Skip to content
Greenware
Esc
↑↓navigate↵open⌘Jpreview
On this page

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 to main, enable auto-merge, or rewrite pushed history without asking.
  • Checks before every push: bun run check (typecheck and tests). Anything touching src/clay/** or gates is Critical: run /security-review on the stack before a PR leaves draft.
  • Never commit client data: no Clay logins, holdouts, ledgers, .env files or client folders. Client names appear only as examples.
  • Releases: scripts/release.sh vX.Y.Z (maintainers) tags main and publishes a GitHub release with greenware.tar.gz and install.sh, the two files the installer and gw update download. greenware.sh (the site/ folder, on Vercel) redirects curl to the latest release’s install.sh and browsers to this repo, so it never needs a redeploy for a release.
  • Docs: this site is docs/ (content) and docs-site/ (the Blume config). A push to main that touches either redeploys it; cd docs-site && bun run validate checks 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.jsonl and signed approvals/

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 pull on the other machine and gw status continues where you left off. Don’t run the same play on two machines at once.
  • Your own edits to CLAUDE.md or functions.md are 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.

Was this page helpful?