|
| 1 | +--- |
| 2 | +id: w21-kp0l |
| 3 | +status: open |
| 4 | +deps: [w21-mzof, w21-tcti] |
| 5 | +links: [] |
| 6 | +created: 2026-03-20T02:38:59Z |
| 7 | +type: task |
| 8 | +priority: 2 |
| 9 | +assignee: Joe Oakhart |
| 10 | +parent: w21-mzof |
| 11 | +--- |
| 12 | +# GREEN: Add contract detection pass to implementation-plan SKILL.md |
| 13 | + |
| 14 | +## Description |
| 15 | +Edit plugins/dso/skills/implementation-plan/SKILL.md. Insert a '### Contract Detection Pass' subsection in Step 3, after the 'Documentation Updates' subsection and before the '---' separator for Step 4. Contents: |
| 16 | + |
| 17 | +1. When to run: After file impact analysis in Step 3, before finalizing the task list |
| 18 | +2. V1 detection heuristic — two patterns: |
| 19 | + (a) Signal emit/parse pairs: file impact includes a component producing structured output (STATUS:, RESULT:, REPORT: markers) AND another parsing it |
| 20 | + (b) Orchestrator/sub-agent report schemas: file impact includes a skill dispatching sub-agents AND defining expected return format |
| 21 | +3. Contract artifact: Create under plugins/dso/docs/contracts/<interface-name>.md with sections: Signal Name, Emitter, Parser, Fields, Example |
| 22 | +4. Cross-story deduplication: Before creating contract task, run tk dep tree <parent-epic-id>, check if existing task title contains 'Contract:' and same interface name. If found, wire as dependent. If not, create. |
| 23 | +5. Contract task as first dependency: blocks all implementation tasks touching either side of the interface |
| 24 | + |
| 25 | +TDD: Task w21-tcti RED tests turn GREEN after this implementation. |
| 26 | + |
| 27 | +## File Impact |
| 28 | +- plugins/dso/skills/implementation-plan/SKILL.md (modify — add Contract Detection Pass section) |
| 29 | + |
| 30 | +## ACCEPTANCE CRITERIA |
| 31 | +- [ ] bash tests/run-all.sh passes (exit 0) |
| 32 | + Verify: bash tests/run-all.sh |
| 33 | +- [ ] SKILL.md contains contract detection heading |
| 34 | + Verify: grep -q '### Contract Detection Pass' plugins/dso/skills/implementation-plan/SKILL.md |
| 35 | +- [ ] Contains emit/parse pattern description |
| 36 | + Verify: grep -q 'emit' plugins/dso/skills/implementation-plan/SKILL.md && grep -q 'parse' plugins/dso/skills/implementation-plan/SKILL.md |
| 37 | +- [ ] Contains orchestrator/sub-agent pattern |
| 38 | + Verify: grep -qE '(orchestrator.*sub-agent|sub-agent.*orchestrator)' plugins/dso/skills/implementation-plan/SKILL.md |
| 39 | +- [ ] Contains deduplication via tk dep tree |
| 40 | + Verify: grep -q 'tk dep tree' plugins/dso/skills/implementation-plan/SKILL.md && grep -qE '(existing contract|Contract:)' plugins/dso/skills/implementation-plan/SKILL.md |
| 41 | +- [ ] Contains artifact path |
| 42 | + Verify: grep -q 'plugins/dso/docs/contracts/' plugins/dso/skills/implementation-plan/SKILL.md |
| 43 | +- [ ] All 5 RED tests pass (GREEN) |
| 44 | + Verify: bash tests/scripts/test-implementation-plan-contracts.sh 2>&1 | grep -q 'RESULT: PASS' |
| 45 | +- [ ] All 5 individually pass |
| 46 | + Verify: test $(bash tests/scripts/test-implementation-plan-contracts.sh 2>&1 | grep -c 'PASS:') -ge 5 |
| 47 | + |
0 commit comments