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
| Field | Default | What it does |
|---|---|---|
version | set by init and upgrade | The Groundwork version that last wrote your files |
flow | false | Whether the optional flow is on. Change it with npx groundwork-ai flow on or flow off, not by hand |
tokenBudget | 2000 | Ceiling for what every session always loads: AGENTS.md, CLAUDE.md, the skill and subagent lists. Minimum 500 |
budgets | below | A token budget per memory file |
staleAfterDays | 14 | A handoff older than this is stale |
nudge | true | Whether the agent is reminded to save a handoff that is behind |
budgets
In estimated tokens (characters ÷ 4). doctor checks them. See Budgets and compaction.
| Key | Default | When it is over |
|---|---|---|
brief | 1500 | The brief cuts itself to fit; doctor fails above 125% |
handoff | 600 | doctor fails; compact archives sections Groundwork doesn't define |
map | 800 | doctor fails; shorten it by hand |
decisions | 600 | doctor fails; compact archives superseded records |
lessons | 1200 | doctor fails; merge or drop by hand |
journal | 2500 | doctor fails; compact archives the oldest entries |
Environment variables
| Variable | What it does |
|---|---|
GROUNDWORK_TOOL, GROUNDWORK_MODEL, GROUNDWORK_SESSION | Say who is writing a checkpoint |
GROUNDWORK_WORKER | Selects 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"
}
}| Field | Default | What it does |
|---|---|---|
setup | pending | /gw runs setup until this is done |
approvalMode | per-card | When 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 |
integration | local | local: /gw-approve gates each card's commit. pr: pull-request review is the approval. Only you switch it to pr |
autoCommit | true | Whether the agent commits each card when the mode allows. false: it tells you what to commit |
experience | new | new: 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 |
enforce | both true | The two built-in checks, below |
models | none | An optional model per role, below |
commitFormat | [{id}] {title} | First line of each card's commit. Quick changes use quick as the ID |
commands | empty | The 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.
| Check | What it does |
|---|---|
commitGate | A 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 |
protectHarness | Stops 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>"
}
}
}