The shipped chains
Kraft ships two chains: default, the full process, and quick-task, the
smallest. To write one of your own, see
Write your own chain.
The default chain
The default chain has these nodes, in order. A node marked gate waits for
you. Before it does, a reviewer agent reads the
gate's document and may send the work back. It never approves for you.
| Node | What it does |
|---|---|
spec | An agent writes the specification. |
spec_approval (gate) | You approve it. A reject sends the item back to spec. |
plan | An agent writes the implementation plan. |
plan_approval (gate) | You approve it. A reject goes back to plan. |
chain_revision | An agent reads the spec and plan against the nodes still to run and proposes changes. |
chain_revision_approval (gate) | You approve the proposal. It passes without asking you when nothing was proposed. A reject goes back to chain_revision. |
implementation | An agent implements the approved plan. |
verification | The changed test scopes run, then a code review, inside a fix loop. |
work_brief | An agent writes the brief you read before the merge request exists. |
local_review (gate) | You approve creating a draft merge request. A reject goes back to implementation. |
describe_merge_request | An agent writes the merge request's title, labels and description. |
draft_merge_request | Kraft rebases onto the base branch, then opens a draft merge request. |
merge_request_feedback | Kraft waits for CI and for the automated reviewers to finish, then a cheap read-only agent decides which of their comments need a change, inside a fix loop. If the base branch moves, the chain restarts from verification. |
work_item_summary | An agent writes the summary and review brief. |
final_review (gate) | You review the whole item and its summary. A reject goes back to implementation. |
mark_ready | Kraft marks the merge request ready. |
external_approval | Kraft waits for an approving review if the forge requires one. |
merge | Kraft merges the merge request, through the target's merge train or merge queue when it has one. A train or queue that drops it sends the item back through final_review after a repair: see on_merge_rejected. |
post_merge_ci | Kraft waits for the post-merge pipeline. |
How long each wait lasts and how many attempts each fix loop gets are in The default caps.
kraft admin templates show default --resolved prints the chain with every
library component expanded.
The quick-task chain
The quick-task chain is two nodes with no gates: implementation, then
verify. verify runs the repo's own test_scopes or test_command from
repos.yaml, a scope's targeted_command in place of its command where it has one. On a repo that declares neither, the item stops and waits for you
with a config error, and Kraft guesses no command.
Overview
Every key a chain file accepts, from the chain down to each kind of task, plus extends, icons and canonical paths, with links to the pages on the features the keys switch on.
Subprocess tasks
What Kraft passes a subprocess task, how it runs, and how its exit code and result file become a status.