Single-source duplicated carrier/handoff contracts across skills (drift risk) #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Interface contracts between a
SKILL.mdand its agent file(s) arewritten out field-by-field in both places — the carrier (what the
orchestrator hands the agent), the handoff/output contract (fields the
agent returns), dispatch parameter tables. Because the two files load
into separate, non-overlapping contexts (
SKILL.md→ orchestratorcontext;
agents/*.md→ the subagent's system prompt) and there is notransclusion, the two copies drift apart.
This was just found and fixed in the
debugskill (commits6410732..de42974): the agent file became the single source for eachfield's semantics, and
SKILL.mdwas reduced to naming the fields plusa pointer. An audit of the remaining skills shows the same pattern is
widespread.
DRIFT= the two copies already diverge in wording (sometimes theagent carries load-bearing semantics
SKILL.mdomits).LATENT= still consistent, but duplicated and drift-prone.Findings
auditbrainstormspec_path/iteration_scope→ grounding-checkdocwriterpriority_items) + output (status/files_touched/warnings_cleared/findings)fieldtestcycle_id/cycle_scope/axis_hints/commit_rangeimplementiter_id) +task_text_path(impl↔spec-reviewer) + sub-status vocabplannerspec_path/iteration_scope/focus_hint→ plan-reconDetail (file:line)
brainstorm —
SKILL.md:277-281(Step 7.5 Dispatch carrier) ↔agents/grounding-check.md:57-60. DRIFT:spec_path— SKILL says "path to the spec just written in Step 6", agent says "absolute path…". The agent's absolute requirement is absent fromSKILL.md, so an orchestrator following only the skill could hand a relative path.docwriter —
SKILL.md:62-69↔agents/docwriter.md:60-65. DRIFT onpriority_items(agent adds "e.g. recently added public APIs").SKILL.md:70-80↔agents/docwriter.md:150-161(+ status protocol136-148). DRIFT: same four return fields defined twice;statusenum inline in SKILL,findingswording diverges.fieldtest —
SKILL.md:104-112(consumes table) ↔agents/fieldtester.md:58-65. LATENT: four fields duplicated;axis_hintsdiffers cosmetically. Agent already owns the empty-axis_hintsfallback (67-69).implement —
SKILL.md:96-114(dispatch code-blocks) ↔agents/implement-orchestrator.md:54-62(Carrier contract). DRIFT oniter_id(agent encodes scratch-dir/stats-filename/not-a-branch semantics the SKILL omits).task_text_pathinagents/implementer.md:54↔agents/spec-reviewer.md:64. LATENT.SKILL.md:71-87↔agents/implement-orchestrator.md:160-216(Phase 2 prose re-states each sub-status + the ≤2-retry rule). LATENT.planner —
SKILL.md:75-82(Dispatch carrier) ↔agents/plan-recon.md:53-58. DRIFT on all three fields; agent carries(mandatory)/optional markers and the BLOCKED-on-missing rule (60-61) thatSKILL.mdomits.Recommended fix (per skill, mirroring the
debugfix)(the subagent must carry the contract inline regardless — it runs in
a fresh context and cannot follow a pointer at runtime).
SKILL.mdinto the agent file so nothing is lost.
SKILL.mdcopy to field names + a pointer to theagent's contract section; mark the agent's table authoritative.
implementFinding 2), pick theproducer/owner agent as source and have the other cross-reference.
auditis the reference: itsSKILL.mdalready points to the agents'contracts instead of restating them.
Acceptance
Every interface field's semantics defined in exactly one file; the other
file names the fields and points. No field description appears twice.