chore: tighten agent prompt contracts (v0.16.17)#119
Merged
Conversation
Strengthen subagent prompts so each contract (output protocol, gates, scope, file boundaries, intermediate state) is unambiguous and model- independent. Removes vague phrases, redundant output instructions, and heading drift that previously left execution open to interpretation. Highlights - Output Protocol: every JSON-returning agent now requires a single raw JSON object (no fence, no surrounding prose) as the final message. - task-executor / task-executor-frontend: Phase Entry Gate is limited to true preconditions; Step 1 / Step 2 / Exit gates take over mid-flow checks. File Scope Constraint and Out-of-Scope Escalation (2-5) added, with allowed list aligned to the actual task-template fields. - security-reviewer: introduces `suspected_risk`, downgrades uncertain findings instead of discarding them, and routes them through Status Determination and the Quality Checklist. - technical-designer / -frontend: explicit Gate 0/1/2/3 ordering with inline annotations, and physical subsection order matching gate order. - subagents-orchestration-guide: Basic Flow split into a Planning flow and a separate task execution cycle; placeholder substitution and context isolation rules made explicit. - Recipes: collapsed CRITICAL/MANDATORY/ALWAYS suffix block into a short positive Subagent Prompt Suffix across all 16 recipes. - skills-index.yaml: refreshed to match the actual sections of each SKILL.md (resolves several pre-existing drifts). - Patch version bumped to 0.16.17 across marketplace and plugins. Plugin subdirectories regenerated via `pnpm sync`; sync:check passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Skills should not depend on specific downstream agents, and agents should not reference other agents by name. Subagents run in isolated contexts and cannot resolve agent identifiers at execution time, so naming a specific peer or downstream agent only adds noise without improving precision. Restored dependency direction: recipe -> agent -> skill (skills know nothing about agents; agents know nothing about each other). Skill -> agent (rewrites) - documentation-criteria SKILL: "acceptance-test-generator skeletons" -> "test skeleton generation output"; "test skeleton file paths from acceptance-test-generator" -> "test skeleton file paths produced for this work plan". - task-template: "determined by task-decomposer" -> "determined during task decomposition"; "task-executor appends" -> agent-neutral phrasing. - ui-spec-template: "based on requirement-analyzer output" -> "based on requirements analysis output". - testing-principles: removed code-verifier reference; the mitigation now only states that Design Docs should include explicit schema references for review-time cross-checking. Agent -> agent (rewrites) - quality-fixer / -frontend: "task-executor" / "task-executor-frontend" -> "upstream implementation step" (in Input Parameters, Step 1 scope, and stub_detected routing). - solver: "verifier output" -> "upstream verification output"; "discovered by verifier" -> "discovered during verification". - verifier: investigator references -> "upstream investigation". - work-planner: "Consider running acceptance-test-generator" -> "Consider running the test skeleton generation step". - technical-designer / -frontend: "codebase-analyzer output" -> "codebase analysis output"; "verifier output" -> "prior-layer verification output"; "design-sync in the subsequent pipeline step" -> "Cross-document checks are handled in a subsequent pipeline step". Plugin subdirectories regenerated via `pnpm sync`; sync:check passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Strengthen subagent prompts so that each contract (output protocol, gates, scope, file boundaries, intermediate state) is unambiguous and model-independent. Removes vague phrases, redundant output instructions, and heading drift that previously left execution open to interpretation.
Highlights
Target Files, task file, work plan,Provides:).suspected_risk, downgrades uncertain findings instead of discarding them, and routes them through Status Determination and the Quality Checklist.direct implementationremoved in favor of routing throughtask-executoreven at Small scale.## Investigation Notessection (added to task-template), so intermediate state is contractually persisted.filesModified(primary) withgit diff HEADas fallback, preventing cross-task false positives.package.json, marketplace, and all three plugin manifests.Notes
dev-workflows/,dev-workflows-frontend/,dev-skills/) are regenerated viapnpm sync.sync:checkpasses.agents/andskills/; plugin subdirectories follow the existing single-source-of-truth pattern.Test plan
pnpm sync:checkpasses (verified locally).task-executor,quality-fixer,code-reviewer) to confirm raw-JSON output and gate behavior.recipe-implementorrecipe-design) executes through to completion without falling back to orchestrator-direct edits.🤖 Generated with Claude Code