Skip to content
ƒtsforgev0.52.0
19

Recipes

3 min read

A recipe is a named, declarative run setup checked into your repo. Instead of retyping --files, --accept, the model, and limits every time, you write them once and invoke by name:

Terminal window
tsforge run api-endpoint "add a DELETE /users/:id route"
tsforge recipes # list the recipes this repo has

A recipe is data, not code. It composes options tsforge already has. It never executes arbitrary logic and never spawns sub-agents, so it stays deterministic and reviewable in a PR. (This is the deliberate divergence from Codebuff’s executable .ts agent definitions.)

.tsforge/recipes/<id>.json # project recipes (checked in, shared with the team)
~/.tsforge/recipes/<id>.json # your personal recipes, across all repos

A project recipe overrides a global one with the same id. tsforge recipes lists everything it found.

.tsforge/recipes/api-endpoint.json
{
"id": "api-endpoint",
"description": "Add an API route under src/api, strict gate",
"gate": "bun run validate",
"files": ["src/api/**"],
"model": "deepseek-v4-flash",
"maxTurns": 30,
"policyMode": "default"
}
FieldMaps toNotes
idrequired, kebab-case; the name you invoke
descriptionshown by tsforge recipes
taskthe prompta CLI positional still overrides it
files--fileseditable scope globs
gate--acceptthe command that confirms “done”
modelthe run’s modela name from ~/.tsforge/models.json
maxTurnsrun limithard cap on model turns
thinkingBudgetrun limitreasoning-token cap per call
policyMode--policy-modeplan / default / acceptEdits / ci / dontAsk / bypassPermissions
base, staged--base / --stagedfor review-style runs
scout--scoutseed a pre-edit blast-radius scout
withReview--with-reviewafter green, run the review and feed verified findings into one repair cycle
mode--greenfield"greenfield" selects the feature-checklist build loop
plannerModel, workModel, evaluatorModelgreenfield rolesper-role model names; each falls back to model/active
profiletsforge.config.json profilerecommended, strict, security, opinionated
agentstsforge agents <ids>agent spec ids to fan out over the task. Resolved from .tsforge/agents/ (project) and ~/.tsforge/agents/ (global, project wins)
web, plan, log, strictFloorOnlythe matching flagsbooleans

A recipe is, in effect, a saved set of CLI options: tsforge run <id> applies them, and you can also combine --recipe <id> with other commands (e.g. tsforge review --recipe …). An explicit CLI flag always wins over the recipe, so tsforge run api-endpoint --files lib/** overrides just the scope.

Fields this version doesn’t recognize (a typo, or a not-yet-supported field like tools) are reported, not silently ignored, so a recipe never quietly does less than it says.

Commands · tsforge.config.json · Models