Existing projects
Add Groundwork to a repo that already has code. Nothing of yours is rewritten.
Works on the project you already have. Run npx groundwork-ai init, open your tool, type /gw.
An existing CLAUDE.md or AGENTS.md is added to, never replaced.
What the first /gw does
- Fills in
AGENTS.md: what the project is, and the test, lint, build and run commands it finds. - Fills in
.groundwork/MAP.md: the main folders, entry points, tests and anything unusual. - Asks what you want to work on. You never have to describe the whole app.
Record what is already true
Choices already made are what a new session can't see in the code. Write down the ones that matter:
npx groundwork-ai decide "Postgres for storage" --status accepted
npx groundwork-ai lesson "Run migrations before the test suite" --origin "tests failed on a stale schema"Rules in your existing CLAUDE.md or AGENTS.md stay where they are.
Save
npx groundwork-ai checkpoint --now "…" --next "…"The journal starts here. Earlier history stays in git log.
With the flow
The optional flow does more on an existing project: it drafts a spec of the current state, records the stack in use as decisions, imports your rules as lessons, and saves a baseline of your tests so new work is judged by no new failures. See evidence and approval.