refactor: keep boundaries, drop work-generating constraints - #161
Merged
Merged
Conversation
Escalation conditions in task-executor and task-executor-frontend had grown to roughly twenty statements spread across five sections, several of which covered repository-local reversible choices that downstream quality assurance already re-checks. The trailing ENFORCEMENT rule already limited escalation to a changed product outcome, a major approved design change, user-held authority, or an irreversible action; the checks above it no longer matched that rule. Keep the seven checks that map to those four categories (Step1 contract, layer, dependency direction, and new library; Step2 accepted test expectation; Step4 core mechanism) and resolve the rest from repository evidence: - Move quality-standard bypasses out of Mandatory Judgment Criteria into a positive delivery statement under Applying to Implementation - Reframe Step2 around the accepted-source rule for existing-test expectations - Drop the Step1 item duplicating the accepted-contract check - Convert Gray Zone examples into boundary classification feeding Step1, and leave similar-implementation overlap to Step3 evidence - Remove the Implementation Continuable section, whose permission restated the escalation boundary rule in reverse - Fire dependency_version_uncertain only when the concern requires a dependency or pattern the repository does not already use - Remove the frontend prop-drilling item, which duplicates frontend-ai-guide - Widen the frontend Step1 contract check to Design Doc / UI Spec type contracts beyond Props - Point the dependency escalation references at the existing 2-2 schema instead of a nonexistent 2-3 Escalation judgment now lives only in the Escalation boundary for unresolved judgment rule. Step numbering and the response schemas are unchanged, so existing cross-references still resolve. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An audit of the workflow against evidence-driven boundaries found rules that create obligations without protecting a decision, artifacts that no consumer reads, and generic skills coupled to a specific document template. Each change below removes the obligation and keeps the boundary it was standing in for. Responsibility boundaries: - Split external-resource-context into a consumer-side reference protocol and a producer-side hearing protocol in references/hearing.md. The eight agents that declared the skill cannot run the hearing, which needs AskUserQuestion, so they now execute the three-step lookup inline instead of loading it. - Reduce documentation-criteria to routing: which documents a change requires and where they live. Per-document content requirements duplicated the six templates, which every authoring agent already reads, so they move there. - Add "What Each Document Fixes" so the always-loaded tier states each document's purpose, its downstream consumer, and what an unfilled section costs, instead of naming documents the reader cannot interpret. - Replace Design Doc section names in ai-development-guide, frontend-ai-guide, and implementation-approach with "the artifact this agent owns". Those skills load into agents that hold governing documents read-only. - Cite skill references by path, matching the existing convention, so the content that moved into templates stays reachable in one hop. Unread artifacts: - Drop the Work Plan review status field. Nothing wrote `approved` and nothing read it; approval is the orchestrator's [Stop] gate. - Drop Design Summary (Meta), the Agreement Checklist scope and constraint subsections, and Work Plan progress notes. Requirement Convergence already carries scope and non-goals. Standards, assumed behaviors, and quality assurance mechanisms stay: they are design evidence, not ceremony. - Drop e2eAbsenceReason and budgetUsage from acceptance-test-generator. The first made the generator justify every correctly empty lane in prose that the orchestrator then graded; the orchestrator now confirms an empty lane against the Design Doc directly. The second had no consumer. - Remove discovery commands from recipes. They pinned a base branch, filtered for template files the workflow never creates, and described searches the model performs without instruction. Escalation surface: - Let acceptance-test-generator use the budget-exception authority that integration-e2e-testing already grants it, and report filtered candidates instead of asking whether to proceed. - Reduce document updates to one approval at the end. - Stop for cross-layer sync results only when conflicts remain. - Separate security-reviewer's missing-input case, which the orchestrator can resolve, from committed credentials, which need user authority. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The audit removed the skill from every agent that declared it, on the grounds that its hearing protocol needs AskUserQuestion and no agent has it. Moving the hearing into references/hearing.md already resolved that; the removal applied a reason the split had dissolved. Subagents do not read skills on their own initiative, so an agent without the declaration has no premise that the record exists and investigates the repository or works around a resource it could have reached. Declare it on the eight agents that read or write the record: task-executor and task-executor-frontend, quality-fixer and quality-fixer-frontend, ui-analyzer, and the three agents that author the feature-tier "External Resources Used" section, where the single-source-of-truth rule decides whether a row carries a label or a duplicated URL. Set the responsibility boundary the earlier removal lacked: - The skill owns the shared contract — storage tiers, the single-source-of-truth rule, fixed headings, lookup order, and continuing rather than stopping when a record is absent. - Each agent owns what it does with the content and which field carries the result. The Reference Protocol no longer prescribes a reporting channel, so ui-analyzer's externalResources.status, quality-fixer's verification_incomplete, and task-executor's recorded limitation coexist. Also state each remaining constraint in positive form: - Emit a below-floor test candidate only when an accepted requirement or a distinct uncovered failure mode justifies the exception. - Every AC states observable behavior, which is what an implementation-detail AC fails. - Split the merged storage checklist back into two independently checkable items. - Say where plan approval is tracked instead of where it is not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Scope belongs to an actor. Recipes declare one because they orchestrate and finish at a stated condition; a knowledge skill is material an agent reads and has nothing to bound. external-resource-context was the only knowledge skill in the repository carrying the section — the other 27 do not. Its content earned no execution decision either. The in-scope list restated the headings that follow it, and the out-of-scope clauses covered situations the protocol already handles: a dead access method fails the fetch and falls to the existing continue rule, and no consumer would author the external resource itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Re-adding external-resource-context appended it after requirement-convergence instead of returning it to its original position, leaving a move in the diff for a declaration that never changed. Co-Authored-By: Claude Opus 5 (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
Reviews the workflow against the distinction between constraints that protect a boundary and constraints that only create work, and removes the second kind. Three passes: escalation conditions, responsibility boundaries between templates / skills / agents, and artifacts that no consumer reads.
The net effect is that agents stop for fewer things, carry less text, and record evidence in one place instead of several.
Escalation
task-executorandtask-executor-frontendcarried roughly twenty escalation statements across five sections, while the ENFORCEMENT rule at the end already limited escalation to a changed product outcome, a major approved design change, user-held authority, or an irreversible action. The checks above it no longer matched that rule.Seven checks that map to those four categories remain. The rest now resolve from repository evidence and record the choice:
Implementation Continuableis removed — its permission restated the escalation boundary rule in reverse.dependency_version_uncertainfires only when a concern needs a dependency or pattern the repository does not already use.Elsewhere:
acceptance-test-generatoruses the budget-exception authorityintegration-e2e-testingalready grants it instead of asking; document updates stop once at the end rather than three times; cross-layer sync stops only when conflicts remain;security-reviewerseparates a missing input, which the orchestrator can supply, from committed credentials, which need user authority.Responsibility boundaries
external-resource-context— the hearing protocol needsAskUserQuestion, which no agent has. Eight agents declared the skill and could not run it. The producer side moves toreferences/hearing.mdfor the session that can ask; consumers execute the three-step lookup inline.documentation-criteria— the skill now answers routing only: which documents a change requires and where they live. Per-document content requirements duplicated the six templates, which every authoring agent already reads by explicit instruction, so they move there. A newWhat Each Document Fixessection gives the always-loaded tier each document's purpose, its downstream consumer, and what an unfilled section costs.Generic skills —
ai-development-guide,frontend-ai-guide, andimplementation-approachinstructed writing into named Design Doc sections. They load into agents that hold governing documents read-only, so those instructions now name the artifact the agent owns.Skill references are cited by path throughout, matching the existing convention, so content that moved into templates stays one hop away.
Unread artifacts
approved, nothing read it. Approval is the orchestrator's[Stop]gate.Design Summary (Meta), the Agreement Checklist scope and constraint subsections, Work Plan progress notes: no consumer, and Requirement Convergence already carries scope and non-goals. Standards, assumed behaviors, and quality-assurance mechanisms stay — they are design evidence.e2eAbsenceReasonandbudgetUsage: the first made the generator justify every correctly empty lane in prose the orchestrator then graded; the orchestrator now confirms an empty lane against the Design Doc directly. The second had no consumer at all.Compatibility
e2eAbsenceReasonandbudgetUsageare removed from theacceptance-test-generatorresult. The only in-repo consumer is updated in the same change. Released as a patch on that basis; anything reading that JSON externally would see a contract change.Verification
pnpm sync:check— all plugin subdirectories in syncclaude plugin validate— marketplace manifest and all four plugin manifests passpnpm check:skills-index— all 13 skills consistentskills/resolve🤖 Generated with Claude Code