# Ccc Qa

> QA workflow. Runs unit + integration + E2E tests, coverage delta, edge case enumeration, flaky test quarantine. Delegates to qa-engineer agent.

- **Type:** Skill
- **Install:** `agentstack add skill-kevinzai-commander-ccc-qa`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [KevinZai](https://agentstack.voostack.com/s/kevinzai)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [KevinZai](https://github.com/KevinZai)
- **Source:** https://github.com/KevinZai/commander/tree/main/commander/cowork-plugin-codex/skills/ccc-qa
- **Website:** https://commanderplugin.com

## Install

```sh
agentstack add skill-kevinzai-commander-ccc-qa
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# /ccc-qa — Comprehensive QA Workflow

Full QA pass before shipping. Detects test framework, runs all suites, reports coverage delta, flags edge cases and flaky tests. Delegates analysis to the `qa-engineer` subagent. Never marks QA passed with open 🔴 Critical findings.

## Triggers

- `/ccc-qa` or `/qa`
- "QA pass", "run all tests", "test coverage check"
- "before shipping", "pre-release checks", "is this ready to ship"
- "check test coverage", "find missing tests"
- "flaky test", "test suite health"
- Coming from `/ccc-review` or `/ccc-ship`

## When NOT to Use

- Greenfield project with no tests yet — use `/ccc-testing` to scaffold the test suite first
- Single-function bug fixes where a targeted unit test is the right move (write it directly)
- Pure documentation or config-only changes with no testable behavior

## Process

### Step 1 — Detect test framework

Run the following in parallel via `Bash`:

```bash
# Detect JS/TS frameworks
cat package.json 2>/dev/null | grep -E '"(vitest|jest|playwright|mocha|cypress|jasmine)"' | head -10

# Detect config files
ls *.config.{ts,js,mjs} vitest.config.* jest.config.* playwright.config.* pytest.ini setup.cfg \
   go.mod Cargo.toml pom.xml 2>/dev/null

# Detect Python
python3 -m pytest --collect-only -q 2>/dev/null | tail -5

# Detect Go
go test ./... -list '.*' 2>/dev/null | head -10

# Detect Rust
cargo test --no-run 2>/dev/null | tail -5

# Baseline coverage (if previously run)
cat .ccc/coverage-history.json 2>/dev/null || cat coverage/coverage-summary.json 2>/dev/null | head -30
```

**Detection logic:**
- `vitest.config.*` present → **Vitest** (`npx vitest run --coverage`)
- `jest.config.*` present or `"jest"` in scripts → **Jest** (`npx jest --coverage`)
- `playwright.config.*` present → **Playwright** (`npx playwright test`)
- `pytest.ini` or `setup.cfg [tool:pytest]` → **pytest** (`python3 -m pytest --cov`)
- `go.mod` present → **Go test** (`go test ./... -cover`)
- `Cargo.toml` present → **cargo test** (`cargo test 2>&1`)
- `pom.xml` present → **JUnit via Maven** (`mvn test`)
- None detected → report to user and offer to scaffold via `/ccc-testing`

### Step 2 — Confirm scope

```yaml
question: "Which test suites should we run?"
options:
  - label: "🧪 All suites (unit + integration + E2E)"
    description: "Full QA pass. Slowest, most thorough. Use before releases."
  - label: "⚡ Unit + integration only"
    description: "Skip E2E. Fast — good for mid-session checks."
  - label: "🎭 E2E only (Playwright / Cypress)"
    description: "Browser tests only. Requires running dev server."
  - label: "📊 Coverage report only"
    description: "No new test run — parse last run's coverage output."
  - label: "🔁 Flaky test audit (run suite 3×)"
    description: "Detect non-deterministic tests by running the full suite three times and comparing results."
```

### Step 3 — Run tests

Execute based on detected framework and confirmed scope. Capture full stdout. Time the run.

**Vitest (unit + coverage):**
```bash
npx vitest run --coverage --reporter=verbose 2>&1 | tail -80
```

**Jest:**
```bash
npx jest --coverage --forceExit 2>&1 | tail -80
```

**Playwright (E2E):**
```bash
# Confirm dev server is running first
curl -s http://localhost:3000 > /dev/null && echo "server up" || echo "server down"
npx playwright test --reporter=list 2>&1 | tail -60
```

**pytest:**
```bash
python3 -m pytest --cov=. --cov-report=term-missing -q 2>&1 | tail -60
```

**Go:**
```bash
go test ./... -cover -count=1 2>&1 | tail -40
```

**Flaky test detection (3-run mode):**
```bash
for i in 1 2 3; do
  echo "=== Run $i ===" && npx vitest run --reporter=json 2>/dev/null | \
  jq '[.testResults[].assertionResults[] | {name:.fullName, status:.status}]'
done
```
Compare outputs across 3 runs. Any test with differing `status` across runs is flagged as flaky.

### Step 4 — Compute coverage delta

```bash
# Store current coverage
mkdir -p .ccc
CURRENT=$(cat coverage/coverage-summary.json 2>/dev/null | \
  jq '{lines: .total.lines.pct, branches: .total.branches.pct, functions: .total.functions.pct}')
PREV=$(cat .ccc/coverage-history.json 2>/dev/null | jq '.last // {}')
echo "$CURRENT" > .ccc/coverage-history.json
echo "Previous: $PREV"
echo "Current:  $CURRENT"
```

Report delta as: `lines: 74% → 82% (+8%)`, `branches: 61% → 65% (+4%)`.
Flag any regression (delta  server max body size, file > upload limit |

## Examples

### Example 1 — Auth refactor QA

```
/ccc-qa unit
```

Framework detected: Vitest. Output: 187/187 pass, coverage 74% → 82% (+8% on `src/auth/*`).
qa-engineer flags: missing concurrent session creation test (🟠 High), expired-token-at-boundary test (🟡 Medium).
Decision chip: user picks "Write missing edge case tests."

### Example 2 — Payment flow QA

```
/ccc-qa all
```

Framework detected: Vitest + Playwright. Unit: 204/210 (6 failing). E2E: 12/12. Coverage delta: −3% branches (🟠 regression).
qa-engineer flags: `POST /checkout` with empty cart returns 500 instead of 400 (🔴 Critical). Blocks ship.
Decision chip: user picks "Fix failing tests now."

### Example 3 — Migration QA (flaky audit)

```
/ccc-qa
# User selects: Flaky test audit (run suite 3×)
```

Run 1: 145 pass. Run 2: 143 pass (2 fail). Run 3: 145 pass.
qa-engineer flags `UserSessionManager.test.ts:88` as flaky (🟠 High — race condition in teardown).
Decision chip: user picks "File issues to Linear."

## Anti-patterns

- Do not mark QA "passed" if there are 🔴 Critical findings
- Do not skip the qa-engineer agent — raw test output alone is not a QA report
- Do not run E2E without confirming the dev server is running
- Do not run the flaky audit with `--watch` mode — always use `run` / `--count=1` for reproducibility

## Attribution

> Adapted from gstack — MIT licensed.

---

> ⚙️ **Fable contract:** plan before build · verifier ≠ worker · prove before alarm · loops need gates · leave durable state — `rules/fable-method.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [KevinZai](https://github.com/KevinZai)
- **Source:** [KevinZai/commander](https://github.com/KevinZai/commander)
- **License:** MIT
- **Homepage:** https://commanderplugin.com

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-kevinzai-commander-ccc-qa
- Seller: https://agentstack.voostack.com/s/kevinzai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
