Planning gateway: every gate

Every task starts from one checked plan. The gates below hold an agent to that plan: no code before the plan passes, and no automation merge before the plan's proof is there. A bug or a chore needs only the short plan: one phase, one criterion.

There is no bypass. No setting turns a gate off. An urgent fix waits until its short plan is written and passes. A short plan takes minutes.

The plan file

The gates

GateWhenWhat it refusesWhere you see itHow to pass
Plan gatebefore each edit or shell command of an agent on your laptopan edit, or a shell command that can writethe agent's tool call is denied with iKanban plan gate: …write the plan; the check says plan ok
Runner plan stagebefore the first build of a task on the laptop runnerthe buildthe task's activity, and the Plan stage in Pipelinesthe plan the runner writes passes the check; else fix the plan and send the task again
Deploy and merge gatebefore an automation merges the task's PRthe mergeone note on the task, and Merge held with the reason in Pipelinesgive each test and command criterion its evidence in the plan
Roadmap sync warningeach Roadmap sync of the plannothing: it warnsthe sync's warnings, and the phase on iKAgent → Roadmapadd criteria to the phase in the plan file

Related: the Done gate. On Pro and Pro+, an open risk from the check critic's review before Done keeps the task from being marked Done. See Agentification.

Plan gate

The kit hook .iKanban/hooks/plan-gate.js runs before each tool call of Claude Code, Gemini CLI, Copilot CLI and Antigravity CLI. npx ikanban hooks install wires it.

Runner plan stage

When a task runs on your laptop runner, the runner plans before it builds:

  1. A fresh agent session writes docs/plans/<TASK-KEY>.json. A bug or a chore gets the short plan; any other task type gets the full plan. The session is told to write only that file, and it stops after 10 minutes.
  2. The runner runs the plan check on the file, with its own copy of the checker (never a checker from the repository). It needs Node.js 18 or later on the laptop. The plan file must be a regular file inside the repository, not a link.
  3. The plan passes: the build starts. It fails: the run ends before the build. The task's activity names each problem; fix the plan and send the task again.

The Plan stage shows in Pipelines before the agent's run (Pipelines is on Pro and Pro+). A follow-up writes no new plan, but its build is checked before a merge like the first one. A task sent again while it already has a pull request works on that PR's branch: when the plan there passes, the run uses it and writes none (the activity says this run works on the task's PR #12), so the plan checked and the plan built are the same file. If criteria change after the check, the held merge says the plan's criteria changed after the check. A Wiki run and a security scan get no plan stage. The plan stage comes to your laptop with the next desktop app release.

Deploy and merge gate

After the build, the runner checks the plan again with --merge: each criterion of kind test or command needs its evidence. Criteria proved on dev (browser, api) get their evidence after the deploy. The criteria themselves must be the ones checked before the build: the build may add evidence, but a changed check, how or expect holds the merge. The Plan stage then reads passed or held.

Whether this check gates the merge is the automation rule's own setting (Then → Merging the agent's pull request): Checks and plan pass (the default) waits for it; Checks pass merges on green checks alone, and the runner then skips this check; A person merges never merges.

With Checks and plan pass, an automation (the laptop runner or a GitHub run) merges a planned task's PR only after the runner's check passed. The task gets one note, for example: iKanban Automation holds the merge of PR #12: the task's plan does not pass yet: P1-C1: no evidence … It merges once the plan passes. With Pipelines, the Merge stage reads held with the same reason. Push the evidence to the pull request: at its new commit, your runner checks the plan again (no agent starts; the task's activity says Plan: re-checked PR #12), and the hold lifts when it passes. A planned run with no check after its build (a runner older than the plan stage) is held too: update the desktop app. Only the runner can report this check; a person or an agent cannot mark it passed.

Run the same checks by hand before a merge or a deploy:

CommandWhat it adds to the plan check
… check <plan> --merge <PHASE>each test and command criterion of that phase has evidence
… check <plan> --doneevery criterion has evidence, and every critic gap in the plan is closed or accepted
… --task <KEY> (with --done or --merge)also the task's open critic gaps on iKanban

Roadmap sync warning

A Roadmap sync warns for each phase with no criteria: phase <key> has no criteria. The Roadmap shows No criteria: add them to the plan file on that phase. The warning blocks nothing.

Limits