Workflow Phases
The seven phases of the MeowKit pipeline: what each produces, which agent runs it, and where the ship check applies.
Every non-trivial task goes through MeowKit's seven phases. Planning and review are practices: no hook blocks an edit on a missing plan or a commit on a missing verdict. The ship check is the one control a hook enforces.
Phase 0: Orient → Phase 1: Plan → Phase 2: Test
→ Phase 3: Build (3.5 Simplify, 3.6 Verify) → Phase 4: Review
→ Phase 5: Ship [ship check] → Phase 6: ReflectThe Glossary defines phase, stage, ship check, execution mode and exception. In short, a stage is a step inside a phase (Simplify and Verify sit inside Build), and an exception is a documented case where a phase is skipped, such as a one-line fix that needs no separate plan.
Why phases exist
Without structure, agents skip testing, approve their own work and ship straight to main. Each phase prevents one failure:
| Phase | Prevents |
|---|---|
| Orient | Wrong agent/model for the task |
| Plan | Building the wrong thing |
| Test | Untested code reaching production |
| Build | Implementation drifting from plan |
| Review | Shipping unreviewed code |
| Ship | Direct pushes to main |
| Reflect | Repeating the same mistakes |
Phase 0: Orient
Agents: orchestrator, analyst. Produces: model tier assignment, execution mode, loaded context, a scout summary.
The orchestrator reads the task description, picks the complexity (Trivial, Standard or Complex), assigns the model tier and loads relevant memory. Domain-based routing forces the COMPLEX tier for high-risk domains such as fintech and healthcare. No code is touched.
Orient also:
- reads
docs/project-context.md, the agent constitution, injected byproject-context-loader.cjs - greps
.meowkit/memory/for matching entries. The skills that read memory do this at task start, and nothing is injected - runs
mk:scale-routingfor domain-based classification and prints a cost estimate - presents a 3 to 6 bullet codebase summary before asking you anything: project type, language, framework, relevant modules, current patterns, in-flight plans, public APIs and schemas. Skipped when the input is already a plan file.
- surfaces the capability resolver, so the agent can map an intent to a skill with
mewkit capabilities resolve --intent "…"instead of guessing. Only generic functional language is injected, never the capability manifest itself.
/mk:help reads plans, reviews, tests, and git to work out where the pipeline is and what comes next.
Phase 1: Plan
Agent: planner. Produces: tasks/plans/YYMMDD-name/plan.md.
The planner writes a plan with goal, acceptance criteria, constraints, and scope. For tasks touching five or more files it also decomposes the work into beads: atomic units that can each be committed on their own.
Before it returns a plan it must answer five things in concrete sentences: expected output, acceptance criteria, scope boundary, non-negotiable constraints, and the files it will touch. Any clarifying question it asks you cites a real path from the scout pass; an abstract question is a failure, not a style choice. Both are skipped when you pass an existing plan.
Supporting skills: mk:plan-creator runs the full nine-step flow with modes --fast, --hard, --deep, --parallel, --two, --product-level, and --spike --timebox <duration> (see Plan Creator Modes and Flags); mk:plan-ceo-review adds a product and engineering lens; mk:validate-plan runs an eight-dimension check on COMPLEX tasks.
For a change of more than two files or about 30 minutes, the agent proposes the plan and agrees it with you before building. Nothing blocks an edit without one. The agreement is what keeps a wrong plan cheap.
Phase 2: Test
Agent: tester. Produces: tests, failing ones in TDD mode and optional otherwise.
TDD is off by default. Turn it on with any of these:
--tddon a command:/mk:cook --tdd "build payment processor",/mk:fix --tdd "..."or/mk:testing --tdd. The flag writes a sentinel at.meowkit/state/tdd-mode, which hooks and agents read for the rest of the session.export MEOWKIT_TDD=1in your shell or CI. It overrides the flag and the config.tdd: truein.meowkit/config.yaml.
With TDD on, failing tests must exist before implementation, and the developer writes the failing test first. No hook checks the order. --tdd is a flag and not a planning mode, so it composes with whichever plan-creator mode you chose. --tdd and --no-test cannot be combined. With TDD off, this phase is optional and the tester runs on request. Security rules, injection defense and the tester's rules against shrinking tests or substituting mocks apply in both modes. Tests must pass before a commit if tests exist.
mk:nyquist checks test-to-requirement coverage at the end of the phase. The security pre-check runs either way.
Phase 3: Build
Agent: developer. Produces: a passing, simplified, verified implementation.
The developer implements against the agreed plan. On test failure it self-heals up to three times, each attempt taking a different approach, then escalates to you. post-write.cjs security-scans every file write. Bead-decomposed tasks commit after each bead and resume from the last uncommitted one. In autobuild runs the developer reads the sprint contract before editing source. At LEAN density the contract is skipped, and no hook checks it.
Two stages then run inside this phase before Review can start. Both are mandatory:
| Stage | Skill | Why it is not optional |
|---|---|---|
| 3.5 Simplify | mk:simplify | The reviewer reads the code you intend to keep, not the first version that passed |
| 3.6 Verify | mk:verify | Build, lint, types, tests and coverage in one pass. A review that starts from a broken build reviews nothing |
They are stages because they carry no plan or verdict of their own. They are the last two things Build does.
Phase 4: Review
Agent: reviewer. Produces: tasks/reviews/YYMMDD-name-verdict.md.
A five-dimension audit (architecture, types, tests, security, performance) ending in PASS, PASS WITH NOTES, or FAIL. mk:scout can run first to surface edge cases; mk:elicit can run after to dig into WARN dimensions.
Two optional flags change what "reviewed" means:
--verifyadds a light browser or artifact check. It is advisory: a FAIL is reported and does not change the outcome.--strictruns the full evaluator. A FAIL sends the work back to Phase 3, for up to two evaluator rounds.
--strict costs more than --verify. By how much depends on your harness, model tier and target surface.
The verdict is a record. A FAIL tells you what to fix before shipping, and nothing blocks a commit on a missing or failing verdict.
Phase 5: Ship
Agent: shipper. Produces: a PR URL and rollback documentation.
The ship check (pre-ship.cjs) runs lint on the changed files, their related tests and a type-check on git commit, git push, git merge and gh pr create|merge, and refuses the command when one fails. The shipper writes a conventional commit, opens a PR (never a push to main) and confirms CI passes. Enforcement & Security lists what the check does on each runtime.
Phase 6: Reflect
Agents: documenter, analyst. Produces: updated memory and documentation.
Non-derivable lessons are appended to .meowkit/memory/decisions.md or gotchas.md with mewkit note, affected docs are synced, and the task is closed.
Two things happen without a request. After each completed plan phase, the phase-file checkboxes and the plan's Agent State are updated before any transition, so a fresh session resumes at the right phase. And once every non-abandoned phase todo is checked, the plan completes and archives without waiting for a ship.
Execution modes
| Mode | When | How |
|---|---|---|
| Sequential | Default for all tasks | One phase at a time, single agent per phase |
| Parallel | Complex tasks with independent subtasks | Up to 3 agents in isolated git worktrees |
| Party | Architecture decisions, trade-off analysis | 2-4 agents deliberate, forced synthesis |
When the pipeline stops and asks you
If the reviewer finds that the change broke behavior that already worked, it appends Side Effects Detected: Yes and the specific effects to the verdict. The pipeline then stops and offers you a choice: revert and re-plan, keep the change and update whatever depended on the old behavior, add a compatibility shim, or accept the regression as intended. Your answer is recorded on the verdict as a ## User Decision Addendum.
mk:fix --auto does not approve itself from a review score. It stops and waits for you.
Which skills expect a plan first
| Skill | Plan behavior | Skip condition |
|---|---|---|
mk:cook | Create plan if missing | Plan path argument, --fast |
mk:fix | Plan if more than 2 files | --quick |
mk:ship | Expect an agreed plan | Hotfix you have confirmed |
mk:cso | Scope audit via plan | --daily |
mk:review | Read plan for context | PR diff reviews |
Three skills skip the pattern entirely. mk:investigate and mk:office-hours produce the input a plan is made from, so they run before one exists; mk:retro reads data and implements nothing.
Next steps
- Build a feature end-to-end
- How agents and skills work together
- Enforcement & Security: the ship check and what each runtime enforces