tdd
Test-Driven Development
Build one observable behavior at a time through a public seam. Keep every cycle small enough that the failing test explains the next production change.
Respect the outer workflow
This inner skill never claims or releases an issue, changes tracker state, commits, pushes, or publishes evidence. For issue-backed work, follow the authoritative lifecycle in work-github-issue.
Treat every repository change made to satisfy an issue as issue-backed, including tests, fixtures, docs, and generated artifacts. Read-only seam discovery may happen before a lease, but no issue-backed file may change until the outer workflow reports a fresh successful ownership check for this session. Let the outer workflow recheck and renew around long cycles. If it reports lost or uncertain ownership, stop writing and return control to it.
Establish the seam
Before deriving behavior, reject a source that declares kind: "spec-explainer" or an equivalent human-explanation warning. For a local-work-item, use its scope, source IDs, and verification seam only as execution coordinates; resolve derived_from and derive every behavior, expected value, edge case, and test oracle from that exact authoritative spec. Any other normative: false input is not behavior authority. If the authority is absent, ambiguous, or fingerprint-mismatched, return to planning without editing.
- Read the request, authoritative ticket or spec, repository instructions, nearby tests, and domain or architecture documents relevant to the change.
- Name the public seam through which a caller observes the behavior: a public function, command, HTTP endpoint, event, rendered interaction, or another stable contract.
- Derive the seam from the existing contract when it is clear. When two or more materially different module seams would change a public API, accepted architecture, ticket boundaries, dependencies, or material test cost, use
codebase-designbefore the first Red. Proceed with a resolved private in-bounds choice; return to planning only for an unresolved contract change. - State the seam and first observable behavior before editing.