Skip to content
Development
Command

/test

Use when the user asks to add missing tests, close coverage gaps, or prove a suite runs. Runs the /team test pipeline: coverage analysis, test writing, then a regression gate that treats any skip as unverified. Tests only, no source.

From plugin
coco
79642 skills53 agents42 commands3 hooks
$ npx -y skills add coco-research/coco --agent claude-code

Command definition

test.md
description: "Use when the user asks to add missing tests, close coverage gaps, or prove a suite runs. Runs the /team test pipeline: coverage analysis, test writing, then a regression gate that treats any skip as unverified. Tests only, no source."

/team test: Test Pipeline

> Called by team.md router when action is `test`.

Role Selection Bias

| Layer | Preferred Roles | Count | |-------|----------------|-------| | L1 | technical-analyst | 2 | | L2 | qa-test-architect + (domain engineers) | 3-4 | | L3 | domain-accuracy | 1-2 | | L4 | principal-architect | 1 |

Stage 1: Brownfield Map

python3 ~/.claude/skills/team-gate/scripts/brownfield_map.py --for "<the coverage gap or test task in words>" --repo-root .

exit 0: continue; read `.team-ship/BROWNFIELD-MAP.md` before reading any code. exit 1: not used; a map is not a pass or fail judgement. exit 2: UNVERIFIED; quote the gate file's summary (gates/handoff-1-map.json).

No test-pipeline aggregator exists to require this gate file; the map is the first step by instruction.

Pipeline Customization

Layer 1: Coverage Analysis

L1 agents focus on the following areas.

  • Current test coverage map (which modules have tests, which don't)
  • Critical paths that lack coverage
  • Existing test patterns and conventions
  • Test infrastructure setup (frameworks, fixtures, mocks)

Layer 2: Test Writing

  • **Mode:** `bypassPermissions`
  • File ownership: each agent owns `tests/test_{module}*` files
  • DO NOT TOUCH: source code (tests only), other agents' test files
  • Follow existing test patterns (fixtures, naming, assertions)

**Toolkit integration:**

  • Check team:toolkit.md for "Test-Driven Development" entry
  • qa-test-architect designs the test strategy; domain engineers write module-specific tests

1. Read the owned source module to understand behavior, then identify untested edge cases and error paths. 2. Run `run_gate.py discover` to find the repository's authoritative test commands, then `run_gate.py parity` to check the local tool versions against the versions CI pins.

python3 ~/.claude/skills/team-gate/scripts/run_gate.py discover --repo-root .
python3 ~/.claude/skills/team-gate/scripts/run_gate.py parity --repo-root .

exit 0: continue and quote each gate file's summary (gates/7-discover.json, gates/7.json). exit 1: BLOCK; parity names the tool whose version differs, quote it and align the tool before continuing. exit 2: UNVERIFIED; the suite is not confirmed passing until the gate passes or an override receipt names the gate.

3. Run `run_gate.py run` for the baseline, before any new test is committed. Record this run's head now: step 4 commits and step 5 rewrites gates/8.json, so the head this step writes is captured here for step 6's `--base`, not read fresh from gates/8.json later.

python3 ~/.claude/skills/team-gate/scripts/run_gate.py run --repo-root .

exit 0: continue and quote the gate file's summary (gates/8.json). exit 1: BLOCK; quote the reasons from the gate file and loop back to test writing. exit 2: UNVERIFIED; the suite is not confirmed passing until the gate passes or an override receipt names the gate.

Provision what CI provisions. When something cannot be provisioned, record "override integration: <reason>" in your own words as the human, and run_gate's skip rule decides the rest.

4. Write the tests following existing patterns, then commit them alone: `test({module}): add missing tests for {description}`. 5. The commit in step 4 moved HEAD, and `run` refuses a discover file recorded at a different HEAD, so run `run_gate.py discover` again before `run_gate.py run`, so the new tests are checked at HEAD.

python3 ~/.claude/skills/team-gate/scripts/run_gate.py discover --repo-root .
python3 ~/.claude/skills/team-gate/scripts/run_gate.py run --repo-root .

exit 0: continue and quote each gate file's summary (gates/7-discover.json, gates/8.json); gates/8.json is rewritten and the latest receipt wins. exit 1: BLOCK; for the command that stopped, quote its gate file's summary and loop back to test writing. exit 2: UNVERIFIED; for the command that stopped, quote its gate file's summary; the suite is not confirmed passing until the gate passes or an override receipt names the gate.

6. Run `prove_red.py prove --base <the head recorded in gates/8.json by the baseline run in step 3> --repo-root .`. prove_red runs each new test green at HEAD, reverts the implementation in a throwaway worktree, and proves it goes red for the right reason.

python3 ~/.claude/skills/team-gate/scripts/prove_red.py prove --base <the head recorded in gates/8.json by the baseline run in step 3> --repo-root .

exit 0: continue and quote the gate file's summary (gates/9.json). exit 1: BLOCK; a never-red or invalid-red classification, quote the reason from gates/9.json. exit 2: UNVERIFIED; the suite is not confirmed passing until the gate passes or an override receipt names the gate.

On a tests-only change prove_red switches to its stub mode: it replaces the implementation modules the new test imports with stubs in the throwaway worktree and proves the test fails against them, recording the class valid-red-stub; a test that still passes, or imports no implementation module, is never-red with the reason "exercises no implementation module".

7. Run `prove_red.py recheck` to confirm the proved tests still hold.

python3 ~/.claude/skills/team-gate/scripts/prove_red.py recheck --repo-root .

exit 0: continue and quote the gate file's summary (gates/9-recheck.json). exit 1: BLOCK; quote the reasons from the gate file and loop back to test writing. exit 2: UNVERIFIED; the suite is not confirmed passing until the gate passes or an override receipt names the gate.

Layer 3: Test Quality Review

L3 agents verify the following properties.

  • Tests actually test behavior (not implementation details)
  • No test interdependence or shared mutable state
  • Edge cases covered (null, empty, boundary, error paths)
Read more
@coco-research
Ships withcoco

495 personas across 13 departments, 229 skills[^installed] and 388 commands in the full catalog (coco 1.9.0, 2026-10-21). Agent skills, slash commands and subagents for Claude Code, Cursor, Codex and other AI coding agents.

796200 skills53 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
796
Star history of coco-research/coco on GitHub, a chart by star-history.com

Other commands on coco.

goal

goal

Command

Set, check, or complete the persistent project goal stored in .goal.md. Trigger as /coco-goal or /coco:goal.

@coco-research@coco-researchInstall Command
mermaid

mermaid

Command

Use when the user asks for a diagram or chart: flowchart, sequence, state, class, ER, or XY chart, as SVG, HTML, or terminal…

@coco-research@coco-researchInstall Command
read

read

Command

Show latest emails from a specific person. Usage: /email-read alice

@coco-research@coco-researchInstall Command
reply

reply

Command

Draft a reply to a specific email. Usage: /email-reply Project Phase 2 Contract Data

@coco-research@coco-researchInstall Command
save

save

Command

Save matching emails to a project folder for sync processing. Usage: /email-save alice to emails/

@coco-research@coco-researchInstall Command
search

search

Command

Search emails by subject keywords. Usage: /email-search github webhook

@coco-research@coco-researchInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command