qa-workflow-cc 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +461 -0
  2. package/VERSION +1 -0
  3. package/bin/install.js +116 -0
  4. package/commands/qa/continue.md +77 -0
  5. package/commands/qa/full.md +149 -0
  6. package/commands/qa/init.md +105 -0
  7. package/commands/qa/resume.md +91 -0
  8. package/commands/qa/status.md +66 -0
  9. package/package.json +28 -0
  10. package/skills/qa/SKILL.md +420 -0
  11. package/skills/qa/references/continuation-format.md +58 -0
  12. package/skills/qa/references/exit-criteria.md +53 -0
  13. package/skills/qa/references/lifecycle.md +181 -0
  14. package/skills/qa/references/model-profiles.md +77 -0
  15. package/skills/qa/templates/agent-skeleton.md +733 -0
  16. package/skills/qa/templates/component-test.md +1088 -0
  17. package/skills/qa/templates/domain-research-queries.md +101 -0
  18. package/skills/qa/templates/domain-security-profiles.md +182 -0
  19. package/skills/qa/templates/e2e-test.md +1200 -0
  20. package/skills/qa/templates/nielsen-heuristics.md +274 -0
  21. package/skills/qa/templates/performance-benchmarks-base.md +321 -0
  22. package/skills/qa/templates/qa-report-template.md +271 -0
  23. package/skills/qa/templates/security-checklist-owasp.md +451 -0
  24. package/skills/qa/templates/stop-points/bootstrap-complete.md +36 -0
  25. package/skills/qa/templates/stop-points/certified.md +25 -0
  26. package/skills/qa/templates/stop-points/escalated.md +32 -0
  27. package/skills/qa/templates/stop-points/fix-ready.md +43 -0
  28. package/skills/qa/templates/stop-points/phase-transition.md +4 -0
  29. package/skills/qa/templates/stop-points/status-dashboard.md +32 -0
  30. package/skills/qa/templates/test-standards.md +652 -0
  31. package/skills/qa/templates/unit-test.md +998 -0
  32. package/skills/qa/templates/visual-regression.md +418 -0
  33. package/skills/qa/workflows/bootstrap.md +45 -0
  34. package/skills/qa/workflows/decision-gate.md +66 -0
  35. package/skills/qa/workflows/fix-execute.md +132 -0
  36. package/skills/qa/workflows/fix-plan.md +52 -0
  37. package/skills/qa/workflows/report-phase.md +64 -0
  38. package/skills/qa/workflows/test-phase.md +86 -0
  39. package/skills/qa/workflows/verify-phase.md +65 -0
