Planning and Tasks
Create task files, check, sync and archive plans, see where work stands, and record the checkpoints of a supervised run.
These commands cover plans, task files and the durable task record. To find out where the current task stands and what comes next, run mewkit orient.
Plans and task files
A plan is a directory under tasks/plans/, named YYMMDD-name. plan.md is the overview and stays under 80 lines. Each phase has its own phase-XX-*.md, and scout and research reports go in a reports/ folder beside them. The kit does not create tasks/ or ship task templates: tasks/active/ is created the first time you run task new.
tasks/plans/260328-add-auth/
├── plan.md
├── phase-01-setup.md
├── phase-02-implement.md
└── reports/
├── scout-report.md
└── researcher-01-oauth.mdA task file is a Markdown document with frontmatter (goal, scope, constraints, acceptance criteria) that a later session can pick up without the earlier conversation. Write one for any change that touches more than two files or takes more than 30 minutes. A task file moves through these statuses:
| Status | Meaning |
|---|---|
draft | Created, not yet agreed |
in-progress | Work is underway |
blocked | Waiting on a dependency or a decision |
review | Work is done and awaits review |
done | All acceptance criteria are met |
plan
status and check read plans and change nothing. sync and archive write.
mewkit plan status <plan-dir> # checkbox progress across plan.md and the phase files
mewkit plan check <phase-file> # required-section report for one phase
mewkit plan check --structural <plan.md-or-dir> # plan.md and every sibling phase file against the full template
mewkit plan sync <plan-dir> # rewrite derived statuses from the checkboxes
mewkit plan sync <plan-dir> --check # print the drift, write nothing, exit 1 if there is any
mewkit plan archive <plan-dir> # mark completed and move to tasks/plans/archive/
mewkit plan archive <plan-dir> --dry-runstatus and check take --json. The plan-creator skill runs plan check --structural before you agree a plan.
The boxes in each phase's ## Todo List are the one thing you author. plan sync derives everything else from them and never ticks or unticks a box:
- Each phase gets
pendingwhen no todo is ticked,in_progresswhen some are, andcompletedwhen all are. A phase markedfailed,abandonedoractivekeeps its status, and so does a phase with no todos. - It rewrites the phase frontmatter
status:, the phase's**Status:**Overview line, the Status cell of the plan.md Phases table row for the phase, andphases[<phase>]in.plan-state.jsonwhen that file exists. Nothing creates it:plan-creatordoes not write it, andplan syncleaves an absent or malformed one alone. A value that already says the right status is left as written; one that differs is replaced whole, note included. Thetasks_completedandtasks_totalcounts are updated for every phase with todos, a kept one too. Every other key and line stays as it was, line endings included. - The
plan.mdfrontmatterstatus:becomesin-progressonce any phase is past pending andcompletedwhen every phase that is not abandoned is complete. A plan markedfailed,abandoned,cancelledorarchivedkeeps its status.
On Claude Code, Codex and Cursor the stop hook applies the same rule to plans that changed, so a plan usually stays in sync without the command. On every runtime, the ship check prints the same drift line and the archive reminder before a commit, push, merge or PR. It only reads the plans and never changes the ship decision. A second run reports already in sync. When every phase is complete, sync prints the plan archive command to run next; it never archives or moves anything itself. --json prints {"plan", "dir", "changes": [{"file", "field", "from", "to"}], "complete"}. plan status adds one line naming plan sync when the derived state is behind the checkboxes; its --json output does not change.
plan archive finishes a plan in three steps:
- It sets
status: completedin theplan.mdfrontmatter, in everyphase-*.mdfrontmatter, and for everyphases[*].statusin.plan-state.json. - It clears an active-task pointer that still points at the plan.
- It moves the directory to
tasks/plans/archive/<name>/. It refuses if that destination exists, and does nothing if the plan is already archived.
--dry-run prints what would happen and writes nothing. The cook workflow runs plan archive at the end of a completed plan.
task new
mewkit task new --type <type> "description"task new creates tasks/active/YYMMDD-<slug>.<type>.md with frontmatter (status draft) and an Agent State section for resuming work. If your project keeps its own tasks/templates/<type>.md (feature-implementation.md, bug-fix.md, refactor.md or security-audit.md), the body comes from that file instead.
| Flag | Description | Default |
|---|---|---|
--type | Task type: feature, bug-fix, refactor, security | feature |
--priority | Task priority | medium |
--activate | Also create the durable task record for the task (see task-state) | off |
mewkit task new --type feature "Add user authentication"
# creates tasks/active/260327-add-user-authentication.feature.md
mewkit task new --type bug-fix --priority high "Fix login timeout"
# creates tasks/active/260327-fix-login-timeout.bug.mdtask list
mewkit task list [--all] [--status <status>]task list shows each task file with its status, type, priority and path. It reads tasks/active/ unless you pass --all, which scans all of tasks/ (completed and backlog included). --status filters by draft, in-progress, blocked, review or done.
task-state
The durable task record is a JSON file per task under tasks/active/, plus a pointer to the current one. A new session reads it to resume.
mewkit task-state show [--json]
mewkit task-state update <task-id> [--status <active|blocked|done>] [--step "<what just finished>"] [--next "<next action>"] [--plan <path>]show reads the records without a network call, marks the record whose plan matches the active-plan pointer as current, and reports a corrupt or incompatible record as an issue instead of failing. update changes one record atomically and needs the task id. It also takes --blocker <text>, --verification <ref=result>, --evidence-ref <path> and --capability-decision <capId|decision|reason>, each repeatable. Workflows call it to record progress; a failed write is reported and does not stop the workflow.
mewkit task-state update feat-auth --status active --step "wired login route" --next "add refresh-token test"orient
mewkit orient [--json] [--no-record]orient prints where the current task sits in the workflow and what the next action is. It reads plans, task records and git state. --no-record skips writing the advisory orient_run measurement, which leaves the run read-only.
advice
advice records the checkpoints of an opt-in supervised run, started with --advice on mk:fix, mk:cook, mk:brainstorming, mk:plan-creator, mk:autobuild or mk:ship. The workflow drives these commands and you rarely type them. They are a CLI so that the call caps, the stage rules and the receipt are enforced outside the model.
Supervision is evidence, not approval. A recorded directive never counts as verification.
mewkit advice begin --run <id> --skill <skill> --stage <stage> --checkpoint <id>
mewkit advice commit --run <id> --checkpoint <id> --disposition <value> --outcome <value> --reason "<one line>"
mewkit advice status --run <id>
mewkit advice validate-packet --evidence <file.json> --packet-kind input|output|brief| Subcommand | What it enforces |
|---|---|
begin | Per-stage and per-skill caps, stage legality, an idempotent --checkpoint, and the pending marker that lets a crashed run resume |
commit | Stage and disposition legality, receipt validation, the dossier write, and evidence supersession after a correction |
status | The resume view: current stage, calls used, latest directive, next safe action |
validate-packet | An input packet, an output packet or a direct-consult brief |
--release-stage is required by mk:ship and refused by every other skill. Ship's budget is 4 calls per release stage (prepare, release, publish), so a run through all three has three separate budgets. The stage is fixed when the slot is claimed and commit inherits it.
--correction-kind decides what a returned correction invalidates. source marks downstream verification and review evidence as superseded and keeps the plan agreement. scope also marks the plan agreement as required again, because a plan whose scope moved needs to be agreed with the user again.
# Open a checkpoint. Repeating the same --checkpoint returns the recorded
# result and spends no slot, which is what makes resume safe.
mewkit advice begin --run fix-260727-auth --skill mk:fix --stage GUIDE --checkpoint guide-1
# Record what came back and what you decided to do with it. --reason is
# required even when you adopted the directive.
mewkit advice commit --run fix-260727-auth --checkpoint guide-1 \
--disposition CONTINUE_WITH_DIRECTIVE --outcome adopted \
--reason "matches the evidence in the root-cause proof" \
--directive "fix the guard, not the caller" --next "write the regression test"
# Send work back, and supersede the evidence it invalidated.
mewkit advice commit --run fix-260727-auth --checkpoint review-1 \
--disposition RETURN_TO_EXECUTOR --outcome adopted --reason "coverage gap" \
--correction "cover the expired-token path" \
--evidence tasks/plans/260727-auth/reports/evidence/workflow-evidence.json \
--correction-kind source
# Ship charges each release stage its own budget.
mewkit advice begin --run ship-260727 --skill mk:ship --stage GUIDE \
--checkpoint publish-guide --release-stage publish
mewkit advice status --run fix-260727-authadvice refuses a call past the cap, an illegal stage and disposition pair, a --checkpoint reused under a different stage, a corrupt dossier, and an --evidence path that is not an existing workflow-evidence.json inside the project. A refusal is final for that checkpoint: continue unsupervised, or escalate when the refusal says to.