feat(forge): definition-of-done card contract + card gate + sop-to-skills offer - #31
Conversation
Reviewer's GuideThis PR operationalizes the definition-of-done thesis by documenting a delegation-card contract, enforcing its required fields with a strict-capable dispatch gate, and packaging the approach into a draft SOP-to-skills commercial offer. Flow diagram for delegation card dispatch gatingflowchart TD
Card[Delegation card] --> Gate[card_gate.py]
Gate --> Done{Has valid DONE section?}
Done -->|No| Reject[REJECTED]
Done -->|Yes| Criteria{3-7 checkable criteria?}
Criteria -->|No| Reject
Criteria -->|Yes| Fields{Maintainable by, Unplug test, Business link?}
Fields -->|No| Reject
Fields -->|Yes| Dispatch[DISPATCHABLE]
Strict[--strict] -.-> Gate
Strict -.-> Vague{Reject vague or non-checkable criteria}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
The new gate/docs include concrete mismatches (documented strict requirements not enforced, inconsistent schema wording, and an inaccurate success criteria count) plus the PR claims fixture verification that isn’t present in-repo.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR operationalizes a “definition of done” contract for agent-forge delegation cards by adding a formal DONE schema plus a CLI gate that rejects cards without a compliant DONE section, and it also adds a draft SOP-to-skills client offer document.
Changes:
- Adds
agent-forge/docs/card-contract.mddefining a machine-checkable DONE schema, verification rules, and anti-gaming guidance. - Adds
agent-forge/tools/card_gate.py, a stdlib-only CLI validator that rejects cards missing DONE requirements and optionally applies stricter heuristics. - Adds
05_Clients/offer-sop-to-skills.md, a draft service offering describing delivery, pricing anchors, and proof points.
File summaries
| File | Description |
|---|---|
| agent-forge/tools/card_gate.py | New CLI gate to validate delegation cards contain a compliant ## DONE block (with optional strict checks). |
| agent-forge/docs/card-contract.md | New written contract describing the DONE schema and verification/anti-gaming rules that the gate enforces. |
| 05_Clients/offer-sop-to-skills.md | New draft client-facing offer tying the DONE discipline to a packaged SOP-to-skills service. |
Review details
Suppressed comments (3)
agent-forge/tools/card_gate.py:14
- The docstring says
--strict"requires the reviewer line", but the implementation does not validate any reviewer line. Either enforce a reviewer field in strict mode, or (simpler) update the docstring to match actual behavior.
Exit codes: 0 = dispatchable; 1 = rejected (report on stdout).
--strict additionally requires the reviewer line and rejects vague
criteria (no digits, no file paths, no commands) heuristically.
agent-forge/tools/card_gate.py:46
DONE_RE.search(text)is executed twice; store the match once and reuse it to avoid redundant work and keep the parsing logic in one place.
if not DONE_RE.search(text):
return False, ["card has no '## DONE' section; see agent-forge/docs/card-contract.md"]
done_block = DONE_RE.search(text)
# capture from DONE header to next ## or EOF
tail = text[done_block.end():]
agent-forge/tools/card_gate.py:88
- On success, the reported criteria count is computed by scanning the entire file, which can over-count if "DONE IF" appears outside the
## DONEsection (and it rereads the file). Consider removing the count or computing it from the DONE block.
if ok:
print(f"DISPATCHABLE: {path.name} ({len(CRITERION_RE.findall(path.read_text(encoding='utf-8')))} criteria)")
return 0
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Usage: | ||
| python3 card_gate.py <card.md> [--strict] | ||
|
|
||
| Exit codes: 0 = dispatchable; 1 = rejected (report on stdout). | ||
| --strict additionally requires the reviewer line and rejects vague | ||
| criteria (no digits, no file paths, no commands) heuristically. | ||
| """ |
| - The skill pipeline: github.com/aegntic/cognitive-os (agent-forge) | ||
| - The quality gates that run on every deliverable: same repo, | ||
| agent-forge/tools/qc.py | ||
| - A working end-to-end skill with examples: github.com/aegntic/tab-harvest |
| 2. **The second-best-engineer test.** State who could maintain the | ||
| output: "DONE IF a competent non-author reviewer can open any file | ||
| produced and explain its purpose in under 20 minutes." For code: |
|
The 'Lint, Format & Test' failure is the pre-existing prettier rot in 02_Showcase/THRESHOLD-INC and brik-pro (50 files, unchanged on this branch; same failure on main since PR #28 documented it). Zero files touched by this PR appear in the failure log: this PR adds only agent-forge/docs/card-contract.md, agent-forge/tools/card_gate.py, 05_Clients/offer-sop-to-skills.md, all prettier-clean locally. All other 8 checks pass. |
What
Operationalizes the Runable definition-of-done thesis inside the forge.
Contents
Verification
Summary by Sourcery
Operationalize definition-of-done requirements across agent-forge cards and introduce an SOP-to-skills service offering.
New Features:
Enhancements:
Documentation: