brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
plan-test-coveragePlan-only, user-story-driven test coverage audit. Use when "test coverage plan", "traceability matrix", "fake-green tests", or "what's not tested". Mutation score → test-mutation.
Independent GitHub snapshot · Automated classification · Original documentation governs
Degree of freedom: MIXED — story derivation and fake-green judgment are HIGH; coverage commands run exactly. Stay plan-only. No tests written in this pass.
Role: Senior QA / test engineer.
Task: Audit the test suite against user stories and critical flows, not just line %. Find untested, weakly tested, and fake-green tests. Build traceability matrix + burndown. Audit & plan only — do not write tests in this pass.
| Skill | Does |
|---|---|
| plan-test-coverage (this) | Story-driven coverage plan |
test-unit | Write unit/integration tests (execution) |
test-qa | Live QA crawl |
test-playwright | E2E verification after changes |
workflow-spec-tdd | Spec + TDD during feature build |
plan-stub-checker | Finds unwired UI — feed into critical-path tests here |
Loop position: plan-stub-checker → wiring approval → plan-test-coverage → plan-perf-audit / plan-security-audit → plan-docs-sync
Propose: add an e2e for "authed user exports data" covering the newly wired Settings control; replace
expect(true).toBe(true)inexport.test.ts. Risk: stub-checker wired the button; coverage % is 82 but the critical path has no test — fake-green hides it. Keep-working: login happy-path Playwright spec already asserts a session cookie. Phase: Phase 1 — Critical uncovered + fake-green. Spec: given authed session / when Export clicked / thenPOST /api/export200 and a file download.
Read references/preservation-contract.md. Acknowledge in output #1.
| File | Contents |
|---|---|
references/methodology.md | Stories from code, traceability, multi-lens, fake-green |
references/output-templates.md | Matrix, burndown, phased plan |
0. Derive user stories from code (FIRST)
1. Inventory existing tests + coverage baseline
2. Traceability matrix (story ↔ test)
3. Multi-lens coverage audit
4. Fake-green / weak-test detection
5. Burndown + phased coverage plan
6. Guardrails (mutation CI, coverage ratchet)
7. Research citations
Detail: references/methodology.md
Delegate an inventory pass to a subagent only when it is sizeable, independent of the others, and its raw output (coverage reports, test listings) has no place in the plan; brief it with the exact commands and the columns to return. It writes no tests, like this pass. Long sweeps are expected — context compaction exists, so finish the inventory rather than wrapping up early.
Reconstruct what the app promises from routes, handlers, flows — not invented stories.
Each story: acceptance criteria + criticality + cited implementing code.
Discover test files; map to stories. Run coverage tool if available:
npm test -- --coverage
npx vitest run --coverage
Not run → [NEEDS RUN] with command to run.
Core artifact. Every critical story with no test = top-priority gap.
Template: references/output-templates.md
Judge branch/path/risk/integration/error paths — not just line %.
Flag fake-green: over-mocks, expect(true), implementation-detail tests.
Recommend mutation testing on critical modules for blind spots.
Phases:
Per gap: given/when/then spec + "what must keep working". Plan only.
[NEEDS RUN]test-mutation; writing tests → test-unit / test-playwright; unwired UI → plan-stub-checker[NEEDS RUN][NEEDS PRODUCT INPUT] / [NEEDS RUN]End the turn with a standalone recap in chat: the two or three highest-impact gaps (untested critical stories and fake-green first) and the first phase to approve. The plan is the deliverable — write it before the recap.