ccc-e2e · diff

git:20260707.947ab2f to git:20261013.fbe187d

98 added, 179 removed. Audit A to A.

---
name: ccc-e2e
- description: "end-to-end pre-release assessment. Fans out via /ccc-fleet into 3 isolated worktrees (QA audit + unit tests + Playwright E2E), each invoking /ccc-testing sub-skills,…"
+ description: "Pre-release assessment that fans out via /ccc-fleet into up to three isolated workers (QA audit, unit tests, Playwright E2E) running /ccc-testing lanes, then writes a severity-ranked PASS or FAIL verdict. Use when about to tag a release, after a large merge, or asking is this ready."
model: sonnet
effort: high
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
- Agent
- AskUserQuestion
- TodoWrite
- mcp__ccd_session__spawn_task
- mcp__ccd_session__mark_chapter
- argument-hint: "[scope: quick | full | qa-only | e2e-only]"
+ argument-hint: "[full | qa-unit | e2e-only | quick | status]"
---
- # /ccc-e2e — End-to-End Pre-Release Assessment
-
- **CC Commander** · /ccc-e2e · Full-surface confidence before you ship
-
- Composes /ccc-fleet + /ccc-testing to run a full pre-release assessment in parallel across 3 isolated worktrees. One command. Three workers. One verdict.
-
- ## Session markers
-
- Call `mcp__ccd_session__mark_chapter` at these phase transitions:
-
- | Trigger | title | summary |
- |---------|-------|---------|
- | After user confirms scope, before fan-out | `"E2E assessment: <branch>"` | `"3-worker fan-out starting on <branch>"` |
- | When all workers have reported back | `"E2E workers complete"` | `"QA: <status> / Unit-TDD: <status> / E2E: <status>"` |
- | After verdict is written | `"E2E verdict: <PASS/FAIL>"` | `"<N> Critical, <N> High — verdict: <PASS/FAIL>"` |
-
- ## Sidebar chips (spawn_task)
-
- After the verdict is rendered, spawn ONE `mcp__ccd_session__spawn_task` chip per **Critical** finding:
-
- - `title`: imperative fix phrase under 60 chars
- - `prompt`: self-contained — include the worker that reported it, file:line if available, issue summary, and fix direction. The spawned session has no memory of this conversation.
- - `tldr`: 1-2 sentences plain English.
-
- Only Critical findings get chips. High/Medium/Low go into the verdict artifact as TodoWrite items.
-
- ## Response shape (EVERY time)
+ # /ccc-e2e — Full-surface confidence before shipping
- ### 1. Brand header
+ **CC Commander** · /ccc-e2e · parallel QA, unit and E2E workers, one honest verdict
- ```
- **CC Commander** · /ccc-e2e · Full-surface pre-release confidence
- ```
+ Composes `/ccc-fleet` (parallel dispatch, worktree isolation) with `/ccc-testing` (testing lanes). Audit only: workers find and report, they do not fix.
- ### 2. Context strip
+ ## When to use / when not to
- Four parallel reads (silent on failure):
+ - Use before tagging a major or minor release, after merging a feature that touches five or more files, after a cross-module refactor, or when the user feels coverage is thin but cannot say where.
+ - Quick bug-fix patch: `/ccc-review`. Single-file change: `/ccc-testing`. Docs-only change: skip. Hotfix under time pressure: `/ccc-ship` pre-flight.
+ - Codex: ask pickers as plain-text questions and run each worker as `codex exec --json --sandbox workspace-write` in its own `git worktree`; the session tools below are skipped.
- - `git rev-parse --abbrev-ref HEAD` → current branch
- - `git rev-list --count main..HEAD 2>/dev/null` → commits ahead
- - `git diff --shortstat main..HEAD 2>/dev/null` → diff size
- - `test -f package.json && node -p "require('./package.json').version"` → version
+ ## What happens
- Render one line:
- > 🧭 Branch: `<branch>` · <N> commits ahead · <X> files changed · version: `<ver>`
+ ### 1. Context strip
- ### 3. Scope picker — `AskUserQuestion`
+ Run in parallel, silent on failure:
- ```
- question: "What scope should I assess?"
- header: "CC Commander E2E"
- multiSelect: false
- options:
- - label: "🔬 Full assessment (QA + Unit-TDD + E2E)"
- description: "3 parallel workers. ~15-30 min. Use before tagging a release."
- preview: "Most thorough. 3 worktrees, 3 agents, severity-ranked verdict."
- - label: "🧪 QA + Unit-TDD only (no E2E)"
- description: "2 workers. ~8-15 min. Use for non-UI changes."
- preview: "Skips Playwright. Good for API/library changes."
- - label: "🎭 E2E only (Playwright)"
- description: "1 worker. ~5-10 min. Use when fixing a specific UI regression."
- preview: "Runs /ccc-testing e2e-testing + visual-regression only."
- - label: "🏃 Quick QA pass only"
- description: "1 worker. ~3-5 min. Use for sanity check, not release gate."
- preview: "Runs /ccc-testing qa-only. Finds but does not fix."
+ ```bash
+ git rev-parse --abbrev-ref HEAD
+ BASE=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's#^origin/##'); BASE=${BASE:-main}
+ git rev-list --count "$BASE"..HEAD 2>/dev/null
+ git diff --shortstat "$BASE"..HEAD 2>/dev/null
+ git diff --name-only "$BASE"..HEAD 2>/dev/null
+ test -f package.json && node -p "require('./package.json').version"
```
- **Recommendation logic** (prepend to ONE label):
- - Branch ahead of main + version bumped → "Full assessment"
- - No UI/CSS files in diff → "QA + Unit-TDD only"
- - Only UI/CSS files in diff → "E2E only"
- - Small patch, low risk → "Quick QA pass only"
-
- ## Step 2 — Fan out workers
-
- On scope pick, dispatch the appropriate workers via the `Agent` tool with `run_in_background: true`. Each worker runs in its own isolated worktree to prevent merge conflicts and shared-state contamination.
-
- ### Full assessment (3 workers)
-
- **Worker 1 — QA audit** (`../qa-audit/` worktree):
- - `Agent`, `subagent_type: qa-engineer`, `model: sonnet`, `run_in_background: true`
- - Task: "Run /ccc-testing qa-only in this worktree. Report: bug count by severity (Critical/High/Medium/Low), affected files, reproduction steps for any Critical. Return JSON: `{worker: 'qa', status: 'pass|fail', findings: [{severity, file, description}], duration_s}`"
-
- **Worker 2 — Unit-TDD** (`../unit-tdd/` worktree):
- - `Agent`, `subagent_type: qa-engineer`, `model: sonnet`, `run_in_background: true`
- - Task: "Run /ccc-testing tdd-workflow + test-strategy in this worktree. Execute the full test suite. Report: pass/fail counts, coverage delta vs last run, any failing test names. Return JSON: `{worker: 'unit-tdd', status: 'pass|fail', tests_pass: N, tests_fail: N, coverage_delta: '+N%|-N%', duration_s}`"
-
- **Worker 3 — E2E** (`../e2e/` worktree):
- - `Agent`, `subagent_type: qa-engineer`, `model: sonnet`, `run_in_background: true`
- - Task: "Run /ccc-testing e2e-testing + visual-regression in this worktree. Run the Playwright suite and screenshot baseline comparison. Report: pass/fail counts, any visual diffs found. Return JSON: `{worker: 'e2e', status: 'pass|fail', tests_pass: N, tests_fail: N, visual_diffs: N, duration_s}`"
-
- ### QA + Unit-TDD (2 workers)
- Dispatch Worker 1 + Worker 2 only. Skip Worker 3.
-
- ### E2E only (1 worker)
- Dispatch Worker 3 only.
-
- ### Quick QA pass (1 worker)
- Dispatch Worker 1 only, with task scoped to `qa-only` (no fixes).
-
- ## Step 3 — Emit progress card
+ Render one line: `🎯 Branch: <branch> · <N> commits ahead of <base> · <X> files changed · version: <ver>`.
- After dispatching, emit one card:
+ ### 2. Scope
- > 🔄 **<N> worker(s) running** — ETA ~<X> min. I'll synthesize when all complete.
- > 📂 Verdict will land at `tasks/reviews/ccc-e2e-<YYYYMMDD>.md`.
- > 💡 Use `/ccc-e2e status` to check in. Or wait — I'll surface the verdict automatically.
+ If `$ARGUMENTS` is `status`, jump to "Status" below. If it is `full`, `qa-unit`, `e2e-only` or `quick` (`qa-only` is an alias for `quick`), use it and skip the picker. Otherwise ask the scope picker (Decision points).
- ## Step 4 — Synthesize and write verdict
+ After scope is set, call `mcp__ccd_session__mark_chapter` with title `"E2E assessment: <branch>"` and summary `"<N>-worker fan-out starting on <branch>"`.
- When all workers report back (or timeout at 30 min per worker), synthesize:
+ ### 3. Fan out workers
- 1. Collect all findings. Merge by severity.
- 2. Compute overall status: FAIL if any worker `status: fail` OR any Critical finding exists.
- 3. Compute coverage delta across all workers.
- 4. Write `tasks/reviews/ccc-e2e-<YYYY-MM-DD>.md` (create `tasks/reviews/` if missing).
+ Dispatch with the Agent tool, following `/ccc-fleet`'s Agent-tool rules. Send every worker call in one message so they start together. Every call uses:
- ### Verdict artifact format
+ - `subagent_type: "qa-engineer"` (`general-purpose` if the plugin agent is not registered)
+ - `model: "sonnet"`, `effort: "medium"`, `isolation: "worktree"`, `run_in_background: true`
+ - a prompt that starts: "FIRST: run `git rev-parse --show-toplevel`. It must be your assigned worktree, not the main checkout; abort and report if it is not. Audit only: do not fix, commit, push or merge."
- ```markdown
- # CCC E2E Assessment — <YYYY-MM-DD>
+ The coordinator stays on the user's selected model.
- **Branch:** <branch> · **Version:** <ver> · **Scope:** <full|partial>
- **Workers:** <N> · **Duration:** <total elapsed>
+ | Worker | Prompt after the preamble | Returns JSON |
+ |---|---|---|
+ | 1 · QA audit | "Run /ccc-testing qa-only. Report bug count by severity (Critical, High, Medium, Low), affected files, and reproduction steps for every Critical." | `{worker: "qa", status: "pass\|fail", findings: [{severity, file, description}], duration_s}` |
+ | 2 · Unit-TDD | "Run /ccc-testing tdd-workflow and test-strategy. Execute the full test suite with the project's test command (detect from package.json scripts, pyproject.toml or pytest.ini). Report pass and fail counts, coverage delta versus the last run, and failing test names." | `{worker: "unit-tdd", status, tests_pass, tests_fail, coverage_delta, findings, duration_s}` |
+ | 3 · E2E | "Run /ccc-testing e2e-testing and visual-regression. Run the Playwright suite (`npx playwright test`) and the screenshot baseline comparison. Report pass and fail counts and any visual diffs." | `{worker: "e2e", status, tests_pass, tests_fail, visual_diffs, findings, duration_s}` |
- ## Verdict: ✅ PASS / ❌ FAIL
+ | Scope | Workers |
+ |---|---|
+ | `full` | 1, 2, 3 |
+ | `qa-unit` | 1, 2 |
+ | `e2e-only` | 3 |
+ | `quick` | 1, scoped to qa-only, report only |
- > FAIL if any Critical finding or any worker status is `fail`.
+ Then post one card:
- ## Worker Summary
+ > 🔄 **N worker(s) running** — about X min. I will synthesize when all report back.
+ > 📝 Verdict will land at `tasks/reviews/ccc-e2e-<YYYY-MM-DD>.md`.
+ > 💡 `/ccc-e2e status` checks progress.
- | Worker | Status | Tests | Coverage | Duration |
- |--------|--------|-------|----------|----------|
- | QA audit | ✅/❌ | — | — | Xs |
- | Unit-TDD | ✅/❌ | <N>/<total> | <delta> | Xs |
- | E2E | ✅/❌ | <N>/<total> | — | Xs |
+ ### 4. Wait
- ## Findings
+ Wait for every worker's completion notification. Allow each worker 30 minutes before marking it `timeout`; E2E suites are slow, so never cut one off earlier. When all have reported, call `mark_chapter` with title `"E2E workers complete"` and summary `"QA: <status> / Unit-TDD: <status> / E2E: <status>"` (only workers that ran).
- ### Critical (N)
- - `file:line` — `<description>` — **Worker:** qa
+ ### 5. Synthesize the verdict
- ### High (N)
- ...
+ 1. Parse each worker's JSON. A worker with no parseable JSON counts as `fail`; keep its output tail.
+ 2. Merge findings by severity across workers.
+ 3. Verdict: ❌ FAIL if any worker is `fail` or `timeout` or any Critical finding exists; ✅ PASS only when every worker passed and there are zero Criticals.
+ 4. Write the artifact with the Write tool using [references/verdict-template.md](references/verdict-template.md).
+ 5. Add every High, Medium and Low finding as a TodoWrite item.
+ 6. Call `mark_chapter` with title `"E2E verdict: <PASS|FAIL>"` and summary `"<N> Critical, <N> High — verdict: <PASS|FAIL>"`.
- ### Medium (N)
- ...
+ ### 6. Fix chips for Criticals
- ### Low (N)
- ...
+ For each Critical finding only, call `mcp__ccd_session__spawn_task` once:
- ## Next steps
- - [ ] <action per Critical/High finding>
+ - `title`: imperative fix phrase under 60 characters
+ - `prompt`: self-contained (the spawned session has no memory of this one): reporting worker, `file:line` if known, issue summary, fix direction, and the verdict artifact path
+ - `tldr`: one or two plain sentences
- ## Recommendation
- Ship / Patch required / Triage needed
- ```
+ When the `mcp__ccd_session__*` tools are not exposed (terminal sessions, Codex), skip markers and chips and list the Critical fixes under "Next steps" in the artifact instead.
- ## When to use
+ ### 7. Exit summary
- - Before `git tag v*.*.0` for a major/minor release
- - After merging a feature that touches 5+ files
- - When refactoring across module boundaries
- - When "feels like we should test more" but unclear where
+ Print: verdict, Critical and High counts, the artifact path, and the worker worktree paths and branches from the Agent results so the user can inspect or remove them.
- ## When NOT to use
+ ### Status
- - Quick bug-fix patches — use /ccc-review instead
- - Single-file changes — use /ccc-testing directly
- - Docs-only PRs — skip this, docs don't need E2E
- - Hotfixes under time pressure — use /ccc-ship preflight instead
+ For `/ccc-e2e status`: report which workers have returned and which are still running, from this session's background-agent notifications, plus `git worktree list`. Do not dispatch anything.
- ## Flow (pseudocode)
+ ## Decision points
```
- 1. AUQ → user picks scope
-
- 2. /ccc-fleet fan-out:
- Worker 1 (qa): /ccc-testing qa-only in ../qa-audit/
- Worker 2 (unit-tdd): /ccc-testing tdd-workflow in ../unit-tdd/
- Worker 3 (e2e): /ccc-testing e2e-testing+visual-regression in ../e2e/
-
- 3. Wait for all (timeout: 30 min per worker)
-
- 4. Merge findings → compute verdict:
- FAIL = any Critical OR any worker.status == fail
- PASS = all workers pass, zero Criticals
-
- 5. Write tasks/reviews/ccc-e2e-{YYYY-MM-DD}.md
-
- 6. Spawn chips for each Critical finding
-
- 7. Exit summary: PASS/FAIL + blocker count + artifact path
+ question: "What scope should I assess?"
+ header: "CC Commander E2E"
+ multiSelect: false
+ options:
+ - label: "🔬 Full assessment (QA + Unit-TDD + E2E)"
+ description: "3 parallel workers, about 15–30 min. Use before tagging a release."
+ - label: "🧪 QA + Unit-TDD only"
+ description: "2 workers, about 8–15 min. For API or library changes with no UI."
+ - label: "🌐 E2E only (Playwright)"
+ description: "1 worker, about 5–10 min. For a specific UI regression."
+ - label: "🎯 Quick QA pass"
+ description: "1 worker, about 3–5 min. A sanity check, not a release gate."
```
- ## Depends on
+ Put the recommended option first and prefix its label with 🟢, using the context strip:
- - /ccc-fleet (parallel orchestration + worktree isolation)
- - /ccc-testing (testing sub-skill router)
- - git worktree (isolation — worktrees must already exist or be created)
- - jq / node (for parsing worker JSON reports)
+ - Branch ahead of base and version bumped → Full assessment.
+ - No UI or CSS files in the diff → QA + Unit-TDD only.
+ - Only UI or CSS files in the diff → E2E only.
+ - Small, low-risk patch → Quick QA pass.
- ## Anti-patterns — DO NOT do these
+ ## Done when
- - Do not run all workers sequentially — always fan-out in parallel
- - Do not merge results without checking worker status field
- - Do not mark PASS if any Critical finding exists — verdicts must be honest
- - Do not auto-fix findings during assessment — this is audit-only
- - Do not skip the verdict artifact — /ccc-ship reads from `tasks/reviews/`
- - Do not timeout workers before 30 min — E2E suites are slow
+ - `test -f tasks/reviews/ccc-e2e-<YYYY-MM-DD>.md` succeeds and the file states ✅ PASS or ❌ FAIL.
+ - Every dispatched worker appears in the worker summary with a status, including failed or timed-out ones.
+ - The exit summary's counts match the artifact.
- ## Brand rules
+ ## Guardrails
- - 🔬 for full assessment · 🧪 for partial · 🎭 for E2E-only · 🏃 for quick pass
- - ✅ PASS / ❌ FAIL — bold, on its own line in the artifact header
- - Severity badges: 🔴 Critical · 🟠 High · 🟡 Medium · 🟢 Low
- - Artifact always written — never output-only
- - Never mention the CLI — Desktop-plugin flow
+ - Never run workers one after another; dispatch them in one message.
+ - Never merge results without checking each worker's `status`.
+ - Never mark PASS with a Critical finding or a failed worker.
+ - Never fix findings during the assessment; this skill audits only.
+ - Never skip the verdict artifact; it is the durable record of the run.
+ - Never commit, push, merge worker branches or delete worktrees; those need separate authorization.
+ - Severity badges: 🔴 Critical · ⚠️ High · 🟡 Medium · 🟢 Low.
- ---
+ ## See also
- **Bottom line:** one command fans out into up to 3 parallel QA workers, each isolated in its own worktree. Severity-ranked verdict lands in `tasks/reviews/`. Criticals become spawn_task chips for immediate fix sessions.
+ - `/ccc-fleet` — the parallel dispatch and worktree rules this skill follows
+ - `/ccc-testing` — the testing lanes each worker runs
+ - `/ccc-qa` — a single-pass QA audit
+ - `/ccc-ship` — release pre-flight once the verdict is PASS
---
> ⚙️ **Fable contract:** plan before build · verifier ≠ worker · prove before alarm · loops need gates · leave durable state — `rules/fable-method.md`