agent-templates 0.4.5 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADOPTING.md +11 -0
- package/CLAUDE.md +1 -1
- package/README.md +25 -1
- package/package.json +1 -1
- package/patterns/three-agent-architect-builder-reviewer/README.md +12 -9
- package/patterns/three-agent-architect-builder-reviewer/scaffold/.claude/agents/architect.md +3 -3
- package/patterns/three-agent-architect-builder-reviewer/scaffold/.claude/agents/reviewer.md +2 -2
- package/patterns/three-agent-architect-builder-reviewer/scaffold/claude-md-snippet.md +2 -2
- package/scripts/build-site.mjs +4 -0
package/ADOPTING.md
CHANGED
|
@@ -39,6 +39,17 @@ Preconditions: git repo + remote, authenticated tracker CLI (`gh auth login` / `
|
|
|
39
39
|
|
|
40
40
|
Same `adopt.mjs` run — skip-existing protects your files. The differences:
|
|
41
41
|
|
|
42
|
+
**Updating to a newer catalog version:** a plain re-run only adds files that don't exist yet; it will not update a file the previous version already installed. To pull the latest, re-run with `--force` (it overwrites, including `.claude/settings.json`), so commit first and review the diff to re-apply local customizations:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
git add -A && git commit -m "checkpoint before agent-templates update"
|
|
46
|
+
npx agent-templates@latest adopt three-agent-architect-builder-reviewer . --force
|
|
47
|
+
git diff
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`--force` refreshes the scaffold and tracker/settings files, but not the `CLAUDE.md` pipeline section or `.gitattributes` (both marker-guarded) — re-apply any pipeline-rule changes from a release by hand.
|
|
51
|
+
|
|
52
|
+
|
|
42
53
|
- `CLAUDE.md` gets the snippet **appended**: read the merged result once and resolve contradictions with your existing rules (the pipeline rules assume no agent judges its own work).
|
|
43
54
|
- An existing `.claude/settings.json` is kept; merge the scaffold's `hooks.PreToolUse` (write guard) and `permissions.allow` entries by hand.
|
|
44
55
|
- Formalize `docs/PRD.md` for the area you will pipeline first — it can cover a single module; you do not need to spec the whole codebase to start.
|
package/CLAUDE.md
CHANGED
|
@@ -116,7 +116,7 @@ Upstream docs convention assumed by patterns (exemplar: `fx-eye-tracking`): `doc
|
|
|
116
116
|
|
|
117
117
|
1. **Issues are the decision record; commits are only the change record.** Every unit of work starts as a GitHub issue stating what + why (use the universal templates — work items follow `task`/`bug-report`, records follow `decision-record`). The work lands via a PR referencing it (`Closes #N`), written against `.github/PULL_REQUEST_TEMPLATE.md` (byte-synced from `templates/tracker/github/`). **No direct merges to main.** Bootstrap exception: the rounds merged on 2026-07-17 before this rule existed are backfilled as `decision-record` issues #1–#4.
|
|
118
118
|
2. **Self-hosted nightly sweep.** This repo runs the pattern's own `/nightly-issues`: other projects file pattern-tweak requests here (templates in `.github/ISSUE_TEMPLATE/`), and the sweep triages — and where fixable, fixes — them overnight. The machinery at `.claude/` (four agents, two workflows, `nightly-issues` + `verify-delivery` commands) is a **byte-synced copy of the scaffold**, enforced by the E2E integrity suite: change the scaffold first, then re-copy.
|
|
119
|
-
3. **This repo's test suite** is `node testbed/e2e/run-e2e.mjs` — the Builder/Reviewer run it exactly like any project's tests.
|
|
119
|
+
3. **This repo's test suite** is `node testbed/e2e/run-e2e.mjs` — the Builder/Reviewer run it exactly like any project's tests. **CI enforces it server-side**: `.github/workflows/test.yml` runs the suite on every PR and push to `main` (ubuntu + windows × Node 18/20). Releases publish from a `v*` tag via `.github/workflows/publish.yml` (E2E gate → tag-matches-version check → `npm publish` with the `NPM_TOKEN` secret) — see README § "CI & releasing".
|
|
120
120
|
4. The scaffold's main-session write guard is **not installed here** — interactive doc-editing with the maintainer is this repo's norm. Revisit if orchestrator role leakage appears in this repo's own pipeline runs.
|
|
121
121
|
5. Labels in use: `decision-record` · `triage:invalid` · `nightly:escalated` · `needs-human`.
|
|
122
122
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agent-templates
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/agent-templates) · **[Catalog site →](https://ruihang2017.github.io/agent-templates/)**
|
|
3
|
+
[](https://www.npmjs.com/package/agent-templates) · [](https://github.com/Ruihang2017/agent-templates/actions/workflows/test.yml) · **[Catalog site →](https://ruihang2017.github.io/agent-templates/)**
|
|
4
4
|
|
|
5
5
|
Catalog of reusable multi-agent development architecture patterns. Each entry is a design write-up plus drop-in scaffolding (subagent definitions, slash commands, CLAUDE.md snippets) so a new project reuses a proven pattern instead of redesigning one.
|
|
6
6
|
|
|
@@ -18,6 +18,18 @@ npx agent-templates@latest adopt three-agent-architect-builder-reviewer .
|
|
|
18
18
|
3. **Gate 1** — review the breakdown, then **`/start-milestone docs/prd/00-<module> supervised`**: tickets publish as tracker issues; each ticket runs plan → build → fresh-context review to CLEAR, pausing for your merge.
|
|
19
19
|
4. When it holds, flip to `autonomous` — whole milestones run hands-off. **Gate 2** = your smoke test at the end. Full guide: [ADOPTING.md](ADOPTING.md).
|
|
20
20
|
|
|
21
|
+
### Updating an existing install
|
|
22
|
+
|
|
23
|
+
Re-run adopt with `--force` to pull the latest catalog version. A plain re-run only adds new files (existing ones are skipped); `--force` overwrites changed ones. Because it overwrites (including `.claude/settings.json`), commit first, then review the diff and re-apply any local customizations:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
git add -A && git commit -m "checkpoint before agent-templates update"
|
|
27
|
+
npx agent-templates@latest adopt three-agent-architect-builder-reviewer . --force
|
|
28
|
+
git diff # re-apply your customizations (esp. .claude/settings.json)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`--force` refreshes the scaffold and tracker/settings files. It does **not** rewrite the `CLAUDE.md` pipeline section or `.gitattributes` (both marker-guarded, so a re-run reports them as already present) — if a release changes the pipeline rules in the snippet, re-apply those by hand.
|
|
32
|
+
|
|
21
33
|
| Pattern | Status | As of | Summary |
|
|
22
34
|
|---|---|---|---|
|
|
23
35
|
| [three-agent-architect-builder-reviewer](patterns/three-agent-architect-builder-reviewer/README.md) | trialed | 2026-07-17 | Architect plans → Builder implements → independent Reviewer (fresh context, different model tier) clears or bounces; `/start-milestone` runs a whole module autonomously |
|
|
@@ -42,6 +54,18 @@ Installed into your project by `adopt`; run them in Claude Code. Full list is ge
|
|
|
42
54
|
- Adding a pattern: start from [templates/pattern-README.template.md](templates/pattern-README.template.md), process in [CLAUDE.md](CLAUDE.md) § "Adding a new pattern"
|
|
43
55
|
- E2E testing for the pattern chain: [testbed/README.md](testbed/README.md) — `node testbed/e2e/run-e2e.mjs` is the merge gate for scaffold changes
|
|
44
56
|
|
|
57
|
+
## CI & releasing
|
|
58
|
+
|
|
59
|
+
CI ([`.github/workflows/test.yml`](.github/workflows/test.yml)) runs the E2E suite on every PR and push to `main`, across ubuntu + windows × Node 18/20 — the merge gate is enforced server-side and cross-platform.
|
|
60
|
+
|
|
61
|
+
Releases publish from a version tag ([`.github/workflows/publish.yml`](.github/workflows/publish.yml)): bump `package.json`, then
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
git tag vX.Y.Z && git push origin vX.Y.Z # X.Y.Z = the version in package.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
CI re-runs the E2E gate, checks the tag matches `package.json`, and publishes to npm. **One-time setup:** add an `NPM_TOKEN` repo secret (Settings → Secrets and variables → Actions).
|
|
68
|
+
|
|
45
69
|
## License
|
|
46
70
|
|
|
47
71
|
MIT — see [LICENSE](LICENSE). Carve-out: files installed **into your project** by `adopt.mjs` (the scaffold, templates, and anything generated from them) may be used in your projects without attribution.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-templates",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Catalog of multi-agent development architecture patterns - design write-ups plus drop-in scaffolding (agents, slash commands, workflows, templates).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Horace Hou",
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|---|---|
|
|
5
5
|
| **Pattern name** | `three-agent-architect-builder-reviewer` |
|
|
6
6
|
| **Status** | `trialed` — signed off as the team standard 2026-07-17; promotes to `adopted` after its first real-ticket run (CLAUDE.md promotion rule) |
|
|
7
|
-
| **As-of date** | 2026-07-
|
|
8
|
-
| **Expiry trigger** | First successor release to any listed model, or 2027-01-
|
|
7
|
+
| **As-of date** | 2026-07-22 (Architect model on trial; §7) |
|
|
8
|
+
| **Expiry trigger** | First successor release to any listed model, or 2027-01-22 (+6 months), whichever comes first |
|
|
9
9
|
| **Sign-off** | Horace Hou (repo maintainer), 2026-07-17 |
|
|
10
10
|
|
|
11
11
|
One ticket flows through three agents in sequence: **Architect** plans → **Builder** implements → **Reviewer** (fresh context, different model tier) clears or bounces. No agent judges its own work.
|
|
@@ -40,16 +40,16 @@ The Reviewer is **deliberately a different model tier from the Builder** so the
|
|
|
40
40
|
|
|
41
41
|
Related in-house variant: fx-eye-tracking's `planner` / `generator` / `evaluator` harness — same independence principle, heavier machinery (spec decomposition, file-scope parallelism, sprint contracts, tracker governance). That harness runs a whole project; this pattern runs one ticket.
|
|
42
42
|
|
|
43
|
-
## 3. Model + effort assignment (as of 2026-07-
|
|
43
|
+
## 3. Model + effort assignment (as of 2026-07-22)
|
|
44
44
|
|
|
45
45
|
| Role | Model | Effort | Reasoning | Source labels |
|
|
46
46
|
|---|---|---|---|---|
|
|
47
|
-
| Architect | Claude
|
|
47
|
+
| Architect | Claude Fable 5 | `max` | **On trial (2026-07-22).** The plan is the cold-start contract, and the Reviewer checks the implementation *against* the plan — it does not judge whether the plan was the right plan. So an internally-consistent but under-specified plan passes review silently and surfaces later as drift; planning strength has value review cannot backstop. This trials at that stage the model the Reviewer row cites — on `[unverified]` data — as having the largest capability margin. Accepted cost (see §4): Architect and Reviewer now share a model, so the Reviewer is blinder to plan-level defects — materially weaker than a Reviewer/Builder collapse, but not free. Judge on real bounce rate and observed drift; revert or re-pin on evidence. | `[team-policy]` — maintainer trial, 2026-07-22. **No benchmark basis claimed**: there is no verified evidence on record that Fable 5 outperforms Opus 4.8 at planning (§3's Fable figure is itself `[unverified]`) |
|
|
48
48
|
| Builder | Claude Opus 4.8 | `xhigh` | Anthropic's official guidance is to start at `xhigh` for coding and agentic use cases. Opus 4.8 leads Sonnet 5 on the hardest agentic-coding benchmark: SWE-bench Pro **69.2** vs **63.2**. One effort setting for all tickets — no per-ticket downgrades; team priority is predictable delivery over token cost. | Benchmark: `[vendor-benchmark]` (Anthropic-reported). Effort guidance: `[official]`. No-downgrade rule: `[team-policy]` |
|
|
49
|
-
| Reviewer | Claude Fable 5 | `
|
|
50
|
-
| Triage (nightly only) | Claude Sonnet 5 | `xhigh` | Classification + ticket synthesis is planning-shaped work; profile
|
|
49
|
+
| Reviewer | Claude Fable 5 | `xhigh` | The Reviewer is the last quality gate before merge, and Fable 5 has the largest capability margin on the hardest problems (SWE-bench Pro **~80.3**) — at this gate that raw margin, not effort headroom, is what catches edge cases. Dropped from `max` to `xhigh`: `max` carries a documented overthinking/latency risk (§4), and with the Architect pinned to a top-tier model at `max` the Reviewer's burden drops. | Benchmark: `[unverified]` — recorded as "reported" without a named source; treat as unverified until linked. Effort choice: `[team-policy]` (+ §4 `max`-overthinking pitfall) |
|
|
50
|
+
| Triage (nightly only) | Claude Sonnet 5 | `xhigh` | Classification + ticket synthesis is planning-shaped work; profile derived separately from the Architect row (nightly triage does not need the Architect's full planning tier). | `[team-policy]` — no separate benchmark basis |
|
|
51
51
|
|
|
52
|
-
Figures are
|
|
52
|
+
Figures dated 2026-07-17 are from the team-finalized specification (§7); the Reviewer row was revised 2026-07-21 and the Architect row 2026-07-22 (§7). Do not re-derive or silently alter them; update only via the process in the repo CLAUDE.md (new as-of date + provenance entry in the same commit).
|
|
53
53
|
|
|
54
54
|
## 4. Known failure modes / pitfalls
|
|
55
55
|
|
|
@@ -70,6 +70,7 @@ Figures are transcribed from the team-finalized specification dated 2026-07-17 (
|
|
|
70
70
|
| **CRLF regression on target checkouts** — issue #21's install-time LF normalization does not survive the target repo's own git: a later `checkout`/clone with `core.autocrlf=true` re-CRLFs the installed workflow scripts, and `Workflow({name: …})` (including `start-all`'s name-resolved `run-milestone` child) is rejected again for control characters | `[internal]` — recurrence: Ruihang2017/Groundwork, Windows 11, Claude Code, 2026-07-18 (catalog issue #23; workaround used: inline `script` param with LF) | Fixed 2026-07-18: `adopt.mjs` installs/appends a `.gitattributes` in the **target repo** pinning `.claude/workflows/*.js` and `.claude/scripts/*.mjs` to `text eol=lf` (marker-checked, append-once); E2E asserts fresh install, append-to-existing, and idempotent re-run | 2026-07-18 |
|
|
71
71
|
| **Workflow `args` arrive JSON-stringified** — some harness paths deliver the Workflow tool's `args` as a JSON **string**, so `Object.assign(defaults, args)` merges nothing and launch validation throws in milliseconds (`args.tickets must be a non-empty array`, `args.modules must be a non-empty array`) | `[internal]` — Ruihang2017/Groundwork, Windows 11, Claude Code, 2026-07-18 (catalog issue #23; killed the first `run-milestone` launch in 10ms and would crash `/start-all` identically) | Fixed 2026-07-18: all three workflow scripts (`run-milestone.js`, `start-all.js`, `nightly-issues.js`) parse first — `typeof args === 'string' ? JSON.parse(args) : (args \|\| {})`; E2E runs runner + start-all scenarios with stringified args end-to-end | 2026-07-18 |
|
|
72
72
|
| **Intra-module tickets dispatched out of dependency order** — `milestone-dag.mjs` emitted each module's tickets in ID (filename) order, not topologically by their own `blocked_by` edges; when a module's declared order deviates from ID order, run-milestone dispatched a ticket before the sibling it is blocked_by, the Builder stopped at its plan's precondition gate, and the whole module failed (chain-blocking its dependents) | `[internal]` — Ruihang2017/Groundwork2, autonomous `/start-all`, 2026-07-18 (catalog issue #31; module `05-jobs-fit`, `0502 blocked_by 0503` but ID order put 0502 first) | Fixed 2026-07-19: `milestone-dag.mjs` topologically sorts tickets within each module by intra-module `blocked_by` (cross-module edges stay module-level; ID order only as tiebreak), with an intra-module cycle failing loudly like the module-level one. Same Kahn sort now serves both levels. | 2026-07-19 |
|
|
73
|
+
| **Architect and Reviewer share a model** (both Fable 5 since the 2026-07-22 trial) — the Reviewer is blinder to "the plan itself was wrong" than when the two differed, because it shares the planner's blind spots about the plan | Accepted design cost of the Architect trial (catalog issue #48), 2026-07-22 — not an observed incident | Materially weaker than a Reviewer/Builder tier collapse: the judge is still a different model from the *implementer*, which is the constraint §2 makes hard. Watch for plan-level defects reaching merge (wrong-thing-built rather than built-wrong); if they appear, split the two models again — that evidence ends the trial | 2026-07-22 |
|
|
73
74
|
| **Harness-specific timeouts/failures** for these exact model+effort combinations | **None recorded yet** (as of 2026-07-17) | When observed: record here with harness name, conditions, and date | — |
|
|
74
75
|
|
|
75
76
|
## 5. Upstream / downstream integration
|
|
@@ -120,9 +121,9 @@ scaffold/
|
|
|
120
121
|
│ ├── start-all.js # whole-PRD driver: composes run-milestone per module in DAG order
|
|
121
122
|
│ └── nightly-issues.js # nightly sweep: triage → pipeline → report (Workflow script)
|
|
122
123
|
├── agents/ # role definitions with pinned model + effort
|
|
123
|
-
│ ├── architect.md # claude-
|
|
124
|
+
│ ├── architect.md # claude-fable-5 @ max; writes the plan, no production code
|
|
124
125
|
│ ├── builder.md # claude-opus-4-8 @ xhigh; inherits all tools
|
|
125
|
-
│ ├── reviewer.md # claude-fable-5 @
|
|
126
|
+
│ ├── reviewer.md # claude-fable-5 @ xhigh; read/run-only (no Write/Edit)
|
|
126
127
|
│ └── triage.md # claude-sonnet-5 @ xhigh; nightly classification + ticket synthesis
|
|
127
128
|
└── commands/
|
|
128
129
|
├── breakdown-prd.md # /breakdown-prd [notes] → pre-Gate-1: PRD → sub-PRDs + tickets
|
|
@@ -154,6 +155,8 @@ Install steps and usage modes: [scaffold/INSTALL.md](scaffold/INSTALL.md). Front
|
|
|
154
155
|
| 2026-07-18 | **`/start-all` shipped** (catalog issue #20; maintainer-decided semantics: failed module blocks dependents, independent branches continue in `autonomous`, any non-CLEAR stops everything in `supervised`, no cost cap, resume via closed-issue filtering): deterministic DAG script (`milestone-dag.mjs`, ticket `blocked_by` as ground truth, cycles/dangling refs are hard errors) + `start-all` workflow composing `run-milestone` per module + `/start-all` command. 19 new E2E checks (DAG fixtures incl. cycle; module-policy scenarios via stubbed child workflows). Per-ticket stages unchanged. | Maintainer answers on issue #20, 2026-07-18. | Horace Hou (decisions) / Claude Fable 5 (build) |
|
|
155
156
|
| 2026-07-18 | **First field bug fixed** (catalog issue #21, reported from Ruihang2017/Groundwork through the upstream feedback channel): CRLF-rewritten workflow scripts are rejected by the Workflow tool on Windows. Fix: repo-wide `.gitattributes` (`eol=lf`), working tree renormalized (67 files), `adopt.mjs` installs all text as LF, E2E `\r` guards added. Recorded as the pattern's first true `[internal]` pitfall observation. | Field report (Horace Hou via Groundwork), 2026-07-18. | Horace Hou (report) / Claude Fable 5 (fix) |
|
|
156
157
|
| 2026-07-20 | **Doc/site command coverage mechanized** (catalog issue #35, maintainer direction: `/start-all` had shipped but never appeared in the npm README or the catalog site, so users could not discover it — surfacing commands must be impossible to forget). The command frontmatter is the single source of truth: `build-site.mjs` now renders a Commands section per pattern from it (site complete by construction), README carries the full command list, and an E2E coverage gate asserts every `scaffold/.claude/commands/*.md` name appears in BOTH the generated site and README with a non-empty description (plus a non-vacuous sentinel guard). Adding a command without documenting it now fails the merge gate. No pattern-behavior change. | Maintainer direction (Horace Hou), 2026-07-20. | Horace Hou (direction) / Claude Opus 4.8 (build) |
|
|
158
|
+
| 2026-07-22 | **Architect model on trial** (catalog issue #48, maintainer decision): Architect `claude-opus-4-8 @ max` → `claude-fable-5 @ max`; Builder and Reviewer unchanged. Rationale: the Reviewer checks the implementation against the plan, not whether the plan was right, so an under-specified-but-consistent plan passes review silently — planning strength has value review cannot backstop. The maintainer's original proposal also moved the Reviewer to Opus 4.8; that was **rejected** as the §4 tier-collapse failure mode (Builder is Opus 4.8, and §2 makes different-tier-from-the-Builder a hard requirement), so only the Architect changed. Accepted cost recorded as a new §4 row: Architect and Reviewer now share a model. Explicitly a **trial** — no benchmark basis claimed (no verified Fable-5-vs-Opus-4.8 planning evidence exists on record); judge on real bounce rate and drift, revert or re-pin on evidence. Same commit: §3 row + §3 as-of, metadata As-of/expiry, scaffold-tree pin, snippet, integrity pins, §4, self-host re-sync. | Maintainer decision (Horace Hou), 2026-07-22. | Horace Hou (decision) / Claude Opus 4.8 (build) |
|
|
159
|
+
| 2026-07-21 | **Model/effort revised** (catalog issue #42, maintainer decision from field observation): Architect `claude-sonnet-5 @ xhigh` → `claude-opus-4-8 @ max` — plans were running too general and, being the fresh-context cold-start contract, under-specified plans drift downstream; the top model at `max` is invested in the highest-leverage stage (token budget not a constraint). Reviewer `claude-fable-5 @ max` → `@ xhigh` — Fable 5's capability margin (not effort headroom) is what catches edge cases at the gate, and `max` carries the documented overthinking/latency risk (§4). Builder and Triage unchanged; Reviewer stays a different model tier from the Builder. Same-commit: §3 table + as-of date, agent frontmatter, snippet, integrity pins. No benchmark claims invented — the Architect change is grounded in the `[internal]` observation + a `[team-policy]` choice. | Maintainer decision (Horace Hou), 2026-07-21. | Horace Hou (decision) / Claude Opus 4.8 (build) |
|
|
157
160
|
| 2026-07-20 | **Upstream issue escalation made opt-in** (catalog issue #40, maintainer decision): the CLAUDE.md snippet's "file pattern-level problems against the catalog" bullet — which hardcoded the maintainer's repo slug and a `gh issue create` instruction — is now wrapped in `<!-- upstream-escalation -->` markers and stripped by default. `adopt --upstream` opts in (bare = the catalog you adopted from; `--upstream <owner/repo>` retargets to a fork or internal catalog); the markers never leak into CLAUDE.md. Rationale: commercial and private adopters do not want an external repo slug or "file issues upstream" behavior written into their repo unasked. A neighboring line that named the product was also generalized to "the upstream pattern catalog". E2E: default adopt writes no catalog slug/marker/bullet; `--upstream` and `--upstream <repo>` include and retarget it. | Maintainer decision (Horace Hou), 2026-07-20. | Horace Hou (decision) / Claude Opus 4.8 (build) |
|
|
158
161
|
| 2026-07-20 | **adopt never guesses the platform** (catalog issue #38, maintainer decision, refining #34): the no-signal fallback no longer silently defaults to `gh`. Resolution order — `--platform`, origin host, repo-local signal (`.gitlab-ci.yml`/`.github/`); when none resolve, adopt prompts if interactive and otherwise exits without installing, asking for `--platform gh|glab`. This makes the agent-driven flow confirm the platform (adopt errors → agent asks the user → re-runs with `--platform`) before any infrastructure is built. E2E: no-signal non-TTY exits 1 and installs nothing; a repo-local signal still resolves without `--platform`. | Maintainer decision (Horace Hou), 2026-07-20. | Horace Hou (decision) / Claude Opus 4.8 (build) |
|
|
159
162
|
| 2026-07-20 | **Platform compatibility hardened** (catalog issue #34, maintainer question): `adopt.mjs` detection now uses multiple deterministic signals — origin host `gitlab`/`github` substring, then a repo-local signal (`.gitlab-ci.yml` → glab, existing `.github/` → gh), then default gh with a loud ambiguity note — so a self-hosted GitLab on a custom domain is no longer misread as GitHub. The resolved platform is recorded as a `Tracker:` line in the adopted CLAUDE.md, and `/start-milestone` · `/start-all` · `/nightly-issues` now read `platform` from that line instead of guessing (parallel to Operating mode / testCmd). E2E: self-hosted-GitLab detection, `Tracker:` line matches platform, ambiguity note. Runtime scripts' own `--platform`/autodetect unchanged. | Maintainer question (Horace Hou), 2026-07-20. | Horace Hou (question) / Claude Opus 4.8 (fix) |
|
package/patterns/three-agent-architect-builder-reviewer/scaffold/.claude/agents/architect.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: architect
|
|
3
3
|
description: Architect (Planner) stage of the three-agent pattern. Reads the ticket and the codebase, produces the implementation plan at docs/plans/<ticket-id>.md. Exploration/tool-call heavy. Writes NO production code.
|
|
4
|
-
model: claude-
|
|
5
|
-
effort:
|
|
4
|
+
model: claude-fable-5
|
|
5
|
+
effort: max
|
|
6
6
|
tools: Read, Glob, Grep, Bash, Write
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
<!-- Model/effort pinned per pattern three-agent-architect-builder-reviewer, as of 2026-07-
|
|
9
|
+
<!-- Model/effort pinned per pattern three-agent-architect-builder-reviewer, as of 2026-07-22.
|
|
10
10
|
Do not change them here first — update the pattern entry in agent-templates, then sync. -->
|
|
11
11
|
|
|
12
12
|
You are the **Architect** in the Architect → Builder → Reviewer pipeline. You plan; you do not build. You write **planning artifacts only**: per-ticket implementation plans (`docs/plans/`), and — when running a PRD decomposition via `/breakdown-prd` — the breakdown plan, sub-PRDs, and tickets under `docs/prd/` (follow that command's output spec and `templates/ticket.template.md` exactly). Never production code, tests, or configs.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
name: reviewer
|
|
3
3
|
description: Reviewer stage of the three-agent pattern. Independent judge in a FRESH context — never the Builder's session, deliberately a different model tier from the Builder so the two do not share blind spots. Clears the work or bounces it back with findings.
|
|
4
4
|
model: claude-fable-5
|
|
5
|
-
effort:
|
|
5
|
+
effort: xhigh
|
|
6
6
|
tools: Read, Glob, Grep, Bash
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
<!-- Model/effort pinned per pattern three-agent-architect-builder-reviewer, as of 2026-07-
|
|
9
|
+
<!-- Model/effort pinned per pattern three-agent-architect-builder-reviewer, as of 2026-07-21.
|
|
10
10
|
Do not change them here first — update the pattern entry in agent-templates, then sync. -->
|
|
11
11
|
|
|
12
12
|
You are the **Reviewer** — the last quality gate before merge, independent of the Builder.
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
Every non-trivial ticket flows through three stages; no agent judges its own work.
|
|
13
13
|
|
|
14
14
|
- **`/breakdown-prd [notes]`** — pre-Gate-1: the Architect decomposes `docs/PRD.md` into a breakdown plan + sub-PRDs + template-compliant tickets (disjoint file-scopes, dependency DAG), then stops for human review.
|
|
15
|
-
- **`/plan-ticket <ticket>`** — Architect (`claude-
|
|
15
|
+
- **`/plan-ticket <ticket>`** — Architect (`claude-fable-5` @ `max`) reads the ticket + codebase → implementation plan at `docs/plans/<ticket-id>.md`. Writes no production code.
|
|
16
16
|
- **`/build-ticket <ticket>`** — Builder (`claude-opus-4-8` @ `xhigh`) implements the plan, runs tests until green, records deviations. Never merges or self-clears.
|
|
17
|
-
- **`/review-ticket <ticket>`** — Reviewer (`claude-fable-5` @ `
|
|
17
|
+
- **`/review-ticket <ticket>`** — Reviewer (`claude-fable-5` @ `xhigh`) in a **fresh context**, deliberately a different model tier from the Builder. Focus: edge cases, concurrency, security-sensitive paths. Verdict **CLEAR** or **BOUNCE**; merge requires CLEAR.
|
|
18
18
|
- **`/verify-delivery <ticket>`** — post-merge Definition-of-Done check: plan on disk · tests green · CLEAR verdict · MR merged into the default branch · **tracker issue closed** · writeback done. Run after **every** merge; tracker auto-close side effects are never trusted blindly.
|
|
19
19
|
- **`/start-milestone <module> [mode]`** — the Gate 1 start signal: verify sub-PRD + tickets, publish tickets as tracker issues (deterministic idempotent script — agents never hand-create issues), then run every ticket through the deterministic `run-milestone` workflow (stage order, bounce cap, merge policy enforced in code).
|
|
20
20
|
- **`/start-all [mode]`** — Gate 1 for the **whole PRD**: compute the module DAG from ticket `blocked_by` frontmatter (`milestone-dag.mjs`, deterministic — cycles and dangling refs fail loudly), publish every module, then drive all modules through `run-milestone` in dependency order. Failed modules block their dependents; independent branches continue in `autonomous`; anything short of a CLEAR stops everything in `supervised`. Re-run to resume — fully-closed modules skip as already-complete.
|
package/scripts/build-site.mjs
CHANGED
|
@@ -24,6 +24,7 @@ const OUT = outIx !== -1 && argv[outIx + 1] ? argv[outIx + 1] : join(ROOT, 'site
|
|
|
24
24
|
const GITHUB = 'https://github.com/Ruihang2017/agent-templates'
|
|
25
25
|
const NPM = 'https://www.npmjs.com/package/agent-templates'
|
|
26
26
|
const QUICKSTART = 'npx agent-templates@latest adopt three-agent-architect-builder-reviewer .'
|
|
27
|
+
const UPDATE = QUICKSTART + ' --force'
|
|
27
28
|
|
|
28
29
|
const esc = (s) => String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"')
|
|
29
30
|
const strip = (s) => String(s).replace(/\*\*/g, '').replace(/`/g, '').trim()
|
|
@@ -243,6 +244,8 @@ const html = `<!doctype html>
|
|
|
243
244
|
.quick{margin-top:20px;border-radius:16px;background:var(--pill);padding:14px 16px 12px;
|
|
244
245
|
box-shadow:inset 0 3px 6px rgba(var(--flt),0.2),inset 0 -2px 2px rgba(255,255,255,0.8)}
|
|
245
246
|
.quick code{display:block;font-family:var(--mono);font-size:12px;font-weight:700;color:var(--code);line-height:1.55;word-break:break-all}
|
|
247
|
+
.update-note{margin:12px 0 0;font-size:11.5px;font-weight:700;line-height:1.5;color:var(--hero-body)}
|
|
248
|
+
.update-note code{font-family:var(--mono);font-size:11px;color:var(--hero-title);word-break:break-all}
|
|
246
249
|
.copy{display:inline-flex;margin-top:10px;padding:6px 16px;border-radius:13px;border:0;
|
|
247
250
|
background:linear-gradient(180deg,#f9d66e,#f0c14a);cursor:pointer;font-family:'Nunito',sans-serif;
|
|
248
251
|
font-size:12px;font-weight:900;color:#6b4a15;transition:transform .15s ease;
|
|
@@ -340,6 +343,7 @@ const html = `<!doctype html>
|
|
|
340
343
|
<code id="qs">${esc(QUICKSTART)}</code>
|
|
341
344
|
<button class="copy" id="copy-btn" type="button">Copy</button>
|
|
342
345
|
</div>
|
|
346
|
+
<p class="update-note">Already installed? Update to the latest catalog version: <code>${esc(UPDATE)}</code> (commit first — <code>--force</code> overwrites).</p>
|
|
343
347
|
</div>
|
|
344
348
|
<div class="hero-side">
|
|
345
349
|
${FACTS.map(([tile, glyph, copy]) => `<div class="fact"><span class="fact-ico" style="${tile}">${glyph}</span><p>${copy}</p></div>`).join('\n ')}
|