Skip to content

feat(skill): build-environment skill + brainpp nesting + delivery plan-gate - #18

Merged
RowitZou merged 1 commit into
mainfrom
feature/env-skill
Jun 8, 2026
Merged

feat(skill): build-environment skill + brainpp nesting + delivery plan-gate#18
RowitZou merged 1 commit into
mainfrom
feature/env-skill

Conversation

@RowitZou

@RowitZou RowitZou commented Jun 8, 2026

Copy link
Copy Markdown
Owner

What

Three coupled prompt changes around environment build/repair, plus the codegen + tests.

1. New bundled skill build-environment

General, stack-agnostic discipline for building or repairing a project's runtime environment:

  • reuse before building → read what the project actually needs (versions, platform, compute target, system deps) → work the plan out up front (not by trial-and-error) → confirm the whole plan once, in a single AskUserQuestion card with recommended defaults → install the project's own way → validate with a smoke + platform-visible check.
  • references/python-ml-cuda.md drop-in holds the executable Python/CUDA specifics (match the accelerator, never a +cpu build for GPU work, --index-url .../whl/cuXXX, torch.cuda.is_available()). Adding a new stack = drop in another reference file, no body edit.
  • Added to main / generalist / coder skill allowlists.

2. brainpp-batch-job — nest the env skill + cleanup

  • Env build/repair now delegates to 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).
  • Posture gains a bullet naming the blockers (image / env / network / capacity) as the explicit exception to "don't stop".
  • Fixed the Stage-1 Environment ownership ambiguity: your own /workspace env → repair it; the image's / a user's env → blocker.
  • Removed the inline blocker default (defaults live only in When you're genuinely blocked); cross-linked the skill in the No usable environment 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.lean discipline 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:skills regenerated 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.

Needs a daemon rebuild + restart to take effect.

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings June 8, 2026 12:42
@RowitZou
RowitZou merged commit c9691e3 into main Jun 8, 2026
1 check passed
@RowitZou
RowitZou deleted the feature/env-skill branch June 8, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-environment skill (with a Python/CUDA reference guide) and expose it to main, generalist, and coder.
  • Update brainpp-batch-job and delivery-orchestration skill guidance to delegate environment setup to the new skill and to add a plan/decision gate via a single AskUserQuestion card.
  • 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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants