plan-contract
Purpose
Writes an executable, scoped PLAN.md for one task and validates it mechanically.
Source Skill purpose
When to use it
Use plan-contract when turning a canonical task into an executable frozen plan. Its front matter gives every editable file an exact path and maps it to acceptance criteria; every criterion maps back to scope or a test. Class and changed surface decide which architecture, data, UI and validation sections are required. Dependencies, contracts, assumptions and TDD exemptions are explicit. A validator checks paths, mappings and required sections before freeze. The plan records task intent and evidence rather than creating new requirements.
The plan is more than a file list: it states concrete behavior, checks, verification commands and every dependency or contract change. New external entry points receive server-side validation requirements. Assumptions record risk and verification status, and high-risk unanswered choices stop freeze. Test exemptions need a specific reason, while a behavior-changing path keeps its test in scope.
Source Skill purpose
How it works
Source Flow
- Read inputs Read TASK.md criteria and constraints, then EVIDENCE.md and INTENT.md if present, before drafting. Take the task class from the run's classification or the suggested class.
Source Flow
- List candidate paths Use impact evidence to identify files that must change for each criterion and list the test that proves it. Verify each existing path with
git ls-files; for a new file, check that its parent directory exists.Source Flow
- Map scope Write exact path entries and their acceptance-criterion mappings.
Source Flow
- Write required sections Add only sections the task class and affected surface require.
Source Flow
- Validate the plan Run the plan validator until paths, mappings and sections pass.
Source Flow
- Present stop point Show the validated plan for approval when supervision requires it.
Source Flow
Key rules
- List exact repository files, without globs or duplicate scope entries.
Source Hard rules
- Map every path to criteria and every criterion back to a path or test.
Source Hard rules
- Keep scope to the smallest change supported by evidence.
Source Hard rules
- Include a test file for every behavior-changing path and give each path without RED and GREEN evidence a specific
tdd_exemptionreason.Source Hard rules
- Take requirements from the task and settled intent rather than inventing them.
Source Hard rules
Output and gate
Output
- Write the validated plan with exact scope and required sections.
Source Output
Gate
- The plan is ready only when its validator exits successfully.
Source Gate rule
Source
Source Skill definition