~/groundwork

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.

One cardrunner hands it on · never does the work
  1. Testerwrites tests that fail for the right reason
  2. Implementermakes them pass, nothing more
  3. Reviewerfresh context, reruns everything
  4. Youapprove, or send back with a reason
  5. committed ✓
↺ reviewer finds a problem → back to the implementer↺ you reject, with a reason → back into the loop
Each role is a fresh session that reads the card, its role file and only the code the card touches.

The steps

  1. Pick. The lowest-numbered card that is todo or rejected and whose depends_on cards are all done.
  2. Test. The tester writes one failing test per acceptance criterion and saves the failing output.
  3. Implement. The implementer makes the tests pass, then runs the full suite, lint and build.
  4. Review. The reviewer reruns everything, checks each criterion against the diff, and fills in the Evidence section, or sends the card back.
  5. Approve. You see what changed, how to check it, and the caveats. In per-phase mode this stop comes at the end of the phase.
  6. 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

RoleJobMust not
PlannerInterview you for the spec; write phases, cards and decision recordsWrite code; choose your stack
TesterTurn acceptance criteria into failing testsWrite the implementation; weaken tests later
ImplementerMake the tests pass with the smallest reasonable changeEdit tests to make them pass; touch unrelated files
ReviewerCheck the work with fresh eyes; pass it or send it backFix 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

FromToWhoWhen
todotestingrunnerStarts the card
testingimplementingtesterFailing tests are written and saved
implementingreviewimplementerTests, lint and build all pass
implementingtestingimplementerA test looks wrong; the reason is on the card
reviewimplementingreviewerProblems found; listed under History
reviewawaiting-approvalreviewerPassed, in per-card mode
reviewdonereviewerPassed, in per-phase mode
awaiting-approvaldonehumanApproved
awaiting-approvalrejectedhumanRejected, with a reason
donerejectedhumanRejected during a phase review
rejectedimplementingrunnerPicked 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.

On this page