Skip to content
Development
Command

/implement

Execute an approved plan: implementers in worktrees from a pinned commit, one integrator, no merges

BOOST
From plugin
ai-kit
11154 skills15 agents54 commands4 MCP
Install
> /plugin marketplace add solanabr/ai-kit
> /plugin install solana-ai-kit@stbr

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/implement

Context preview

What this command does when you run it.

Execute an approved plan: implementers in worktrees from a pinned commit, one integrator, no merges

Command definition

implement.md
description: "Execute an approved plan: implementers in worktrees from a pinned commit, one integrator, no merges"

Execute the plan in `$ARGUMENTS`: a `/plan-work` file (`.claude/context/plan-*.md`), else the plan approved last in this session; a goal with no plan goes to `/plan-work` first. Start only once the user has approved the plan (they typed this command on it, approved it at `/crew`'s plan gate, or said so); otherwise stop and ask. This command builds on branches. It never merges, pushes or opens a PR.

Steps

1. **Decisions in force:** `bash .claude/bin/decisions.sh in-force`. If the helper is missing or fails, or the record is empty, say so and use the decisions made in this conversation. Tasks the plan lists under Stops wait for the user's answer; run the rest. 2. **Pin the base:** `git rev-parse HEAD` on the branch the work builds on. Uncommitted changes are not in it: say so if there are any. Where the plan names an older base, `git log --oneline <plan-base>..<pinned> -- <a task's files>` shows what moved under each task; its implementer re-verifies those items first, and skips and reports what is already done or no longer applies. 3. **Check the split:** one implementer per task, one owner per file. A file two tasks list is a plan defect: fix the split before dispatch. Shared files (lockfiles, CHANGELOG, VERSION, counts, generated clients, test registries) belong to the integrator, this session: a task puts the exact edit it needs there in its report. 4. **Worktrees.** Steps 4 to 8 run once per wave of the plan. Per task in the wave: `git worktree add -b <branch>-<task> .claude/worktrees/<slug>-<task> <sha>`, where `<sha>` is the pinned base for the first wave and the integration branch's head for each later one. Subagent worktrees (`isolation: worktree`) branch from the default branch, which is why this command makes its own. A commit as the start point also keeps git from writing upstream tracking into `.git/config`, which the sandbox refuses. 5. **Dispatch** the whole wave at once, each task as the owner the plan names (`subagent_type`, or `agentType` in a workflow; general-purpose when it names none): as a dynamic workflow when the session can run one, with the return contract as each agent's schema, so the user can watch it in `/workflows`; else as background subagents launched in one message (`/tasks`). If agent-team teammates fail to spawn, send them again as plain background subagents. 6. **Between waves, here:** rerun the command behind each claim the next step rests on; a gate that ran zero tests or reported SKIP has not passed. The user's calls in the reports go to them as numbered briefs ([format](decide.md#brief)); a task whose work hangs on one waits for the answer, and the rest integrate. A workflow takes no input mid-run and its agents take no messages, so a decision that changes mid-wave and touches a task stops that task and relaunches it with the new list. 7. **Integrate** on the work's branch, never on the default branch (when the base is `main`, create one by the kit's branch convention), in its own worktree (`.claude/worktrees/<slug>`) unless the current checkout is on it and clean. Per task, in dependency order: `git diff --name-only <sha>..<branch>-<task>` must list only that task's files, then `git cherry-pick <sha>..<branch>-<task>`. A conflict means a task wrote outside its files: stop and look, never resolve it by taking one side. Apply the shared-file edits word for word, commit, and run the project's full build, lint and test commands. 8. **Clean up** each task's worktree once its commits are integrated: `git worktree remove .claude/worktrees/<slug>-<task>` (outside the sandbox if it refuses the write to the git directory). After the last wave's checks pass, remove the integration worktree too, so the branch can be checked out anywhere. Task branches stay; deleting them is the user's call.

Brief

Each implementer gets:

  • its worktree's absolute path, where every edit goes apart from its report file, to `cd` into first with that literal path: Claude Code's path checks refuse relative reads after a `cd` they cannot resolve, such as one to a variable, and a worktree made with git gets none of the isolation checks that keep a subagent out of the main checkout;
  • its task from the plan: the files it owns, the files it only reads, the interfaces it consumes and provides, and its gate, which it runs before reporting;
  • the decisions in force, verbatim, under "The user's decisions in force: never contradict one; report a conflict instead". Paste them even where a hook pushes them: the push is unverified for workflow agents, and a changed list changes the prompt, so a relaunched workflow runs the agent again instead of returning a result cached on old decisions;
  • its limits. No user to ask: a call that is theirs (product intent, scope, an interface another task uses, deleting what the plan does not name) goes under **Decisions needed** while it finishes the rest, and so does a conflict with another task, never settled with that task directly. WIP commits on its branch (`git add <its files>`, then `git commit -m "wip(<task>): <what>"`), never `git stash` (every worktree shares one stash stack), a merge, a push, a PR, the full suite, or `decisions.sh add` or `supersede`;
  • the return contract: the full report written to `.claude/context/implement-<YYYY-MM-DD>-<slug>/<task>.md` in the main checkout, by absolute path, returning that path, its commit SHAs, the items it skipped and why, and its shared-file edits, then one labelled line each for **Verified** (command and result), **Decisions made** (routine ones as a count), **Decisions needed** (as briefs), **Assumptions** and **Next owner**, writing "none" where there is nothing. These are the labels the decision hook checks a kit agent's report for.

Output

The pinned base; per task, its branch, commits, gate result and skipped items; the integration branch, its head SHA and the full-c

Read more
Ships withai-kit

Claude Code, set up to ship on Solana. Not programs alone — the whole lifecycle: validating the idea, building the program and the app around it, shipping it, and the launch and growth work that follows.

Get the whole plugin

Other commands on ai-kit.