The build loop
One card goes through a tester, an implementer and a reviewer, then stops for your approval.
The flow (optional)
Project memory works without this. Turn the flow on with npx groundwork-ai flow on.
Every card is tested, built and reviewed before you see it. Then it waits for you.
- Testerwrites tests that fail for the right reason
- Implementermakes them pass, nothing more
- Reviewerfresh context, reruns everything
- Youapprove, or send back with a reason
- committed ✓
The steps
- Pick. The lowest-numbered card that is
todoorrejectedand whosedepends_oncards are alldone. - Test. The tester writes one failing test per acceptance criterion and saves the failing output.
- Implement. The implementer makes the tests pass, then runs the full suite, lint and build.
- Review. The reviewer reruns everything, checks each criterion against the diff, and fills in the Evidence section, or sends the card back.
- Approve. You see what changed, how to check it, and the caveats. In
per-phasemode this stop comes at the end of the phase. - Commit. The card is committed as
[<card-id>] <card title>, and the loop moves on.
Your main session, the runner, hands the card to each role and commits. It never does their work.
The roles
| Role | Job | Must not |
|---|---|---|
| Planner | Interview you for the spec; write phases, cards and decision records | Write code; choose your stack |
| Tester | Turn acceptance criteria into failing tests | Write the implementation; weaken tests later |
| Implementer | Make the tests pass with the smallest reasonable change | Edit tests to make them pass; touch unrelated files |
| Reviewer | Check the work with fresh eyes; pass it or send it back | Fix the code itself |
Where the tool has subagents, each role runs as a separate agent with fresh context. Each reads only its role file, the card, and the files they point to.
After three send-backs on one card, the loop stops and asks you.
Statuses
| From | To | Who | When |
|---|---|---|---|
todo | testing | runner | Starts the card |
testing | implementing | tester | Failing tests are written and saved |
implementing | review | implementer | Tests, lint and build all pass |
implementing | testing | implementer | A test looks wrong; the reason is on the card |
review | implementing | reviewer | Problems found; listed under History |
review | awaiting-approval | reviewer | Passed, in per-card mode |
review | done | reviewer | Passed, in per-phase mode |
awaiting-approval | done | human | Approved |
awaiting-approval | rejected | human | Rejected, with a reason |
done | rejected | human | Rejected during a phase review |
rejected | implementing | runner | Picked up again |
No other moves are allowed. Each one adds a line to the card's History.
The checks
The project's test, lint and build commands are in .groundwork/config.json. All must pass before a
card reaches you. With a saved baseline, the rule is
no new failures.
Keep sessions short
Start a new session when a phase closes; /gw-approve suggests it. The handoff carries everything
the next session needs.
Without subagents
A tool that can't start separate agents still works: one session plays each role in turn. It reads that role's file first, finishes the role before switching, and as reviewer reruns every check itself.