agileflow 3.0.2 → 3.2.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 (116) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +58 -86
  3. package/lib/dashboard-automations.js +130 -0
  4. package/lib/dashboard-git.js +254 -0
  5. package/lib/dashboard-inbox.js +64 -0
  6. package/lib/dashboard-protocol.js +1 -0
  7. package/lib/dashboard-server.js +114 -924
  8. package/lib/dashboard-session.js +136 -0
  9. package/lib/dashboard-status.js +72 -0
  10. package/lib/dashboard-terminal.js +354 -0
  11. package/lib/dashboard-websocket.js +88 -0
  12. package/lib/drivers/codex-driver.ts +4 -4
  13. package/lib/feedback.js +9 -2
  14. package/lib/lazy-require.js +59 -0
  15. package/lib/logger.js +106 -0
  16. package/package.json +4 -2
  17. package/scripts/agileflow-configure.js +14 -2
  18. package/scripts/agileflow-welcome.js +450 -459
  19. package/scripts/claude-tmux.sh +113 -5
  20. package/scripts/context-loader.js +4 -9
  21. package/scripts/lib/command-prereqs.js +280 -0
  22. package/scripts/lib/configure-detect.js +92 -2
  23. package/scripts/lib/configure-features.js +411 -1
  24. package/scripts/lib/context-formatter.js +468 -233
  25. package/scripts/lib/context-loader.js +27 -15
  26. package/scripts/lib/damage-control-utils.js +8 -1
  27. package/scripts/lib/feature-catalog.js +321 -0
  28. package/scripts/lib/portable-tasks-cli.js +274 -0
  29. package/scripts/lib/portable-tasks.js +479 -0
  30. package/scripts/lib/signal-detectors.js +1 -1
  31. package/scripts/lib/team-events.js +86 -1
  32. package/scripts/obtain-context.js +28 -4
  33. package/scripts/smart-detect.js +17 -0
  34. package/scripts/strip-ai-attribution.js +63 -0
  35. package/scripts/team-manager.js +90 -0
  36. package/scripts/welcome-deferred.js +437 -0
  37. package/src/core/agents/legal-analyzer-a11y.md +110 -0
  38. package/src/core/agents/legal-analyzer-ai.md +117 -0
  39. package/src/core/agents/legal-analyzer-consumer.md +108 -0
  40. package/src/core/agents/legal-analyzer-content.md +113 -0
  41. package/src/core/agents/legal-analyzer-international.md +115 -0
  42. package/src/core/agents/legal-analyzer-licensing.md +115 -0
  43. package/src/core/agents/legal-analyzer-privacy.md +108 -0
  44. package/src/core/agents/legal-analyzer-security.md +112 -0
  45. package/src/core/agents/legal-analyzer-terms.md +111 -0
  46. package/src/core/agents/legal-consensus.md +242 -0
  47. package/src/core/agents/perf-analyzer-assets.md +174 -0
  48. package/src/core/agents/perf-analyzer-bundle.md +165 -0
  49. package/src/core/agents/perf-analyzer-caching.md +160 -0
  50. package/src/core/agents/perf-analyzer-compute.md +165 -0
  51. package/src/core/agents/perf-analyzer-memory.md +182 -0
  52. package/src/core/agents/perf-analyzer-network.md +157 -0
  53. package/src/core/agents/perf-analyzer-queries.md +155 -0
  54. package/src/core/agents/perf-analyzer-rendering.md +156 -0
  55. package/src/core/agents/perf-consensus.md +280 -0
  56. package/src/core/agents/security-analyzer-api.md +199 -0
  57. package/src/core/agents/security-analyzer-auth.md +160 -0
  58. package/src/core/agents/security-analyzer-authz.md +168 -0
  59. package/src/core/agents/security-analyzer-deps.md +147 -0
  60. package/src/core/agents/security-analyzer-infra.md +176 -0
  61. package/src/core/agents/security-analyzer-injection.md +148 -0
  62. package/src/core/agents/security-analyzer-input.md +191 -0
  63. package/src/core/agents/security-analyzer-secrets.md +175 -0
  64. package/src/core/agents/security-consensus.md +276 -0
  65. package/src/core/agents/team-lead.md +50 -13
  66. package/src/core/agents/test-analyzer-assertions.md +181 -0
  67. package/src/core/agents/test-analyzer-coverage.md +183 -0
  68. package/src/core/agents/test-analyzer-fragility.md +185 -0
  69. package/src/core/agents/test-analyzer-integration.md +155 -0
  70. package/src/core/agents/test-analyzer-maintenance.md +173 -0
  71. package/src/core/agents/test-analyzer-mocking.md +178 -0
  72. package/src/core/agents/test-analyzer-patterns.md +189 -0
  73. package/src/core/agents/test-analyzer-structure.md +177 -0
  74. package/src/core/agents/test-consensus.md +294 -0
  75. package/src/core/commands/audit/legal.md +446 -0
  76. package/src/core/commands/{logic/audit.md → audit/logic.md} +12 -12
  77. package/src/core/commands/audit/performance.md +443 -0
  78. package/src/core/commands/audit/security.md +443 -0
  79. package/src/core/commands/audit/test.md +442 -0
  80. package/src/core/commands/babysit.md +505 -463
  81. package/src/core/commands/configure.md +18 -33
  82. package/src/core/commands/research/ask.md +42 -9
  83. package/src/core/commands/research/import.md +14 -8
  84. package/src/core/commands/research/list.md +17 -16
  85. package/src/core/commands/research/synthesize.md +8 -8
  86. package/src/core/commands/research/view.md +28 -4
  87. package/src/core/commands/team/start.md +36 -7
  88. package/src/core/commands/team/stop.md +5 -2
  89. package/src/core/commands/whats-new.md +2 -2
  90. package/src/core/experts/devops/expertise.yaml +13 -2
  91. package/src/core/experts/documentation/expertise.yaml +26 -4
  92. package/src/core/profiles/COMPARISON.md +170 -0
  93. package/src/core/profiles/README.md +178 -0
  94. package/src/core/profiles/claude-code.yaml +111 -0
  95. package/src/core/profiles/codex.yaml +103 -0
  96. package/src/core/profiles/cursor.yaml +134 -0
  97. package/src/core/profiles/examples.js +250 -0
  98. package/src/core/profiles/loader.js +235 -0
  99. package/src/core/profiles/windsurf.yaml +159 -0
  100. package/src/core/teams/logic-audit.json +6 -0
  101. package/src/core/teams/perf-audit.json +71 -0
  102. package/src/core/teams/security-audit.json +71 -0
  103. package/src/core/teams/test-audit.json +71 -0
  104. package/src/core/templates/command-prerequisites.yaml +169 -0
  105. package/src/core/templates/damage-control-patterns.yaml +9 -0
  106. package/tools/cli/installers/ide/_base-ide.js +33 -3
  107. package/tools/cli/installers/ide/claude-code.js +2 -67
  108. package/tools/cli/installers/ide/codex.js +9 -9
  109. package/tools/cli/installers/ide/cursor.js +165 -4
  110. package/tools/cli/installers/ide/windsurf.js +237 -6
  111. package/tools/cli/lib/content-transformer.js +234 -9
  112. package/tools/cli/lib/docs-setup.js +1 -1
  113. package/tools/cli/lib/ide-generator.js +357 -0
  114. package/tools/cli/lib/ide-registry.js +2 -2
  115. package/scripts/tmux-task-name.sh +0 -75
  116. package/scripts/tmux-task-watcher.sh +0 -177
