Teams and pull requests
With the flow on: one branch and one handoff per task, and pull-request review as the approval.
The flow (optional)
Project memory works without this. Turn the flow on with npx groundwork-ai flow on.
Give each task its own branch and handoff, and let pull-request review be the approval. A change on
main that a task depends on gets noticed.
Status: a working prototype. Two branches, fresh clones and PR checks have been run. A full live review cycle hasn't been observed yet.
Set it up once
- Switch to PR integration. Set
"integration": "pr"in.groundwork/config.json, during setup or in your own editor. After setup the agent is refused this change. - Add the checks. Copy
demo/groundwork-pr.ymlto.github/workflows/, and add the package:npm install --save-dev groundwork-ai. - Protect
main. Require a pull request, an approving review, thegroundwork-headandgroundwork-mergechecks, an up-to-date branch, and dismissal of stale approvals. These rules are what enforce approval.
Work on a task
-
Plan cards on
main, so every branch agrees on the ids. -
One branch per card:
gw/<id>, such asgw/1.2. Its handoff is.groundwork/work/<id>/HANDOFF.md, so tasks don't overwrite each other. -
Record what the task relies on:
npx groundwork-ai reassess 1.2 --target origin/main --dep decision:0001 --dep spec:SPEC.md -
Local commits are checkpoints. They don't need
/gw-approve. -
The agent pushes the task branch and stops for the pull request. It never merges into or pushes
main.
When main moves
npx groundwork-ai check --base origin/mainRun it before you start, when you resume, and before review. It reports:
| Means | Do | |
|---|---|---|
| freshness | Your branch is behind main | Merge or rebase |
| context | A decision or spec section the task depends on changed | Read it, fix the code and card, rerun the tests, then npx groundwork-ai reassess 1.2 --target origin/main |
Drop a dependency that was deleted on purpose with --drop decision:0001. Renames aren't followed;
--dep points a reference at its current path.
Review and merge
Open a pull request from gw/<id>. The head check verifies the card, its evidence and its context. A
reviewer approves in your Git host, and your repository's rules decide when it merges.
Limits: what's enforced.
Commands: check, reassess.