一键导入
verify-implementation
Verify completed plan implementation, fix gaps/bugs/regressions, and commit fixes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verify completed plan implementation, fix gaps/bugs/regressions, and commit fixes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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
Implement a plan with a coordinated agent team
Run compiler or cross-language benchmarks and compare results
Regenerate C# snapshot tests and spy stdlib after intentional codegen changes
| name | verify-implementation |
| description | Verify completed plan implementation, fix gaps/bugs/regressions, and commit fixes |
| argument-hint | <path/to/plan.md> |
Verify that a plan has been fully and correctly implemented. Reads the plan, checks every step against the actual codebase, runs the full test suite, spawns a team of agents to audit different dimensions, fixes any gaps/bugs/regressions found, and commits all fixes.
If $ARGUMENTS is non-empty, use it as the path to the plan file.
If $ARGUMENTS is empty, find the most recently modified .md file in ~/.claude/plans/:
ls -t ~/.claude/plans/*.md 2>/dev/null | head -1
If no plan file is found (directory doesn't exist or contains no .md files), ask the user to provide the plan path explicitly.
Read the plan file completely before proceeding.
Before spawning any agents, perform these checks yourself:
/verify-plan stamp — search for <!-- Verified by /verify-plan near the top of the file
/implement-plan evidence — look for implementation commits by checking git log --oneline for commit messages referencing the plandotnet build sharpy.sln — must succeed. If it fails, stop and report the build error (the implementation is broken)dotnet test — record pass/fail/skip counts as the current baselinedotnet format whitespace --verify-no-changes — record whether formatting is cleanExtract from the plan:
Build a completeness checklist — a structured list of every deliverable the plan describes.
Create a team using TeamCreate with name verify-implementation.
Spawn the following agents in parallel using the Task tool with team_name: "verify-implementation":
code-reviewer)You are auditing whether a plan was fully implemented. You have been given a completeness checklist extracted from a plan file.
For EVERY item in the checklist:
1. Use Glob to verify referenced files exist
2. Use Grep to verify referenced functions, classes, methods, types, and diagnostic codes exist
3. Use Read to verify the implementation matches what the plan describes (not just that a file exists, but that the content is correct)
4. For test fixtures (.spy + .expected/.error/.warning), verify both files exist and the .expected content is plausible
Report each item as:
- DONE — fully implemented as described
- PARTIAL — partially implemented (describe what's missing)
- MISSING — not implemented at all
- DIVERGED — implemented differently than planned (describe the divergence)
Output a structured checklist with status for every item.
Provide this agent with the full completeness checklist you extracted.
verification-expert)You are checking for regressions introduced by recent implementation work. Focus on:
1. Run the full test suite: `dotnet test`
- Report any failing tests
- Compare against the baseline counts provided
2. Run file-based integration tests specifically:
`dotnet test --filter "FullyQualifiedName~FileBasedIntegrationTests"`
- Report any failures with details
3. Check for .skip files that may have been added to hide failures:
- Search for .skip files in src/Sharpy.Compiler.Tests/Integration/TestFixtures/
- Flag any .skip files that appear to be recently created (check git status)
4. Run representative test fixtures through the compiler:
- Pick 5 .spy files from src/Sharpy.Compiler.Tests/Integration/TestFixtures/
- Run each with: `dotnet run --project src/Sharpy.Cli -- run <file>`
- Report any runtime errors
5. Check for .expected files that were modified (a plan violation):
- Run `git diff mainline...HEAD -- "*.expected"` to find modified .expected files
- Flag any modifications as potential test expectation tampering
Output a regression report with PASS/FAIL for each check.
Provide this agent with the baseline test counts.
code-reviewer)You are reviewing the architectural quality of recently implemented changes. Focus on code that was added or modified as part of the plan implementation.
Check the git diff to identify changed files:
`git diff mainline...HEAD --name-only`
For each changed file, review for:
1. **Sharpy Convention Compliance**
- Feature implementation order respected (Lexer -> Parser -> Semantic -> Validation -> CodeGen -> Tests)
- Immutable AST rule: no mutable state added to AST node records; annotations in SemanticInfo
- SyntaxFactory-only rule: CodeGen changes use Roslyn SyntaxFactory, never string templating
- Axiom precedence: .NET > Type Safety > Python Syntax
- C# 9.0 constraint: Sharpy.Core and generated code must be C# 9.0 compatible
- Language spec consistency: check docs/language_specification/ for contradictions
2. **Code Quality**
- No dead code, commented-out code, or debug leftovers (console.writeline, print debugging)
- No TODO/FIXME/BUG comments without GitHub issue references
- No magic numbers or strings that should be constants
- No copy-paste duplication that should be abstracted
- Error handling covers edge cases (null, empty, UnknownType)
3. **Maintainability & Scalability**
- New code follows existing patterns in its file/module
- No tight coupling introduced between pipeline phases
- Validators registered at correct Order values (no conflicts)
- Symbol lifecycle respected (progressive population across passes)
- Materialization at correct phase boundaries
- CompilerServices integration follows the adapter pattern
4. **Design Anti-Patterns**
- "Add X because Python has it" — feature creep
- Runtime type checking where compile-time would work
- Wrapper types instead of extension methods
- Multiple ways to do the same thing
- Magic behavior that's unpredictable
Output findings as: CRITICAL (must fix before merge), WARNING (should fix), SUGGESTION (nice to have).
verification-expert)You are auditing test coverage for recently implemented changes. Focus on code added or modified as part of the plan.
1. Identify changed source files:
`git diff mainline...HEAD --name-only -- "src/Sharpy.Compiler/" "src/Sharpy.Core/"`
2. For each changed source file, check if corresponding tests exist:
- Parser changes -> Parser tests in Sharpy.Compiler.Tests/Parser/
- Semantic changes -> Semantic tests in Sharpy.Compiler.Tests/Semantic/
- CodeGen changes -> CodeGen tests in Sharpy.Compiler.Tests/CodeGen/
- Core changes -> Sharpy.Core.Tests/
- New language features -> file-based integration tests (.spy + .expected)
3. Check test quality:
- Positive tests (happy path) exist
- Negative tests (.spy + .error) exist for error cases
- Edge cases covered (empty collections, None/null, boundary values, single elements)
- Warning tests (.warning) exist if new warnings were added
4. Check for untested code paths:
- New switch/match arms without corresponding tests
- New exception types or error paths without negative tests
- New diagnostic codes without test coverage
5. Verify Python behavior alignment:
- For any new Python semantics, run `python3 -c "..."` to verify behavior matches
- Flag any semantic divergences
Output a coverage report with: COVERED, PARTIALLY COVERED (missing cases listed), NOT COVERED.
Wait for all four agents to complete and return their reports. Do not begin remediation until every agent has reported back. Compile a unified list of issues from all reports, categorized as:
Address every issue from the unified list:
| Category | Action |
|---|---|
| MISSING implementation | Implement it yourself or delegate to an appropriate agent |
| PARTIAL implementation | Complete it yourself or delegate |
| Regression (test failure) | Fix the root cause — never modify .expected files |
| Architectural violation | Fix the code to follow conventions |
| Missing tests | Write the missing tests |
| TODO without issue | Create the GitHub issue with gh issue create and update the comment |
| Formatting | Run dotnet format whitespace |
| Dead code / debug leftovers | Remove them |
git add -A or git add .fix: Complete missing implementation for [plan step X]fix: Resolve regression in [component]fix: Add missing test coverage for [feature]chore: Fix architectural violations from plan implementationCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>dotnet build sharpy.sln && dotnet test && dotnet format whitespace --verify-no-changesFor fixes in specialized areas, delegate to domain agents via the Task tool with team_name: "verify-implementation":
| Area | Agent Type |
|---|---|
| Parser/Lexer/AST fixes | parser-expert |
| Semantic/TypeChecker fixes | semantic-expert |
| CodeGen/RoslynEmitter fixes | codegen-expert |
| Sharpy.Core/stdlib fixes | core-library-expert |
| Test writing | test-expert |
| General implementation | implementer |
Provide each agent with:
After all fixes are committed:
dotnet build sharpy.sln — must succeeddotnet test — no failures (compare against original baseline — pass count should be equal or higher)dotnet test --filter "FullyQualifiedName~FileBasedIntegrationTests" — all passdotnet format whitespace --verify-no-changes — clean.spy snippets through dotnet run --project src/Sharpy.Cli -- run <file> — no crashesgit diff mainline...HEAD --stat — summarize all changesIf any final verification step fails, loop back to remediation. Maximum 3 remediation loops — if issues persist after 3 attempts, report them as unresolved.
After final verification passes:
SendMessage with type: "shutdown_request"TeamDelete## Implementation Verification Report
**Plan:** [plan file path]
**Branch:** [current branch]
**Verified on:** YYYY-MM-DD
### Completeness
| Status | Count |
|--------|-------|
| Fully implemented | N |
| Was partial (now fixed) | N |
| Was missing (now fixed) | N |
| Diverged from plan (acceptable) | N |
| Unresolved | N |
### Regressions
- **Baseline:** X passed, Y failed, Z skipped
- **Post-implementation:** X passed, Y failed, Z skipped
- **Post-remediation:** X passed, Y failed, Z skipped
- **Regressions found:** N (N fixed)
### Architectural Review
- **Critical issues found:** N (N fixed)
- **Warnings found:** N (N fixed)
- **Suggestions:** N
### Test Coverage
- **New tests added (by plan):** N
- **Missing tests added (by remediation):** N
- **Coverage gaps remaining:** N
### Fixes Applied
| Commit | Description | Category |
|--------|-------------|----------|
| abc1234 | ... | missing-impl / regression / arch-violation / missing-test / cleanup |
### Issues Created
| Issue | Title | Reason |
|-------|-------|--------|
| #NNN | ... | TODO without issue / deferred work / discovered tech debt |
### Unresolved Items
(List any items that could not be fixed, with explanation)
### Files Changed (total, including plan implementation + fixes)
(output of `git diff mainline...HEAD --stat`)