@@ -0,0 +1,420 @@
1
+ ---
2
+ name: qa
3
+ description: QA bootstrap — discovers tech stack, generates agents and test resources for any project. Use /qa:full, /qa:init, /qa:continue, /qa:resume, /qa:status for QA operations.
4
+ user-invocable: false
5
+ disable-model-invocation: true
6
+ allowed-tools: "Read, Write, Edit, Glob, Grep, Bash, Task, WebSearch, WebFetch"
7
+ model: inherit
8
+ ---
9
+
10
+ # QA Bootstrap Protocol
11
+
12
+ This skill contains the Phase 0 bootstrap logic for QA. It is invoked by `/qa:init` (bootstrap only) and `/qa:full` (bootstrap + execute).
13
+
14
+ **This skill is self-bootstrapping.** It works in ANY project directory. On first run it discovers the tech stack, generates all QA infrastructure (agents, skill files, test matrix), and writes `qa-profile.json`.
15
+
16
+ ## Commands (colon sub-commands)
17
+
18
+ | Command | Purpose |
19
+ |---------|---------|
20
+ | `/qa:full` | Full QA cycle — test, report, fix plan, verify |
21
+ | `/qa:init` | Bootstrap only (this skill) |
22
+ | `/qa:continue` | Execute approved fix plan |
23
+ | `/qa:resume` | Resume from any interrupted state |
24
+ | `/qa:status` | View current QA progress |
25
+
26
+ ## Reference Documents (loaded on-demand by commands)
27
+
28
+ | File | Content |
29
+ |------|---------|
30
+ | `references/lifecycle.md` | Phase definitions, state machine, edge cases, rules |
31
+ | `references/continuation-format.md` | QA stop-point formatting guide |
32
+ | `references/exit-criteria.md` | Exit criteria + severity definitions |
33
+ | `references/model-profiles.md` | QA agent model allocation table |
34
+
35
+ ---
36
+
37
+ > Full lifecycle diagram, phase semantics, edge cases, and rules: see `references/lifecycle.md`
38
+ > Exit criteria and severity definitions: see `references/exit-criteria.md`
39
+ > Stop-point formatting templates: see `references/continuation-format.md`
40
+ > Model allocation per agent role: see `references/model-profiles.md`
41
+
42
+ ---
43
+
44
+ ## Phase 0: Bootstrap Protocol
45
+
46
+ **Triggers when:**
47
+ - `.claude/qa-profile.json` does NOT exist, OR
48
+ - Profile is stale (>30 days old), OR
49
+ - User invoked `/qa init` or `/qa rebootstrap`
50
+
51
+ **Skip when:**
52
+ - `.claude/qa-profile.json` exists AND is fresh AND user did NOT request init/rebootstrap
53
+
54
+ If profile exists but is stale (>30 days), prompt the user: "QA profile is N days old. Re-scan? [yes/no]"
55
+
56
+ ### B1: Root Discovery (sequential, main context)
57
+
58
+ Read these files to establish project basics:
59
+
60
+ ```
61
+ package.json → name, packageManager, scripts, dependencies, devDependencies
62
+ pnpm-workspace.yaml → monorepo detection (pnpm)
63
+ turbo.json → monorepo detection (turborepo)
64
+ lerna.json → monorepo detection (lerna)
65
+ nx.json → monorepo detection (nx)
66
+ tsconfig.json → TypeScript configuration
67
+ CLAUDE.md → architecture description, agent routing
68
+ README.md → project description
69
+ ```
70
+
71
+ From `package.json`, apply framework detection heuristics:
72
+
73
+ ```
74
+ IF deps includes "next" → framework = "nextjs"
75
+ IF deps includes "expo" → framework = "expo"
76
+ IF deps includes "fastify" → framework = "fastify"
77
+ IF deps includes "express" → framework = "express"
78
+ IF deps includes "remix" or "@remix-run/*" → framework = "remix"
79
+ IF deps includes "astro" → framework = "astro"
80
+ IF deps includes "nuxt" → framework = "nuxt"
81
+ IF deps includes "@trpc/server" → apiStyle = "trpc"
82
+ IF deps includes "prisma" or "@prisma/client" → orm = "prisma"
83
+ IF deps includes "drizzle-orm" → orm = "drizzle"
84
+ IF deps includes "mongoose" → orm = "mongoose"
85
+ IF deps includes "@clerk/nextjs" or "clerk-expo"→ auth = "clerk"
86
+ IF deps includes "next-auth" → auth = "next-auth"
87
+ IF deps includes "passport" → auth = "passport"
88
+ IF deps includes "@supabase/auth-helpers-*" → auth = "supabase"
89
+ IF deps includes "vitest" → testRunner = "vitest"
90
+ IF deps includes "jest" → testRunner = "jest"
91
+ IF deps includes "@playwright/test" → e2e = "playwright"
92
+ IF deps includes "cypress" → e2e = "cypress"
93
+ IF deps includes "@testing-library/react" → componentLib = "@testing-library/react"
94
+ IF deps includes "@testing-library/react-native"→ componentLib = "@testing-library/react-native"
95
+ ```
96
+
97
+ ### B1b: Domain Detection
98
+
99
+ After root discovery, infer the project's domain from README.md, CLAUDE.md, and any PRD file (`.planning/REQUIREMENTS.md`, `.planning/PRD.md`, or similar):
100
+
101
+ | Keywords Found | Domain Label |
102
+ |---------------|-------------|
103
+ | "crisis", "safety", "DV", "domestic violence", "addiction", "survivor" | `safety-critical` |
104
+ | "health", "medical", "patient", "HIPAA", "PHI", "clinical" | `healthcare` |
105
+ | "e-commerce", "checkout", "cart", "payment", "PCI", "stripe" | `e-commerce` |
106
+ | "SaaS", "tenant", "organization", "workspace", "multi-tenant" | `multi-tenant-saas` |
107
+ | "education", "student", "course", "LMS", "FERPA" | `education` |
108
+ | "fintech", "banking", "transaction", "KYC", "AML" | `fintech` |
109
+
110
+ If no keywords match → `domain = "general"`
111
+
112
+ Also extract from these files:
113
+ - **Target audience description** — who uses this app (e.g., "Women seeking addiction resources")
114
+ - **Domain-specific compliance requirements** — any regulations mentioned (HIPAA, PCI, FERPA, etc.)
115
+
116
+ Set in profile:
117
+ ```
118
+ profile.project.domain = "safety-critical" (or detected value)
119
+ profile.project.domainKeywords = ["crisis", "addiction"] (matched keywords)
120
+ profile.project.targetAudience = "Women seeking addiction resources"
121
+ ```
122
+
123
+ ### B2: Parallel Research (spawn up to 8 Task agents)
124
+
125
+ Launch these research agents in parallel:
126
+
127
+ | Agent | Job | Input | Output |
128
+ |-------|-----|-------|--------|
129
+ | **App Discovery** (1 per app in monorepo, or 1 for single app) | Read app's package.json, detect framework, deps, test config, design system | App path | App entry for profile |
130
+ | **Security Context** | Scan router/route files for auth patterns, tenant isolation, procedure types | Router glob pattern | Security section for profile |
131
+ | **PRD/Feature Analysis** | Read PRD/README, extract feature categories with priorities | PRD path or README | Features section for profile |
132
+ | **Anthropic Docs Research** | Live research of current Anthropic agent/skill/command format docs | WebSearch + context7 + WebFetch | Format rules for generation + verification status |
133
+ | **Stack Testing Research** | WebSearch for testing best practices specific to detected framework + test runner | `profile.apps[].framework`, `profile.testing.testRunner` | Condensed patterns (max 2K tokens) |
134
+ | **Security Research** | WebSearch for security standards specific to detected domain + auth provider | `profile.project.domain`, `profile.security.authMethods` | Domain security profile (max 2K tokens) |
135
+ | **UX/A11Y Research** | WebSearch for accessibility standards specific to detected UI framework + domain | `profile.project.domain`, `profile.apps[].framework` | UX criteria + scoring adjustments (max 2K tokens) |
136
+
137
+ #### Anthropic Docs Research Agent
138
+
139
+ This agent performs LIVE research to get the latest Anthropic documentation on agent, skill, and command formats. This replaces the old "Anthropic Format Check" that only read local files.
140
+
141
+ ```
142
+ You are a documentation research agent. Your job is to find the CURRENT Anthropic
143
+ Claude Code documentation on writing custom agents, skills, and commands.
144
+
145
+ **Step 1: WebSearch queries (run all):**
146
+ - "Anthropic Claude Code custom agents format {current_year}"
147
+ - "Claude Code skills format reference {current_year}"
148
+ - "Claude Code orchestrator pattern multi-agent subagent {current_year}"
149
+ - "Claude Code slash commands custom commands format {current_year}"
150
+ - "site:docs.anthropic.com Claude Code agents skills"
151
+
152
+ **Step 2: context7 (if available):**
153
+ - Resolve library ID for "claude-code"
154
+ - Query for agent creation docs, skill format docs, command format docs
155
+
156
+ **Step 3: WebFetch (attempt these paths):**
157
+ - https://docs.anthropic.com/en/docs/claude-code/agents
158
+ - https://docs.anthropic.com/en/docs/claude-code/skills
159
+ - https://docs.anthropic.com/en/docs/claude-code/commands
160
+
161
+ **Step 4: Reconciliation:**
162
+ - Read local files: ~/.claude/docs/agents-format.md and ~/.claude/docs/skills-format.md
163
+ - Compare live findings against local docs
164
+ - Log any discrepancies (new fields, deprecated fields, changed defaults)
165
+ - USE LIVE FINDINGS for agent generation when they differ from local
166
+
167
+ **Return a condensed summary (MAX 2000 tokens) organized as:**
168
+ - Agent format: required frontmatter fields, allowed-tools syntax, model values
169
+ - Skill format: required frontmatter fields, user-invocable settings
170
+ - Command format: required frontmatter fields, argument-hint syntax, @file auto-context
171
+ - Discrepancies: {list of differences between live docs and local files}
172
+ - Verification: "verified_current" or "using_local_fallback"
173
+
174
+ Do NOT return raw URLs. Synthesize into actionable format rules.
175
+ ```
176
+
177
+ **Set in profile after return:**
178
+ ```json
179
+ {
180
+ "research": {
181
+ "anthropicDocsVerified": true,
182
+ "anthropicDocsVersion": "{date or version from docs}",
183
+ "anthropicDocsDiscrepancies": ["list of differences found"]
184
+ }
185
+ }
186
+ ```
187
+
188
+ #### General Research Agent Prompt Template
189
+
190
+ ```
191
+ You are a research agent. Use WebSearch to find current best practices.
192
+
193
+ **Queries to run** (from templates/domain-research-queries.md, substituted with detected values):
194
+ {framework-specific queries}
195
+ {domain-specific queries}
196
+
197
+ For each relevant result, WebFetch the URL for details.
198
+
199
+ **Return a condensed summary (MAX 2000 tokens) organized as:**
200
+ - Key patterns for {topic}
201
+ - Common pitfalls to test for
202
+ - Framework-specific considerations
203
+ - Checklist items to include in QA
204
+
205
+ Do NOT return raw URLs or full articles. Synthesize actionable guidance.
206
+ ```
207
+
208
+ **Graceful fallback:** If WebSearch fails or returns nothing useful, proceed without research. Set `profile.research.researchCompleted = false`. Agents generate from templates alone. If Anthropic docs research fails, fall back to local `~/.claude/docs/agents-format.md` and `~/.claude/docs/skills-format.md`. Set `profile.research.anthropicDocsVerified = false`.
209
+
210
+ If context7 MCP is available, also launch:
211
+
212
+ | Agent | Job |
213
+ |-------|-----|
214
+ | **Framework Docs** (1 per detected framework) | Fetch current testing patterns via context7 MCP |
215
+
216
+ **Graceful fallback:** If context7 is unavailable, proceed without latest docs. Note in profile: `"context7Available": false`.
217
+
218
+ ### B3: Determine Monorepo Structure
219
+
220
+ **If monorepo detected** (pnpm-workspace.yaml, turbo.json, lerna.json, or nx.json):
221
+ - Read workspace config to find app directories
222
+ - For each app directory, read its package.json
223
+ - Create one entry per app in the profile's `apps[]` array
224
+
225
+ **If single app** (no workspace config):
226
+ - Create one entry with `path: "."` in `apps[]`
227
+
228
+ ### B4: Write Profile
229
+
230
+ Assemble `.claude/qa-profile.json` from all research results. Schema:
231
+
232
+ ```json
233
+ {
234
+ "$schema": "qa-profile-v1",
235
+ "version": 1,
236
+ "generatedAt": "ISO-8601",
237
+
238
+ "project": {
239
+ "name": "string (from package.json name)",
240
+ "rootDir": "absolute-path",
241
+ "monorepo": true,
242
+ "packageManager": "pnpm|npm|yarn|bun",
243
+ "language": "typescript|javascript",
244
+ "domain": "safety-critical|healthcare|e-commerce|multi-tenant-saas|education|fintech|general",
245
+ "domainKeywords": ["matched", "keywords"],
246
+ "targetAudience": "description of who uses this app"
247
+ },
248
+
249
+ "apps": [{
250
+ "name": "string",
251
+ "path": "relative-path (e.g., apps/web or .)",
252
+ "framework": "nextjs|expo|fastify|express|remix|astro|nuxt|unknown",
253
+ "type": "frontend|backend|worker|marketing",
254
+ "testIdPrefix": "WEB|API|MOB|WK|MKT",
255
+ "buildCommand": "string",
256
+ "testCommand": "string",
257
+ "designSystem": "string|null",
258
+ "authProvider": "string|null"
259
+ }],
260
+
261
+ "testing": {
262
+ "testRunner": "vitest|jest",
263
+ "e2eFramework": "playwright|cypress|none",
264
+ "componentTestLib": "@testing-library/react|@testing-library/react-native|none",
265
+ "autoDetected": true,
266
+ "existingInfrastructure": {
267
+ "setupFile": "path|null",
268
+ "helpersFile": "path|null",
269
+ "configFile": "path|null"
270
+ },
271
+ "coverageThresholds": {
272
+ "statements": 80,
273
+ "branches": 70,
274
+ "functions": 80,
275
+ "lines": 80
276
+ }
277
+ },
278
+
279
+ "security": {
280
+ "multiTenancy": true,
281
+ "tenantIsolationField": "orgId|tenantId|userId|none",
282
+ "authMethods": ["clerk-jwt", "magic-link", "next-auth", "..."],
283
+ "procedureTypes": ["protectedProcedure", "publicProcedure", "..."],
284
+ "routerCount": 0,
285
+ "routerPath": "glob-pattern"
286
+ },
287
+
288
+ "features": {
289
+ "prdPath": "path|null",
290
+ "prdExists": true,
291
+ "categories": [
292
+ {
293
+ "name": "string",
294
+ "prefix": "string (test ID prefix)",
295
+ "priority": "P0|P1|P2",
296
+ "estimatedTests": 0
297
+ }
298
+ ],
299
+ "totalEstimatedTests": 0
300
+ },
301
+
302
+ "agentRouting": {
303
+ "fixRoutes": [
304
+ { "pattern": "glob", "agent": "agent-name" }
305
+ ]
306
+ },
307
+
308
+ "scopes": {
309
+ "available": ["full", "api", "security", "ux"],
310
+ "default": "full"
311
+ },
312
+
313
+ "commands": {
314
+ "typeCheck": "pnpm type-check",
315
+ "build": "pnpm build",
316
+ "test": "pnpm test"
317
+ },
318
+
319
+ "config": {
320
+ "model_profile": "balanced"
321
+ },
322
+
323
+ "research": {
324
+ "stackTesting": "condensed findings from Stack Testing Research agent",
325
+ "securityProfile": "condensed findings from Security Research agent",
326
+ "uxCriteria": "condensed findings from UX/A11Y Research agent",
327
+ "anthropicDocsVerified": true,
328
+ "anthropicDocsVersion": "date or version from live docs",
329
+ "anthropicDocsDiscrepancies": [],
330
+ "researchedAt": "ISO-8601",
331
+ "researchCompleted": true
332
+ },
333
+
334
+ "context7Available": true
335
+ }
336
+ ```
337
+
338
+ ### B5: Create Directories
339
+
340
+ ```bash
341
+ mkdir -p .claude/agents .claude/skills/testing/resources docs/qa-reports
342
+ ```
343
+
344
+ ### B6: Generate Files (parallel Task agents, up to 8)
345
+
346
+ The template files live at `~/.claude/skills/qa/templates/`. Generate project files by:
347
+
348
+ 1. **Category A — Copy verbatim** (100% generic, no substitution needed):
349
+ - `templates/nielsen-heuristics.md` → `.claude/skills/testing/resources/nielsen-heuristics.md`
350
+ - `templates/visual-regression.md` → `.claude/skills/testing/visual-regression.md`
351
+
352
+ 2. **Category B — Copy with variable substitution:**
353
+ - `templates/unit-test.md` → `.claude/skills/testing/unit-test.md`
354
+ - `templates/component-test.md` → `.claude/skills/testing/component-test.md`
355
+ - `templates/e2e-test.md` → `.claude/skills/testing/e2e-test.md`
356
+ - `templates/qa-report-template.md` → `.claude/skills/testing/resources/qa-report-template.md`
357
+ - `templates/performance-benchmarks-base.md` → `.claude/skills/testing/resources/performance-benchmarks.md`
358
+ - `templates/security-checklist-owasp.md` → `.claude/skills/testing/resources/security-checklist.md`
359
+ - `templates/test-standards.md` → `.claude/skills/testing/test-standards.md`
360
+
361
+ For each: Read the template, replace all `{{variable}}` placeholders with values from `qa-profile.json`, write the output.
362
+
363
+ 3. **Category C — Agent generation (domain-aware):**
364
+ - Read `templates/agent-skeleton.md`
365
+ - Read `profile.research.*` for domain-specific content from B2 research agents
366
+ - Read `templates/domain-security-profiles.md` for the matching `profile.project.domain`
367
+ - For each of the 6 agent sections, substitute profile variables AND domain variables:
368
+ - `{{DOMAIN_CONTEXT}}` → Combined domain label + target audience + relevant research findings from `profile.research.stackTesting`
369
+ - `{{SECURITY_PROFILE}}` → Domain security profile from template + research findings from `profile.research.securityProfile`
370
+ - `{{DOMAIN_UX_CONTEXT}}` → Domain-specific UX scoring adjustments from `profile.research.uxCriteria`
371
+ - If `profile.research.researchCompleted == false`, use template content only (no research findings to inject)
372
+ - Write each agent to `.claude/agents/qa-{name}.md`
373
+
374
+ 4. **PRD Test Matrix** (generated, not from template):
375
+ - If PRD exists: Read the PRD, extract features, generate `.claude/skills/testing/resources/prd-test-matrix.md` with test cases mapped to features
376
+ - If no PRD: Prompt user: "No PRD found. Would you like to: (a) define key features to test, (b) auto-discover from routes/components, or (c) point to a requirements doc?" If (a), collect feature list interactively. If (b), generate minimal test matrix from route/component discovery. If (c), read the provided path. Mark `prdExists: false` unless user provides a doc.
377
+
378
+ 5. **tRPC Test Skill** (conditional):
379
+ - If tRPC detected (`security.procedureTypes` is non-empty): Generate `.claude/skills/testing/trpc-test.md` with router test patterns
380
+ - If no tRPC: Skip
381
+
382
+ ### B7: Handle Existing Files
383
+
384
+ Before writing each generated file, check if it already exists:
385
+
386
+ - **File exists AND is newer than profile** → Skip (user customized it). Log: "Skipping {file} — user-modified"
387
+ - **File exists AND is older than profile** → Offer update: "Update {file}? It was last modified {date}."
388
+ - **File does not exist** → Write it
389
+
390
+ ### B8: Validate
391
+
392
+ After generation, verify:
393
+ 1. Glob `.claude/agents/qa-*.md` — expect 6 files (or 5 if no API/security auditor needed)
394
+ 2. Glob `.claude/skills/testing/*.md` — expect skill files
395
+ 3. Glob `.claude/skills/testing/resources/*.md` — expect resource files
396
+ 4. Spot-check: Read first 5 lines of 2 random generated files to verify no leftover `{{variable}}` placeholders
397
+ 5. Verify YAML frontmatter is valid in agent files
398
+ 6. If `profile.research.anthropicDocsVerified == true`: Cross-check generated agent frontmatter against Anthropic docs findings (required fields, allowed-tools syntax, model values). Log any discrepancies as warnings.
399
+
400
+ ### B9: Report Bootstrap Results
401
+
402
+ **State checkpoint:** Write initial cycle state before reporting:
403
+
404
+ ```
405
+ Write docs/qa-reports/cycle-state.json: {
406
+ "cycle": 0,
407
+ "date": "{YYYY-MM-DD}",
408
+ "phase": "bootstrap_complete",
409
+ "scope": "init"
410
+ }
411
+ ```
412
+
413
+ Read and output `~/.claude/skills/qa/templates/stop-points/bootstrap-complete.md`
414
+ Substitute all `{placeholder}` values with profile data from B4.
415
+
416
+ If `/qa:init` was invoked, STOP HERE. Do not proceed to QA execution.
417
+
418
+ ---
419
+
420
+ > **Phases 1-9 have been extracted to lean command orchestrators.** See `~/.claude/commands/qa/full.md` for the main QA cycle, `~/.claude/commands/qa/continue.md` for fix execution, and `~/.claude/commands/qa/resume.md` for recovery from any state.
@@ -0,0 +1,58 @@
1
+ # QA Continuation Format
2
+
3
+ Standard format for QA stop-point output. Follows GSD continuation-format rules adapted for QA lifecycle.
4
+
5
+ ## Format Rules (GSD-Compatible)
6
+
7
+ 1. **Always show WHAT it is** — name + description, never just a command
8
+ 2. **Command in inline backticks** — easy to copy-paste
9
+ 3. **`/clear` explanation always included** — explains WHY
10
+ 4. **"Also available" not "Other options"** — sounds more app-like
11
+ 5. **Visual separators** — `---` above and below to make it stand out
12
+ 6. **Recovery line always inside separator block** — never floating
13
+ 7. **Box-drawing characters:** `━` for top/bottom banners, `─` for separators
14
+
15
+ ## Stop Point Template Files
16
+
17
+ Templates have been extracted to individual files. Commands read the appropriate template, substitute placeholders, and output directly.
18
+
19
+ | Stop Point | Template File | Used By |
20
+ |-----------|---------------|---------|
21
+ | Bootstrap Complete | `templates/stop-points/bootstrap-complete.md` | `/qa:init` (terminal), `/qa:full` (informational) |
22
+ | Fix Plan Ready (Phase 6) | `templates/stop-points/fix-ready.md` | `/qa:full` (mandatory user-approval stop) |
23
+ | Certified (Phase 8) | `templates/stop-points/certified.md` | `/qa:full` (terminal — all exit criteria pass) |
24
+ | Escalated (Phase 9) | `templates/stop-points/escalated.md` | `/qa:full` (terminal — stuck defects) |
25
+ | Phase Transition | `templates/stop-points/phase-transition.md` | All commands (inter-phase autonomous continuation) |
26
+ | Status Dashboard | `templates/stop-points/status-dashboard.md` | `/qa:status` (read-only dashboard) |
27
+
28
+ ## Anti-Patterns
29
+
30
+ ### Don't: Command-only (no context)
31
+
32
+ ```
33
+ Run /qa:continue
34
+ ```
35
+
36
+ User has no idea what cycle this is or what happens next.
37
+
38
+ ### Don't: Missing /clear explanation
39
+
40
+ ```
41
+ `/qa:full`
42
+ Run /clear first.
43
+ ```
44
+
45
+ Doesn't explain why. User might skip it.
46
+
47
+ ### Don't: Recovery line outside separator block
48
+
49
+ ```
50
+ ---
51
+ Also available:
52
+ - `/qa:status`
53
+ ---
54
+
55
+ If session interrupted → `/qa:resume`
56
+ ```
57
+
58
+ Recovery line must be INSIDE a `---` block, not floating.
@@ -0,0 +1,53 @@
1
+ # QA Exit Criteria
2
+
3
+ Thresholds that must be met for QA certification, plus severity definitions used across all QA agents.
4
+
5
+ ## Exit Criteria
6
+
7
+ Read from profile and apply defaults:
8
+
9
+ | Gate | Default Threshold |
10
+ |------|-------------------|
11
+ | P0 features pass | 100% |
12
+ | P1 features pass | 100% (or documented workarounds) |
13
+ | Critical defects open | 0 |
14
+ | Major defects open | 0 |
15
+ | Minor defects open | <10 |
16
+ | UX Score (Nielsen avg) | >= 3.5 / 5.0 |
17
+ | WCAG 2.1 AA critical | 0 violations |
18
+ | Lighthouse Performance | >= 80 (if frontend exists) |
19
+ | Lighthouse Accessibility | >= 85 (if frontend exists) |
20
+ | Tenant isolation verified | All routers (if multi-tenant) |
21
+ | Auth boundary tests | 100% pass (if auth exists) |
22
+
23
+ ## Decision Gate Logic (Phase 5)
24
+
25
+ ```
26
+ IF all exit criteria pass:
27
+ → decision = "PASS"
28
+ → Phase 8: Certification
29
+ → DONE (autonomous — no stop)
30
+
31
+ ELIF cycle >= 3 AND same defects persist across 2+ cycles:
32
+ → decision = "ESCALATE"
33
+ → Phase 9: Escalation
34
+ → STOP with escalation report
35
+
36
+ ELIF cycle >= 3 AND blockedDefectIds.length > 0 across 2+ cycles without resolution:
37
+ → decision = "ESCALATE"
38
+ → Phase 9: Escalation (include blocked defect history)
39
+
40
+ ELSE (failures exist):
41
+ → decision = "FAIL"
42
+ → Phase 6: Plan Fixes
43
+ → Continues autonomously into fix planning
44
+ ```
45
+
46
+ ## Defect Severity Definitions
47
+
48
+ | Severity | Definition | Example |
49
+ |----------|-----------|---------|
50
+ | **Critical** | Feature broken, data loss risk, security hole | Cross-tenant data leak, core feature crash |
51
+ | **Major** | Partially broken, no workaround | Form submission fails, auth bypass |
52
+ | **Minor** | Works with issues, workaround exists | Filter doesn't clear on back nav |
53
+ | **Cosmetic** | Visual-only | Icon misalignment, wrong font weight |