refactor!: rebrand CCAM to AgentHub

Clean break, no compatibility alias. Renames the product name, the CLI
binary (`ccam` -> `agenthub`), the env var prefix (`CCAM_` ->
`AGENTHUB_`), the Prometheus metric namespace (`ccam_*` ->
`agenthub_*`), the tmux session prefix (`ccam-lane-<id>` ->
`agenthub-lane-<id>`), the per-repo runtime profile directory
(`.ccam/profile` -> `.agenthub/profile`), the lanes state root
(`~/.claude/ccam-lanes` -> `~/.claude/agenthub-lanes`), the bundled
plugins (`plugins/ccam*` -> `plugins/agenthub*`) and their slash
commands (`/ccam-doctor` -> `/agenthub-doctor`, `/ccam:*` ->
`/agenthub:*`).

Because there is no alias, an existing install has to be updated by
hand: rename its `.ccam/profile` directory and any `CCAM_*` variables,
and reinstall the plugin under its new name.

Two other name families are deliberately left alone here, since they are
not just strings: the `Claude-Code-Monitor` repository/marketplace name,
and the `agent-dashboard` npm package plus its `~/.claude/agent-dashboard`
runtime directory, which holds the live database and needs a migration
rather than a rename.

Verified: server 1406/1406, client 459/459, `grep -i ccam` clean across
tracked files, `openapi.yaml` regenerated (95 paths, unchanged count).
This commit is contained in:
2026-09-07 12:09:15 +07:00
parent ae9b3dbcd5
commit 17d56d0e01
345 changed files with 2705 additions and 2727 deletions
@@ -1,27 +1,27 @@
# F3a — `ccam lanes integration <name>` toggle reader
# F3a — `agenthub lanes integration <name>` toggle reader
**Status:** approved 2026-08-05. Roadmap it belongs to:
`docs/superpowers/plans/2026-08-03-shipyard-parity-lanes.md` (subsystem **F**).
## Problem
`SKILL.md`'s Setup section hardcodes tracker/dev-QC/CI-wait as permanently off ("treat all three as permanently off for this run") because F's `integrations.env` toggle system doesn't exist in CCAM yet. Shipyard's source, `lane-env.sh --check NAME`, is the reference primitive: read one `<NAME>_ENABLED` flag from a profile's `integrations.env`, exit 0/1.
`SKILL.md`'s Setup section hardcodes tracker/dev-QC/CI-wait as permanently off ("treat all three as permanently off for this run") because F's `integrations.env` toggle system doesn't exist in AgentHub yet. Shipyard's source, `lane-env.sh --check NAME`, is the reference primitive: read one `<NAME>_ENABLED` flag from a profile's `integrations.env`, exit 0/1.
This is a narrow slice of F, not all of F3. `ticketer` (the agent that would actually consume `TRACKER_ENABLED`) is explicitly deferred — no tracker MCP is configured for any lane yet, and CCAM has no per-lane credential source (same gap E3 already documented for `qc-local`). This task only builds the toggle-reading primitive itself, so `SKILL.md`'s hardcoded-off text can become a real check instead of a permanent assumption, once something exists to check.
This is a narrow slice of F, not all of F3. `ticketer` (the agent that would actually consume `TRACKER_ENABLED`) is explicitly deferred — no tracker MCP is configured for any lane yet, and AgentHub has no per-lane credential source (same gap E3 already documented for `qc-local`). This task only builds the toggle-reading primitive itself, so `SKILL.md`'s hardcoded-off text can become a real check instead of a permanent assumption, once something exists to check.
## Scope
**In scope:**
1. `<repo>/.ccam/profile/integrations.env` — a new, optional profile file (same directory as `profile.env`), parsed with the EXISTING `parseEnvFile` helper in `server/lib/lane-profile.js` (comments/quotes/`export` already handled — no new parser).
1. `<repo>/.agenthub/profile/integrations.env` — a new, optional profile file (same directory as `profile.env`), parsed with the EXISTING `parseEnvFile` helper in `server/lib/lane-profile.js` (comments/quotes/`export` already handled — no new parser).
2. `isIntegrationEnabled(lane, name)` in `server/lib/lane-profile.js` — reads `integrations.env` (falling back `lane.cwd` → `lane.source_repo`, same two-location search `resolveProfile` already does for `profile.env`), returns `true` iff `<NAME_UPPER>_ENABLED === "1"`. A missing file or missing key is `false` — off by default, consistent with A2's declarations.
3. `GET /api/lanes/:id/integrations/:name` route — `{enabled: boolean}`.
4. `ccam lanes integration <name> [<id>]` CLI — exit `0` when enabled, `1` when disabled (the exit-code contract Shipyard's `--check` already established, and what a skill's `&&`-gated stage-skip logic needs).
4. `agenthub lanes integration <name> [<id>]` CLI — exit `0` when enabled, `1` when disabled (the exit-code contract Shipyard's `--check` already established, and what a skill's `&&`-gated stage-skip logic needs).
**Explicitly out of scope:**
- `ticketer.md` / `dev-qc.md` agents — deferred pending a tracker/dev-QC MCP and credential source.
- Every other field `integrations.env` can declare (`TRACKER_URL`, `TRACKER_PROJECT`, `DEV_SITE_URL`, `CI_REPO`, etc.) — only the `<NAME>_ENABLED` flags matter for this primitive; the rest is read by whatever later task actually consumes a specific integration (F3/F4's real agent work), not by this generic toggle check.
- Surfacing toggle state in `GET /api/lanes/:id/runtime` — that endpoint is polled and broadcast on every hook; adding fields nothing consumes yet is premature. `GET /:id/integrations/:name` is its own lightweight endpoint instead.
- `lane-env.sh`'s default (no `--check`) mode — dumping the full per-lane runtime env as `export` lines exists in Shipyard because bash/zsh sourcing has a HARNESS_ROOT resolution footgun CCAM's cwd-based lane resolution doesn't have. Nothing in CCAM needs this.
- `lane-env.sh`'s default (no `--check`) mode — dumping the full per-lane runtime env as `export` lines exists in Shipyard because bash/zsh sourcing has a HARNESS_ROOT resolution footgun AgentHub's cwd-based lane resolution doesn't have. Nothing in AgentHub needs this.
## Decisions