feat(skill): build-environment skill + brainpp nesting + delivery plan-gate - #18
Merged
Conversation
…very plan-gate
- New bundled skill 'build-environment': general, stack-agnostic env build/repair
discipline (reuse -> read needs -> single-card confirm -> install the project's
way -> validate), with a references/python-ml-cuda.md drop-in for the
Python/CUDA specifics. Added to main / generalist / coder skill allowlists.
- brainpp-batch-job: nest UseSkill('build-environment') for the env build; add a
Posture bullet naming the blockers (image/env/network/capacity) as the
exception to 'don't stop'; fix the Stage-1 env ownership ambiguity (your
/workspace env -> repair; image's/user's env -> blocker); drop the inline
blocker default; cross-link the skill in the No-usable-environment blocker.
- delivery-orchestration: step 2 gains a single-card plan-gate to align material
unknowns before committing to an expensive run.
- prompt.ts: main-only cap.lean discipline bullet (gated kind=orchestrator +
skill=build-environment) telling main to pin packages/versions when delegating
an env build.
- Regenerated bundled skill index; updated skill manifest + role-prompt snapshot
tests (main/generalist/coder hashes, coder.skills).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a new bundled build-environment skill and wires it into existing orchestration/cluster-job guidance, adding a “single-card” decision gate for expensive or hard-to-undo work, and updating generated skill indexes + snapshot-based tests accordingly.
Changes:
- Add bundled
build-environmentskill (with a Python/CUDA reference guide) and expose it tomain,generalist, andcoder. - Update
brainpp-batch-jobanddelivery-orchestrationskill guidance to delegate environment setup to the new skill and to add a plan/decision gate via a singleAskUserQuestioncard. - Regenerate bundled skill index + update role/skill manifests and prompt snapshot hash tables.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/skill/skill-role-manifest.test.ts | Updates expected role↔skill visibility to include build-environment. |
| src/skill/role-validation.test.ts | Updates coder role skill list expectation to include build-environment. |
| src/skill/bundled/index.generated.ts | Regenerated bundled skills index; adds build-environment and updates skill bodies. |
| src/skill/bundled/delivery-orchestration/SKILL.md | Adds “plan-gate” step requiring bundling unpinned consequential decisions into one card. |
| src/skill/bundled/build-environment/SKILL.md | New environment build/repair discipline skill with references/ support. |
| src/skill/bundled/build-environment/references/python-ml-cuda.md | New Python/CUDA reference guide for correct GPU-aware installs and validation. |
| src/skill/bundled/brainpp-batch-job/SKILL.md | Delegates env repair/build guidance to UseSkill('build-environment') and clarifies blocker posture. |
| src/skill/bundled-skills.test.ts | Updates expected bundled skill name list. |
| src/prompt/prompt-for-role.test.ts | Updates snapshot hashes for changed role prompts. |
| src/prompt.ts | Adds main-only discipline bullet gated on build-environment skill presence. |
| src/agents/role-prompt.snapshot.test.ts | Updates role prompt snapshot hashes. |
| src/agents/bundled/index.ts | Adds build-environment to main/generalist/coder skill allowlists. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+23
to
+26
| ## Validate before anything depends on it | ||
| - Imports: `python -c "import torch, <framework>; print(torch.__version__)"`. | ||
| - GPU-visible: `python -c "import torch; assert torch.cuda.is_available(), 'CUDA not visible'"`. | ||
| - Report `python` version, `torch` **with its build suffix** (`+cu128` vs `+cpu`), CUDA-visible yes/no. |
Comment on lines
19
to
+20
| 1. **Understand and decompose.** Pin down the deliverable and what "done" looks like — the acceptance signal (a passing test, a complete report, a working setup). Break it into subtasks small enough that each lands an independently checkable result; a subtask whose output you cannot verify on its own is too big — split it further. | ||
| 2. **Plan.** Lay the phases out as a `TodoWrite` list so progress stays visible to you and the user across the loop. | ||
| 2. **Plan, and align the unknowns before you commit.** Lay your intended approach out as a `TodoWrite` list so progress stays visible. Then, before sinking real time or cost into it — a long or expensive run, anything hard to undo — check what's actually pinned: the decisions that materially shape the result are often left implicit in the request. Gather the ones that are both **unpinned and consequential**, decide your recommended value for each, and put them to the user **together in a single `AskUserQuestion` card** — your recommendation is what they're signing off on unless they choose otherwise. This isn't "ask about everything": a clear, cheap, well-specified task needs no card; you're catching the ambiguous assumption that would otherwise send half a day of work the wrong way. (Settling a decision here means a downstream skill won't re-ask it.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three coupled prompt changes around environment build/repair, plus the codegen + tests.
1. New bundled skill
build-environmentGeneral, stack-agnostic discipline for building or repairing a project's runtime environment:
AskUserQuestioncard with recommended defaults → install the project's own way → validate with a smoke + platform-visible check.references/python-ml-cuda.mddrop-in holds the executable Python/CUDA specifics (match the accelerator, never a+cpubuild for GPU work,--index-url .../whl/cuXXX,torch.cuda.is_available()). Adding a new stack = drop in another reference file, no body edit.main/generalist/coderskill allowlists.2. brainpp-batch-job — nest the env skill + cleanup
UseSkill('build-environment')(Stage-1 implicit composition); brainpp keeps only the cluster-specifics (reuse order, prep-job-in-image, no-install-in-job-command, the/workspace-venv-over-image-conda trap, ownership→blocker)./workspaceenv → repair it; the image's / a user's env → blocker.3. delivery-orchestration — plan-gate
Step 2 gains a single-card plan-gate: before sinking real time/cost into something expensive or hard to undo, bundle the unpinned-and-consequential decisions into one card with recommended defaults.
4. prompt.ts — main-only dispatch discipline
One
cap.leandiscipline bullet gated{ kind: orchestrator } + { skill: build-environment }(first use of the{skill}gate): when main delegates an env build, pin packages+versions in the dispatch so the worker doesn't bounce back.Tests
pnpm gen:skillsregenerated the bundled index. Updated the skill-name list, the role↔skill visibility manifest,coder.skills, and both role-prompt snapshot hash tables (main/generalist/coder shifted from the new Available-Skills entry + the main-only cap.lean bullet). Full suite: 1967 pass / 0 fail.🤖 Generated with Claude Code