cc-workspace 4.7.1 → 5.2.2
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/CHANGELOG.md +307 -0
- package/README.md +123 -41
- package/bin/cli.js +333 -134
- package/global-skills/agents/e2e-validator.md +152 -33
- package/global-skills/agents/implementer.md +77 -71
- package/global-skills/agents/reviewer.md +192 -0
- package/global-skills/agents/security-auditor.md +345 -0
- package/global-skills/agents/team-lead.md +93 -101
- package/global-skills/agents/workspace-init.md +16 -5
- package/global-skills/bootstrap-repo/SKILL.md +1 -0
- package/global-skills/cleanup/SKILL.md +35 -25
- package/global-skills/cross-service-check/SKILL.md +1 -0
- package/global-skills/cycle-retrospective/SKILL.md +6 -4
- package/global-skills/dispatch-feature/SKILL.md +225 -173
- package/global-skills/dispatch-feature/references/anti-patterns.md +52 -35
- package/global-skills/dispatch-feature/references/spawn-templates.md +140 -97
- package/global-skills/doctor/SKILL.md +124 -25
- package/global-skills/e2e-validator/references/container-strategies.md +55 -23
- package/global-skills/hooks/orphan-cleanup.sh +60 -0
- package/global-skills/hooks/permission-auto-approve.sh +61 -4
- package/global-skills/hooks/session-start-context.sh +10 -47
- package/global-skills/hooks/test_hooks.sh +242 -0
- package/global-skills/hooks/user-prompt-guard.sh +6 -6
- package/global-skills/hooks/validate-spawn-prompt.sh +40 -30
- package/global-skills/incident-debug/SKILL.md +1 -0
- package/global-skills/merge-prep/SKILL.md +1 -0
- package/global-skills/metrics/SKILL.md +139 -0
- package/global-skills/plan-review/SKILL.md +2 -1
- package/global-skills/qa-ruthless/SKILL.md +2 -0
- package/global-skills/refresh-profiles/SKILL.md +1 -0
- package/global-skills/rules/context-hygiene.md +4 -19
- package/global-skills/rules/model-routing.md +31 -18
- package/global-skills/session/SKILL.md +41 -20
- package/global-skills/templates/workspace.template.md +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [5.2.2] — 2026-03-09
|
|
4
|
+
|
|
5
|
+
### Agent Teams enforcement
|
|
6
|
+
|
|
7
|
+
- **Removed `Task(implementer)` from agent tools** — team-lead and e2e-validator can no
|
|
8
|
+
longer spawn implementers as subagents. All implementer spawns now go through the
|
|
9
|
+
`Teammate` tool exclusively, enforcing the Agent Teams communication protocol
|
|
10
|
+
(SendMessage/wait loop, micro-QA between commits).
|
|
11
|
+
|
|
12
|
+
- **e2e-validator gains `Teammate, SendMessage`** — can now delegate `--fix` repairs
|
|
13
|
+
through the proper teammate protocol instead of Task subagents.
|
|
14
|
+
|
|
15
|
+
- **Auto-enable Agent Teams on install** — `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is
|
|
16
|
+
now automatically injected into `~/.claude/settings.json` during `npx cc-workspace install`.
|
|
17
|
+
Users no longer need to set this environment variable manually.
|
|
18
|
+
|
|
19
|
+
## [5.2.1] — 2026-03-06
|
|
20
|
+
|
|
21
|
+
### Prompt quality improvements
|
|
22
|
+
|
|
23
|
+
- **`dispatch-feature` Phase 0** — added concrete few-shot examples for good vs bad
|
|
24
|
+
clarification questions. Models produce significantly better clarifications with
|
|
25
|
+
examples to anchor on.
|
|
26
|
+
|
|
27
|
+
- **`dispatch-feature` modes B/C/D** — expanded from 1-line descriptions to detailed
|
|
28
|
+
step-by-step procedures. Mode B specifies exploration-first flow, Mode C specifies
|
|
29
|
+
retroactive plan creation and scoped post-impl, Mode D defers to its dedicated section.
|
|
30
|
+
Reduces improvisation risk on non-default modes.
|
|
31
|
+
|
|
32
|
+
- **`dispatch-feature` Phase 4 micro-QA** — Haiku diff review prompt is now referenced
|
|
33
|
+
from `@references/spawn-templates.md` instead of being inlined. Prevents prompt
|
|
34
|
+
corruption when Opus reformulates the template. The canonical template in
|
|
35
|
+
spawn-templates.md (section "Haiku micro-QA subagent template") is the single
|
|
36
|
+
source of truth.
|
|
37
|
+
|
|
38
|
+
### Bug fixes
|
|
39
|
+
|
|
40
|
+
- **`workspace-init` Phase 2** — fixed stale references to global `~/.claude/skills/`
|
|
41
|
+
and `~/.claude/rules/` (removed in v5.2.0). Phase 2 now correctly checks local
|
|
42
|
+
`orchestrator/.claude/skills/` and `.claude/rules/`, and checks global agents
|
|
43
|
+
separately with the full list of 6 agents.
|
|
44
|
+
|
|
45
|
+
- **CLI `doctor`** — skill count check is now dynamic (reads from package's
|
|
46
|
+
`global-skills/` directory) instead of hardcoded `13`. Adding or removing skills
|
|
47
|
+
no longer requires updating the doctor check.
|
|
48
|
+
|
|
49
|
+
- **CLI `session close`** — now checks for `gh` CLI availability before offering PR
|
|
50
|
+
creation. If `gh` is not installed, the PR step is skipped with a helpful message
|
|
51
|
+
instead of failing silently on user confirmation.
|
|
52
|
+
|
|
53
|
+
- **CLI cleanup** — removed obsolete tombstone comment about `generateBlockHook()`
|
|
54
|
+
(removed in v4.1.4).
|
|
55
|
+
|
|
56
|
+
## [5.2.0] — 2026-03-06
|
|
57
|
+
|
|
58
|
+
### Breaking changes
|
|
59
|
+
|
|
60
|
+
- **Skills and rules are now LOCAL** — installed in `orchestrator/.claude/skills/` and
|
|
61
|
+
`orchestrator/.claude/rules/` instead of `~/.claude/skills/` and `~/.claude/rules/`.
|
|
62
|
+
Only agents remain global (`~/.claude/agents/`) because `claude --agent` requires it.
|
|
63
|
+
This means Claude sessions outside orchestrator/ no longer inherit cc-workspace rules
|
|
64
|
+
and skills — Claude behaves normally when used outside orchestrator context.
|
|
65
|
+
|
|
66
|
+
- **Automatic legacy cleanup** — `npx cc-workspace update --force` removes old global
|
|
67
|
+
skills and rules from `~/.claude/` (from versions < 5.2). Only cc-workspace-owned
|
|
68
|
+
entries are removed; user-created skills/rules are untouched.
|
|
69
|
+
|
|
70
|
+
### New agents
|
|
71
|
+
|
|
72
|
+
- **`reviewer`** — Senior code review agent (Opus). Evidence-based: every comment requires
|
|
73
|
+
file:line + code snippet + justification. Anchored on constitution + CLAUDE.md + plan,
|
|
74
|
+
NEVER on existing legacy code (safe for projects in active refactoring). Mandatory scope
|
|
75
|
+
check (plan vs implemented). Standalone via `claude --agent reviewer` or invoked in
|
|
76
|
+
dispatch-feature Phase 5 after qa-ruthless.
|
|
77
|
+
|
|
78
|
+
- **`security-auditor`** — Security audit agent (Opus). 7-phase systematic audit:
|
|
79
|
+
auth flow tracing (endpoint × middleware mapping), tenant isolation (model × scoping check),
|
|
80
|
+
secrets scan (hardcoded values, committed .env, frontend bundle exposure), dependency CVEs
|
|
81
|
+
(npm audit / composer audit with grep fallback), input validation & injection vectors
|
|
82
|
+
(SQL, XSS, command, deserialization), headers & CORS, and session-scoped delta analysis
|
|
83
|
+
(separates NEW findings from PRE-EXISTING). Conditional in Phase 5 — triggered when plan
|
|
84
|
+
involves auth changes, tenant-scoped models, file uploads, payment data, or new public
|
|
85
|
+
endpoints. Standalone via `claude --agent security-auditor`.
|
|
86
|
+
|
|
87
|
+
### Changes
|
|
88
|
+
|
|
89
|
+
- **`qa-ruthless`** — added explicit `model: opus` in frontmatter. Previously inherited
|
|
90
|
+
from caller context; now fixed to Opus regardless of invocation method.
|
|
91
|
+
|
|
92
|
+
- **`dispatch-feature` Phase 5** — updated order:
|
|
93
|
+
1. cross-service-check
|
|
94
|
+
2. qa-ruthless
|
|
95
|
+
3. reviewer (new — always)
|
|
96
|
+
4. security-auditor (new — conditional)
|
|
97
|
+
5. merge-prep
|
|
98
|
+
6. cycle-retrospective
|
|
99
|
+
|
|
100
|
+
- **`team-lead`** — workflow table updated for new Phase 5 order with reviewer and
|
|
101
|
+
conditional security-auditor.
|
|
102
|
+
|
|
103
|
+
- **`model-routing.md`** — routing table updated: QA orchestration = Opus (explicit),
|
|
104
|
+
code reviewer = Opus, security auditor = Opus, QA investigators = Sonnet (clarified).
|
|
105
|
+
|
|
106
|
+
- **`doctor`** — refactored for new layout:
|
|
107
|
+
- Skills and rules checked locally in `orchestrator/.claude/` (not globally)
|
|
108
|
+
- Legacy detection: warns if old global skills/rules still exist
|
|
109
|
+
- Agent count updated to 6 (added reviewer, security-auditor)
|
|
110
|
+
|
|
111
|
+
- **`bin/cli.js`** — major refactoring:
|
|
112
|
+
- `installGlobals()`: only installs agents globally; calls `cleanLegacyGlobals()`
|
|
113
|
+
- `cleanLegacyGlobals()` (new): removes cc-workspace skills and rules from `~/.claude/`
|
|
114
|
+
- `setupWorkspace()`: copies skills + rules into `orchestrator/.claude/skills/` and
|
|
115
|
+
`orchestrator/.claude/rules/`
|
|
116
|
+
- `updateLocal()`: now updates skills + rules locally (in addition to hooks, settings,
|
|
117
|
+
templates, CLAUDE.md)
|
|
118
|
+
- `doctor()`: checks skills/rules locally, detects legacy globals
|
|
119
|
+
- `uninstall`: updated for new layout, cleans agents + legacy globals
|
|
120
|
+
- CLAUDE.md content: updated config section, skills/agents count, launch commands
|
|
121
|
+
- Help, post-init summary, and all user-facing messages updated
|
|
122
|
+
|
|
123
|
+
- **All frontmatter** — `prompt_version` bumped to `5.2.0` across all 19 agents and skills.
|
|
124
|
+
|
|
125
|
+
### Migration from v5.1.x
|
|
126
|
+
|
|
127
|
+
1. Run `npx cc-workspace update --force` from your workspace root.
|
|
128
|
+
2. This will:
|
|
129
|
+
- Install 6 agents globally (`~/.claude/agents/`)
|
|
130
|
+
- Install skills + rules locally (`orchestrator/.claude/skills/` and `rules/`)
|
|
131
|
+
- Remove legacy global skills and rules from `~/.claude/`
|
|
132
|
+
- Update hooks, settings, templates, CLAUDE.md
|
|
133
|
+
3. Run `npx cc-workspace doctor` to verify the new layout.
|
|
134
|
+
4. Claude sessions outside orchestrator/ will no longer see cc-workspace rules/skills.
|
|
135
|
+
|
|
136
|
+
## [5.1.0] — 2026-03-05
|
|
137
|
+
|
|
138
|
+
### Fixes from prompt engineering review
|
|
139
|
+
|
|
140
|
+
- **Version alignment** — `package.json` now matches `prompt_version: 5.1.0` across all agents/skills.
|
|
141
|
+
|
|
142
|
+
- **`--dry-run` flag** — `init` and `update` commands now support `--dry-run` to preview
|
|
143
|
+
all file operations without writing anything. All FS helpers (mkdirp, copyFile, copyDir,
|
|
144
|
+
writeFile, writeVersion, chmod) respect the flag.
|
|
145
|
+
|
|
146
|
+
- **Secure `permission-auto-approve.sh`** — compound commands (`&&`, `||`, `;`, `|`,
|
|
147
|
+
backticks, `$()`) are now rejected before any pattern matching. Prevents hypothetical
|
|
148
|
+
`git branch session/x && malicious-command` bypasses. DRY constant for JSON responses.
|
|
149
|
+
|
|
150
|
+
- **Robust `detectProjectType`** — replaced naive `string.includes()` check with
|
|
151
|
+
`JSON.parse` + `dependencies`/`devDependencies` key lookup. Detects `@quasar/app-vite`,
|
|
152
|
+
`@quasar/app-webpack` explicitly. No more false positives from package names containing
|
|
153
|
+
"next" or "react" as substrings.
|
|
154
|
+
|
|
155
|
+
- **Split `session-start-context.sh`** — extracted orphan worktree cleanup into
|
|
156
|
+
`orphan-cleanup.sh` (new hook). `session-start-context.sh` now handles context injection
|
|
157
|
+
only. Both registered as separate `SessionStart` hooks in `settings.json`.
|
|
158
|
+
|
|
159
|
+
- **Stronger `validate-spawn-prompt.sh`** — constitution detection uses 3 heuristics:
|
|
160
|
+
explicit headers, numbered bold rules (3+ = constitution), and keyword+domain term density.
|
|
161
|
+
Expanded domain keywords (error handling, security, test coverage, etc.).
|
|
162
|
+
|
|
163
|
+
- **JSON format for Haiku micro-QA** — micro-QA template now requests structured JSON
|
|
164
|
+
(`{"status":"OK"}` or `{"status":"BLOCKER","file":"...","line":N,"reason":"..."}`)
|
|
165
|
+
instead of free-text. Updated in both `spawn-templates.md` and `dispatch-feature/SKILL.md`.
|
|
166
|
+
|
|
167
|
+
- **Compact Phase 2.5/2.9** — replaced verbose literal bash blocks with concise semantic
|
|
168
|
+
descriptions + table format. Opus has the concepts; token savings without information loss.
|
|
169
|
+
|
|
170
|
+
- **Clarified `/compact` instruction** — Rule #10 in team-lead now explicitly references
|
|
171
|
+
Claude Code's native `/compact` command rather than vague "compact after each cycle".
|
|
172
|
+
|
|
173
|
+
- **Chrome MCP check in doctor** — new Check 4b verifies Chrome DevTools MCP server
|
|
174
|
+
configuration in both global and project-level settings. Warns if `e2e-validator --chrome`
|
|
175
|
+
would fail due to missing MCP.
|
|
176
|
+
|
|
177
|
+
- **CLI unit tests** — added `test_cli.sh` (comprehensive): version, help, unknown command,
|
|
178
|
+
`--dry-run` (no files written), full `init` (structure + globals + permissions),
|
|
179
|
+
idempotency (user files preserved), `update --force`, project type detection,
|
|
180
|
+
session list. ~50 assertions.
|
|
181
|
+
|
|
182
|
+
## [5.0.0] — 2026-03-05
|
|
183
|
+
|
|
184
|
+
### Breaking changes
|
|
185
|
+
|
|
186
|
+
- **Orchestrator now has Bash access** — `disallowedTools: Bash` removed from `team-lead`.
|
|
187
|
+
Opus manages git (branch creation, worktrees) and micro-QA directly. No subagent delegation for git.
|
|
188
|
+
|
|
189
|
+
- **One teammate per repo** — the dispatch model shifts from "one subagent per commit unit"
|
|
190
|
+
to "one teammate per repo". The teammate handles all commit units for its repo sequentially,
|
|
191
|
+
signals after each commit, and waits for orchestrator green light.
|
|
192
|
+
|
|
193
|
+
- **Micro-QA between every commit** — mandatory Bash test run + Haiku diff review after each
|
|
194
|
+
commit before greenlighting the next. This replaces the single final QA-only model.
|
|
195
|
+
|
|
196
|
+
- **Worktrees created after plan validation** — branches and worktrees are set up by Opus
|
|
197
|
+
directly via Bash only after the user validates the plan. No more orphan branches on rejected plans.
|
|
198
|
+
|
|
199
|
+
- **Worktrees persist until session close** — worktrees in `/tmp/` are never pruned during
|
|
200
|
+
an active session. Cleanup happens exclusively in `/session close <n>`.
|
|
201
|
+
|
|
202
|
+
- **cycle-retrospective is mandatory** — now a required Phase 5 step in dispatch-feature,
|
|
203
|
+
not an optional post-cycle task.
|
|
204
|
+
|
|
205
|
+
- **plan-review uses Sonnet** — upgraded from Haiku for constitution compliance checking.
|
|
206
|
+
|
|
207
|
+
### New features
|
|
208
|
+
|
|
209
|
+
- **Source branch override** — specify a different source branch in the initial prompt
|
|
210
|
+
("fix on hotfix/payment", "refacto from develop"). Stored in session JSON, used as PR target.
|
|
211
|
+
|
|
212
|
+
- **Session JSON commit tracking** — session `.json` files now track per-repo commit status,
|
|
213
|
+
hash, and QA result for resumability after crashes.
|
|
214
|
+
|
|
215
|
+
- **Worktree removal in session close** — `session close` (CLI and skill) now includes
|
|
216
|
+
a step to remove `/tmp/` worktrees before branch deletion.
|
|
217
|
+
|
|
218
|
+
- **Micro-QA Haiku template** — new spawn template in `spawn-templates.md` for the
|
|
219
|
+
structured diff-only review subagent used in Phase 4.
|
|
220
|
+
|
|
221
|
+
### Changes
|
|
222
|
+
|
|
223
|
+
- `team-lead.md` — removed `disallowedTools: Bash`, added Phase 4 micro-QA flow,
|
|
224
|
+
updated dispatch model to one teammate per repo, added git setup instructions (Phase 2.5).
|
|
225
|
+
|
|
226
|
+
- `implementer.md` — removed all git setup responsibility (worktree creation, branch creation).
|
|
227
|
+
Implementer receives a ready worktree path. Added SendMessage signal + wait protocol.
|
|
228
|
+
`maxTurns` increased from 60 to 120 for multi-commit sessions.
|
|
229
|
+
|
|
230
|
+
- `dispatch-feature/SKILL.md` — Phase 1 uses Opus direct exploration (no upfront Haiku scan).
|
|
231
|
+
Phase 2.5 documents Opus-direct git setup. Phase 3 redesigned for one-teammate-per-repo.
|
|
232
|
+
Phase 4 (micro-QA) is new. Phase 5 adds mandatory cycle-retrospective.
|
|
233
|
+
|
|
234
|
+
- `dispatch-feature/references/spawn-templates.md` — full rewrite for one-teammate-per-repo
|
|
235
|
+
model. New backend, frontend, infra, and Haiku micro-QA templates. Context tiering updated.
|
|
236
|
+
|
|
237
|
+
- `dispatch-feature/references/anti-patterns.md` — updated for v5 model.
|
|
238
|
+
Removed "one subagent per commit" anti-pattern (now correct behavior).
|
|
239
|
+
Added: never two teammates on same repo, never skip micro-QA, never prune active worktrees.
|
|
240
|
+
|
|
241
|
+
- `hooks/permission-auto-approve.sh` — extended to auto-approve safe Bash git operations
|
|
242
|
+
(branch creation, worktree add in /tmp/, log/status/diff) and test/typecheck in worktrees.
|
|
243
|
+
|
|
244
|
+
- `hooks/validate-spawn-prompt.sh` — updated checks for v5 spawn model:
|
|
245
|
+
worktree_path required, signal protocol required, plan (not just tasks) required.
|
|
246
|
+
|
|
247
|
+
- `hooks/session-start-context.sh` — session-aware orphan cleanup: active session worktrees
|
|
248
|
+
are never removed. Only truly orphaned worktrees (no matching active session JSON) are cleaned.
|
|
249
|
+
|
|
250
|
+
- `hooks/user-prompt-guard.sh` — updated reminder: Bash is allowed for git/test operations,
|
|
251
|
+
not for writing application code in repos.
|
|
252
|
+
|
|
253
|
+
- `rules/model-routing.md` — updated routing table (plan-review → Sonnet, micro-QA → Haiku).
|
|
254
|
+
Documents dispatch-feature Phase 1 exception (Opus explores directly).
|
|
255
|
+
|
|
256
|
+
- `skills/session/SKILL.md` — added worktree removal step in `/session close`.
|
|
257
|
+
|
|
258
|
+
- `dispatch-feature/SKILL.md` — added **Phase 2.9: Pre-dispatch check** between
|
|
259
|
+
git setup and teammate dispatch. Verifies branch exists, worktree exists and is on
|
|
260
|
+
the right branch, worktree is clean, repo is reachable. Auto-fixes simple cases
|
|
261
|
+
(missing branch/worktree), escalates to user if unreachable.
|
|
262
|
+
|
|
263
|
+
- `doctor/SKILL.md` — added **v5 compatibility checks** (Check 3):
|
|
264
|
+
detects v4 installations (disallowedTools: Bash in team-lead, missing SendMessage
|
|
265
|
+
in implementer, plan-review on haiku), validates active session worktree_path fields,
|
|
266
|
+
checks session worktrees exist on disk, detects orphan worktrees not linked to any session.
|
|
267
|
+
|
|
268
|
+
- `skills/cleanup/SKILL.md` — session-aware: explicitly skips active session worktrees.
|
|
269
|
+
|
|
270
|
+
- `skills/cycle-retrospective/SKILL.md` — description updated to MANDATORY, references Phase 5.
|
|
271
|
+
|
|
272
|
+
- `skills/plan-review/SKILL.md` — model changed from haiku to sonnet.
|
|
273
|
+
|
|
274
|
+
- `templates/workspace.template.md` — version reference updated to v5.0.
|
|
275
|
+
|
|
276
|
+
- `bin/cli.js` — version bumped to 5.0.0. `session close` command now includes worktree
|
|
277
|
+
removal step before branch deletion. `claudeMdContent()` updated to reflect v5 rules.
|
|
278
|
+
|
|
279
|
+
### Migration from v4.x
|
|
280
|
+
|
|
281
|
+
1. Run `npx cc-workspace update --force` to install v5 global components.
|
|
282
|
+
2. Run `npx cc-workspace update` from your workspace root to update local `orchestrator/`.
|
|
283
|
+
3. The new `team-lead` agent has Bash access — review your workspace security posture.
|
|
284
|
+
4. Existing sessions (`session.json` files) are compatible but lack the new `worktree_path`
|
|
285
|
+
and `commits` fields. Add them manually or re-init sessions.
|
|
286
|
+
5. `cycle-retrospective` will now be called automatically at the end of every dispatch cycle.
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
### E2E Validator updates (v5.0.0 continued)
|
|
290
|
+
|
|
291
|
+
- `agents/e2e-validator.md` — model upgraded Sonnet → Opus. maxTurns 100 → 150.
|
|
292
|
+
No worktrees: agent works directly on repos at correct branch (merged or session).
|
|
293
|
+
Added port conflict check (Step 1) before starting containers.
|
|
294
|
+
Added global 10-minute timeout on container health checks.
|
|
295
|
+
Added test data seeding step (Step 2).
|
|
296
|
+
Teardown simplified — no worktree removal, only branch restore + docker down.
|
|
297
|
+
`--fix` mode updated to use Teammate(implementer) instead of Task(implementer).
|
|
298
|
+
|
|
299
|
+
- `e2e-validator/references/container-strategies.md` — build contexts changed from
|
|
300
|
+
`/tmp/e2e-{repo}` to `../{repo}` (direct repo path at checked-out branch).
|
|
301
|
+
Added non-standard port defaults to reduce conflicts with local dev servers.
|
|
302
|
+
Added port assignment table in e2e-config.md guidance.
|
|
303
|
+
Removed all /tmp/ worktree references.
|
|
304
|
+
|
|
305
|
+
## [4.7.1] — previous
|
|
306
|
+
|
|
307
|
+
See git history for earlier versions.
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ cd ~/projects/my-workspace
|
|
|
27
27
|
npx cc-workspace init . "My Project"
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
This creates an `orchestrator/` directory
|
|
30
|
+
This creates an `orchestrator/` directory with 13 skills, 2 rules, and 9 hooks locally in `orchestrator/.claude/`, and installs 6 agents globally in `~/.claude/agents/`.
|
|
31
31
|
|
|
32
32
|
### Configure (one time)
|
|
33
33
|
|
|
@@ -48,6 +48,8 @@ The init agent will:
|
|
|
48
48
|
```bash
|
|
49
49
|
cd orchestrator/
|
|
50
50
|
claude --agent team-lead # orchestration sessions
|
|
51
|
+
claude --agent reviewer # evidence-based code review
|
|
52
|
+
claude --agent security-auditor # security audit
|
|
51
53
|
claude --agent e2e-validator # E2E validation (beta)
|
|
52
54
|
```
|
|
53
55
|
|
|
@@ -67,8 +69,8 @@ npx cc-workspace update
|
|
|
67
69
|
```
|
|
68
70
|
|
|
69
71
|
Updates all components if the package version is newer:
|
|
70
|
-
- **Global**:
|
|
71
|
-
- **Local** (if `orchestrator/` found): hooks, settings.json, CLAUDE.md, templates, _TEMPLATE.md
|
|
72
|
+
- **Global**: agents in `~/.claude/agents/` + cleanup of legacy global skills/rules
|
|
73
|
+
- **Local** (if `orchestrator/` found): skills, rules, hooks, settings.json, CLAUDE.md, templates, _TEMPLATE.md
|
|
72
74
|
- **Never overwritten**: workspace.md, constitution.md, plans/, e2e/
|
|
73
75
|
|
|
74
76
|
### Diagnostic
|
|
@@ -78,7 +80,7 @@ npx cc-workspace doctor # from terminal
|
|
|
78
80
|
/doctor # from inside a Claude Code session
|
|
79
81
|
```
|
|
80
82
|
|
|
81
|
-
Checks: installed version,
|
|
83
|
+
Checks: installed version, agents (global), skills + rules (local), hooks, jq, orchestrator/ structure, legacy globals detection.
|
|
82
84
|
|
|
83
85
|
---
|
|
84
86
|
|
|
@@ -89,10 +91,17 @@ my-workspace/
|
|
|
89
91
|
├── orchestrator/ <- you cd here
|
|
90
92
|
│ ├── .claude/
|
|
91
93
|
│ │ ├── settings.json <- env vars + hooks
|
|
92
|
-
│ │
|
|
93
|
-
│ │
|
|
94
|
-
│ │
|
|
95
|
-
│ │
|
|
94
|
+
│ │ ├── hooks/
|
|
95
|
+
│ │ │ ├── session-start-context.sh
|
|
96
|
+
│ │ │ ├── validate-spawn-prompt.sh
|
|
97
|
+
│ │ │ └── ... <- 9+ scripts (all warning-only)
|
|
98
|
+
│ │ ├── skills/ <- LOCAL (13 skills — only active in orchestrator/)
|
|
99
|
+
│ │ │ ├── dispatch-feature/
|
|
100
|
+
│ │ │ ├── qa-ruthless/
|
|
101
|
+
│ │ │ └── ...
|
|
102
|
+
│ │ └── rules/ <- LOCAL (2 rules — only active in orchestrator/)
|
|
103
|
+
│ │ ├── context-hygiene.md
|
|
104
|
+
│ │ └── model-routing.md
|
|
96
105
|
│ ├── CLAUDE.md <- orchestrator profile
|
|
97
106
|
│ ├── workspace.md <- filled by workspace-init
|
|
98
107
|
│ ├── constitution.md <- filled by workspace-init
|
|
@@ -117,6 +126,15 @@ my-workspace/
|
|
|
117
126
|
├── repo-a/ (.git) <- teammate worktree
|
|
118
127
|
├── repo-b/ (.git) <- teammate worktree
|
|
119
128
|
└── repo-c/ (.git) <- teammate worktree
|
|
129
|
+
|
|
130
|
+
~/.claude/
|
|
131
|
+
└── agents/ <- GLOBAL (6 agents — needed for claude --agent)
|
|
132
|
+
├── team-lead.md
|
|
133
|
+
├── implementer.md
|
|
134
|
+
├── workspace-init.md
|
|
135
|
+
├── reviewer.md
|
|
136
|
+
├── security-auditor.md
|
|
137
|
+
└── e2e-validator.md
|
|
120
138
|
```
|
|
121
139
|
|
|
122
140
|
---
|
|
@@ -153,7 +171,7 @@ In `workspace.md`, add the `Source Branch` column to the service map:
|
|
|
153
171
|
1. The team-lead identifies impacted repos during planning (Phase 2)
|
|
154
172
|
2. After plan approval, **Phase 2.5** creates a session:
|
|
155
173
|
- Writes `.sessions/{name}.json` with impacted repos only
|
|
156
|
-
-
|
|
174
|
+
- Opus runs `git branch session/{name} {source}` + `git worktree add /tmp/...` directly via Bash
|
|
157
175
|
- Uses `git branch` (NOT `git checkout -b`) to avoid disrupting other sessions
|
|
158
176
|
3. Teammates receive the session branch in their spawn prompt — they do NOT create their own branches
|
|
159
177
|
4. PRs go from `session/{name}` → `source_branch` (never to main directly)
|
|
@@ -212,12 +230,14 @@ parallel in each repo via Agent Teams.
|
|
|
212
230
|
|
|
213
231
|
| Role | Model | What it does |
|
|
214
232
|
|------|-------|-------------|
|
|
215
|
-
| **Orchestrator** | Opus 4.6 | Clarifies, plans, delegates,
|
|
233
|
+
| **Orchestrator** | Opus 4.6 | Clarifies, plans, manages git, delegates, micro-QA between commits. Writes in orchestrator/ only. |
|
|
216
234
|
| **Init** | Sonnet 4.6 | Diagnostic + interactive workspace configuration. Run once. |
|
|
217
|
-
| **Teammates** | Sonnet 4.6 | Implement in an isolated worktree,
|
|
235
|
+
| **Teammates** | Sonnet 4.6 | Implement in an isolated worktree. One per repo, handles all commits sequentially, signals after each. |
|
|
218
236
|
| **Data extractors** | Haiku | Read-only. Collect raw data (types, configs, logs). Never judge or conclude. |
|
|
219
|
-
| **QA** |
|
|
220
|
-
| **
|
|
237
|
+
| **QA** | Opus 4.6 | Hostile mode. Spawns Sonnet investigators. Min 3 problems found per service. |
|
|
238
|
+
| **Reviewer** | Opus 4.6 | Evidence-based code review. Scope check + architecture + constitution compliance. |
|
|
239
|
+
| **Security Auditor** | Opus 4.6 | Auth flow tracing, tenant isolation, secrets scan, CVEs, input validation. |
|
|
240
|
+
| **E2E Validator** | Opus 4.6 | Containers + Chrome browser testing (beta). |
|
|
221
241
|
|
|
222
242
|
### The 4 session modes
|
|
223
243
|
|
|
@@ -233,13 +253,14 @@ parallel in each repo via Agent Teams.
|
|
|
233
253
|
```
|
|
234
254
|
CLARIFY -> ask max 5 questions if ambiguity
|
|
235
255
|
PLAN -> write the plan in ./plans/, wait for approval
|
|
236
|
-
SESSION -> create session branches in impacted repos (Phase 2.5)
|
|
237
|
-
SPAWN -> Wave 1: API/data
|
|
256
|
+
SESSION -> create session branches + worktrees in impacted repos (Phase 2.5)
|
|
257
|
+
SPAWN -> Wave 1: API/data (one teammate per repo, sequential commits)
|
|
238
258
|
Wave 2: frontend with validated API contract
|
|
239
259
|
Wave 3: infra/config if applicable
|
|
240
|
-
|
|
241
|
-
VERIFY -> cross-service-check + qa-ruthless
|
|
242
|
-
|
|
260
|
+
MICRO-QA -> Bash tests + Haiku diff after EVERY commit before green light
|
|
261
|
+
VERIFY -> cross-service-check + qa-ruthless + reviewer + (security-auditor)
|
|
262
|
+
MERGE -> merge-prep (PRs, conflict detection)
|
|
263
|
+
RETRO -> cycle-retrospective (mandatory)
|
|
243
264
|
```
|
|
244
265
|
|
|
245
266
|
### Security — path-aware writes
|
|
@@ -249,9 +270,9 @@ but never in sibling repos. A `PreToolUse` hook in the team-lead agent frontmatt
|
|
|
249
270
|
dynamically checks if the target path is inside orchestrator/ before allowing writes.
|
|
250
271
|
|
|
251
272
|
Protection layers:
|
|
252
|
-
1. `
|
|
253
|
-
2. `
|
|
254
|
-
3. `PreToolUse`
|
|
273
|
+
1. `tools` whitelist in agent frontmatter
|
|
274
|
+
2. `PreToolUse` path-aware hook in agent frontmatter (team-lead only — teammates write freely in their worktrees)
|
|
275
|
+
3. `PreToolUse` Bash guard in implementer frontmatter (blocks git checkout on main working trees)
|
|
255
276
|
|
|
256
277
|
---
|
|
257
278
|
|
|
@@ -259,16 +280,16 @@ Protection layers:
|
|
|
259
280
|
|
|
260
281
|
| Skill | Role | Trigger |
|
|
261
282
|
|-------|------|---------|
|
|
262
|
-
| **dispatch-feature** | 4 modes: Clarify -> Plan -> Delegate -> Track | "Implement X", "new feature" |
|
|
263
|
-
| **qa-ruthless** | Hostile QA + UX audit | "QA", "review", "test" |
|
|
283
|
+
| **dispatch-feature** | 4 modes: Clarify -> Plan -> Git -> Delegate -> Micro-QA -> Track | "Implement X", "new feature" |
|
|
284
|
+
| **qa-ruthless** | Hostile QA + UX audit (Opus) | "QA", "review", "test" |
|
|
264
285
|
| **cross-service-check** | Inter-repo consistency | "cross-service", "pre-merge" |
|
|
265
286
|
| **incident-debug** | Multi-layer diagnostic | "Bug", "500", "not working" |
|
|
266
|
-
| **plan-review** | Plan sanity check (
|
|
287
|
+
| **plan-review** | Plan sanity check (Sonnet) | "Review plan" |
|
|
267
288
|
| **merge-prep** | Conflicts, PRs, merge order | "Merge", "PR" |
|
|
268
289
|
| **cycle-retrospective** | Post-cycle learning (Opus + Haiku gatherers) | "Retro", "retrospective" |
|
|
269
290
|
| **refresh-profiles** | Re-scan repo CLAUDE.md files (Haiku) | "Refresh profiles" |
|
|
270
291
|
| **bootstrap-repo** | Generate a CLAUDE.md (Haiku) | "Bootstrap", "init CLAUDE.md" |
|
|
271
|
-
| **
|
|
292
|
+
| **metrics** | Quantitative KPIs from session data | "/metrics", "/metrics last-5" |
|
|
272
293
|
| **session** | List, status, close parallel sessions | `/session`, `/session status X` |
|
|
273
294
|
| **doctor** | Full workspace diagnostic (Haiku) | `/doctor` |
|
|
274
295
|
| **cleanup** | Remove orphan worktrees + stale sessions | `/cleanup` |
|
|
@@ -278,18 +299,23 @@ next one starts. The plan on disk is the source of truth.
|
|
|
278
299
|
|
|
279
300
|
---
|
|
280
301
|
|
|
281
|
-
## The
|
|
302
|
+
## The 6 agents
|
|
282
303
|
|
|
283
304
|
| Agent | Model | Usage |
|
|
284
305
|
|-------|-------|-------|
|
|
285
306
|
| **team-lead** | Opus 4.6 | `claude --agent team-lead` — multi-service orchestration |
|
|
286
307
|
| **workspace-init** | Sonnet 4.6 | `claude --agent workspace-init` — diagnostic + initial config |
|
|
287
|
-
| **implementer** | Sonnet 4.6 |
|
|
288
|
-
| **
|
|
308
|
+
| **implementer** | Sonnet 4.6 | Teammate spawned by team-lead — isolated implementation in worktrees |
|
|
309
|
+
| **reviewer** | Opus 4.6 | `claude --agent reviewer` — evidence-based code review (scope check, architecture, constitution) |
|
|
310
|
+
| **security-auditor** | Opus 4.6 | `claude --agent security-auditor` — auth flows, tenant isolation, secrets, CVEs, input validation |
|
|
311
|
+
| **e2e-validator** | Opus 4.6 | `claude --agent e2e-validator` — E2E validation with containers + Chrome (beta) |
|
|
312
|
+
|
|
313
|
+
Agents are installed globally in `~/.claude/agents/` (required for `claude --agent`).
|
|
314
|
+
Skills and rules are local to `orchestrator/.claude/` — they don't affect Claude sessions outside orchestrator/.
|
|
289
315
|
|
|
290
316
|
---
|
|
291
317
|
|
|
292
|
-
## The 9 hooks (settings.json) +
|
|
318
|
+
## The 9 hooks (settings.json) + 2 agent-level hooks (frontmatter)
|
|
293
319
|
|
|
294
320
|
All hooks in settings.json are **non-blocking** (exit 0 + warning). No hook blocks the session.
|
|
295
321
|
|
|
@@ -396,9 +422,10 @@ npx cc-workspace doctor # full diagnostic (or /doctor in-session)
|
|
|
396
422
|
```
|
|
397
423
|
|
|
398
424
|
On each `init` or `update`, the CLI compares versions:
|
|
399
|
-
- **Newer version** → overrides
|
|
425
|
+
- **Newer version** → overrides agents (global), skills + rules + hooks (local)
|
|
400
426
|
- **Same version** → skip (unless `--force`)
|
|
401
427
|
- **Workspace files** (workspace.md, constitution.md, plans/) → never overwritten
|
|
428
|
+
- **Legacy cleanup** → removes old global skills/rules from `~/.claude/` (versions < 5.2)
|
|
402
429
|
|
|
403
430
|
---
|
|
404
431
|
|
|
@@ -411,7 +438,7 @@ cc-workspace/
|
|
|
411
438
|
├── README.md
|
|
412
439
|
├── LICENSE
|
|
413
440
|
│
|
|
414
|
-
└── global-skills/ <-
|
|
441
|
+
└── global-skills/ <- source of truth for all components
|
|
415
442
|
├── templates/
|
|
416
443
|
│ ├── workspace.template.md
|
|
417
444
|
│ ├── constitution.template.md
|
|
@@ -421,7 +448,8 @@ cc-workspace/
|
|
|
421
448
|
│ └── references/
|
|
422
449
|
│ ├── frontend-ux-standards.md
|
|
423
450
|
│ ├── spawn-templates.md
|
|
424
|
-
│
|
|
451
|
+
│ ├── anti-patterns.md
|
|
452
|
+
│ └── rollback-protocol.md
|
|
425
453
|
├── qa-ruthless/SKILL.md
|
|
426
454
|
├── cross-service-check/SKILL.md
|
|
427
455
|
├── incident-debug/SKILL.md
|
|
@@ -430,6 +458,7 @@ cc-workspace/
|
|
|
430
458
|
├── cycle-retrospective/SKILL.md
|
|
431
459
|
├── refresh-profiles/SKILL.md
|
|
432
460
|
├── bootstrap-repo/SKILL.md
|
|
461
|
+
├── metrics/SKILL.md
|
|
433
462
|
├── e2e-validator/
|
|
434
463
|
│ └── references/
|
|
435
464
|
│ ├── container-strategies.md
|
|
@@ -438,11 +467,21 @@ cc-workspace/
|
|
|
438
467
|
├── session/SKILL.md <- /session slash command
|
|
439
468
|
├── doctor/SKILL.md <- /doctor slash command
|
|
440
469
|
├── cleanup/SKILL.md <- /cleanup slash command
|
|
441
|
-
├── hooks/ <- 9 scripts (warning-only)
|
|
442
|
-
├── rules/ <- 2 rules
|
|
443
|
-
└── agents/ <-
|
|
470
|
+
├── hooks/ <- 9+ scripts (warning-only)
|
|
471
|
+
├── rules/ <- 2 rules → installed LOCAL in orchestrator/.claude/rules/
|
|
472
|
+
└── agents/ <- 6 agents → installed GLOBAL in ~/.claude/agents/
|
|
473
|
+
├── team-lead.md
|
|
474
|
+
├── implementer.md
|
|
475
|
+
├── workspace-init.md
|
|
476
|
+
├── reviewer.md
|
|
477
|
+
├── security-auditor.md
|
|
478
|
+
└── e2e-validator.md
|
|
444
479
|
```
|
|
445
480
|
|
|
481
|
+
**Installation layout:**
|
|
482
|
+
- `agents/` → `~/.claude/agents/` (global — `claude --agent` requires it)
|
|
483
|
+
- Everything else → `orchestrator/.claude/` (local — no side effects outside orchestrator)
|
|
484
|
+
|
|
446
485
|
---
|
|
447
486
|
|
|
448
487
|
## Idempotence
|
|
@@ -450,9 +489,10 @@ cc-workspace/
|
|
|
450
489
|
Both `init` and `update` are safe to re-run:
|
|
451
490
|
- **Never overwritten**: `workspace.md`, `constitution.md`, `plans/*.md`, `e2e/` (user content)
|
|
452
491
|
- **Always regenerated**: `settings.json`, `CLAUDE.md`, `_TEMPLATE.md`
|
|
453
|
-
- **Always copied**: hooks, templates
|
|
492
|
+
- **Always copied**: hooks, skills, rules, templates
|
|
454
493
|
- **Always regenerated on init**: `service-profiles.md` (fresh scan)
|
|
455
|
-
- **
|
|
494
|
+
- **Agents** (global): only updated if the version is newer (or `--force`)
|
|
495
|
+
- **Legacy cleanup**: old global skills/rules in `~/.claude/` are removed automatically
|
|
456
496
|
|
|
457
497
|
---
|
|
458
498
|
|
|
@@ -489,14 +529,14 @@ Add `--fix` to any mode to dispatch teammates for fixing failures.
|
|
|
489
529
|
|
|
490
530
|
### How it works
|
|
491
531
|
|
|
492
|
-
1.
|
|
493
|
-
2. Starts services via `docker compose up`
|
|
494
|
-
3. Waits for health checks
|
|
532
|
+
1. Checks out repos to the correct branch (merged source or session branch)
|
|
533
|
+
2. Starts services via `docker compose up` with build context pointing to repos
|
|
534
|
+
3. Waits for health checks (10-minute global timeout)
|
|
495
535
|
4. Runs existing test suites + generates API scenario tests from the plan
|
|
496
536
|
5. With `--chrome`: drives Chrome via chrome-devtools MCP (navigate, fill forms,
|
|
497
537
|
click, take screenshots, record GIFs, check network requests and console)
|
|
498
538
|
6. Generates report with evidence (screenshots, GIFs, network traces)
|
|
499
|
-
7. Tears down containers and
|
|
539
|
+
7. Tears down containers and restores repos to their original branch
|
|
500
540
|
|
|
501
541
|
### Chrome testing
|
|
502
542
|
|
|
@@ -518,6 +558,48 @@ With `--chrome`, the agent:
|
|
|
518
558
|
|
|
519
559
|
---
|
|
520
560
|
|
|
561
|
+
## Changelog v5.1.0 -> v5.2.0
|
|
562
|
+
|
|
563
|
+
| # | Feature | Detail |
|
|
564
|
+
|---|---------|--------|
|
|
565
|
+
| 1 | **Skills & rules now LOCAL** | Installed in `orchestrator/.claude/skills/` and `rules/` instead of `~/.claude/`. Only agents remain global. Claude behaves normally outside orchestrator/. |
|
|
566
|
+
| 2 | **Automatic legacy cleanup** | `update --force` removes old global skills/rules from `~/.claude/` (from versions < 5.2). |
|
|
567
|
+
| 3 | **Reviewer agent (Opus)** | Evidence-based code review: scope check (plan vs implemented), architecture assessment, constitution compliance. Anchored on constitution + CLAUDE.md + plan, never on legacy code. |
|
|
568
|
+
| 4 | **Security auditor agent (Opus)** | 7-phase audit: auth flow tracing, tenant isolation, secrets scan, dependency CVEs, input validation, headers/CORS, session-scoped delta analysis. Conditional in Phase 5. |
|
|
569
|
+
| 5 | **qa-ruthless explicit Opus** | Added `model: opus` in frontmatter. Previously inherited from caller context. |
|
|
570
|
+
| 6 | **Phase 5 expanded** | Now: cross-service → qa-ruthless → reviewer → (security-auditor) → merge-prep → cycle-retrospective. |
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## Changelog v5.0.0 -> v5.1.0
|
|
575
|
+
|
|
576
|
+
| # | Feature | Detail |
|
|
577
|
+
|---|---------|--------|
|
|
578
|
+
| 1 | **`--dry-run` flag** | `init` and `update` support preview without writing files. |
|
|
579
|
+
| 2 | **Secure `permission-auto-approve.sh`** | Compound commands rejected before pattern matching. |
|
|
580
|
+
| 3 | **Robust `detectProjectType`** | JSON.parse + dependency lookup instead of string.includes(). |
|
|
581
|
+
| 4 | **Split orphan cleanup** | Extracted into separate `orphan-cleanup.sh` hook. |
|
|
582
|
+
| 5 | **JSON format for micro-QA** | Haiku returns structured `{"status":"OK"}` instead of free text. |
|
|
583
|
+
| 6 | **Chrome MCP check in doctor** | Verifies Chrome DevTools MCP configuration. |
|
|
584
|
+
| 7 | **Hook unit tests** | `test_hooks.sh` with ~30 assertions. CLI unit tests with ~50 assertions. |
|
|
585
|
+
|
|
586
|
+
---
|
|
587
|
+
|
|
588
|
+
## Changelog v4.7.0 -> v5.0.0
|
|
589
|
+
|
|
590
|
+
| # | Feature | Detail |
|
|
591
|
+
|---|---------|--------|
|
|
592
|
+
| 1 | **Opus has Bash** | `disallowedTools: Bash` removed from team-lead. Opus manages git (branches, worktrees) and micro-QA directly. |
|
|
593
|
+
| 2 | **One teammate per repo** | Shift from one subagent per commit unit to one teammate per repo. Sequential commits with signal+wait protocol. |
|
|
594
|
+
| 3 | **Micro-QA between every commit** | Bash tests + Haiku diff review after each commit before green light. |
|
|
595
|
+
| 4 | **Worktrees after plan validation** | Branches and worktrees created by Opus only after user approves the plan. |
|
|
596
|
+
| 5 | **Worktrees persist** | `/tmp/` worktrees live until `session close`. No pruning during active sessions. |
|
|
597
|
+
| 6 | **cycle-retrospective mandatory** | Required Phase 5 step, not optional. |
|
|
598
|
+
| 7 | **Source branch override** | Specify source branch in initial prompt. Stored in session JSON. |
|
|
599
|
+
| 8 | **E2E validator upgraded** | Opus model, no worktrees (direct checkout), port conflict check, global timeout, test data seeding. |
|
|
600
|
+
|
|
601
|
+
---
|
|
602
|
+
|
|
521
603
|
## Changelog v4.6.2 -> v4.7.0
|
|
522
604
|
|
|
523
605
|
| # | Feature | Detail |
|