implement

A command that carries out a written software plan one phase at a time, checking each phase before moving on.

In plain words
What is it for?
Use it to execute phased coding plans, delegate clearly scoped phases to an implementer, and stop when checks fail.
Why use it?
It prevents work from advancing when required files or verification checks are missing or failing.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/keez97/phase-gate/implement
Clone the repo
git clone --depth 1 https://github.com/keez97/phase-gate
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,325 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00028 $0.03325
Opus 5 $0.00014 $0.01663
Sonnet 5 $0.00006 $0.00665
Haiku 4.5 $0.00003 $0.00332

Measured yesterday against content hash 8e153d6c6b5d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

implement scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/implement.md · 235 lines

How it starts

The opening of the file, as written. The whole thing — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/implement — Execution Phase

Walks a plan from plans/active/ phase by phase. For each phase: optionally delegate to the implementer agent against the phase's file manifest; run the phase-end verification gate; on green, advance. On red, surface failures and stop.

Preflight 1: Plan Manifest Check

Before any phase-level work:

bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-plan-manifest.sh" "$PLAN_PATH"
  • Exit 0 → proceed.
  • Exit 1 → STOP. The script prints per-phase violations to stderr. Surface them to the user and ask whether to (a) amend the plan to add missing #### Files blocks, or (b) mark the affected phases inline-only in their headings and re-run preflight. Do not proceed until it exits 0.

Rationale: the implementer agent delegation flow requires each phase's scope to be enumerable. A phase without a manifest is not safely delegable.

Preflight 2: Verification Manifest Check

If the plan has a verification.jsonl, every row's check_command must be filled in before implementation begins:

bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-verification-manifest.sh" "$PLAN_DIR"
  • Exit 0 → proceed (includes the opt-out case: no verification.jsonl present).
  • Exit 1 → STOP. Script prints each stub row's id + criterion to stderr. Ask the user whether to (a) fill the check_command fields in verification.jsonl (Edit tool — bounded authoring exception per commands/plan.md Step 2.7), or (b) delete the stub rows if the criterion is being dropped. Re-run preflight until it exits 0.

Rationale: rows may start as stubs at /plan time but /implement requires every verification claim to be mechanically checkable. A null check_command is not a gate — it is a todo masquerading as one.

Session Start

Read the plan fully. Check existing checkmarks (- [x]) on phase tasks — phases already done don't get re-run. Verify all dependencies in the plan exist (files, scripts, env vars). Resolve all Open Questions or stop and flag them to the user.

Read the full file on GitHub · 235 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 235 lines · 28 tokens per session scan A 8e153d6c6b5d

Subscribe to this mod's changes

implement is a command published in the GitHub repository keez97/phase-gate (1 stars, last pushed 3mo ago), licensed MIT. It adds 28 tokens to every session and 3,325 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.