Skip to content

Custom workflows and commands

A custom workflow is a list of steps in VS Code settings, each one a slash command and the markdown file it writes. To change what happens inside a Companion step, use the Workflow Builder.

{
"speckit.customWorkflows": [
{
"name": "my-workflow",
"displayName": "My Workflow",
"description": "Spec, design, tasks, then build",
"steps": [
{ "name": "specify", "label": "Specify", "command": "myflow.specify", "file": "spec.md" },
{ "name": "plan", "label": "Design", "command": "myflow.plan", "file": "design.md", "includeRelatedDocs": true },
{ "name": "tasks", "label": "Tasks", "command": "myflow.tasks", "file": "tasks.md" },
{ "name": "implement", "label": "Implement", "command": "myflow.implement", "actionOnly": true }
],
"commands": [
{ "name": "auto", "title": "Auto Mode", "command": "/myflow.auto", "step": "specify" }
],
"supportedAiProviders": ["claude", "claude-vscode"],
"steering": [
{ "label": "Codebase notes", "path": ".planning/codebase" }
]
}
]
}

It appears in Create New Spec next to the two built-ins. The choice is recorded on the spec when it’s created, and a spec doesn’t change workflow afterwards.

Create New Spec with its workflow picker set to SpecKit, above the Feature Brief field
The workflow is chosen when a spec is created, then recorded on the spec.
Property Required Description
name Yes Identifier recorded on each spec. Lowercase letters, digits and dashes.
displayName No Label in the picker. Defaults to name.
description No Second line in the picker
steps No The steps, in order
commands No Extra buttons beside a step’s own action. Each needs name, command and step, and takes title and tooltip.
supportedAiProviders No The provider ids that can use the workflow. It’s hidden for any other. Empty means all.
steering No Folders or files the workflow reads that aren’t specs. Each needs a path and takes a label. They show under Steering.

The sidebar and the viewer’s rail show your steps under the labels you wrote.

A workflow written by hand: its own phases listed as the steps a run will take.
A workflow written by hand, with its own steps listed in the rail.
Property Required Description
name Yes Step identifier
command Yes The slash command to send, written without the leading slash
label No Name in the sidebar and rail. Defaults to the capitalized name.
file No The document the step writes. Defaults to <name>.md.
actionOnly No The step writes no document, so it gets a footer action and no rail entry
subFiles No An explicit list of child documents
subDir No A folder scanned for child .md files, not recursive
includeRelatedDocs No Groups the spec folder’s unassigned .md files under this step. Use it on one step.
model No Passed as claude --model. Claude Code only.
effort No low, medium or high, passed as claude --effort. Claude Code only.

Run Companion on spec-kit’s workflow engine

Section titled “Run Companion on spec-kit’s workflow engine”

Companion auto is the usual way to run hands-off. The same pipeline also runs on spec-kit’s own workflow engine. Register it once, then check that specify workflow list shows it:

Terminal window
specify workflow add .specify/extensions/companion/workflows/speckit-companion.workflow.yml

The doctor reports a missing or outdated registration, and python3 .specify/extensions/companion/scripts/doctor.py --fix registers it for you.

Start a run with your request:

Terminal window
specify workflow run speckit-companion --input spec="Add a dark mode toggle"

The engine reads the size specify recorded. A simple change goes straight to implement. A normal or oversized one stops at a review gate after the spec and again after the plan. Outside a terminal the run pauses there, and you pass the gate with its input:

Terminal window
specify workflow resume <run id> --input review_spec=approve
specify workflow resume <run id> --input review_plan=approve

reject stops the run. Each gate has its own input, so approving the spec never approves the plan.

The engine runs each step as a headless agent with that agent’s own permission settings, so a step that cannot write files stops. Pass the flags your agent needs through SPECKIT_INTEGRATION_<AGENT>_EXTRA_ARGS, for example SPECKIT_INTEGRATION_CLAUDE_EXTRA_ARGS="--permission-mode acceptEdits".

Every entry in speckit.customCommands appears in SpecKit: Run Custom Command. An object entry also appears in the viewer footer’s Other actions menu, on the step you set.

{
"speckit.customCommands": [
"review",
{
"name": "pr",
"title": "Create PR",
"command": "/speckit.pr ${specDir} --draft",
"step": "tasks",
"tooltip": "Open a draft pull request for this spec",
"autoExecute": false
}
]
}

The bare string "review" sends /speckit.review.

Property Default Description
name none Identifier. Becomes /speckit.<name> when command is omitted.
title none Label in the picker and the menu
command none The full slash command to send
step all Where the menu offers it: spec, plan, tasks or all
tooltip none Hover text
requiresSpecDir true Adds the spec directory: in place of ${specDir} when the command has one, at the end when it doesn’t
autoExecute true Runs the command in the terminal. false leaves it typed for you to send.