|
| 1 | +# Gittensory review config templates |
| 2 | + |
| 3 | +Copy-paste templates for `.gittensory.yml` — the per-repo review manifest. Every file in this |
| 4 | +directory uses the **same schema** whether it lives in a public repo root or a self-host private |
| 5 | +mount (`GITTENSORY_REPO_CONFIG_DIR`). |
| 6 | + |
| 7 | +## Template catalog |
| 8 | + |
| 9 | +| File | Purpose | |
| 10 | +|------|---------| |
| 11 | +| [`gittensory.minimal.yml`](./gittensory.minimal.yml) | Smallest safe starter — gate off, observe-only autonomy, no accidental writes | |
| 12 | +| [`gittensory.full.yml`](./gittensory.full.yml) | Exhaustive commented reference — every `gate:`, `settings:`, `review:`, and `features:` field | |
| 13 | +| [`global.gittensory.yml`](./global.gittensory.yml) | **Private only** — illustrative fleet-wide default for a self-host mount | |
| 14 | +| [`repo-override.gittensory.yml`](./repo-override.gittensory.yml) | **Private only** — per-repo overlay deep-merged over `global.gittensory.yml` | |
| 15 | + |
| 16 | +Canonical copies of the minimal and full templates also live at the repo root as |
| 17 | +[`.gittensory.minimal.yml`](../../.gittensory.minimal.yml) and |
| 18 | +[`.gittensory.yml.example`](../../.gittensory.yml.example). CI keeps the `config/examples/` copies |
| 19 | +in sync with those files. |
| 20 | + |
| 21 | +## Public repo root vs private self-host mount |
| 22 | + |
| 23 | +| Layer | Path | Who can read it | Typical contents | |
| 24 | +|-------|------|-----------------|------------------| |
| 25 | +| **Public** | `.gittensory.yml` or `.github/gittensory.yml` in git | Contributors | `wantedPaths`, test expectations, public review presentation | |
| 26 | +| **Private global** | `${GITTENSORY_REPO_CONFIG_DIR}/.gittensory.yml` | Operator only | Shared autonomy baseline, contributor caps, maintainer allowlists | |
| 27 | +| **Private per-repo** | `${GITTENSORY_REPO_CONFIG_DIR}/owner__repo/.gittensory.yml` | Operator only | Repo-specific CI context names, AI mode, overrides | |
| 28 | + |
| 29 | +When **either** a private global or private per-repo file exists, the loader **never fetches** the |
| 30 | +public repo file for that review — mount private policy deliberately. See [README.md](./README.md) |
| 31 | +for precedence and deep-merge rules. |
| 32 | + |
| 33 | +**Never commit real private policy** (maintainer logins, thresholds, autonomy dials you do not want |
| 34 | +contributors to read) into a public repository. Copy `global.gittensory.yml` into your gitignored |
| 35 | +`gittensory-config/` mount and edit there. |
| 36 | + |
| 37 | +## Quick start |
| 38 | + |
| 39 | +### Public repo (contributor-visible config) |
| 40 | + |
| 41 | +```bash |
| 42 | +cp config/examples/gittensory.minimal.yml .gittensory.yml |
| 43 | +# edit wantedPaths / gate when ready |
| 44 | +``` |
| 45 | + |
| 46 | +### Self-host private mount (operator-only policy) |
| 47 | + |
| 48 | +```bash |
| 49 | +mkdir -p gittensory-config |
| 50 | +cp config/examples/global.gittensory.yml gittensory-config/.gittensory.yml |
| 51 | +# edit your-admin-login placeholders before going live |
| 52 | +# optional per-repo overlay: |
| 53 | +mkdir -p gittensory-config/myorg__myrepo |
| 54 | +cp config/examples/repo-override.gittensory.yml gittensory-config/myorg__myrepo/.gittensory.yml |
| 55 | +``` |
| 56 | + |
| 57 | +Point `GITTENSORY_REPO_CONFIG_DIR` at that directory (default `/config` in `docker-compose.yml` maps |
| 58 | +`./gittensory-config`). |
| 59 | + |
| 60 | +## Fleet examples (without committing private policy) |
| 61 | + |
| 62 | +These patterns apply to common JSONbored repos. **Do not copy real maintainer logins or thresholds |
| 63 | +into public git** — use the private mount for anything marked *private* below. |
| 64 | + |
| 65 | +### `JSONbored/gittensory` (dogfooding) |
| 66 | + |
| 67 | +- **Public** `.gittensory.yml` in the repo: work-area guardrails, test expectations, gate dimensions |
| 68 | + contributors should understand. |
| 69 | +- **Private** `gittensory-config/` (gitignored locally, operator mount in production): fleet |
| 70 | + autonomy, anti-abuse caps, maintainer exemption lists — the same split described in |
| 71 | + [`global.gittensory.yml`](./global.gittensory.yml). |
| 72 | +- Start from `gittensory.minimal.yml` in the public repo until gate semantics are tuned, then promote |
| 73 | + fields into the private global default as you enable autonomous review. |
| 74 | + |
| 75 | +### `JSONbored/awesome-claude` (public template repo) |
| 76 | + |
| 77 | +- Prefer **`gittensory.minimal.yml`** or a trimmed public manifest: `wantedPaths`, linked-issue |
| 78 | + policy, and advisory gate modes only. |
| 79 | +- Keep contributor caps, `autoCloseExemptLogins`, and `autonomy.close: auto` in **private config |
| 80 | + only** — this repo is meant to be copied; do not bake operator-specific enforcement into its |
| 81 | + public history. |
| 82 | + |
| 83 | +### `JSONbored/metagraphed` (sibling product repo) |
| 84 | + |
| 85 | +- Same split as `gittensory`: public manifest for transparent contributor guidance; private mount |
| 86 | + for thresholds and maintainer-only rules. |
| 87 | +- Use `repo-override.gittensory.yml` when one repo needs different `expectedCiContexts` or |
| 88 | + `gate.checkMode: disabled` while sharing a fleet-wide `global.gittensory.yml` baseline. |
| 89 | + |
| 90 | +## Validation |
| 91 | + |
| 92 | +Every template in this directory is parsed in CI (`test/unit/config-templates.test.ts` and |
| 93 | +`test/unit/selfhost-config-examples.test.ts`). The exhaustive template body is kept identical to |
| 94 | +`.gittensory.yml.example` from `# WHERE IT LIVES` onward. Lint a local file before deploy: |
| 95 | + |
| 96 | +```bash |
| 97 | +npx tsx scripts/gittensory-config-lint.ts path/to/.gittensory.yml |
| 98 | +``` |
0 commit comments