Agent commands
/gw resumes from memory and saves. With the flow on, there are a few more.
One command to remember: /gw. Type it in your AI tool to pick up where you left off, and to
save. In Codex it is $gw. In any other tool, ask your agent to "read .groundwork/commands/gw.md
and follow it".
Everything else is a terminal command the agent runs for you: see the CLI reference.
What /gw does
It reads the brief, tells you where things stand, then does the first thing that applies:
| State | What it does |
|---|---|
.groundwork/ is missing | Tells you to run npx groundwork-ai init |
AGENTS.md still has placeholders | Asks what the project is and does, finds its commands, fills them in |
| The map isn't filled in | Reads the manifest, layout and tests, and fills in MAP.md |
| The handoff is empty | Asks what you want to work on |
| The handoff isn't fresh | Checks its Next step against the code and the listed commits, corrects it, saves |
| You asked to save or stop | Saves with checkpoint and tells you the next step |
| Otherwise | Does the handoff's Next step |
With the flow
With the flow on, /gw also drives the build, and two more commands are yours alone.
Type the three with a slash. Ask for the rest in plain words or by name; /gw picks the right one
anyway.
| When you want to… | Type, or ask for | What it does |
|---|---|---|
| Start or carry on | /gw | Works out where the project is and runs the next step. Never approves for you |
| Accept finished work | /gw-approve | Checks the evidence, marks the card done, commits it |
| Send work back | /gw-reject | Needs a reason in your words; records it on the card and sends it back |
| Set up the project | gw-setup | Fills in AGENTS.md and the config: name, stack, how much to explain, when you approve |
| Turn an idea into a spec | gw-spec | Asks for the smallest useful version first, then writes .groundwork/SPEC.md for you to confirm |
| Turn the spec into a plan | gw-plan | Proposes phases and cards. Nothing is written until you agree |
| Build the next card | gw-next | Runs tester, implementer, reviewer, then stops for you |
| Make a small change or fix | gw-quick | One pass, no card. See right-sizing |
| Choose between options | gw-decide | Lays out 2 to 4 options, waits for your choice, records it |
| Agree a screen before it's built | gw-ui-spec | Writes states, transitions and screen sizes onto the card. See UI and animation |
| Save before you stop | gw-handoff | Saves through checkpoint, keeping the phase and current card |
| Turn repeated mistakes into rules | gw-retro | Reads the retro report and proposes changes. Nothing changes without your OK |
Only /gw, /gw-approve and /gw-reject are installed as native commands. The others live in
.groundwork/commands/, and /gw reads the one it needs. In a tool with no adapter, ask your agent
to "read .groundwork/commands/<name>.md and follow it".