Project files
Every file Groundwork adds to your repo, what it holds and who writes it.
Everything Groundwork knows is a plain file in your repo. Commit it with your code and a fresh clone picks up where you left off.
Layout
After npx groundwork-ai init:
AGENTS.md # what every session reads first
.groundwork/
HANDOFF.md # where things stand
MAP.md # where things are in the codebase
DECISIONS.md # generated index of decisions/
decisions/ # one record per decision
LESSONS.md # mistakes worth remembering
JOURNAL.md # one entry per checkpoint, from git
config.json # settings
config.schema.json
memory.md # how project memory works, for any agent
commands/gw.md # the /gw command
lib/ # the scripts behind brief and checkpoint
hooks/ # session-start.mjs and checkpoint.mjs
templates/ # AGENTS.md (spare copy) and decision.md
.gitignore # keeps local state out of gitMade while you work:
.groundwork/
work/<id>/HANDOFF.md # a parallel worker's own handoff
work/LEDGER.md # who started what, and how it ended
archive/ # what compact moved out
private/ # secrets the agent needs: never committed
.state.json .lock # local state: never committedWhat each file holds
| File | Holds | Written by |
|---|---|---|
AGENTS.md | The project, its commands, how to use memory, promoted rules | You, and the agent on the first /gw |
HANDOFF.md | Now, Next, Blockers, Failing checks, Workers in flight, Notes, under a stamp | The agent writes the prose; checkpoint the stamp |
MAP.md | Folders, entry points, tests, traps | The agent |
decisions/, DECISIONS.md | Numbered records and their index | decide and you; index builds the index |
LESSONS.md | Notes and rules, each with the mistake behind it | lesson and you |
JOURNAL.md | The commits and files since the last checkpoint | checkpoint |
work/ | One handoff per worker, and the ledger | Each worker its own; worker the ledger |
archive/ | Old journal entries, superseded decisions, handoff logs | compact |
config.json | Settings | You, flow, mode |
With the flow on
.groundwork/ also gets workflow.md, the gw-* commands, roles/, guards/, guides/,
reference/, hooks/user-prompt.mjs, templates/card.md, and:
| File | Holds | Written by |
|---|---|---|
SPEC.md | Problem, users, goals, features, constraints | gw-spec, the planner |
cards/ | One card per unit of work: criteria, evidence links, History | gw-plan, the loop, you |
evidence/ | Proof per card, and baseline/ on existing projects | Tester, reviewer, setup |
rules/ | Rules only one role needs, promoted from lessons | gw-retro, you |
retro.md and .approvals/ are also kept out of git.
Yours and Groundwork's
| Files | On upgrade | |
|---|---|---|
| Yours | HANDOFF.md, MAP.md, DECISIONS.md, decisions/, LESSONS.md, JOURNAL.md, work/, archive/, config values, AGENTS.md; with the flow SPEC.md, cards/, evidence/, rules/ | Never touched |
| Groundwork's | memory.md, commands/, lib/, hooks/, templates/, config.schema.json; with the flow roles/, workflow.md, guards/, guides/ | Refreshed. One you edited is kept, with the new version next to it as .new |
Adapter files
| Tool | What init adds | With the flow |
|---|---|---|
| Claude Code | .claude/skills/gw/, .claude/settings.json (hooks), a one-line CLAUDE.md that loads AGENTS.md | .claude/agents/gw-*.md, more skills |
| OpenCode | .opencode/commands/, a plugin in .opencode/plugins/ | Agents |
| Codex | .codex/hooks.json, .agents/skills/gw*/ | .codex/agents/ |
| Cursor | .cursor/hooks.json, .cursor/hooks/, .cursor/skills/gw*/ | .cursor/agents/ |
| Gemini CLI | .gemini/settings.json (hooks), .gemini/hooks/, .gemini/commands/gw*.toml, a GEMINI.md that imports AGENTS.md | .gemini/agents/ |
| Plain markdown | Nothing | Nothing |
init also adds a .gitattributes that marks images as binary, so git never rewrites screenshots.
doctor tells you when adapter files have drifted.