refactor: single-source carrier/handoff contracts across skills
Apply the debug-skill pattern (commits 6410732..de42974) to the remaining skills: the agent file is the single source for each interface field's semantics; the SKILL.md copy is reduced to field names plus a pointer, marking the agent's contract table authoritative. Because SKILL.md loads into orchestrator context and agents/*.md into the subagent's fresh system prompt with no transclusion, duplicated field tables drift apart over time. - brainstorm: carrier (spec_path/iteration_scope) -> grounding-check; the absolute-path requirement now lives only in the agent. - planner: carrier (spec_path/iteration_scope/focus_hint) -> plan-recon, including the mandatory/optional markers and the BLOCKED-on-missing rule SKILL.md had omitted. - fieldtest: carrier + produced fields -> fieldtester; the skill-level `status` roll-up (clean/friction_found/bugs_found/infra_blocked), which is not part of the agent's run-status protocol, stays defined in SKILL.md only. - docwriter: carrier + produced fields -> docwriter agent. - implement: carrier (iter_id scratch-dir/stats/not-a-branch semantics) -> implement-orchestrator; per-task sub-status vocabulary moved into the orchestrator-agent (it runs the loop in a fresh context and could not read SKILL.md at runtime, yet referenced "the sub-status table" by name); task_text_path single-sourced in implementer with spec-reviewer cross-referencing. audit was already the reference implementation (pointers, no restated contracts) and is unchanged. closes #2 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,10 @@ Additionally, every dispatch:
|
||||
|
||||
## Carrier contract
|
||||
|
||||
You receive from the outer orchestrator:
|
||||
You receive from the outer orchestrator the following fields. This
|
||||
table is the authoritative definition of each field's semantics;
|
||||
the dispatching skill shows the call shape but references this table
|
||||
rather than restating the semantics.
|
||||
|
||||
| Field | Content |
|
||||
|-------|---------|
|
||||
@@ -147,6 +150,34 @@ them as you switch roles:
|
||||
- Spec-compliance check reference: `spec-reviewer.md`
|
||||
- Quality check reference: `quality-reviewer.md`
|
||||
|
||||
##### Per-task sub-status vocabulary (authoritative)
|
||||
|
||||
The phases below produce these sub-status values. They are
|
||||
*internal* to you — they describe the state of an inline
|
||||
role-phase, not the status of a separate subagent, and are not
|
||||
reported upstream. This table is the authoritative definition of
|
||||
the vocabulary and the re-loop rule; the per-phase prose that
|
||||
follows applies it, and the dispatching skill names it but
|
||||
references this table. The vocabulary maps 1:1 to the phase
|
||||
reference files listed above.
|
||||
|
||||
| Sub-status | Action |
|
||||
|------------|--------|
|
||||
| `DONE` | next phase / next task |
|
||||
| `DONE_WITH_CONCERNS` | accumulate concern, next phase |
|
||||
| `NEEDS_CONTEXT` (1st–2nd) | re-attempt the phase with expanded context |
|
||||
| `NEEDS_CONTEXT` (3rd) | stop → `BLOCKED` to orchestrator, reason `context-exhausted` |
|
||||
| `non_compliant` / `changes_requested` (1st–2nd) | switch back to implementer mindset, repair with the check's report as repair brief, then re-run the check phase |
|
||||
| `non_compliant` / `changes_requested` (3rd) | stop → `BLOCKED` to orchestrator, reason `review-loop-exhausted` |
|
||||
| `BLOCKED` (implementer phase) | stop → `BLOCKED` to orchestrator, reason verbatim |
|
||||
| `unclear` (spec-compliance phase) | stop → `BLOCKED` to orchestrator, reason `spec-ambiguous` |
|
||||
| Tool / infra error | stop → `BLOCKED` to orchestrator, reason `infra` + raw error |
|
||||
|
||||
Re-loop limit: 2 retries per failure-mode per task. The 3rd is
|
||||
`BLOCKED` to the orchestrator. `skip task K, continue` is
|
||||
intentionally NOT a mode — tasks have implicit ordering
|
||||
dependencies and you do not know the dependency graph.
|
||||
|
||||
#### 2.1 — Implementer phase (inline)
|
||||
|
||||
Read `/tmp/iter-<iter_id>/task-K.md`. Adopt the implementer
|
||||
|
||||
Reference in New Issue
Block a user