Workflow Builder and hooks
The Workflow Builder draws the Companion pipeline as a board: one lane per step, each lane a list of nodes, the blocks of instruction your assistant reads. Open it from the circuit icon at the top of the Specs view, or run SpecKit Companion: Open Workflow Builder.

Every edit on the board is a change to .specify/companion.yml or a file beside it, and none of it reaches your assistant until you build.
Read a lane
Section titled “Read a lane”A lane groups its nodes into phases. Anything your project changed carries the same color, so a lane with no color runs as shipped.

| Mark | Meaning |
|---|---|
changed |
The step differs from the shipped workflow |
yours |
You rewrote this node, or this routing |
gate |
The node can stop the run |
held |
The node can’t be reordered, because a later node reads what it writes |
via <extension> |
A hook an installed extension attached |
+ on a dashed rule |
Attach a hook there, or open the phase menu |
The header counts the same marks for the whole workflow. Its changes chip scrolls to the first lane that differs, and its Living specs chip holds the on/off switch and layout for living specs.

Docked beside the editor, the lanes stack one under the next and every control still works.

Edit a node
Section titled “Edit a node”Click a node to open its panel. Edit and Save write your version to .specify/companion/nodes/<step>/<node>.md and leave the shipped file alone. More > Use the shipped node deletes your copy.

To reorder, drag the node or use the Order row. Move to phase… drops it at the nearest edge of the phase you pick.

A node with alternatives has a Replace menu, and its hooks move with the replacement. Add node, in a phase’s + menu, offers the add-ons that ship switched off.

The same + menu renames, splits and merges phases. A row that can’t run is greyed out with the reason.

A hook is your own work, run before or after a node, a phase or a whole step. There are four kinds.
| In the builder | In companion.yml |
What it does |
|---|---|---|
| Skill | { type: skill, ref: <name> } |
Asks the assistant to load a skill you already have. Try this first. |
| Instruction | { type: prompt, text: "<instruction>" } |
One instruction, read at that point |
| Command | { type: command, run: "<shell line>" } |
A shell line. The assistant needs a terminal. |
| Node | { type: node, ref: <id> } |
A file at .specify/companion/nodes/<id>.md, reusable in several places |
Add hook is in a phase’s + menu, in a node’s panel, and on the dotted slot between nodes. Pick where it runs, then the kind.

Drag a hook onto the top or bottom half of a node to run it before or after, or between two hooks to change their order. Hooks at one place run top to bottom. A hook stays inside its own step, and an extension’s hooks don’t move.

By hand, the same hooks look like this:
commands: implement: hooks: before: handoff: - { type: command, run: "npm test" } - { type: prompt, text: "Confirm the CHANGELOG is updated." } after: implement-exec: - { type: node, ref: review } - { type: command, run: "npm run e2e", background: true }handoff and implement-exec are the anchors. An anchor is a node id, a phase name or the step’s own name. background: true starts a hook without waiting for it, which suits tests and notifications and nothing that writes the run record.
The extension ships four nodes you can attach with ref:, covered in Plan blocks.
Nothing executes companion.yml. Your assistant reads it at run time, so a check that must never be skipped belongs in CI.
| Situation | What happens |
|---|---|
No companion.yml |
Shipped defaults, no warning |
| The file can’t be parsed | Shipped defaults and one warning. Nothing partial is applied. |
| A hook anchored to a missing node | A warning, and that anchor is skipped |
A type: node hook with a missing file |
An error |
An extension’s hook marked asks first |
It doesn’t run unless you ask |
| An unattended run under Auto | A hook that would stop for a person records the checkpoint and carries on |
Spec Kit’s own lifecycle hooks (before_plan, after_specify) live in .specify/extensions.yml, and a Companion run fires those too.
Where a verdict routes
Section titled “Where a verdict routes”specify ends with classify-size, the one branch in the pipeline. As shipped, simple skips plan and tasks, and oversized prints a notice before running everything. Change the routing, at the foot of the lane, opens one row per answer and writes only what you changed:
commands: specify: decisions: classify-size: simple: folds: [plan] warns: ""| Key | What it does |
|---|---|
folds |
The steps that answer skips. [] runs everything. |
warns |
A line printed before the run continues. "" prints nothing. |
The node declares which answers exist, and a build refuses a folds entry naming a step that doesn’t exist.
Document shape
Section titled “Document shape”The Document shape chip on a step lists each ## section of the template it writes. Pick an alternative for a section, or As shipped. Your own alternatives are files in .specify/companion/fragments/.

Steps and workflows
Section titled “Steps and workflows”Add step, in the header or on the + between two lanes, asks for a name, the step it runs behind and the file it writes. After the next build your assistant runs it as /speckit.companion.<name>.

A workflow is a whole named configuration. Switching swaps node order, hooks, templates and routing together, so a one-line fix and a client deliverable can run differently in one repository.

Classic spec-kit changes document shapes only, back to P1/P2/P3 stories and the full Technical Context block. Brownfield is for changing an existing system: the spec is written as a delta, the task list is challenged before it runs, and a person opens the result before it counts as done. As shipped, in the Workflow dropdown, parks your configuration without deleting it.
Build writes the command files your assistant loads. Preview build lists which commands would change and writes nothing. A failed build names the step and leaves the working commands as they were.
The pipeline’s files
Section titled “The pipeline’s files”| Path | Holds | Builder writes |
|---|---|---|
.specify/companion.yml |
Your changes to the shipped pipeline | Yes |
.specify/companion/workflows/<name>.yml |
A named workflow. While one is selected, edits go here. | Yes |
.specify/companion/nodes/<step>/<node>.md |
A node you rewrote, or a step you added. _frame.md replaces the step’s preamble. |
Yes |
.specify/companion/fragments/<name>.md |
A document section you wrote | No |
.specify/extensions/companion/commands/ |
What a build produces. Don’t edit it by hand. | On build |
companion.yml has eight keys:
| Key | What it does |
|---|---|
workflow |
Names a file under workflows/ that replaces this configuration whole. shipped selects none. |
commands.<step>.nodes |
Replaces the step’s node order. Dropping a node that a kept node reads is an error. |
commands.<step>.phases |
Renames and regroups phases. Every node must sit in exactly one. |
commands.<step>.hooks |
Hooks, by side and anchor |
commands.<step>.decisions |
Routing, by node and answer |
commands.<step>.template.sections |
Maps a template heading to the fragment that replaces it |
risk.high, risk.low |
Paths that make a change high or low risk, on top of the defaults. The tier sets how deep implement reviews the work. |
mutation.enabled |
true runs a mutation check at the end of implement and marks requirements whose tests catch no planted bug as weak. Off by default; it adds minutes. |
On a stock Spec Kit project
Section titled “On a stock Spec Kit project”Without the Companion extension for Spec Kit, the board draws the project’s own workflow: .specify/workflows/ when one is installed, otherwise the /speckit.* commands your assistant has. Build is disabled and nothing is written under .specify/companion/. A hook’s checkbox sets enabled for it in .specify/extensions.yml, and a document shape row opens that template from .specify/templates/.
Nodes, phases and your own hooks arrive with the extension. See Install.