~/groundwork

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

  1. 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.
  2. Add the checks. Copy demo/groundwork-pr.yml to .github/workflows/, and add the package: npm install --save-dev groundwork-ai.
  3. Protect main. Require a pull request, an approving review, the groundwork-head and groundwork-merge checks, 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 as gw/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/main

Run it before you start, when you resume, and before review. It reports:

MeansDo
freshnessYour branch is behind mainMerge or rebase
contextA decision or spec section the task depends on changedRead 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.

On this page