|
| 1 | +# Definition of Done: The Card Contract |
| 2 | + |
| 3 | +Every agent-forge delegation card MUST carry a DONE section before |
| 4 | +dispatch. A card without one does not ship. This file is the schema and |
| 5 | +the law; qc and reviewers reject cards that dodge it. |
| 6 | + |
| 7 | +Why: agents chase passing conditions (the "agent school" problem). If |
| 8 | +the finish line is not defined in machine-checkable terms before launch, |
| 9 | +the work produces process, not value [qYe1GsMRElw; wiki/definition-of-done]. |
| 10 | + |
| 11 | +## The DONE schema |
| 12 | + |
| 13 | +Every card's DONE section contains, in this order: |
| 14 | + |
| 15 | +1. **Machine-checkable acceptance criteria.** Each criterion must be |
| 16 | + verifiable by a command, a file assertion, or a count. "Looks good" |
| 17 | + is not a criterion. Format: `DONE IF <checkable statement>`. |
| 18 | + - File existence and counts: "DONE IF renders/manifest.json lists |
| 19 | + 5 entries with qc_status passed" |
| 20 | + - Measurable qualities: "DONE IF python3 -m py_compile tools/*.py |
| 21 | + exits 0" or "DONE IF the HTML contains zero em-dash characters" |
| 22 | + - Behavioral: "DONE IF ffprobe reports 30-70s and 1080x1920" |
| 23 | + Minimum 3, maximum 7 criteria. More than 7 means the card is two |
| 24 | + cards. |
| 25 | + |
| 26 | +2. **The second-best-engineer test.** State who could maintain the |
| 27 | + output: "DONE IF a competent non-author reviewer can open any file |
| 28 | + produced and explain its purpose in under 20 minutes." For code: |
| 29 | + note file sizes, function limits, reuse boundaries. Complexity |
| 30 | + budgets belong here (e.g. no file over 400 lines, no function over |
| 31 | + 50 [wiki/definition-of-done]). |
| 32 | + |
| 33 | +3. **The unplug test.** What breaks when this ships and the author |
| 34 | + disappears: "DONE IF the deliverable runs from a clean checkout |
| 35 | + with only the README's install steps." If it needs the author's |
| 36 | + machine, it is not done. |
| 37 | + |
| 38 | +4. **Business measure linkage.** One line tying the deliverable to a |
| 39 | + cash-register metric or a portfolio goal. If no link exists, the |
| 40 | + card says so explicitly ("infrastructure; no direct metric") rather |
| 41 | + than inventing one. |
| 42 | + |
| 43 | +## Verification rules |
| 44 | + |
| 45 | +- The DONE section is written BEFORE dispatch, by the dispatcher. |
| 46 | +- The executor may not weaken, reinterpret, or re-scope criteria; if a |
| 47 | + criterion proves wrong, the executor stops and reports rather than |
| 48 | + quietly shipping around it. |
| 49 | +- Completion claims must quote command output for every machine- |
| 50 | + checkable criterion. "All tests pass" without the output is a |
| 51 | + failed card. |
| 52 | +- The reviewer (human or council) re-runs at least one criterion. |
| 53 | + |
| 54 | +## Anti-gaming |
| 55 | + |
| 56 | +Every metric gets gamed eventually [qYe1GsMRElw 7:05]. Countermeasures: |
| 57 | + |
| 58 | +- Prefer counts that are expensive to fake (real file contents, real |
| 59 | + command output) over counts that are cheap to fake (line counts, |
| 60 | + TODO markers added/removed). |
| 61 | +- Tests must protect behavior, not bless the answer: if the executor |
| 62 | + wrote the test, the reviewer spot-checks it against the spec. |
| 63 | +- The judge is never the worker: card completion is verified by the |
| 64 | + parent or a second pass, never solely by the executor's self-report. |
| 65 | + |
| 66 | +## Card template snippet |
| 67 | + |
| 68 | + ## DONE |
| 69 | + - DONE IF <criterion 1 (command/file/count)> |
| 70 | + - DONE IF <criterion 2> |
| 71 | + - DONE IF <criterion 3> |
| 72 | + - Maintainable by: <who, and what they need to understand it> |
| 73 | + - Unplug test: <clean-checkout condition> |
| 74 | + - Business link: <metric or explicit "no direct metric"> |
| 75 | + |
| 76 | +## Provenance |
| 77 | + |
| 78 | +Pattern: Runable "agents that finish" thesis + forge qc gates. |
| 79 | +Sources: [qYe1GsMRElw 4:28, 9:59]; wiki/definition-of-done; |
| 80 | +Nate Herk roast-council verification discipline [iTY8Q449YNQ]. |
0 commit comments