一键导入
implement-plan
Implement a plan with a coordinated agent team
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement a plan with a coordinated agent team
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | implement-plan |
| description | Implement a plan with a coordinated agent team |
| argument-hint | <path/to/plan.md> [--exclude "section1,section2"] |
Implement a verified plan using a coordinated team of compiler agents. Reads the plan, decomposes it into ordered tasks, spawns appropriate agents, and implements with incremental commits and test-driven development.
Parse $ARGUMENTS for:
.md)If $ARGUMENTS is empty, find the most recently modified .md file in ~/.claude/plans/:
ls -t ~/.claude/plans/*.md | head -1
Before spawning any agents, perform these checks yourself:
<!-- Verified by /verify-plan at the top/verify-plan first." Ask whether to proceed or stop.git status — if there are uncommitted changes, warn the user and ask whether to proceed or stash firstgit diff mainline...HEAD --stat to see what's already been changed on this branchdotnet build sharpy.sln — if it fails, stop and report the build errordotnet test — record the baseline (pass/fail/skip counts). If tests fail, warn the user and ask whether to proceedCreate a team using TeamCreate with name implement-plan.
Determine which agents to spawn based on what the plan touches. Read the plan and check for references to these areas:
| Role | Agent Type | Spawn When Plan References |
|---|---|---|
| Parser work | parser-expert | Lexer/, Parser/, Ast/, TokenType, AST nodes, parsing |
| Semantic work | semantic-expert | Semantic/, TypeChecker, NameResolver, TypeResolver, SymbolTable, SemanticInfo, type checking |
| Codegen work | codegen-expert | CodeGen/, RoslynEmitter, SyntaxFactory, TypeMapper, NameMangler, code generation, emit |
| Core library | core-library-expert | Sharpy.Core/, stdlib, builtins, runtime library, Partial.* |
| Tests | test-expert | Always spawned — every plan needs tests |
| Final verification | verification-expert | Always spawned — final pass after implementation |
Break the plan into commit-sized tasks using TaskCreate. Follow these rules:
addBlockedBy to enforce ordering — Parser tasks block on Lexer tasks, Semantic blocks on Parser, etc.--exclude flagverification-expert) and a "Run dotnet format whitespace" task, both blocked by all implementation tasksAssign tasks to agents via TaskUpdate with the owner field. Monitor progress via TaskList.
Each agent receives these instructions along with their specific task:
You are implementing part of a plan. Your task is described below along with the relevant plan section.
CRITICAL RULES:
- Never modify .expected files to make tests pass — fix the implementation
- RoslynEmitter uses SyntaxFactory exclusively — no string templating
- Immutable AST — annotations go in SemanticInfo, not AST nodes
- Axiom precedence: .NET > Type Safety > Python Syntax
- C# 9.0 for Sharpy.Core and generated code only
- Verify Python behavior with `python3 -c "..."` before implementing Python semantics
- Language spec is authoritative — check docs/language_specification/ before implementing
- TODO/BUG/FIXME comments must reference GitHub issues
CRITICAL — SERIALIZED DOTNET EXECUTION:
NEVER run `dotnet build` or `dotnet test` directly. Always use `.claude/scripts/dotnet-serialized` instead.
This wrapper acquires an exclusive lock so only one dotnet process runs at a time.
Multiple concurrent dotnet test runs will consume 5-10 GB RAM EACH and crash the system.
The wrapper is a drop-in replacement — same args, same output, same exit code.
You MUST use `dangerouslyDisableSandbox: true` for all dotnet commands.
TEST OUTPUT LOGS:
The serialized wrapper tees all output to `.claude/tmp/dotnet-serialized-{0,1,2}.log` (rotating deque of 3).
`.claude/tmp/dotnet-serialized-latest.log` symlinks to the most recent run.
Before re-running the full test suite (~8 min), check if a recent log already has the output you need:
grep -i "FAIL\|error" .claude/tmp/dotnet-serialized-latest.log
WORKFLOW:
1. Read the plan section for your task
2. Read existing code patterns in the area you're modifying
3. Write tests first or alongside implementation (not after)
4. Implement the changes
5. Run component-specific tests: `.claude/scripts/dotnet-serialized test --filter "FullyQualifiedName~[Component]" --no-build`
6. Run the full test suite: `.claude/scripts/dotnet-serialized test --filter "Category!=Benchmark" --no-build`
7. Run `dotnet format whitespace`
8. Stage ONLY the specific files you changed (never `git add -A` or `git add .`)
9. Commit with a descriptive message referencing the plan section
10. Mark your task as completed via TaskUpdate
During implementation, if agents discover:
gh issue create --title "..." --body "..." (check for duplicates first with gh issue list --search "...")// BUG(#NNN): ... comment// TODO(#NNN): ... commentAfter each task is completed by an agent:
feat: Add FormatStringExpression AST node (plan step 2)Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> in the commitAfter all implementation tasks are complete, the verification-expert runs:
.claude/scripts/dotnet-serialized build sharpy.sln — must succeed.claude/scripts/dotnet-serialized test --filter "Category!=Benchmark" --no-build — compare against baseline (no new failures).claude/scripts/dotnet-serialized test --filter "FullyQualifiedName~FileBasedIntegrationTests" --no-buildemit csharp on representative .spy files: pick 3-5 from test fixturesdotnet format whitespace — verify no changes needed (clean working tree)git diff --stat — summarize all changes madeAfter final verification:
SendMessage with type: "shutdown_request"TeamDelete## Implementation Summary
**Plan:** [plan file path]
**Branch:** [current branch]
**Commits:** [count]
### What Was Done
- (list each completed task with commit hash)
### What Was Deferred
- (list any items deferred with GitHub issue numbers)
### Test Results
- **Baseline:** X passed, Y failed, Z skipped
- **Final:** X passed, Y failed, Z skipped
- **New tests added:** N
### Files Changed
(output of `git diff mainline...HEAD --stat`)
Suggest and apply a semver version bump based on commits since the last tag
Push current branch to remote origin
Scaffold a new Sharpy.Stdlib module (spy-sourced or handwritten C#) with all required files, conventions, docs, and tests
Run compiler or cross-language benchmarks and compare results
Regenerate C# snapshot tests and spy stdlib after intentional codegen changes
Stress-test property tests across many rounds to find rare bugs. Each round uses fresh random seeds.