Skip to content

refactor: keep boundaries, drop work-generating constraints - #161

Merged
shinpr merged 6 commits into
mainfrom
refactor/escalation-boundary-reduction
Aug 8, 2026
Merged

shinpr merged 6 commits into
mainfrom
refactor/escalation-boundary-reduction

Conversation

@shinpr

@shinpr shinpr commented Aug 8, 2026

Copy link
Copy Markdown
Owner

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-executor and task-executor-frontend carried 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:

  • Quality-standard bypasses move out of the pre-implementation judgment criteria into a positive delivery statement.
  • Step 2 becomes the accepted-source rule for existing-test expectations, the one boundary in that group.
  • Gray-zone examples become boundary classification feeding Step 1; similar-implementation overlap is decided by Step 3 evidence.
  • Implementation Continuable is removed — its permission restated the escalation boundary rule in reverse.
  • dependency_version_uncertain fires only when a concern needs a dependency or pattern the repository does not already use.

Elsewhere: acceptance-test-generator uses the budget-exception authority integration-e2e-testing already 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-reviewer separates a missing input, which the orchestrator can supply, from committed credentials, which need user authority.

Responsibility boundaries

external-resource-context — the hearing protocol needs AskUserQuestion, which no agent has. Eight agents declared the skill and could not run it. The producer side moves to references/hearing.md for 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 new What Each Document Fixes section gives the always-loaded tier each document's purpose, its downstream consumer, and what an unfilled section costs.

Generic skillsai-development-guide, frontend-ai-guide, and implementation-approach instructed 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

  • Work Plan review status: nothing wrote 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.
  • e2eAbsenceReason and budgetUsage: 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.
  • Discovery commands in recipes: they pinned a base branch, filtered for template files the workflow never creates, and described searches the model performs without instruction.

Compatibility

e2eAbsenceReason and budgetUsage are removed from the acceptance-test-generator result. 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 sync
  • claude plugin validate — marketplace manifest and all four plugin manifests pass
  • pnpm check:skills-index — all 13 skills consistent
  • Relative markdown links across skills/ resolve

🤖 Generated with Claude Code

shinpr and others added 3 commits August 8, 2026 16:04
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>
@shinpr shinpr self-assigned this Aug 8, 2026
shinpr and others added 3 commits August 8, 2026 17:57
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>
@shinpr
shinpr merged commit 1375282 into main Aug 8, 2026
1 check passed
@shinpr
shinpr deleted the refactor/escalation-boundary-reduction branch August 8, 2026 09:05
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.

1 participant