Skip to main content
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. This is rendered through envsubst (variable substitution) and then sent to Claude as the prompt.

Front matter keys

The model ID passed to claude-code --model. Accepts any ID your configured provider supports.
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-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.
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.
Path to a shell script to run once the implement/review loop approves the change, immediately before the PR opens. Use this to run your test suite or any other validation you want as a final gate.
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.
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 markdown body is processed with envsubst before being sent to Claude. You can reference any of these variables anywhere in the body:

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-implement on an existing PR, triggering a gap-fill run.
The starter template handles both cases with a conditional section. You can read ${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 with WORKFLOW.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:
If your repo has a CLAUDE.md file with codebase conventions, point Claude at it explicitly. The starter template already includes Read CLAUDE.md if it exists at the top — keep that line in place so Claude picks up your conventions automatically.

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.