Build a Feature
Build a feature with /mk:cook, from plan to PR: modes, what each phase does, and where you step in.
/mk:cook is the main workflow for building a feature. You describe what you want, and it runs the phases from orientation to reflection: plan, optional tests, build, simplify, verify, review, ship.
/mk:cook add user authentication with JWTCook classifies the task, declares a model tier and writes a plan under tasks/plans/YYMMDD-name/. You agree the plan before code is written, and you read the review verdict before you ship. Neither is enforced by a hook. They are the two points where the workflow asks for you.
Modes
/mk:cook add pagination to the user list API # default: plan, build, verify, review
/mk:cook tasks/plans/260501-pagination/plan.md # run an existing plan, no planning
/mk:cook build payment processor --tdd # failing tests first
/mk:cook add login form --fast # skip research, keep a plan
/mk:cook implement checkout system --parallel # up to 3 agents in git worktrees
/mk:cook update the README --no-test # skip the test phase| Situation | Mode |
|---|---|
| New feature, clear scope | Default |
| Production-critical feature | --tdd |
| Well-understood feature | --fast |
| Plan has independent parts | --parallel |
| Plan already agreed | Pass the plan path |
| Docs-only change | --no-test |
--tdd (or MEOWKIT_TDD=1) is opt-in. In TDD mode the developer writes failing tests before implementation, and the tester owns the red phase. The order is a workflow rule, and no hook checks it. Without --tdd, Phase 2 is optional. --no-test combined with --tdd is invalid.
Add --verify for a light browser check after review, or --strict for a full evaluator pass that sends a FAIL back to the build phase. Use --strict for security-critical or payment features.
What happens in each phase
| Phase | What you see | What you do |
|---|---|---|
| 0. Orient | Task classified, model tier declared | Nothing |
| 1. Plan | A plan with acceptance criteria | Agree the plan |
| 2. Test | Tests from the acceptance criteria (red in TDD mode) | Check coverage |
| 3. Build | Implementation, then simplify and verify (build, lint, tests, coverage) | Watch for self-healing attempts |
| 4. Review | A five-dimension verdict | Read the verdict |
| 5. Ship | A PR | Merge when CI passes |
| 6. Reflect | Docs and plan synced, one memory entry if there is a lesson | Ask for it after you ship or close the run |
Phase 6 does not run on its own after the verdict. It runs after shipping, or when you ask to close the run without shipping.
Gotchas
- A feature that looks simple and touches three files still needs a plan. Let cook write it.
--autofixes issues and runs through without pausing, so no one reads the verdict as it is written. Read it before you ship.- Long builds lose context. After each plan phase, cook updates the Agent State block in
plan.md, so read it when you resume.
When it goes wrong
| What you see | Why | What to do |
|---|---|---|
| The plan is far broader than you meant | The description left scope open | Narrow it: "cart for the product page", not "cart" |
| Tests cover only the happy path | The tester read the criteria literally | Ask for the cases you care about, such as zero or maximum quantity |
| The developer self-heals three times, then escalates | The tests and the implementation disagree | Decide whether the plan or the tests are wrong and fix that one |
| Review FAILs on security | A hardcoded value or unsafe pattern | Fix the findings and re-run the review |
Next steps
- Fix a bug for
/mk:fix - Autonomous builds for green-field products
- The workflow for the phases in detail