@@ -0,0 +1,442 @@
1
+ ---
2
+ description: Multi-agent test quality analysis with consensus voting for finding test suite weaknesses
3
+ argument-hint: "[file|directory] [DEPTH=quick|deep] [FOCUS=coverage|fragility|mocking|assertions|structure|integration|maintenance|patterns|all]"
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:audit:test - Multi-agent test quality analysis"
8
+ - "CRITICAL: Deploy analyzers IN PARALLEL in ONE message with multiple Task calls"
9
+ - "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
10
+ - "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), INVESTIGATE (1 weak)"
11
+ - "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep), FOCUS (coverage|fragility|mocking|assertions|structure|integration|maintenance|patterns|all)"
12
+ - "Pass consensus all analyzer outputs, let it synthesize the final report"
13
+ state_fields:
14
+ - target_path
15
+ - depth
16
+ - focus_areas
17
+ - analyzers_deployed
18
+ - findings_collected
19
+ ---
20
+
21
+ # /agileflow:audit:test
22
+
23
+ Deploy multiple specialized test quality analyzers in parallel to find weaknesses in the test suite, then synthesize results through consensus voting into a prioritized Test Quality Audit Report.
24
+
25
+ ---
26
+
27
+ ## Quick Reference
28
+
29
+ ```
30
+ /agileflow:audit:test app/ # Analyze app tests (quick, core 5 analyzers)
31
+ /agileflow:audit:test . DEPTH=deep # Deep analysis - all 8 analyzers
32
+ /agileflow:audit:test src/ FOCUS=coverage,mocking # Focus on specific areas
33
+ /agileflow:audit:test . DEPTH=deep FOCUS=all # Comprehensive full audit
34
+ /agileflow:audit:test __tests__/ FOCUS=fragility # Check test fragility specifically
35
+ ```
36
+
37
+ ---
38
+
39
+ ## How It Works
40
+
41
+ ```
42
+ +-------------------------------------------------------------+
43
+ | /agileflow:audit:test |
44
+ | |
45
+ | 1. Parse arguments (target, depth, focus) |
46
+ | 2. Deploy analyzers IN PARALLEL |
47
+ | 3. Collect all findings |
48
+ | 4. Run consensus coordinator to validate & prioritize |
49
+ | 5. Generate actionable Test Quality Audit Report |
50
+ +-------------------------------------------------------------+
51
+
52
+ +----------+ +----------+ +---------+ +-----------+ +-----------+
53
+ | Coverage | | Fragility| | Mocking | | Assertions| | Structure |
54
+ +----+-----+ +----+-----+ +----+----+ +-----+-----+ +-----+----+
55
+ | | | | |
56
+ +----+-------+ +--+----------+ +---+------+ (deep only)
57
+ | Integration| | Maintenance | | Patterns |
58
+ +-----+------+ +------+------+ +----+-----+
59
+ | | |
60
+ +---------------+-------------+
61
+ v
62
+ +----------------------+
63
+ | Consensus Coordinator|
64
+ | (validates, votes, |
65
+ | generates report) |
66
+ +----------------------+
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Arguments
72
+
73
+ | Argument | Values | Default | Description |
74
+ |----------|--------|---------|-------------|
75
+ | TARGET | file/directory | `.` | What to analyze |
76
+ | DEPTH | quick, deep | quick | quick = core 5 analyzers, deep = all 8 |
77
+ | FOCUS | coverage,fragility,mocking,assertions,structure,integration,maintenance,patterns,all | all | Which analyzers to deploy |
78
+
79
+ ---
80
+
81
+ ## Step-by-Step Process
82
+
83
+ ### STEP 1: Parse Arguments
84
+
85
+ ```
86
+ TARGET = first argument or current directory
87
+ DEPTH = quick (default) or deep
88
+ FOCUS = all (default) or comma-separated list
89
+ ```
90
+
91
+ **Analyzer Selection**:
92
+
93
+ | Condition | Analyzers Deployed |
94
+ |-----------|-------------------|
95
+ | `DEPTH=quick` + `FOCUS=all` | coverage, fragility, mocking, assertions, structure (core 5) |
96
+ | `DEPTH=deep` + `FOCUS=all` | All 8 analyzers |
97
+ | `FOCUS=coverage` | test-analyzer-coverage only |
98
+ | `FOCUS=fragility` | test-analyzer-fragility only |
99
+ | `FOCUS=mocking` | test-analyzer-mocking only |
100
+ | `FOCUS=assertions` | test-analyzer-assertions only |
101
+ | `FOCUS=structure` | test-analyzer-structure only |
102
+ | `FOCUS=integration` | test-analyzer-integration only |
103
+ | `FOCUS=maintenance` | test-analyzer-maintenance only |
104
+ | `FOCUS=patterns` | test-analyzer-patterns only |
105
+ | `FOCUS=coverage,mocking` | Comma-separated: deploy specified analyzers |
106
+
107
+ **DEPTH behavior**:
108
+ - `quick` (default): Deploy core 5 analyzers. Focus on CRITICAL/HIGH issues only.
109
+ - `deep`: Deploy all 8 analyzers. Include MEDIUM/LOW findings.
110
+
111
+ ### STEP 2: Deploy Analyzers in Parallel
112
+
113
+ **CRITICAL**: Deploy ALL selected analyzers in a SINGLE message with multiple Task calls.
114
+
115
+ **Prompt template for each analyzer**:
116
+
117
+ ```
118
+ TASK: Analyze the following test code for {TEST_QUALITY_DOMAIN} issues.
119
+
120
+ TARGET: {file_path or directory}
121
+ DEPTH: {quick|deep}
122
+
123
+ {For quick depth}: Focus on CRITICAL and HIGH severity issues only. Skip minor style issues.
124
+ {For deep depth}: Be comprehensive. Include MEDIUM and LOW severity findings.
125
+
126
+ Read the target files (both test files and source files they test) and apply your analysis methodology.
127
+
128
+ OUTPUT your findings in your standard format (FINDING-N with location, severity, confidence, code, explanation, remediation).
129
+
130
+ If no issues found, output: "No {TEST_QUALITY_DOMAIN} issues found in {TARGET}"
131
+ ```
132
+
133
+ **Example deployment (DEPTH=quick, FOCUS=all - deploys core 5)**:
134
+
135
+ ```xml
136
+ <invoke name="Task">
137
+ <parameter name="description">Test coverage analysis</parameter>
138
+ <parameter name="prompt">TASK: Analyze the following code for TEST COVERAGE gaps.
139
+ TARGET: src/
140
+ DEPTH: quick
141
+ Focus on CRITICAL and HIGH severity issues only...
142
+ ...</parameter>
143
+ <parameter name="subagent_type">test-analyzer-coverage</parameter>
144
+ <parameter name="run_in_background">true</parameter>
145
+ </invoke>
146
+
147
+ <invoke name="Task">
148
+ <parameter name="description">Test fragility analysis</parameter>
149
+ <parameter name="prompt">TASK: Analyze the following tests for FRAGILITY issues.
150
+ TARGET: src/
151
+ DEPTH: quick
152
+ ...</parameter>
153
+ <parameter name="subagent_type">test-analyzer-fragility</parameter>
154
+ <parameter name="run_in_background">true</parameter>
155
+ </invoke>
156
+
157
+ <invoke name="Task">
158
+ <parameter name="description">Mock quality analysis</parameter>
159
+ <parameter name="prompt">TASK: Analyze the following tests for MOCKING issues.
160
+ TARGET: src/
161
+ DEPTH: quick
162
+ ...</parameter>
163
+ <parameter name="subagent_type">test-analyzer-mocking</parameter>
164
+ <parameter name="run_in_background">true</parameter>
165
+ </invoke>
166
+
167
+ <invoke name="Task">
168
+ <parameter name="description">Assertion quality analysis</parameter>
169
+ <parameter name="prompt">TASK: Analyze the following tests for ASSERTION QUALITY issues.
170
+ TARGET: src/
171
+ DEPTH: quick
172
+ ...</parameter>
173
+ <parameter name="subagent_type">test-analyzer-assertions</parameter>
174
+ <parameter name="run_in_background">true</parameter>
175
+ </invoke>
176
+
177
+ <invoke name="Task">
178
+ <parameter name="description">Test structure analysis</parameter>
179
+ <parameter name="prompt">TASK: Analyze the following tests for STRUCTURE issues.
180
+ TARGET: src/
181
+ DEPTH: quick
182
+ ...</parameter>
183
+ <parameter name="subagent_type">test-analyzer-structure</parameter>
184
+ <parameter name="run_in_background">true</parameter>
185
+ </invoke>
186
+ ```
187
+
188
+ **For DEPTH=deep, also deploy**:
189
+
190
+ ```xml
191
+ <invoke name="Task">
192
+ <parameter name="description">Integration test analysis</parameter>
193
+ <parameter name="prompt">TASK: Analyze the following code for INTEGRATION TEST gaps...
194
+ ...</parameter>
195
+ <parameter name="subagent_type">test-analyzer-integration</parameter>
196
+ <parameter name="run_in_background">true</parameter>
197
+ </invoke>
198
+
199
+ <invoke name="Task">
200
+ <parameter name="description">Test maintenance analysis</parameter>
201
+ <parameter name="prompt">TASK: Analyze the following tests for MAINTENANCE issues...
202
+ ...</parameter>
203
+ <parameter name="subagent_type">test-analyzer-maintenance</parameter>
204
+ <parameter name="run_in_background">true</parameter>
205
+ </invoke>
206
+
207
+ <invoke name="Task">
208
+ <parameter name="description">Test anti-pattern analysis</parameter>
209
+ <parameter name="prompt">TASK: Analyze the following tests for ANTI-PATTERNS...
210
+ ...</parameter>
211
+ <parameter name="subagent_type">test-analyzer-patterns</parameter>
212
+ <parameter name="run_in_background">true</parameter>
213
+ </invoke>
214
+ ```
215
+
216
+ ### STEP 3: Collect Results
217
+
218
+ Wait for all analyzers to complete:
219
+
220
+ ```xml
221
+ <invoke name="TaskOutput">
222
+ <parameter name="task_id">{coverage_id}</parameter>
223
+ <parameter name="block">true</parameter>
224
+ </invoke>
225
+
226
+ <invoke name="TaskOutput">
227
+ <parameter name="task_id">{fragility_id}</parameter>
228
+ <parameter name="block">true</parameter>
229
+ </invoke>
230
+
231
+ <!-- ... collect all results ... -->
232
+ ```
233
+
234
+ ### STEP 4: Run Consensus Coordinator
235
+
236
+ Pass all analyzer outputs to the consensus coordinator:
237
+
238
+ ```xml
239
+ <invoke name="Task">
240
+ <parameter name="description">Test audit consensus</parameter>
241
+ <parameter name="prompt">You are the Test Quality Consensus Coordinator.
242
+
243
+ TARGET: {target_path}
244
+ DEPTH: {depth}
245
+
246
+ ## Analyzer Outputs
247
+
248
+ ### Coverage Analyzer Results:
249
+ {coverage_output}
250
+
251
+ ### Fragility Analyzer Results:
252
+ {fragility_output}
253
+
254
+ ### Mocking Analyzer Results:
255
+ {mocking_output}
256
+
257
+ ### Assertions Analyzer Results:
258
+ {assertions_output}
259
+
260
+ ### Structure Analyzer Results:
261
+ {structure_output}
262
+
263
+ {If deep depth, also include:}
264
+ ### Integration Test Analyzer Results:
265
+ {integration_output}
266
+
267
+ ### Maintenance Analyzer Results:
268
+ {maintenance_output}
269
+
270
+ ### Patterns Analyzer Results:
271
+ {patterns_output}
272
+
273
+ ---
274
+
275
+ Follow your consensus process:
276
+ 1. Detect project type from the codebase
277
+ 2. Parse all findings into normalized structure
278
+ 3. Group related findings by test file
279
+ 4. Vote on confidence (CONFIRMED if 2+ agree, LIKELY if 1 with evidence)
280
+ 5. Filter by project type relevance
281
+ 6. Assess false confidence risk for each finding
282
+ 7. Generate the final Test Quality Audit Report
283
+ 8. Save report to docs/08-project/test-audits/test-audit-{YYYYMMDD}.md
284
+ </parameter>
285
+ <parameter name="subagent_type">test-consensus</parameter>
286
+ </invoke>
287
+ ```
288
+
289
+ ### STEP 5: Present Results
290
+
291
+ After consensus completes, show the report summary and offer next steps:
292
+
293
+ ```xml
294
+ <invoke name="AskUserQuestion">
295
+ <parameter name="questions">[{
296
+ "question": "Test audit complete: [N] findings ([critical] Critical, [high] High). [test_count] test files analyzed. Project type: [type].",
297
+ "header": "Next steps",
298
+ "multiSelect": false,
299
+ "options": [
300
+ {"label": "Fix [critical] Critical issues now (Recommended)", "description": "[top_issue_summary]"},
301
+ {"label": "Create stories for all findings", "description": "Track [critical] critical + [high] high priority items in backlog"},
302
+ {"label": "Re-run with DEPTH=deep on [target]", "description": "Current was quick (5 analyzers) - deep adds Integration, Maintenance, Patterns"},
303
+ {"label": "Save report and done", "description": "Report saved to docs/08-project/test-audits/"}
304
+ ]
305
+ }]</parameter>
306
+ </invoke>
307
+ ```
308
+
309
+ ---
310
+
311
+ ## Example Output
312
+
313
+ ```
314
+ Test Quality Audit: src/
315
+ ====================================================================
316
+
317
+ Deploying 5 test quality analyzers (quick mode)...
318
+ * Coverage Analyzer
319
+ * Fragility Analyzer
320
+ * Mocking Analyzer
321
+ * Assertions Analyzer
322
+ * Structure Analyzer
323
+
324
+ Running consensus...
325
+ * Consensus complete
326
+ * Project type detected: Full-stack Web Application
327
+
328
+ --------------------------------------------
329
+ TEST QUALITY SUMMARY
330
+ --------------------------------------------
331
+
332
+ | Severity | Count | Category |
333
+ |----------|-------|----------|
334
+ | Critical | 2 | False Confidence, Missing Coverage |
335
+ | High | 3 | Over-Mocking, Weak Assertions |
336
+ | Medium | 2 | Fragile Tests, Structure |
337
+ | Low | 1 | Naming |
338
+
339
+ Total: 8 findings (1 false positive excluded)
340
+
341
+ --------------------------------------------
342
+ FIX IMMEDIATELY (False Confidence Risk)
343
+ --------------------------------------------
344
+
345
+ 1. Payment test mocks entire payment service — never calls real code [CONFIRMED by Mocking, Assertions]
346
+ Location: __tests__/payment.test.ts:28
347
+ Risk: Tests pass but payment flow is completely untested
348
+ Fix: Test real payment service with test API keys, mock only external HTTP
349
+
350
+ 2. No tests for error handling in auth middleware [CONFIRMED by Coverage, Assertions]
351
+ Location: middleware/auth.ts (0 test coverage on catch blocks)
352
+ Risk: Auth errors may crash the app — no test verifies graceful handling
353
+ Fix: Add tests for expired token, invalid token, missing token scenarios
354
+
355
+ --------------------------------------------
356
+ FIX THIS SPRINT
357
+ --------------------------------------------
358
+
359
+ 3. 15 tests use setTimeout assertions — timing-dependent [LIKELY - Fragility]
360
+ 4. Snapshot files > 500 lines each — rubber stamp reviews [LIKELY - Assertions]
361
+ 5. Mock not restored between tests — leaks into next test [LIKELY - Mocking]
362
+
363
+ [Full report saved to docs/08-project/test-audits/test-audit-20260220.md]
364
+ ```
365
+
366
+ ---
367
+
368
+ <!-- COMPACT_SUMMARY_START -->
369
+ ## Compact Summary
370
+
371
+ **Command**: `/agileflow:audit:test` - Multi-agent test quality analysis with consensus
372
+
373
+ **Quick Usage**:
374
+ ```
375
+ /agileflow:audit:test app/ # Quick scan (core 5 analyzers)
376
+ /agileflow:audit:test . DEPTH=deep # All 8 analyzers
377
+ /agileflow:audit:test src/ FOCUS=coverage,mocking # Specific areas
378
+ ```
379
+
380
+ **What It Does**: Deploy test quality analyzers in parallel -> Each finds different test weakness classes -> Consensus coordinator validates, filters by project type, assesses false confidence risk -> Actionable Test Quality Audit Report
381
+
382
+ **Analyzers (Core 5 - quick mode)**:
383
+ - `test-analyzer-coverage` - Untested critical paths, missing error path tests, low branch coverage
384
+ - `test-analyzer-fragility` - Timing-dependent tests, order-dependent tests, environment-dependent tests
385
+ - `test-analyzer-mocking` - Over-mocking, mock leakage, testing mocks instead of code
386
+ - `test-analyzer-assertions` - Weak assertions, missing negative tests, snapshot overuse
387
+ - `test-analyzer-structure` - Missing describe/it nesting, unclear names, code duplication
388
+
389
+ **Analyzers (Deep mode adds 3 more)**:
390
+ - `test-analyzer-integration` - Missing API tests, no E2E coverage, missing contract tests
391
+ - `test-analyzer-maintenance` - Dead tests, outdated assertions, tests passing for wrong reasons
392
+ - `test-analyzer-patterns` - Anti-patterns: testing privates, deep mock chains, God test objects
393
+
394
+ **Severity Levels** (test quality-oriented):
395
+ - CRITICAL: False confidence — tests pass but code is broken
396
+ - HIGH: Missing coverage on critical path
397
+ - MEDIUM: Test quality issue
398
+ - LOW: Improvement opportunity
399
+
400
+ **Confidence Levels**:
401
+ - CONFIRMED: 2+ analyzers agree -> High priority
402
+ - LIKELY: 1 analyzer with evidence -> Medium priority
403
+ - INVESTIGATE: 1 analyzer, weak evidence -> Low priority
404
+
405
+ **Output**: `docs/08-project/test-audits/test-audit-{YYYYMMDD}.md`
406
+ <!-- COMPACT_SUMMARY_END -->
407
+
408
+ ---
409
+
410
+ ## Boundary Rules (No Overlap)
411
+
412
+ - **vs audit:logic**: No logic bugs in application code — only test quality
413
+ - **vs qa agent**: The `qa.md` agent is a team member for story work. This is an on-demand test analysis tool
414
+
415
+ ---
416
+
417
+ ## Integration with Babysit
418
+
419
+ When `/agileflow:babysit` completes implementation, it can run a quick test audit:
420
+
421
+ ```
422
+ Implementation complete. Running quick test audit...
423
+
424
+ Test Quality Audit Results:
425
+ ===========================
426
+ No critical test quality issues found
427
+ 1 HIGH issue detected:
428
+ - No tests for error handling in new payment endpoint
429
+ Confidence: CONFIRMED (Coverage + Assertions analyzers)
430
+
431
+ Add error handling tests before merging? [Y/n]
432
+ ```
433
+
434
+ ---
435
+
436
+ ## Related Commands
437
+
438
+ - `/agileflow:audit:logic` - Logic bug analysis (similar architecture)
439
+ - `/agileflow:audit:security` - Security vulnerability analysis (similar architecture)
440
+ - `/agileflow:audit:performance` - Performance bottleneck analysis (similar architecture)
441
+ - `/agileflow:audit:legal` - Legal compliance analysis (similar architecture)
442
+ - `/agileflow:verify` - Run tests