WORKFLOW.md is your prompt template — it is seeded into your repo once by the sync workflow and is entirely yours to customize from that point on. Every time AI-Implement picks up an issue from your ticketing system (Linear or Jira), it renders this file and sends the result to Claude as its implementation instructions. You control the model, the repo context Claude reads, and every detail of how Claude approaches your codebase.
File structure
WORKFLOW.md has two parts separated by a YAML front matter block:
YAML front matter (between the --- lines at the top) — read by the workflow to configure the run. This block is stripped before Claude sees anything; Claude never receives it.
Markdown body — everything after the front matter. A fixed list of variables is substituted into it (see Variables available in the body), and the result is sent to Claude as the prompt.
Front matter keys
model
model
The model ID passed to This key is required when using Bedrock. There is no Bedrock-specific default — the model resolves from a single provider-agnostic chain that ends in
claude-code --model. Accepts any ID your configured provider supports.claude-sonnet-4-6.Omit it on a Bedrock-mapped repo and that Anthropic model ID is substituted silently. It is invalid on Bedrock, so the run fails when the model is invoked rather than up front.For the Anthropic provider, claude-sonnet-4-6 is the intended default and omitting the key is safe.setup
setup
Path to a shell script to run before Claude starts. Use this to install dependencies, generate code, or set up fixtures your implementation run needs.
verify
verify
Path to a shell script to run once the implement/review loop approves the change. It runs after the branch is pushed and the pull request is open, so it checks what landed rather than gating whether the pull request appears.A run that exhausts its review iterations without approval still opens a draft PR — but
verify is skipped entirely for that PR, since the gate it runs on was never satisfied.teardown
teardown
Path to a shell script that always runs at the end, whether or not Claude succeeded. Use this for cleanup tasks.
Variables available in the body
The variables below are substituted into the body by a regular expression, not byenvsubst. Reference any of them anywhere in the body.
Only
${NAME} forms are substituted, and a token that is not on this list is treated differently than shell semantics would suggest. Workflow template files covers the rules and what they mean for a shell example in your body.
Planning context is appended to the prompt automatically whenever a planning run produced it, so it is not a variable you place in the body.
Writing
${PLANNING_CONTEXT} yourself inserts the block a second time through substitution, so the planning context reaches Claude twice.
New implementation vs gap-fill runs
AI-Implement uses this single file for two distinct scenarios:- When
${PR_NUMBER}is empty — Claude creates a new branch and opens a pull request. - When
${PR_NUMBER}is set — Claude pushes commits to the existing PR branch without creating a new one. This happens when you comment/ai-implementon an existing PR, triggering a gap-fill run.
${PR_NUMBER} in your own template body to branch the instructions however your workflow requires.
Starter template
The following is the default body that ships withWORKFLOW.md after initial setup. Use it as your starting point:
The starter template’s
Fixes ${ISSUE_IDENTIFIER} line triggers GitHub’s auto-close integration with Linear when the PR merges. Jira issues won’t auto-close on merge through this mechanism (GitHub doesn’t auto-recognize Jira keys) — set up Jira automation if you want similar behavior.Customizing the “Repo context” section
The## Repo context section is the primary place to teach Claude about your codebase. Fill it in with specifics so Claude doesn’t have to guess:
Adding repo-specific constraints
After the## Repo context section you can add any constraint Claude should follow throughout the run:
The sync workflow seeds
WORKFLOW.md into your repo once and never overwrites it again. Every change you make is permanent — upstream updates to the workflow templates will not touch this file.