Build a Feature
Step-by-step guide to building features with /mk:cook, from plan to ship.
/mk:cook is the primary workflow for building features. It runs the full 7-phase pipeline: you describe what you want, and MeowKit handles planning, testing, building, reviewing, and shipping.
Quick start
/mk:cook add user authentication with JWTThat's it. MeowKit detects your intent, creates a plan, and walks through each phase. You approve at two checkpoints (Gate 1 and Gate 2).
Common workflows
From a natural language description
/mk:cook add pagination to the user list APIMeowKit classifies the task, selects the right model tier, and creates a plan. You review and approve the plan before any code is written.
From an existing plan file
/mk:cook tasks/plans/260501-pagination/plan.mdSkips the planning phase. The plan must already be approved (Gate 1).
With TDD
/mk:cook build payment processor --tddFailing tests are written before implementation. The developer cannot write code until tests exist and fail. Use --tdd for production-critical features.
Fast mode
/mk:cook add login form --fastSkips research. The planner still creates a plan, but without deep codebase analysis. Good for well-understood features with clear scope.
Parallel mode
/mk:cook implement checkout system --parallelSpawns up to 3 agents in isolated git worktrees for independent subtasks. Use when the plan has clearly independent components.
What happens at each phase
| Phase | What you see | What you do |
|---|---|---|
| 0. Orient | Task classified, model tier declared | Nothing, it is automatic |
| 1. Plan | Plan created with acceptance criteria | Approve the plan (Gate 1) |
| 2. Test | Tests written from acceptance criteria | Review test coverage |
| 3. Build | Implementation proceeds | Watch for self-healing attempts |
| 4. Review | 5-dimension audit with verdict | Approve the review (Gate 2) |
| 5. Ship | PR created, CI triggered | Merge when CI passes |
| 6. Reflect | Patterns captured to memory | Nothing, it is automatic |
Choosing the right mode
| Situation | Mode |
|---|---|
| New feature, clear scope | Default: /mk:cook "description" |
| Production-critical feature | --tdd for strict test-first discipline |
| Well-understood feature | --fast to skip research |
| Feature with independent parts | --parallel for parallel agents |
| Feature from existing plan | Pass the plan path directly |
| Docs-only change | --no-test to skip Phase 2 |
Gotchas
- Simple features grow. Always let MeowKit create a plan. A "simple" feature that touches three files needs one.
- Gate 2 is never auto-approved. The
--autoflag fixes issues but still requires your review approval. - Long sessions lose context. The plan's Agent State section auto-updates, so read it if you resume mid-build.
When it goes wrong
| What you see | Why | What to do |
|---|---|---|
| The plan is far broader than you meant | The description left the scope open | Narrow it: "cart for the product page", not "cart" |
| Tests only cover the happy path | The tester read the acceptance criteria literally | Ask for the edge cases you care about: zero quantity, maximum quantity |
| The developer self-heals three times, then escalates | The tests expect a different approach than the implementation took | Decide which is wrong, the plan or the tests, and fix that one rather than the symptom |
| Review FAILs on security | Hardcoded values or an unsafe pattern | Fix the findings; the review re-runs automatically |
Next steps
- Fix a bug: structured debugging with
/mk:fix - Autonomous builds: green-field products with
/mk:autobuild - Understand the workflow: the 7-phase pipeline in detail