feat(plugin): ship the agents from a single root agents/ directory
Move .claude/agents/ and server/data/agent-templates/ship-feature-lane/ into one agents/ at the repo root — which IS the plugin root, so all five agents now ship with the ccam plugin as ccam:<name>, the same way skills already do. The two pipeline agents were byte-identical copies in both places; that duplication is gone. `ccam lanes agents install` now reads them straight from agents/, so the per-lane copy in <lane>/.claude/agents/ still gives the bare `subagent_type: qc-local` the ship-feature-lane skill prefers. Skill and docs record both names: bare inside a lane, ccam: as fallback.
This commit is contained in:
+3
-3
@@ -1086,7 +1086,7 @@ ccam skills install
|
||||
|
||||
Copies `skills/ship-feature-lane/` into `~/.claude/skills/ship-feature-lane/` (overwrites on reinstall — run it again after pulling an update to the skill), which restores the bare `/ship-feature-lane` name. One-time per machine, same as `ccam lanes agents install` is one-time per lane.
|
||||
|
||||
**Agents are the deliberate exception.** `qc-local` and `senior-gate-reviewer` are *not* shipped as plugin agents: a plugin agent is addressed as `ccam:qc-local`, and the skill dispatches them by the bare `subagent_type: qc-local`. `ccam lanes agents install` writes them into the lane's own `.claude/agents/`, which is also the highest-priority agent source — so the lane's copy wins over anything global.
|
||||
**Agents come from the same plugin, under two names.** `qc-local` and `senior-gate-reviewer` live in `agents/` at the repo root, so the plugin exposes them as `ccam:qc-local` / `ccam:senior-gate-reviewer`. `ccam lanes agents install` copies those same files into the lane's own `.claude/agents/` — the highest-priority agent source — which is what makes the bare `subagent_type: qc-local` the skill prefers resolve inside the lane. Either name reaches the same definition; the skill falls back to the `ccam:` form when the lane copy is missing.
|
||||
|
||||
### Invoking the skill
|
||||
|
||||
@@ -1155,13 +1155,13 @@ GENERATED_MERGE_PATHS="api/openapi.json api/client.ts"
|
||||
|
||||
### Installing the QC/gate agents: agents install
|
||||
|
||||
Stage 6 (browser QC) and Stage 7 (senior GO/NO-GO gate) run as subagents — `qc-local` and `senior-gate-reviewer` — that must exist in the lane's own `.claude/agents/` before the skill can launch them:
|
||||
Stage 6 (browser QC) and Stage 7 (senior GO/NO-GO gate) run as subagents — `qc-local` and `senior-gate-reviewer`. The plugin already ships them as `ccam:qc-local` / `ccam:senior-gate-reviewer`; installing them into the lane's own `.claude/agents/` is what makes the bare names work there:
|
||||
|
||||
```bash
|
||||
ccam lanes agents install
|
||||
```
|
||||
|
||||
Writes both agent templates into `<lane>/.claude/agents/` and adds that directory to the lane's local `.git/info/exclude` (never the tracked `.gitignore` — this is a per-clone runtime concern, not an app-repo change). Idempotent and never automatic, the same shape as `ccam lanes proof-link` — a session installs the agents explicitly, once, before a lane's first run through Stage 6/7 (or after a CCAM upgrade ships updated templates — reinstalling overwrites, it doesn't merge).
|
||||
Writes both agent definitions (from the repo's own `agents/`, the same files the plugin ships) into `<lane>/.claude/agents/` and adds that directory to the lane's local `.git/info/exclude` (never the tracked `.gitignore` — this is a per-clone runtime concern, not an app-repo change). Idempotent and never automatic, the same shape as `ccam lanes proof-link` — a session installs the agents explicitly, once, before a lane's first run through Stage 6/7 (or after a CCAM upgrade ships updated templates — reinstalling overwrites, it doesn't merge).
|
||||
|
||||
**Credentials are not embedded.** Unlike Shipyard's original per-lane agent generation, these templates carry no QA account credentials — this repo has no seeded-QA-account system yet. `qc-local` degrades gracefully: if it hits a login page with no credentials block present, it reports `LOCAL-QC: FAIL — login required, no seed-account mechanism configured for this profile` rather than guessing.
|
||||
|
||||
|
||||
+10
-6
@@ -89,6 +89,7 @@ checkout unnecessary.
|
||||
| The dashboard UI (`/run` and every other client route) | built into the runtime dir by the bootstrap, so it works the moment `claude` starts |
|
||||
| `/ccam-doctor`, `/ccam-update`, `/ccam-open` | `plugins/ccam/commands/` |
|
||||
| The skills (`ship-feature-lane`, `ship-feature`, `repo-onboarding`, `debug-live-issue`, `mcp-operations`, `update-project-docs`, `file-headers`) | `skills/` at the repo root — which IS the plugin root, so they are auto-discovered as plugin skills |
|
||||
| The agents (`qc-local`, `senior-gate-reviewer`, `backend-reviewer`, `frontend-reviewer`, `mcp-reviewer`) | `agents/` at the repo root, auto-discovered the same way — exposed as `ccam:<name>` |
|
||||
|
||||
Plugin skills are namespaced: they are invoked as `/ccam:<name>`, with the bare
|
||||
`/<name>` working as an alias unless another skill or command claims that name.
|
||||
@@ -97,12 +98,15 @@ latter only loads for a session whose cwd is inside this checkout, which is
|
||||
useless for a lane working in a different repo. `ccam skills install` survives
|
||||
as the fallback for a plain checkout without the plugin.
|
||||
|
||||
**Agents are deliberately not shipped this way.** `.claude/agents/` stays
|
||||
repo-local, and the lane agents (`qc-local`, `senior-gate-reviewer`) are
|
||||
installed per-lane by `ccam lanes agents install`. A plugin agent would be
|
||||
addressed as `ccam:qc-local`, breaking the `subagent_type: qc-local` references
|
||||
in the pipeline skill; the per-lane copy also lands in the highest-priority
|
||||
agent source.
|
||||
**The agents ship the same way, from the same files.** `agents/` at the repo
|
||||
root holds all five (`qc-local`, `senior-gate-reviewer`, `backend-reviewer`,
|
||||
`frontend-reviewer`, `mcp-reviewer`), so the plugin exposes them as
|
||||
`ccam:<name>`. `ccam lanes agents install` copies `qc-local` +
|
||||
`senior-gate-reviewer` from that same directory into a lane's own
|
||||
`.claude/agents/` — the highest-priority agent source — which is what makes the
|
||||
bare `subagent_type: qc-local` in the pipeline skill resolve there. One source
|
||||
file, two ways to reach it; the skill names the bare form first and falls back
|
||||
to the `ccam:` form.
|
||||
|
||||
Because the plugin ships the hooks itself, `npm run install-hooks` is not needed
|
||||
for plugin users — and must not be run alongside it. Events carry no id, so two
|
||||
|
||||
Reference in New Issue
Block a user