implement-minimal
Central rule:
Implement the smallest complete change that satisfies the current
acceptance criteria, and leave the project runnable.
Do not expand scope, add speculative structure, or refactor unrelated code
while using this skill.
Activate when
- A plan or a single clear acceptance criterion exists and code must change
- The next step is one runnable increment
- The change is larger than a one-line edit but smaller than a full feature
Do not activate when
- No plan or acceptance criterion exists yet -> use
oss-plan
- The repository does not exist yet -> use
oss-bootstrap
- A test or build is failing and the cause is unknown -> use
test-and-debug
- The change only adds or upgrades a dependency -> use
dependency-review
Required inputs
- The acceptance criterion for this increment
- Access to the repository to inspect status, conventions, and diff
- The targeted validation command for the affected code
Low-resource policy
Read the first of these that exists, then follow it:
${CLAUDE_PROJECT_DIR}/.claude/shared/LOW_RESOURCE.md
$HOME/.claude/shared/LOW_RESOURCE.md
If neither exists, apply this fallback: run one expensive command at a time,
prefer the narrowest validation, disable watch mode, reuse existing
environments, and run full validation only at a milestone boundary. Do not
scan the whole filesystem to locate the policy.
Context-efficiency policy
Read the first of these that exists, then follow it:
${CLAUDE_PROJECT_DIR}/.claude/shared/CONTEXT_EFFICIENCY.md
$HOME/.claude/shared/CONTEXT_EFFICIENCY.md
If neither exists, apply this fallback: select files before reading; use
targeted searches and bounded ranges; do not preload references; do not reread
unchanged files; finish one atomic increment and stop; create a compact handoff
before context is exhausted.
Facts that must not be assumed
- The test runner, package manager, or build tool
- That existing tests pass right now
- That an external API, wallet, or MCP tool is reachable
- That a dependency is already approved
Preflight
git status --short and git diff --stat to see current work in progress
- If unrelated uncommitted changes exist, stop and report before editing
- Identify the affected files and the convention they already follow ->
references/change-types.md
- Identify any external input the change reads ->
references/external-boundaries.md
Workflow
- Restate the single acceptance criterion this increment satisfies
- Inspect
git status and git diff for in-progress work
- Discover conventions from neighboring files and existing scripts
- Identify the one runnable increment that satisfies the criterion
- Before editing, state files to modify, files to create, any new dependency,
and the targeted validation command
- If a new dependency is required, stop and route to
dependency-review
- Implement only that increment, following existing conventions
- Validate external input at the boundary once ->
references/external-boundaries.md
- Run the targeted validation for the changed code only
- If validation fails, repair only failures caused by this increment; an
unrelated pre-existing failure is a stop-and-report condition
- Inspect
git diff and remove churn, stray edits, and obvious comments
- Update docs only when public behavior changed
- Produce the report using
templates/implementation-report.md
- Stop after the increment
Implementation rules
- Do not change unrelated files
- Do not silently rewrite entire modules
- Do not introduce an interface for a single implementation
- Do not introduce factories, repositories, providers, adapters, managers,
registries, or service layers without a demonstrated current need
- Do not extract a helper used only once unless it materially improves clarity
- Do not create generic utilities for possible future use
- Do not add fallback behavior not required by the acceptance criterion
- Do not add defensive branches for impossible or unsupported states
- Do not add architecture for anticipated future requirements
- Prefer existing project conventions over introducing new ones
- Validate external data at system boundaries, not at every internal call
- Avoid unrelated formatting churn and broad renaming
- Preserve public APIs unless the task explicitly changes them
- Do not claim validation that was not run
Comment policy
- Comments may explain a non-obvious constraint, trade-off, external behavior,
security decision, or mathematical assumption
- Comments must not narrate the next line, a function name, a loop, a
condition, an assignment, or obvious control flow
- Prefer clear names and small functions over explanatory comments
- Remove a stale comment only in code you directly modify, and only when safe
Change-type branches
Route by the kind of change; each branch names its own discovery,
implementation boundary, validation, and stop condition ->
references/change-types.md
- New feature slice
- Bug fix
- Integration with an external system
- Refactoring in isolation
- UI change
- CLI change
- Configuration change
- Documentation-affecting behavior change
Validation escalation
Run the smallest check that proves the increment:
single test or command
related test file
changed-file lint or typecheck
related integration path
full suite only at the milestone that ends the work
Never run the full suite after every edit.
Stop conditions
- The increment cannot be validated cheaply
- A pre-existing unrelated failure blocks the targeted validation
- The change requires a new dependency not yet reviewed
- The acceptance criterion is ambiguous after one clarification pass
Human review boundaries
- Any change to auth, wallet, or user-data handling
- Any change to a public API surface
- Any validation that could only be run against an unavailable live system
Final report
Produce the report in the exact section order of
templates/implementation-report.md, then
stop. Broader review happens under public-code-review.
1---2name: implement-minimal3description: Implement the smallest complete change that satisfies the current acceptance criteria for a public open-source project. Use when writing or editing code after a plan or a clear acceptance criterion exists. Avoids speculative abstraction, unrelated changes, obvious comments, and unverified validation claims. Keeps the project runnable after the increment.4---56# implement-minimal78Central rule:910> Implement the smallest complete change that satisfies the current11> acceptance criteria, and leave the project runnable.1213Do not expand scope, add speculative structure, or refactor unrelated code14while using this skill.1516## Activate when1718- A plan or a single clear acceptance criterion exists and code must change19- The next step is one runnable increment20- The change is larger than a one-line edit but smaller than a full feature2122## Do not activate when2324- No plan or acceptance criterion exists yet -> use `oss-plan`25- The repository does not exist yet -> use `oss-bootstrap`26- A test or build is failing and the cause is unknown -> use `test-and-debug`27- The change only adds or upgrades a dependency -> use `dependency-review`2829## Required inputs3031- The acceptance criterion for this increment32- Access to the repository to inspect status, conventions, and diff33- The targeted validation command for the affected code3435## Low-resource policy3637Read the first of these that exists, then follow it:3839- `${CLAUDE_PROJECT_DIR}/.claude/shared/LOW_RESOURCE.md`40- `$HOME/.claude/shared/LOW_RESOURCE.md`4142If neither exists, apply this fallback: run one expensive command at a time,43prefer the narrowest validation, disable watch mode, reuse existing44environments, and run full validation only at a milestone boundary. Do not45scan the whole filesystem to locate the policy.4647## Context-efficiency policy4849Read the first of these that exists, then follow it:5051- `${CLAUDE_PROJECT_DIR}/.claude/shared/CONTEXT_EFFICIENCY.md`52- `$HOME/.claude/shared/CONTEXT_EFFICIENCY.md`5354If neither exists, apply this fallback: select files before reading; use55targeted searches and bounded ranges; do not preload references; do not reread56unchanged files; finish one atomic increment and stop; create a compact handoff57before context is exhausted.5859## Facts that must not be assumed6061- The test runner, package manager, or build tool62- That existing tests pass right now63- That an external API, wallet, or MCP tool is reachable64- That a dependency is already approved6566## Preflight67681. `git status --short` and `git diff --stat` to see current work in progress692. If unrelated uncommitted changes exist, stop and report before editing703. Identify the affected files and the convention they already follow ->71 [references/change-types.md](references/change-types.md)724. Identify any external input the change reads ->73 [references/external-boundaries.md](references/external-boundaries.md)7475## Workflow76771. Restate the single acceptance criterion this increment satisfies782. Inspect `git status` and `git diff` for in-progress work793. Discover conventions from neighboring files and existing scripts804. Identify the one runnable increment that satisfies the criterion815. Before editing, state files to modify, files to create, any new dependency,82 and the targeted validation command836. If a new dependency is required, stop and route to `dependency-review`847. Implement only that increment, following existing conventions858. Validate external input at the boundary once ->86 [references/external-boundaries.md](references/external-boundaries.md)879. Run the targeted validation for the changed code only8810. If validation fails, repair only failures caused by this increment; an89 unrelated pre-existing failure is a stop-and-report condition9011. Inspect `git diff` and remove churn, stray edits, and obvious comments9112. Update docs only when public behavior changed9213. Produce the report using93 [templates/implementation-report.md](templates/implementation-report.md)9414. Stop after the increment9596## Implementation rules9798- Do not change unrelated files99- Do not silently rewrite entire modules100- Do not introduce an interface for a single implementation101- Do not introduce factories, repositories, providers, adapters, managers,102 registries, or service layers without a demonstrated current need103- Do not extract a helper used only once unless it materially improves clarity104- Do not create generic utilities for possible future use105- Do not add fallback behavior not required by the acceptance criterion106- Do not add defensive branches for impossible or unsupported states107- Do not add architecture for anticipated future requirements108- Prefer existing project conventions over introducing new ones109- Validate external data at system boundaries, not at every internal call110- Avoid unrelated formatting churn and broad renaming111- Preserve public APIs unless the task explicitly changes them112- Do not claim validation that was not run113114## Comment policy115116- Comments may explain a non-obvious constraint, trade-off, external behavior,117 security decision, or mathematical assumption118- Comments must not narrate the next line, a function name, a loop, a119 condition, an assignment, or obvious control flow120- Prefer clear names and small functions over explanatory comments121- Remove a stale comment only in code you directly modify, and only when safe122123## Change-type branches124125Route by the kind of change; each branch names its own discovery,126implementation boundary, validation, and stop condition ->127[references/change-types.md](references/change-types.md)128129- New feature slice130- Bug fix131- Integration with an external system132- Refactoring in isolation133- UI change134- CLI change135- Configuration change136- Documentation-affecting behavior change137138## Validation escalation139140Run the smallest check that proves the increment:141142```text143single test or command144related test file145changed-file lint or typecheck146related integration path147full suite only at the milestone that ends the work148```149150Never run the full suite after every edit.151152## Stop conditions153154- The increment cannot be validated cheaply155- A pre-existing unrelated failure blocks the targeted validation156- The change requires a new dependency not yet reviewed157- The acceptance criterion is ambiguous after one clarification pass158159## Human review boundaries160161- Any change to auth, wallet, or user-data handling162- Any change to a public API surface163- Any validation that could only be run against an unavailable live system164165## Final report166167Produce the report in the exact section order of168[templates/implementation-report.md](templates/implementation-report.md), then169stop. Broader review happens under `public-code-review`.