| name | butler-ship-feature |
| description | "Use for Butler project feature work, migrations, fixes, specs, experimental spikes, reviews, or roadmap execution when Codex must follow the Butler ship-feature loop: spec first, task plan, tests, implementation, internal review, docs/report, validation, and phase commit." |
Butler Ship Feature
Core Rule
Run Butler work through this loop:
- Update or create the governing spec first.
- Break the execution plan into task-sized slices.
- Write tests from the spec before or alongside implementation.
- Implement the smallest vertical slice that satisfies the spec.
- Review the result against the spec.
- Run validation gates.
- Update docs, reports, and handoff/progress notes.
- Commit each completed phase.
Do not report 100% completion unless the spec success criteria, tests, review,
docs, and validation gates are all closed.
Spec Discipline
- Treat the spec as the source of truth, not the plan.
- If behavior is undefined, update the spec before coding.
- Every feature must have success criteria that map to unit, integration,
or E2E tests.
- Plans may describe order and scope, but they must not replace the spec.
Implementation Workflow
Use this sequence for each phase:
- Context: Read the active spec, plan, relevant code, recent reports, and
current git status.
- Plan: Keep a short task plan with exactly one active task.
- Tests: Add or update tests that would fail without the intended behavior.
- Code: Implement without reverting unrelated user changes.
- Internal review: Compare the diff against the spec success criteria.
- Validate: Run targeted tests,
bun run check, and git diff --check
unless the phase has a narrower justified gate.
- Docs/report: Update the governing spec if behavior changed, then update
plan/report/handoff-style progress docs.
- Commit: Commit the completed phase with a concise message.
Validation Gates
For Butler repo work, prefer these gates:
bun test <targeted tests>
bun run lint
bun run typecheck
git diff --check
bun run check
Add feature-specific gates when relevant:
- transport work: transport-agnostic harness tests
- memory work: stress reports, vector and graph count checks
- installer work: install/repair smoke tests
- runtime work: native tool-loop and mock transport tests
If a gate cannot run, record why and what risk remains.
Reporting
Keep final reports concise but include:
- what changed
- which spec criteria are now covered
- test and validation results
- remaining risks or next phase
- commit hash when committed
Avoid dumping raw personal memory, transcripts, credentials, or private runtime
data into reports.