Your factory in git
Version your factory folder in its own private repository: what gw init keeps out, what to commit, and habits that work.
There are two repositories, and they hold very different things.
1. The tool (this repo)
- Feature branches and draft PRs. A branch per change (
greenware/sNN-<topic>), stacked when one change needs another. The owner merges; agents never push tomain, enable auto-merge, or rewrite pushed history without asking. - Checks before every push:
bun run check(typecheck and tests). Anything touchingsrc/clay/**or gates is Critical: run/security-reviewon the stack before a PR leaves draft. - Never commit client data: no Clay logins, holdouts, ledgers,
.envfiles or client folders. Client names appear only as examples. - Releases:
scripts/release.sh vX.Y.Z(maintainers) tagsmainand publishes a GitHub release withgreenware.tar.gzandinstall.sh, the two files the installer andgw updatedownload.greenware.sh(thesite/folder, on Vercel) redirectscurlto the latest release’sinstall.shand browsers to this repo, so it never needs a redeploy for a release. - Docs: this site is
docs/(content) anddocs-site/(the Blume config). A push tomainthat touches either redeploys it;cd docs-site && bun run validatechecks links first.
2. Your factory folder (for example ~/factory)
It’s worth versioning, because play artifacts are your audit trail (“what did we approve, and why?”). Keep it in its own private repo, separate from the tool.
cd ~/factory && git init && git add -A && git commit -m "factory: initial"
gh repo create <you>/<agency>-factory --private --source . --push
gw init writes a .gitignore that keeps out:
| Ignored | Why |
|---|---|
clients/*/.clay/ |
Clay logins |
clients/*/gold/ |
holdouts: often personal data, and only Verify may see them |
clients/*/suppression/ |
suppression lists for workspaces without Audiences: customer and do-not-contact domains or emails |
clients/*/ledger.jsonl |
the spend and call ledger: large and operational |
.greenware/ |
the engine’s signing secret, cache and shim |
plays/*/*/.greenware/ |
per-stage context snapshots (copies) |
onboarding/, prereqs/, .env* |
raw web pages, Clay facts and scratch |
Commit everything else:
- client context (
CLAUDE.md), standards, decisions, answers (precedent), function shortlists and registries (resources.json,workspace.json) - play artifacts:
idea.md,breakdown.*,questions.json,research.md,requirements.*,spec.md,contract.json,plan.md,prereqs.json,golive.md,verification.*,audit.*,deliverables/,events.jsonland signedapprovals/
Habits that work:
- Commit at milestones, not stages: “acme: champion-job-change Gate A approved”, “… published v1”.
- Commit before switching machines. Plays are just folders, so
git pullon the other machine andgw statuscontinues where you left off. Don’t run the same play on two machines at once. - Your own edits to
CLAUDE.mdorfunctions.mdare normal commits. Greenware never overwrites them; it writes*.proposed.*files for you to diff. - If a client leaves, archive the client folder in git history, delete it from the working tree, and remove its Clay login.
- Don’t share the factory repo with anyone who shouldn’t see client data. It holds client context and decisions even with the ignores.