~/groundwork

Configuration

Every setting in .groundwork/config.json, with its default.

Settings live in .groundwork/config.json. Edit the file and the change applies at the next step.

{
  "$schema": "./config.schema.json",
  "version": "2.0.0",
  "flow": false,
  "tokenBudget": 2000,
  "budgets": {
    "brief": 1500,
    "handoff": 600,
    "map": 800,
    "decisions": 600,
    "lessons": 1200,
    "journal": 2500
  },
  "staleAfterDays": 14,
  "nudge": true
}

Project memory

FieldDefaultWhat it does
versionset by init and upgradeThe Groundwork version that last wrote your files
flowfalseWhether the optional flow is on. Change it with npx groundwork-ai flow on or flow off, not by hand
tokenBudget2000Ceiling for what every session always loads: AGENTS.md, CLAUDE.md, the skill and subagent lists. Minimum 500
budgetsbelowA token budget per memory file
staleAfterDays14A handoff older than this is stale
nudgetrueWhether the agent is reminded to save a handoff that is behind

budgets

In estimated tokens (characters ÷ 4). doctor checks them. See Budgets and compaction.

KeyDefaultWhen it is over
brief1500The brief cuts itself to fit; doctor fails above 125%
handoff600doctor fails; compact archives sections Groundwork doesn't define
map800doctor fails; shorten it by hand
decisions600doctor fails; compact archives superseded records
lessons1200doctor fails; merge or drop by hand
journal2500doctor fails; compact archives the oldest entries

Environment variables

VariableWhat it does
GROUNDWORK_TOOL, GROUNDWORK_MODEL, GROUNDWORK_SESSIONSay who is writing a checkpoint
GROUNDWORK_WORKERSelects a worker's handoff

The matching flags win.

The flow's settings

With the flow on, config.json has these too:

{
  "setup": "done",
  "approvalMode": "per-card",
  "autoCommit": true,
  "experience": "new",
  "guards": ["no-ai-trailers"],
  "enforce": { "commitGate": true, "protectHarness": true },
  "commitFormat": "[{id}] {title}",
  "commands": {
    "install": "npm install",
    "test": "npm test",
    "lint": "npm run lint",
    "build": "npm run build",
    "run": "npm run dev"
  }
}
FieldDefaultWhat it does
setuppending/gw runs setup until this is done
approvalModeper-cardWhen you approve: per-card or per-phase (at-end only for projects that already use it). Change it with npx groundwork-ai mode. See Approval modes
integrationlocallocal: /gw-approve gates each card's commit. pr: pull-request review is the approval. Only you switch it to pr
autoCommittrueWhether the agent commits each card when the mode allows. false: it tells you what to commit
experiencenewnew: a sentence per step and how to check it. experienced: terse summaries
guards["no-ai-trailers"]Guards to run before shell commands and file writes, by file name in .groundwork/guards/. The default blocks commits that credit an AI tool
enforceboth trueThe two built-in checks, below
modelsnoneAn optional model per role, below
commitFormat[{id}] {title}First line of each card's commit. Quick changes use quick as the ID
commandsemptyThe project's install, test, lint, build and run commands. test, lint and build are the checks a card must pass. Leave one empty if the project doesn't have it

enforce

Both run before every shell command and file write, whatever guards lists.

CheckWhat it does
commitGateA commit that names a card needs that card done and passing check. In per-card mode, in a tool that records your messages, it also needs your /gw-approve
protectHarnessStops the agent weakening the setup: removing a guard, turning either check or flow off, loosening approvalMode, switching integration to pr, turning autoCommit back on, marking setup not done, or changing guard files, hook files, .groundwork/lib/ or Groundwork's hooks in settings

Only you can turn them off, by editing the file yourself. Until setup is done, the agent may write the config freely.

Models per role

A value is one model name for every tool, or an object keyed by adapter (claude-code, opencode, codex, cursor, gemini). Leave a role out to use the tool's default.

{
  "models": {
    "tester": "<a cheaper model>",
    "implementer": "<a mid-tier model>",
    "reviewer": {
      "claude-code": "<the strongest model>",
      "opencode": "<provider>/<model>"
    }
  }
}

On this page