bmad-method 5.0.0-beta.2 → 5.0.1
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.
- package/.github/ISSUE_TEMPLATE/bug_report.md +3 -3
- package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
- package/.github/workflows/discord.yaml +11 -2
- package/.github/workflows/format-check.yaml +42 -0
- package/.github/workflows/manual-release.yaml +173 -0
- package/.husky/pre-commit +3 -0
- package/.vscode/settings.json +26 -1
- package/CHANGELOG.md +0 -11
- package/README.md +2 -0
- package/bmad-core/agent-teams/team-all.yaml +1 -1
- package/bmad-core/agents/bmad-orchestrator.md +1 -1
- package/bmad-core/agents/dev.md +4 -4
- package/bmad-core/data/bmad-kb.md +1 -1
- package/bmad-core/data/test-levels-framework.md +12 -12
- package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
- package/bmad-core/tasks/nfr-assess.md +10 -10
- package/bmad-core/tasks/qa-gate.md +23 -23
- package/bmad-core/tasks/review-story.md +18 -18
- package/bmad-core/tasks/risk-profile.md +25 -25
- package/bmad-core/tasks/test-design.md +9 -9
- package/bmad-core/tasks/trace-requirements.md +21 -21
- package/bmad-core/templates/architecture-tmpl.yaml +49 -49
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +5 -5
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +31 -31
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +13 -13
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +19 -6
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +21 -9
- package/bmad-core/templates/front-end-spec-tmpl.yaml +24 -24
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +122 -104
- package/bmad-core/templates/market-research-tmpl.yaml +2 -2
- package/bmad-core/templates/prd-tmpl.yaml +9 -9
- package/bmad-core/templates/project-brief-tmpl.yaml +4 -4
- package/bmad-core/templates/qa-gate-tmpl.yaml +9 -9
- package/bmad-core/templates/story-tmpl.yaml +12 -12
- package/bmad-core/workflows/brownfield-fullstack.yaml +9 -9
- package/bmad-core/workflows/brownfield-service.yaml +1 -1
- package/bmad-core/workflows/brownfield-ui.yaml +1 -1
- package/bmad-core/workflows/greenfield-fullstack.yaml +1 -1
- package/bmad-core/workflows/greenfield-service.yaml +1 -1
- package/bmad-core/workflows/greenfield-ui.yaml +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +28 -15
- package/dist/agents/architect.txt +220 -190
- package/dist/agents/bmad-master.txt +298 -255
- package/dist/agents/bmad-orchestrator.txt +1 -1
- package/dist/agents/pm.txt +20 -20
- package/dist/agents/po.txt +11 -11
- package/dist/agents/qa.txt +275 -618
- package/dist/agents/sm.txt +11 -11
- package/dist/agents/ux-expert.txt +23 -23
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +109 -109
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +75 -77
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +41 -41
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +483 -474
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +1 -1
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +149 -149
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +20 -20
- package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +371 -358
- package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +25 -25
- package/dist/teams/team-all.txt +581 -881
- package/dist/teams/team-fullstack.txt +316 -273
- package/dist/teams/team-ide-minimal.txt +276 -619
- package/dist/teams/team-no-ui.txt +281 -238
- package/docs/versioning-and-releases.md +114 -44
- package/eslint.config.mjs +119 -0
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml +26 -26
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +4 -4
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +1 -1
- package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +26 -28
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +50 -50
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +23 -23
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +24 -24
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +42 -42
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
- package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +5 -5
- package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +3 -3
- package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +23 -23
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +63 -63
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +20 -20
- package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
- package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +5 -5
- package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +1 -1
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +20 -20
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +7 -7
- package/package.json +62 -39
- package/prettier.config.mjs +32 -0
- package/release_notes.md +30 -0
- package/tools/bmad-npx-wrapper.js +10 -10
- package/tools/builders/web-builder.js +124 -130
- package/tools/bump-all-versions.js +42 -33
- package/tools/bump-expansion-version.js +23 -16
- package/tools/cli.js +10 -12
- package/tools/flattener/aggregate.js +10 -10
- package/tools/flattener/binary.js +44 -17
- package/tools/flattener/discovery.js +19 -18
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +125 -125
- package/tools/flattener/main.js +201 -304
- package/tools/flattener/projectRoot.js +75 -73
- package/tools/flattener/prompts.js +9 -9
- package/tools/flattener/stats.helpers.js +131 -67
- package/tools/flattener/stats.js +3 -3
- package/tools/flattener/test-matrix.js +201 -193
- package/tools/flattener/xml.js +33 -31
- package/tools/installer/bin/bmad.js +130 -89
- package/tools/installer/config/ide-agent-config.yaml +1 -1
- package/tools/installer/config/install.config.yaml +2 -2
- package/tools/installer/lib/config-loader.js +46 -42
- package/tools/installer/lib/file-manager.js +91 -113
- package/tools/installer/lib/ide-base-setup.js +57 -56
- package/tools/installer/lib/ide-setup.js +375 -343
- package/tools/installer/lib/installer.js +875 -714
- package/tools/installer/lib/memory-profiler.js +54 -53
- package/tools/installer/lib/module-manager.js +19 -15
- package/tools/installer/lib/resource-locator.js +26 -28
- package/tools/installer/package.json +19 -19
- package/tools/lib/dependency-resolver.js +26 -30
- package/tools/lib/yaml-utils.js +7 -7
- package/tools/preview-release-notes.js +66 -0
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +7 -9
- package/tools/update-expansion-version.js +14 -15
- package/tools/upgraders/v3-to-v4-upgrader.js +203 -294
- package/tools/version-bump.js +41 -26
- package/tools/yaml-format.js +56 -43
- package/.github/workflows/promote-to-stable.yml +0 -144
- package/.github/workflows/release.yaml +0 -60
- package/.releaserc.json +0 -21
- package/tools/semantic-release-sync-installer.js +0 -30
package/dist/agents/qa.txt
CHANGED
|
@@ -119,10 +119,10 @@ Perform a comprehensive test architecture review with quality gate decision. Thi
|
|
|
119
119
|
|
|
120
120
|
```yaml
|
|
121
121
|
required:
|
|
122
|
-
- story_id:
|
|
123
|
-
- story_path:
|
|
124
|
-
- story_title:
|
|
125
|
-
- story_slug:
|
|
122
|
+
- story_id: '{epic}.{story}' # e.g., "1.3"
|
|
123
|
+
- story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
|
|
124
|
+
- story_title: '{title}' # If missing, derive from story file H1
|
|
125
|
+
- story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
## Prerequisites
|
|
@@ -284,6 +284,8 @@ Gate: {STATUS} → docs/qa/gates/{epic}.{story}-{slug}.yml
|
|
|
284
284
|
Risk profile: docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
|
|
285
285
|
NFR assessment: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
|
|
286
286
|
|
|
287
|
+
# Note: Paths should reference core-config.yaml for custom configurations
|
|
288
|
+
|
|
287
289
|
### Recommended Status
|
|
288
290
|
|
|
289
291
|
[✓ Ready for Done] / [✗ Changes Required - See unchecked items above]
|
|
@@ -295,26 +297,26 @@ NFR assessment: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
|
|
|
295
297
|
**Template and Directory:**
|
|
296
298
|
|
|
297
299
|
- Render from `templates/qa-gate-tmpl.yaml`
|
|
298
|
-
- Create `docs/qa/gates/` directory if missing
|
|
300
|
+
- Create `docs/qa/gates/` directory if missing (or configure in core-config.yaml)
|
|
299
301
|
- Save to: `docs/qa/gates/{epic}.{story}-{slug}.yml`
|
|
300
302
|
|
|
301
303
|
Gate file structure:
|
|
302
304
|
|
|
303
305
|
```yaml
|
|
304
306
|
schema: 1
|
|
305
|
-
story:
|
|
306
|
-
story_title:
|
|
307
|
+
story: '{epic}.{story}'
|
|
308
|
+
story_title: '{story title}'
|
|
307
309
|
gate: PASS|CONCERNS|FAIL|WAIVED
|
|
308
|
-
status_reason:
|
|
309
|
-
reviewer:
|
|
310
|
-
updated:
|
|
310
|
+
status_reason: '1-2 sentence explanation of gate decision'
|
|
311
|
+
reviewer: 'Quinn (Test Architect)'
|
|
312
|
+
updated: '{ISO-8601 timestamp}'
|
|
311
313
|
|
|
312
314
|
top_issues: [] # Empty if no issues
|
|
313
315
|
waiver: { active: false } # Set active: true only if WAIVED
|
|
314
316
|
|
|
315
317
|
# Extended fields (optional but recommended):
|
|
316
318
|
quality_score: 0-100 # 100 - (20*FAILs) - (10*CONCERNS) or use technical-preferences.md weights
|
|
317
|
-
expires:
|
|
319
|
+
expires: '{ISO-8601 timestamp}' # Typically 2 weeks from review
|
|
318
320
|
|
|
319
321
|
evidence:
|
|
320
322
|
tests_reviewed: { count }
|
|
@@ -326,24 +328,24 @@ evidence:
|
|
|
326
328
|
nfr_validation:
|
|
327
329
|
security:
|
|
328
330
|
status: PASS|CONCERNS|FAIL
|
|
329
|
-
notes:
|
|
331
|
+
notes: 'Specific findings'
|
|
330
332
|
performance:
|
|
331
333
|
status: PASS|CONCERNS|FAIL
|
|
332
|
-
notes:
|
|
334
|
+
notes: 'Specific findings'
|
|
333
335
|
reliability:
|
|
334
336
|
status: PASS|CONCERNS|FAIL
|
|
335
|
-
notes:
|
|
337
|
+
notes: 'Specific findings'
|
|
336
338
|
maintainability:
|
|
337
339
|
status: PASS|CONCERNS|FAIL
|
|
338
|
-
notes:
|
|
340
|
+
notes: 'Specific findings'
|
|
339
341
|
|
|
340
342
|
recommendations:
|
|
341
343
|
immediate: # Must fix before production
|
|
342
|
-
- action:
|
|
343
|
-
refs: [
|
|
344
|
+
- action: 'Add rate limiting'
|
|
345
|
+
refs: ['api/auth/login.ts']
|
|
344
346
|
future: # Can be addressed later
|
|
345
|
-
- action:
|
|
346
|
-
refs: [
|
|
347
|
+
- action: 'Consider caching'
|
|
348
|
+
refs: ['services/data.ts']
|
|
347
349
|
```
|
|
348
350
|
|
|
349
351
|
### Gate Decision Criteria
|
|
@@ -455,11 +457,11 @@ Slug rules:
|
|
|
455
457
|
|
|
456
458
|
```yaml
|
|
457
459
|
schema: 1
|
|
458
|
-
story:
|
|
460
|
+
story: '{epic}.{story}'
|
|
459
461
|
gate: PASS|CONCERNS|FAIL|WAIVED
|
|
460
|
-
status_reason:
|
|
461
|
-
reviewer:
|
|
462
|
-
updated:
|
|
462
|
+
status_reason: '1-2 sentence explanation of gate decision'
|
|
463
|
+
reviewer: 'Quinn'
|
|
464
|
+
updated: '{ISO-8601 timestamp}'
|
|
463
465
|
top_issues: [] # Empty array if no issues
|
|
464
466
|
waiver: { active: false } # Only set active: true if WAIVED
|
|
465
467
|
```
|
|
@@ -468,20 +470,20 @@ waiver: { active: false } # Only set active: true if WAIVED
|
|
|
468
470
|
|
|
469
471
|
```yaml
|
|
470
472
|
schema: 1
|
|
471
|
-
story:
|
|
473
|
+
story: '1.3'
|
|
472
474
|
gate: CONCERNS
|
|
473
|
-
status_reason:
|
|
474
|
-
reviewer:
|
|
475
|
-
updated:
|
|
475
|
+
status_reason: 'Missing rate limiting on auth endpoints poses security risk.'
|
|
476
|
+
reviewer: 'Quinn'
|
|
477
|
+
updated: '2025-01-12T10:15:00Z'
|
|
476
478
|
top_issues:
|
|
477
|
-
- id:
|
|
479
|
+
- id: 'SEC-001'
|
|
478
480
|
severity: high # ONLY: low|medium|high
|
|
479
|
-
finding:
|
|
480
|
-
suggested_action:
|
|
481
|
-
- id:
|
|
481
|
+
finding: 'No rate limiting on login endpoint'
|
|
482
|
+
suggested_action: 'Add rate limiting middleware before production'
|
|
483
|
+
- id: 'TEST-001'
|
|
482
484
|
severity: medium
|
|
483
|
-
finding:
|
|
484
|
-
suggested_action:
|
|
485
|
+
finding: 'No integration tests for auth flow'
|
|
486
|
+
suggested_action: 'Add integration test coverage'
|
|
485
487
|
waiver: { active: false }
|
|
486
488
|
```
|
|
487
489
|
|
|
@@ -489,20 +491,20 @@ waiver: { active: false }
|
|
|
489
491
|
|
|
490
492
|
```yaml
|
|
491
493
|
schema: 1
|
|
492
|
-
story:
|
|
494
|
+
story: '1.3'
|
|
493
495
|
gate: WAIVED
|
|
494
|
-
status_reason:
|
|
495
|
-
reviewer:
|
|
496
|
-
updated:
|
|
496
|
+
status_reason: 'Known issues accepted for MVP release.'
|
|
497
|
+
reviewer: 'Quinn'
|
|
498
|
+
updated: '2025-01-12T10:15:00Z'
|
|
497
499
|
top_issues:
|
|
498
|
-
- id:
|
|
500
|
+
- id: 'PERF-001'
|
|
499
501
|
severity: low
|
|
500
|
-
finding:
|
|
501
|
-
suggested_action:
|
|
502
|
+
finding: 'Dashboard loads slowly with 1000+ items'
|
|
503
|
+
suggested_action: 'Implement pagination in next sprint'
|
|
502
504
|
waiver:
|
|
503
505
|
active: true
|
|
504
|
-
reason:
|
|
505
|
-
approved_by:
|
|
506
|
+
reason: 'MVP release - performance optimization deferred'
|
|
507
|
+
approved_by: 'Product Owner'
|
|
506
508
|
```
|
|
507
509
|
|
|
508
510
|
## Gate Decision Criteria
|
|
@@ -621,21 +623,21 @@ Identify all testable requirements from:
|
|
|
621
623
|
For each requirement, document which tests validate it. Use Given-When-Then to describe what the test validates (not how it's written):
|
|
622
624
|
|
|
623
625
|
```yaml
|
|
624
|
-
requirement:
|
|
626
|
+
requirement: 'AC1: User can login with valid credentials'
|
|
625
627
|
test_mappings:
|
|
626
|
-
- test_file:
|
|
627
|
-
test_case:
|
|
628
|
+
- test_file: 'auth/login.test.ts'
|
|
629
|
+
test_case: 'should successfully login with valid email and password'
|
|
628
630
|
# Given-When-Then describes WHAT the test validates, not HOW it's coded
|
|
629
|
-
given:
|
|
630
|
-
when:
|
|
631
|
-
then:
|
|
631
|
+
given: 'A registered user with valid credentials'
|
|
632
|
+
when: 'They submit the login form'
|
|
633
|
+
then: 'They are redirected to dashboard and session is created'
|
|
632
634
|
coverage: full
|
|
633
635
|
|
|
634
|
-
- test_file:
|
|
635
|
-
test_case:
|
|
636
|
-
given:
|
|
637
|
-
when:
|
|
638
|
-
then:
|
|
636
|
+
- test_file: 'e2e/auth-flow.test.ts'
|
|
637
|
+
test_case: 'complete login flow'
|
|
638
|
+
given: 'User on login page'
|
|
639
|
+
when: 'Entering valid credentials and submitting'
|
|
640
|
+
then: 'Dashboard loads with user data'
|
|
639
641
|
coverage: integration
|
|
640
642
|
```
|
|
641
643
|
|
|
@@ -657,19 +659,19 @@ Document any gaps found:
|
|
|
657
659
|
|
|
658
660
|
```yaml
|
|
659
661
|
coverage_gaps:
|
|
660
|
-
- requirement:
|
|
661
|
-
gap:
|
|
662
|
+
- requirement: 'AC3: Password reset email sent within 60 seconds'
|
|
663
|
+
gap: 'No test for email delivery timing'
|
|
662
664
|
severity: medium
|
|
663
665
|
suggested_test:
|
|
664
666
|
type: integration
|
|
665
|
-
description:
|
|
667
|
+
description: 'Test email service SLA compliance'
|
|
666
668
|
|
|
667
|
-
- requirement:
|
|
668
|
-
gap:
|
|
669
|
+
- requirement: 'AC5: Support 1000 concurrent users'
|
|
670
|
+
gap: 'No load testing implemented'
|
|
669
671
|
severity: high
|
|
670
672
|
suggested_test:
|
|
671
673
|
type: performance
|
|
672
|
-
description:
|
|
674
|
+
description: 'Load test with 1000 concurrent connections'
|
|
673
675
|
```
|
|
674
676
|
|
|
675
677
|
## Outputs
|
|
@@ -685,11 +687,11 @@ trace:
|
|
|
685
687
|
full: Y
|
|
686
688
|
partial: Z
|
|
687
689
|
none: W
|
|
688
|
-
planning_ref:
|
|
690
|
+
planning_ref: 'docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md'
|
|
689
691
|
uncovered:
|
|
690
|
-
- ac:
|
|
691
|
-
reason:
|
|
692
|
-
notes:
|
|
692
|
+
- ac: 'AC3'
|
|
693
|
+
reason: 'No test found for password reset timing'
|
|
694
|
+
notes: 'See docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md'
|
|
693
695
|
```
|
|
694
696
|
|
|
695
697
|
### Output 2: Traceability Report
|
|
@@ -863,10 +865,10 @@ Generate a comprehensive risk assessment matrix for a story implementation using
|
|
|
863
865
|
|
|
864
866
|
```yaml
|
|
865
867
|
required:
|
|
866
|
-
- story_id:
|
|
867
|
-
- story_path:
|
|
868
|
-
- story_title:
|
|
869
|
-
- story_slug:
|
|
868
|
+
- story_id: '{epic}.{story}' # e.g., "1.3"
|
|
869
|
+
- story_path: 'docs/stories/{epic}.{story}.*.md'
|
|
870
|
+
- story_title: '{title}' # If missing, derive from story file H1
|
|
871
|
+
- story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
|
|
870
872
|
```
|
|
871
873
|
|
|
872
874
|
## Purpose
|
|
@@ -936,14 +938,14 @@ For each category, identify specific risks:
|
|
|
936
938
|
|
|
937
939
|
```yaml
|
|
938
940
|
risk:
|
|
939
|
-
id:
|
|
941
|
+
id: 'SEC-001' # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
|
|
940
942
|
category: security
|
|
941
|
-
title:
|
|
942
|
-
description:
|
|
943
|
+
title: 'Insufficient input validation on user forms'
|
|
944
|
+
description: 'Form inputs not properly sanitized could lead to XSS attacks'
|
|
943
945
|
affected_components:
|
|
944
|
-
-
|
|
945
|
-
-
|
|
946
|
-
detection_method:
|
|
946
|
+
- 'UserRegistrationForm'
|
|
947
|
+
- 'ProfileUpdateForm'
|
|
948
|
+
detection_method: 'Code review revealed missing validation'
|
|
947
949
|
```
|
|
948
950
|
|
|
949
951
|
### 2. Risk Assessment
|
|
@@ -990,20 +992,20 @@ For each identified risk, provide mitigation:
|
|
|
990
992
|
|
|
991
993
|
```yaml
|
|
992
994
|
mitigation:
|
|
993
|
-
risk_id:
|
|
994
|
-
strategy:
|
|
995
|
+
risk_id: 'SEC-001'
|
|
996
|
+
strategy: 'preventive' # preventive|detective|corrective
|
|
995
997
|
actions:
|
|
996
|
-
-
|
|
997
|
-
-
|
|
998
|
-
-
|
|
999
|
-
-
|
|
998
|
+
- 'Implement input validation library (e.g., validator.js)'
|
|
999
|
+
- 'Add CSP headers to prevent XSS execution'
|
|
1000
|
+
- 'Sanitize all user inputs before storage'
|
|
1001
|
+
- 'Escape all outputs in templates'
|
|
1000
1002
|
testing_requirements:
|
|
1001
|
-
-
|
|
1002
|
-
-
|
|
1003
|
-
-
|
|
1004
|
-
residual_risk:
|
|
1005
|
-
owner:
|
|
1006
|
-
timeline:
|
|
1003
|
+
- 'Security testing with OWASP ZAP'
|
|
1004
|
+
- 'Manual penetration testing of forms'
|
|
1005
|
+
- 'Unit tests for validation functions'
|
|
1006
|
+
residual_risk: 'Low - Some zero-day vulnerabilities may remain'
|
|
1007
|
+
owner: 'dev'
|
|
1008
|
+
timeline: 'Before deployment'
|
|
1007
1009
|
```
|
|
1008
1010
|
|
|
1009
1011
|
## Outputs
|
|
@@ -1029,12 +1031,12 @@ risk_summary:
|
|
|
1029
1031
|
highest:
|
|
1030
1032
|
id: SEC-001
|
|
1031
1033
|
score: 9
|
|
1032
|
-
title:
|
|
1034
|
+
title: 'XSS on profile form'
|
|
1033
1035
|
recommendations:
|
|
1034
1036
|
must_fix:
|
|
1035
|
-
-
|
|
1037
|
+
- 'Add input sanitization & CSP'
|
|
1036
1038
|
monitor:
|
|
1037
|
-
-
|
|
1039
|
+
- 'Add security alerts for auth endpoints'
|
|
1038
1040
|
```
|
|
1039
1041
|
|
|
1040
1042
|
### Output 2: Markdown Report
|
|
@@ -1219,299 +1221,79 @@ Create comprehensive test scenarios with appropriate test level recommendations
|
|
|
1219
1221
|
|
|
1220
1222
|
```yaml
|
|
1221
1223
|
required:
|
|
1222
|
-
- story_id:
|
|
1223
|
-
- story_path:
|
|
1224
|
-
- story_title:
|
|
1225
|
-
- story_slug:
|
|
1224
|
+
- story_id: '{epic}.{story}' # e.g., "1.3"
|
|
1225
|
+
- story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
|
|
1226
|
+
- story_title: '{title}' # If missing, derive from story file H1
|
|
1227
|
+
- story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
|
|
1226
1228
|
```
|
|
1227
1229
|
|
|
1228
1230
|
## Purpose
|
|
1229
1231
|
|
|
1230
1232
|
Design a complete test strategy that identifies what to test, at which level (unit/integration/e2e), and why. This ensures efficient test coverage without redundancy while maintaining appropriate test boundaries.
|
|
1231
1233
|
|
|
1232
|
-
##
|
|
1233
|
-
|
|
1234
|
-
### Unit Tests
|
|
1235
|
-
|
|
1236
|
-
**When to use:**
|
|
1237
|
-
|
|
1238
|
-
- Testing pure functions and business logic
|
|
1239
|
-
- Algorithm correctness
|
|
1240
|
-
- Input validation and data transformation
|
|
1241
|
-
- Error handling in isolated components
|
|
1242
|
-
- Complex calculations or state machines
|
|
1243
|
-
|
|
1244
|
-
**Characteristics:**
|
|
1245
|
-
|
|
1246
|
-
- Fast execution (immediate feedback)
|
|
1247
|
-
- No external dependencies (DB, API, file system)
|
|
1248
|
-
- Highly maintainable and stable
|
|
1249
|
-
- Easy to debug failures
|
|
1250
|
-
|
|
1251
|
-
**Example scenarios:**
|
|
1252
|
-
|
|
1253
|
-
```yaml
|
|
1254
|
-
unit_test:
|
|
1255
|
-
component: "PriceCalculator"
|
|
1256
|
-
scenario: "Calculate discount with multiple rules"
|
|
1257
|
-
justification: "Complex business logic with multiple branches"
|
|
1258
|
-
mock_requirements: "None - pure function"
|
|
1259
|
-
```
|
|
1260
|
-
|
|
1261
|
-
### Integration Tests
|
|
1262
|
-
|
|
1263
|
-
**When to use:**
|
|
1264
|
-
|
|
1265
|
-
- Testing component interactions
|
|
1266
|
-
- Database operations and queries
|
|
1267
|
-
- API endpoint behavior
|
|
1268
|
-
- Service layer orchestration
|
|
1269
|
-
- External service integration (with test doubles)
|
|
1270
|
-
|
|
1271
|
-
**Characteristics:**
|
|
1272
|
-
|
|
1273
|
-
- Moderate execution time
|
|
1274
|
-
- May use test databases or containers
|
|
1275
|
-
- Tests multiple components together
|
|
1276
|
-
- Validates contracts between components
|
|
1277
|
-
|
|
1278
|
-
**Example scenarios:**
|
|
1279
|
-
|
|
1280
|
-
```yaml
|
|
1281
|
-
integration_test:
|
|
1282
|
-
components: ["UserService", "UserRepository", "Database"]
|
|
1283
|
-
scenario: "Create user with duplicate email check"
|
|
1284
|
-
justification: "Tests transaction boundaries and constraint handling"
|
|
1285
|
-
test_doubles: "Mock email service, real test database"
|
|
1286
|
-
```
|
|
1287
|
-
|
|
1288
|
-
### End-to-End Tests
|
|
1289
|
-
|
|
1290
|
-
**When to use:**
|
|
1291
|
-
|
|
1292
|
-
- Critical user journeys
|
|
1293
|
-
- Cross-system workflows
|
|
1294
|
-
- UI interaction flows
|
|
1295
|
-
- Full stack validation
|
|
1296
|
-
- Production-like scenario testing
|
|
1297
|
-
|
|
1298
|
-
**Characteristics:**
|
|
1299
|
-
|
|
1300
|
-
- Keep under 90 seconds per test
|
|
1301
|
-
- Tests complete user scenarios
|
|
1302
|
-
- Uses real or production-like environment
|
|
1303
|
-
- Higher maintenance cost
|
|
1304
|
-
- More prone to flakiness
|
|
1305
|
-
|
|
1306
|
-
**Example scenarios:**
|
|
1234
|
+
## Dependencies
|
|
1307
1235
|
|
|
1308
1236
|
```yaml
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
justification: "Critical business flow requiring full stack validation"
|
|
1313
|
-
environment: "Staging with test payment gateway"
|
|
1237
|
+
data:
|
|
1238
|
+
- test-levels-framework.md # Unit/Integration/E2E decision criteria
|
|
1239
|
+
- test-priorities-matrix.md # P0/P1/P2/P3 classification system
|
|
1314
1240
|
```
|
|
1315
1241
|
|
|
1316
|
-
##
|
|
1242
|
+
## Process
|
|
1317
1243
|
|
|
1318
1244
|
### 1. Analyze Story Requirements
|
|
1319
1245
|
|
|
1320
|
-
Break down each acceptance criterion into testable scenarios:
|
|
1321
|
-
|
|
1322
|
-
```yaml
|
|
1323
|
-
acceptance_criterion: "User can reset password via email"
|
|
1324
|
-
test_scenarios:
|
|
1325
|
-
- level: unit
|
|
1326
|
-
what: "Password validation rules"
|
|
1327
|
-
why: "Complex regex and business rules"
|
|
1328
|
-
|
|
1329
|
-
- level: integration
|
|
1330
|
-
what: "Password reset token generation and storage"
|
|
1331
|
-
why: "Database interaction with expiry logic"
|
|
1332
|
-
|
|
1333
|
-
- level: integration
|
|
1334
|
-
what: "Email service integration"
|
|
1335
|
-
why: "External service with retry logic"
|
|
1336
|
-
|
|
1337
|
-
- level: e2e
|
|
1338
|
-
what: "Complete password reset flow"
|
|
1339
|
-
why: "Critical security flow needing full validation"
|
|
1340
|
-
```
|
|
1341
|
-
|
|
1342
|
-
### 2. Apply Test Level Heuristics
|
|
1343
|
-
|
|
1344
|
-
Use these rules to determine appropriate test levels:
|
|
1345
|
-
|
|
1346
|
-
```markdown
|
|
1347
|
-
## Test Level Selection Rules
|
|
1348
|
-
|
|
1349
|
-
### Favor Unit Tests When:
|
|
1350
|
-
|
|
1351
|
-
- Logic can be isolated
|
|
1352
|
-
- No side effects involved
|
|
1353
|
-
- Fast feedback needed
|
|
1354
|
-
- High cyclomatic complexity
|
|
1355
|
-
|
|
1356
|
-
### Favor Integration Tests When:
|
|
1357
|
-
|
|
1358
|
-
- Testing persistence layer
|
|
1359
|
-
- Validating service contracts
|
|
1360
|
-
- Testing middleware/interceptors
|
|
1361
|
-
- Component boundaries critical
|
|
1246
|
+
Break down each acceptance criterion into testable scenarios. For each AC:
|
|
1362
1247
|
|
|
1363
|
-
|
|
1248
|
+
- Identify the core functionality to test
|
|
1249
|
+
- Determine data variations needed
|
|
1250
|
+
- Consider error conditions
|
|
1251
|
+
- Note edge cases
|
|
1364
1252
|
|
|
1365
|
-
|
|
1366
|
-
- Multi-system interactions
|
|
1367
|
-
- Regulatory compliance scenarios
|
|
1368
|
-
- Visual regression important
|
|
1253
|
+
### 2. Apply Test Level Framework
|
|
1369
1254
|
|
|
1370
|
-
|
|
1255
|
+
**Reference:** Load `test-levels-framework.md` for detailed criteria
|
|
1371
1256
|
|
|
1372
|
-
|
|
1373
|
-
- Unit testing framework behavior
|
|
1374
|
-
- Integration testing third-party libraries
|
|
1375
|
-
- Duplicate coverage across levels
|
|
1257
|
+
Quick rules:
|
|
1376
1258
|
|
|
1377
|
-
|
|
1259
|
+
- **Unit**: Pure logic, algorithms, calculations
|
|
1260
|
+
- **Integration**: Component interactions, DB operations
|
|
1261
|
+
- **E2E**: Critical user journeys, compliance
|
|
1378
1262
|
|
|
1379
|
-
|
|
1263
|
+
### 3. Assign Priorities
|
|
1380
1264
|
|
|
1381
|
-
|
|
1382
|
-
2. Can a unit test cover this instead of integration?
|
|
1383
|
-
3. Can an integration test cover this instead of E2E?
|
|
1265
|
+
**Reference:** Load `test-priorities-matrix.md` for classification
|
|
1384
1266
|
|
|
1385
|
-
|
|
1267
|
+
Quick priority assignment:
|
|
1386
1268
|
|
|
1387
|
-
-
|
|
1388
|
-
-
|
|
1389
|
-
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
### 3. Design Test Scenarios
|
|
1393
|
-
|
|
1394
|
-
**Test ID Format:** `{EPIC}.{STORY}-{LEVEL}-{SEQ}`
|
|
1395
|
-
|
|
1396
|
-
- Example: `1.3-UNIT-001`, `1.3-INT-002`, `1.3-E2E-001`
|
|
1397
|
-
- Ensures traceability across all artifacts
|
|
1398
|
-
|
|
1399
|
-
**Naming Convention:**
|
|
1269
|
+
- **P0**: Revenue-critical, security, compliance
|
|
1270
|
+
- **P1**: Core user journeys, frequently used
|
|
1271
|
+
- **P2**: Secondary features, admin functions
|
|
1272
|
+
- **P3**: Nice-to-have, rarely used
|
|
1400
1273
|
|
|
1401
|
-
|
|
1402
|
-
- Integration: `test_{flow}_{interaction}`
|
|
1403
|
-
- E2E: `test_{journey}_{outcome}`
|
|
1274
|
+
### 4. Design Test Scenarios
|
|
1404
1275
|
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
- Tag tests with risk IDs they mitigate
|
|
1408
|
-
- Prioritize tests for high-risk areas (P0)
|
|
1409
|
-
- Link to risk profile when available
|
|
1410
|
-
|
|
1411
|
-
For each identified test need:
|
|
1276
|
+
For each identified test need, create:
|
|
1412
1277
|
|
|
1413
1278
|
```yaml
|
|
1414
1279
|
test_scenario:
|
|
1415
|
-
id:
|
|
1416
|
-
requirement:
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
input: "Timestamp array"
|
|
1423
|
-
expected: "Correct window calculation"
|
|
1424
|
-
|
|
1425
|
-
integration_tests:
|
|
1426
|
-
- name: "Login endpoint enforces rate limit"
|
|
1427
|
-
setup: "5 failed attempts"
|
|
1428
|
-
action: "6th attempt"
|
|
1429
|
-
expected: "429 response with retry-after header"
|
|
1430
|
-
|
|
1431
|
-
e2e_tests:
|
|
1432
|
-
- name: "User sees rate limit message"
|
|
1433
|
-
setup: "Trigger rate limit"
|
|
1434
|
-
validation: "Error message displayed, retry timer shown"
|
|
1280
|
+
id: '{epic}.{story}-{LEVEL}-{SEQ}'
|
|
1281
|
+
requirement: 'AC reference'
|
|
1282
|
+
priority: P0|P1|P2|P3
|
|
1283
|
+
level: unit|integration|e2e
|
|
1284
|
+
description: 'What is being tested'
|
|
1285
|
+
justification: 'Why this level was chosen'
|
|
1286
|
+
mitigates_risks: ['RISK-001'] # If risk profile exists
|
|
1435
1287
|
```
|
|
1436
1288
|
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
**Per Acceptance Criterion:**
|
|
1440
|
-
|
|
1441
|
-
- At least 1 unit test for business logic
|
|
1442
|
-
- At least 1 integration test if multiple components interact
|
|
1443
|
-
- At least 1 E2E test if it's a user-facing feature
|
|
1444
|
-
|
|
1445
|
-
**Exceptions:**
|
|
1446
|
-
|
|
1447
|
-
- Pure UI changes: May skip unit tests
|
|
1448
|
-
- Pure logic changes: May skip E2E tests
|
|
1449
|
-
- Infrastructure changes: May focus on integration tests
|
|
1450
|
-
|
|
1451
|
-
**When in doubt:** Start with unit tests, add integration for interactions, E2E for critical paths only.
|
|
1452
|
-
|
|
1453
|
-
## Test Quality Standards
|
|
1454
|
-
|
|
1455
|
-
### Core Testing Principles
|
|
1456
|
-
|
|
1457
|
-
**No Flaky Tests:** Ensure reliability through proper async handling, explicit waits, and atomic test design.
|
|
1458
|
-
|
|
1459
|
-
**No Hard Waits/Sleeps:** Use dynamic waiting strategies (e.g., polling, event-based triggers).
|
|
1460
|
-
|
|
1461
|
-
**Stateless & Parallel-Safe:** Tests run independently; use cron jobs or semaphores only if unavoidable.
|
|
1462
|
-
|
|
1463
|
-
**No Order Dependency:** Every it/describe/context block works in isolation (supports .only execution).
|
|
1464
|
-
|
|
1465
|
-
**Self-Cleaning Tests:** Test sets up its own data and automatically deletes/deactivates entities created during testing.
|
|
1289
|
+
### 5. Validate Coverage
|
|
1466
1290
|
|
|
1467
|
-
|
|
1291
|
+
Ensure:
|
|
1468
1292
|
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
- Start with local environments or ephemeral stacks
|
|
1474
|
-
- Validate functionality across all deployment stages (local → dev → stage)
|
|
1475
|
-
|
|
1476
|
-
**Low Maintenance:** Minimize manual upkeep (avoid brittle selectors, do not repeat UI actions, leverage APIs).
|
|
1477
|
-
|
|
1478
|
-
**CI Execution Evidence:** Integrate into pipelines with clear logs/artifacts.
|
|
1479
|
-
|
|
1480
|
-
**Visibility:** Generate test reports (e.g., JUnit XML, HTML) for failures and trends.
|
|
1481
|
-
|
|
1482
|
-
### Coverage Requirements
|
|
1483
|
-
|
|
1484
|
-
**Release Confidence:**
|
|
1485
|
-
|
|
1486
|
-
- Happy Path: Core user journeys are prioritized
|
|
1487
|
-
- Edge Cases: Critical error/validation scenarios are covered
|
|
1488
|
-
- Feature Flags: Test both enabled and disabled states where applicable
|
|
1489
|
-
|
|
1490
|
-
### Test Design Rules
|
|
1491
|
-
|
|
1492
|
-
**Assertions:** Keep them explicit in tests; avoid abstraction into helpers. Use parametrized tests for soft assertions.
|
|
1493
|
-
|
|
1494
|
-
**Naming:** Follow conventions (e.g., `describe('Component')`, `it('should do X when Y')`).
|
|
1495
|
-
|
|
1496
|
-
**Size:** Aim for files ≤200 lines; split/chunk large tests logically.
|
|
1497
|
-
|
|
1498
|
-
**Speed:** Target individual tests ≤90 seconds; optimize slow setups (e.g., shared fixtures).
|
|
1499
|
-
|
|
1500
|
-
**Careful Abstractions:** Favor readability over DRY when balancing helper reuse (page objects are okay, assertion logic is not).
|
|
1501
|
-
|
|
1502
|
-
**Test Cleanup:** Ensure tests clean up resources they create (e.g., closing browser, deleting test data).
|
|
1503
|
-
|
|
1504
|
-
**Deterministic Flow:** Tests should refrain from using conditionals (e.g., if/else) to control flow or try/catch blocks where possible.
|
|
1505
|
-
|
|
1506
|
-
### API Testing Standards
|
|
1507
|
-
|
|
1508
|
-
- Tests must not depend on hardcoded data → use factories and per-test setup
|
|
1509
|
-
- Always test both happy path and negative/error cases
|
|
1510
|
-
- API tests should run parallel safely (no global state shared)
|
|
1511
|
-
- Test idempotency where applicable (e.g., duplicate requests)
|
|
1512
|
-
- Tests should clean up their data
|
|
1513
|
-
- Response logs should only be printed in case of failure
|
|
1514
|
-
- Auth tests must validate token expiration and renewal
|
|
1293
|
+
- Every AC has at least one test
|
|
1294
|
+
- No duplicate coverage across levels
|
|
1295
|
+
- Critical paths have multiple levels
|
|
1296
|
+
- Risk mitigations are addressed
|
|
1515
1297
|
|
|
1516
1298
|
## Outputs
|
|
1517
1299
|
|
|
@@ -1519,13 +1301,11 @@ test_scenario:
|
|
|
1519
1301
|
|
|
1520
1302
|
**Save to:** `docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md`
|
|
1521
1303
|
|
|
1522
|
-
Generate a comprehensive test design document:
|
|
1523
|
-
|
|
1524
1304
|
```markdown
|
|
1525
1305
|
# Test Design: Story {epic}.{story}
|
|
1526
1306
|
|
|
1527
1307
|
Date: {date}
|
|
1528
|
-
|
|
1308
|
+
Designer: Quinn (Test Architect)
|
|
1529
1309
|
|
|
1530
1310
|
## Test Strategy Overview
|
|
1531
1311
|
|
|
@@ -1533,212 +1313,80 @@ Reviewer: Quinn (Test Architect)
|
|
|
1533
1313
|
- Unit tests: Y (A%)
|
|
1534
1314
|
- Integration tests: Z (B%)
|
|
1535
1315
|
- E2E tests: W (C%)
|
|
1316
|
+
- Priority distribution: P0: X, P1: Y, P2: Z
|
|
1536
1317
|
|
|
1537
|
-
## Test
|
|
1538
|
-
|
|
1539
|
-
[Explain why this distribution was chosen]
|
|
1540
|
-
|
|
1541
|
-
## Detailed Test Scenarios
|
|
1542
|
-
|
|
1543
|
-
### Requirement: AC1 - {description}
|
|
1544
|
-
|
|
1545
|
-
#### Unit Tests (3 scenarios)
|
|
1546
|
-
|
|
1547
|
-
1. **ID**: 1.3-UNIT-001
|
|
1548
|
-
**Test**: Validate input format
|
|
1549
|
-
- **Why Unit**: Pure validation logic
|
|
1550
|
-
- **Coverage**: Input edge cases
|
|
1551
|
-
- **Mocks**: None needed
|
|
1552
|
-
- **Mitigates**: DATA-001 (if applicable)
|
|
1553
|
-
|
|
1554
|
-
#### Integration Tests (2 scenarios)
|
|
1555
|
-
|
|
1556
|
-
1. **ID**: 1.3-INT-001
|
|
1557
|
-
**Test**: Service processes valid request
|
|
1558
|
-
- **Why Integration**: Multiple components involved
|
|
1559
|
-
- **Coverage**: Happy path + error handling
|
|
1560
|
-
- **Test Doubles**: Mock external API
|
|
1561
|
-
- **Mitigates**: TECH-002
|
|
1562
|
-
|
|
1563
|
-
#### E2E Tests (1 scenario)
|
|
1564
|
-
|
|
1565
|
-
1. **ID**: 1.3-E2E-001
|
|
1566
|
-
**Test**: Complete user workflow
|
|
1567
|
-
- **Why E2E**: Critical user journey
|
|
1568
|
-
- **Coverage**: Full stack validation
|
|
1569
|
-
- **Environment**: Staging
|
|
1570
|
-
- **Max Duration**: 90 seconds
|
|
1571
|
-
- **Mitigates**: BUS-001
|
|
1572
|
-
|
|
1573
|
-
[Continue for all requirements...]
|
|
1574
|
-
|
|
1575
|
-
## Test Data Requirements
|
|
1576
|
-
|
|
1577
|
-
### Unit Test Data
|
|
1578
|
-
|
|
1579
|
-
- Static fixtures for calculations
|
|
1580
|
-
- Edge case values arrays
|
|
1581
|
-
|
|
1582
|
-
### Integration Test Data
|
|
1583
|
-
|
|
1584
|
-
- Test database seeds
|
|
1585
|
-
- API response fixtures
|
|
1586
|
-
|
|
1587
|
-
### E2E Test Data
|
|
1588
|
-
|
|
1589
|
-
- Test user accounts
|
|
1590
|
-
- Sandbox environment data
|
|
1591
|
-
|
|
1592
|
-
## Mock/Stub Strategy
|
|
1593
|
-
|
|
1594
|
-
### What to Mock
|
|
1595
|
-
|
|
1596
|
-
- External services (payment, email)
|
|
1597
|
-
- Time-dependent functions
|
|
1598
|
-
- Random number generators
|
|
1599
|
-
|
|
1600
|
-
### What NOT to Mock
|
|
1601
|
-
|
|
1602
|
-
- Core business logic
|
|
1603
|
-
- Database in integration tests
|
|
1604
|
-
- Critical security functions
|
|
1605
|
-
|
|
1606
|
-
## Test Execution Implementation
|
|
1607
|
-
|
|
1608
|
-
### Parallel Execution
|
|
1609
|
-
|
|
1610
|
-
- All unit tests: Fully parallel (stateless requirement)
|
|
1611
|
-
- Integration tests: Parallel with isolated databases
|
|
1612
|
-
- E2E tests: Sequential or limited parallelism
|
|
1613
|
-
|
|
1614
|
-
### Execution Order
|
|
1615
|
-
|
|
1616
|
-
1. Unit tests first (fail fast)
|
|
1617
|
-
2. Integration tests second
|
|
1618
|
-
3. E2E tests last (expensive, max 90 seconds each)
|
|
1619
|
-
|
|
1620
|
-
## Risk-Based Test Priority
|
|
1621
|
-
|
|
1622
|
-
### P0 - Must Have (Linked to Critical/High Risks)
|
|
1623
|
-
|
|
1624
|
-
- Security-related tests (SEC-\* risks)
|
|
1625
|
-
- Data integrity tests (DATA-\* risks)
|
|
1626
|
-
- Critical business flow tests (BUS-\* risks)
|
|
1627
|
-
- Tests for risks scored ≥6 in risk profile
|
|
1628
|
-
|
|
1629
|
-
### P1 - Should Have (Medium Risks)
|
|
1630
|
-
|
|
1631
|
-
- Edge case coverage
|
|
1632
|
-
- Performance tests (PERF-\* risks)
|
|
1633
|
-
- Error recovery tests
|
|
1634
|
-
- Tests for risks scored 4-5
|
|
1635
|
-
|
|
1636
|
-
### P2 - Nice to Have (Low Risks)
|
|
1637
|
-
|
|
1638
|
-
- UI polish tests
|
|
1639
|
-
- Minor validation tests
|
|
1640
|
-
- Tests for risks scored ≤3
|
|
1641
|
-
|
|
1642
|
-
## Test Maintenance Considerations
|
|
1318
|
+
## Test Scenarios by Acceptance Criteria
|
|
1643
1319
|
|
|
1644
|
-
###
|
|
1320
|
+
### AC1: {description}
|
|
1645
1321
|
|
|
1646
|
-
|
|
1322
|
+
#### Scenarios
|
|
1647
1323
|
|
|
1648
|
-
|
|
1324
|
+
| ID | Level | Priority | Test | Justification |
|
|
1325
|
+
| ------------ | ----------- | -------- | ------------------------- | ------------------------ |
|
|
1326
|
+
| 1.3-UNIT-001 | Unit | P0 | Validate input format | Pure validation logic |
|
|
1327
|
+
| 1.3-INT-001 | Integration | P0 | Service processes request | Multi-component flow |
|
|
1328
|
+
| 1.3-E2E-001 | E2E | P1 | User completes journey | Critical path validation |
|
|
1649
1329
|
|
|
1650
|
-
|
|
1651
|
-
- Dynamic waits only (no hard sleeps)
|
|
1652
|
-
- Environment isolation
|
|
1653
|
-
- Self-cleaning test data
|
|
1654
|
-
|
|
1655
|
-
## Coverage Goals
|
|
1656
|
-
|
|
1657
|
-
### Unit Test Coverage
|
|
1658
|
-
|
|
1659
|
-
- Target: 80% line coverage
|
|
1660
|
-
- Focus: Business logic, calculations
|
|
1330
|
+
[Continue for all ACs...]
|
|
1661
1331
|
|
|
1662
|
-
|
|
1332
|
+
## Risk Coverage
|
|
1663
1333
|
|
|
1664
|
-
|
|
1665
|
-
- Focus: Contract validation
|
|
1334
|
+
[Map test scenarios to identified risks if risk profile exists]
|
|
1666
1335
|
|
|
1667
|
-
|
|
1336
|
+
## Recommended Execution Order
|
|
1668
1337
|
|
|
1669
|
-
|
|
1670
|
-
|
|
1338
|
+
1. P0 Unit tests (fail fast)
|
|
1339
|
+
2. P0 Integration tests
|
|
1340
|
+
3. P0 E2E tests
|
|
1341
|
+
4. P1 tests in order
|
|
1342
|
+
5. P2+ as time permits
|
|
1671
1343
|
```
|
|
1672
1344
|
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
### Over-testing Smells
|
|
1345
|
+
### Output 2: Gate YAML Block
|
|
1676
1346
|
|
|
1677
|
-
|
|
1678
|
-
- E2E tests for calculations
|
|
1679
|
-
- Integration tests for framework features
|
|
1347
|
+
Generate for inclusion in quality gate:
|
|
1680
1348
|
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
Good test design shows:
|
|
1696
|
-
|
|
1697
|
-
- Clear level separation
|
|
1698
|
-
- No redundant coverage
|
|
1699
|
-
- Fast feedback from unit tests
|
|
1700
|
-
- Reliable integration tests
|
|
1701
|
-
- Focused e2e tests
|
|
1702
|
-
|
|
1703
|
-
## Key Principles
|
|
1704
|
-
|
|
1705
|
-
- Test at the lowest appropriate level
|
|
1706
|
-
- One clear owner per test
|
|
1707
|
-
- Fast tests run first
|
|
1708
|
-
- Mock at boundaries, not internals
|
|
1709
|
-
- E2E for user value, not implementation
|
|
1710
|
-
- Maintain test/production parity where critical
|
|
1711
|
-
- Tests must be atomic and self-contained
|
|
1712
|
-
- No shared state between tests
|
|
1713
|
-
- Explicit assertions in test files (not helpers)
|
|
1349
|
+
```yaml
|
|
1350
|
+
test_design:
|
|
1351
|
+
scenarios_total: X
|
|
1352
|
+
by_level:
|
|
1353
|
+
unit: Y
|
|
1354
|
+
integration: Z
|
|
1355
|
+
e2e: W
|
|
1356
|
+
by_priority:
|
|
1357
|
+
p0: A
|
|
1358
|
+
p1: B
|
|
1359
|
+
p2: C
|
|
1360
|
+
coverage_gaps: [] # List any ACs without tests
|
|
1361
|
+
```
|
|
1714
1362
|
|
|
1715
|
-
### Output
|
|
1363
|
+
### Output 3: Trace References
|
|
1716
1364
|
|
|
1717
|
-
|
|
1365
|
+
Print for use by trace-requirements task:
|
|
1718
1366
|
|
|
1719
1367
|
```text
|
|
1720
|
-
Test design: docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
|
|
1368
|
+
Test design matrix: docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
|
|
1369
|
+
P0 tests identified: {count}
|
|
1721
1370
|
```
|
|
1722
1371
|
|
|
1723
|
-
|
|
1372
|
+
## Quality Checklist
|
|
1724
1373
|
|
|
1725
|
-
|
|
1374
|
+
Before finalizing, verify:
|
|
1726
1375
|
|
|
1727
|
-
|
|
1376
|
+
- [ ] Every AC has test coverage
|
|
1377
|
+
- [ ] Test levels are appropriate (not over-testing)
|
|
1378
|
+
- [ ] No duplicate coverage across levels
|
|
1379
|
+
- [ ] Priorities align with business risk
|
|
1380
|
+
- [ ] Test IDs follow naming convention
|
|
1381
|
+
- [ ] Scenarios are atomic and independent
|
|
1728
1382
|
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
by_priority:
|
|
1737
|
-
P0: { p0_count }
|
|
1738
|
-
P1: { p1_count }
|
|
1739
|
-
P2: { p2_count }
|
|
1740
|
-
coverage_gaps: [] # List any ACs without tests
|
|
1741
|
-
```
|
|
1383
|
+
## Key Principles
|
|
1384
|
+
|
|
1385
|
+
- **Shift left**: Prefer unit over integration, integration over E2E
|
|
1386
|
+
- **Risk-based**: Focus on what could go wrong
|
|
1387
|
+
- **Efficient coverage**: Test once at the right level
|
|
1388
|
+
- **Maintainability**: Consider long-term test maintenance
|
|
1389
|
+
- **Fast feedback**: Quick tests run first
|
|
1742
1390
|
==================== END: .bmad-core/tasks/test-design.md ====================
|
|
1743
1391
|
|
|
1744
1392
|
==================== START: .bmad-core/tasks/nfr-assess.md ====================
|
|
@@ -1750,12 +1398,12 @@ Quick NFR validation focused on the core four: security, performance, reliabilit
|
|
|
1750
1398
|
|
|
1751
1399
|
```yaml
|
|
1752
1400
|
required:
|
|
1753
|
-
- story_id:
|
|
1754
|
-
- story_path:
|
|
1401
|
+
- story_id: '{epic}.{story}' # e.g., "1.3"
|
|
1402
|
+
- story_path: 'docs/stories/{epic}.{story}.*.md'
|
|
1755
1403
|
|
|
1756
1404
|
optional:
|
|
1757
|
-
- architecture_refs:
|
|
1758
|
-
- technical_preferences:
|
|
1405
|
+
- architecture_refs: 'docs/architecture/*.md'
|
|
1406
|
+
- technical_preferences: 'docs/technical-preferences.md'
|
|
1759
1407
|
- acceptance_criteria: From story file
|
|
1760
1408
|
```
|
|
1761
1409
|
|
|
@@ -1836,16 +1484,16 @@ nfr_validation:
|
|
|
1836
1484
|
_assessed: [security, performance, reliability, maintainability]
|
|
1837
1485
|
security:
|
|
1838
1486
|
status: CONCERNS
|
|
1839
|
-
notes:
|
|
1487
|
+
notes: 'No rate limiting on auth endpoints'
|
|
1840
1488
|
performance:
|
|
1841
1489
|
status: PASS
|
|
1842
|
-
notes:
|
|
1490
|
+
notes: 'Response times < 200ms verified'
|
|
1843
1491
|
reliability:
|
|
1844
1492
|
status: PASS
|
|
1845
|
-
notes:
|
|
1493
|
+
notes: 'Error handling and retries implemented'
|
|
1846
1494
|
maintainability:
|
|
1847
1495
|
status: CONCERNS
|
|
1848
|
-
notes:
|
|
1496
|
+
notes: 'Test coverage at 65%, target is 80%'
|
|
1849
1497
|
```
|
|
1850
1498
|
|
|
1851
1499
|
## Deterministic Status Rules
|
|
@@ -2075,10 +1723,10 @@ performance_deep_dive:
|
|
|
2075
1723
|
p99: 350ms
|
|
2076
1724
|
database:
|
|
2077
1725
|
slow_queries: 2
|
|
2078
|
-
missing_indexes: [
|
|
1726
|
+
missing_indexes: ['users.email', 'orders.user_id']
|
|
2079
1727
|
caching:
|
|
2080
1728
|
hit_rate: 0%
|
|
2081
|
-
recommendation:
|
|
1729
|
+
recommendation: 'Add Redis for session data'
|
|
2082
1730
|
load_test:
|
|
2083
1731
|
max_rps: 150
|
|
2084
1732
|
breaking_point: 200 rps
|
|
@@ -2102,7 +1750,7 @@ workflow:
|
|
|
2102
1750
|
elicitation: advanced-elicitation
|
|
2103
1751
|
|
|
2104
1752
|
agent_config:
|
|
2105
|
-
editable_sections:
|
|
1753
|
+
editable_sections:
|
|
2106
1754
|
- Status
|
|
2107
1755
|
- Story
|
|
2108
1756
|
- Acceptance Criteria
|
|
@@ -2119,7 +1767,7 @@ sections:
|
|
|
2119
1767
|
instruction: Select the current status of the story
|
|
2120
1768
|
owner: scrum-master
|
|
2121
1769
|
editors: [scrum-master, dev-agent]
|
|
2122
|
-
|
|
1770
|
+
|
|
2123
1771
|
- id: story
|
|
2124
1772
|
title: Story
|
|
2125
1773
|
type: template-text
|
|
@@ -2131,7 +1779,7 @@ sections:
|
|
|
2131
1779
|
elicit: true
|
|
2132
1780
|
owner: scrum-master
|
|
2133
1781
|
editors: [scrum-master]
|
|
2134
|
-
|
|
1782
|
+
|
|
2135
1783
|
- id: acceptance-criteria
|
|
2136
1784
|
title: Acceptance Criteria
|
|
2137
1785
|
type: numbered-list
|
|
@@ -2139,7 +1787,7 @@ sections:
|
|
|
2139
1787
|
elicit: true
|
|
2140
1788
|
owner: scrum-master
|
|
2141
1789
|
editors: [scrum-master]
|
|
2142
|
-
|
|
1790
|
+
|
|
2143
1791
|
- id: tasks-subtasks
|
|
2144
1792
|
title: Tasks / Subtasks
|
|
2145
1793
|
type: bullet-list
|
|
@@ -2156,7 +1804,7 @@ sections:
|
|
|
2156
1804
|
elicit: true
|
|
2157
1805
|
owner: scrum-master
|
|
2158
1806
|
editors: [scrum-master, dev-agent]
|
|
2159
|
-
|
|
1807
|
+
|
|
2160
1808
|
- id: dev-notes
|
|
2161
1809
|
title: Dev Notes
|
|
2162
1810
|
instruction: |
|
|
@@ -2180,7 +1828,7 @@ sections:
|
|
|
2180
1828
|
elicit: true
|
|
2181
1829
|
owner: scrum-master
|
|
2182
1830
|
editors: [scrum-master]
|
|
2183
|
-
|
|
1831
|
+
|
|
2184
1832
|
- id: change-log
|
|
2185
1833
|
title: Change Log
|
|
2186
1834
|
type: table
|
|
@@ -2188,7 +1836,7 @@ sections:
|
|
|
2188
1836
|
instruction: Track changes made to this story document
|
|
2189
1837
|
owner: scrum-master
|
|
2190
1838
|
editors: [scrum-master, dev-agent, qa-agent]
|
|
2191
|
-
|
|
1839
|
+
|
|
2192
1840
|
- id: dev-agent-record
|
|
2193
1841
|
title: Dev Agent Record
|
|
2194
1842
|
instruction: This section is populated by the development agent during implementation
|
|
@@ -2201,25 +1849,25 @@ sections:
|
|
|
2201
1849
|
instruction: Record the specific AI agent model and version used for development
|
|
2202
1850
|
owner: dev-agent
|
|
2203
1851
|
editors: [dev-agent]
|
|
2204
|
-
|
|
1852
|
+
|
|
2205
1853
|
- id: debug-log-references
|
|
2206
1854
|
title: Debug Log References
|
|
2207
1855
|
instruction: Reference any debug logs or traces generated during development
|
|
2208
1856
|
owner: dev-agent
|
|
2209
1857
|
editors: [dev-agent]
|
|
2210
|
-
|
|
1858
|
+
|
|
2211
1859
|
- id: completion-notes
|
|
2212
1860
|
title: Completion Notes List
|
|
2213
1861
|
instruction: Notes about the completion of tasks and any issues encountered
|
|
2214
1862
|
owner: dev-agent
|
|
2215
1863
|
editors: [dev-agent]
|
|
2216
|
-
|
|
1864
|
+
|
|
2217
1865
|
- id: file-list
|
|
2218
1866
|
title: File List
|
|
2219
1867
|
instruction: List all files created, modified, or affected during story implementation
|
|
2220
1868
|
owner: dev-agent
|
|
2221
1869
|
editors: [dev-agent]
|
|
2222
|
-
|
|
1870
|
+
|
|
2223
1871
|
- id: qa-results
|
|
2224
1872
|
title: QA Results
|
|
2225
1873
|
instruction: Results from QA Agent QA review of the completed story implementation
|
|
@@ -2241,8 +1889,8 @@ template:
|
|
|
2241
1889
|
schema: 1
|
|
2242
1890
|
story: "{{epic_num}}.{{story_num}}"
|
|
2243
1891
|
story_title: "{{story_title}}"
|
|
2244
|
-
gate: "{{gate_status}}"
|
|
2245
|
-
status_reason: "{{status_reason}}"
|
|
1892
|
+
gate: "{{gate_status}}" # PASS|CONCERNS|FAIL|WAIVED
|
|
1893
|
+
status_reason: "{{status_reason}}" # 1-2 sentence summary of why this gate decision
|
|
2246
1894
|
reviewer: "Quinn (Test Architect)"
|
|
2247
1895
|
updated: "{{iso_timestamp}}"
|
|
2248
1896
|
|
|
@@ -2259,68 +1907,77 @@ risk_summary:
|
|
|
2259
1907
|
must_fix: []
|
|
2260
1908
|
monitor: []
|
|
2261
1909
|
|
|
2262
|
-
#
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
1910
|
+
# Examples section using block scalars for clarity
|
|
1911
|
+
examples:
|
|
1912
|
+
with_issues: |
|
|
1913
|
+
top_issues:
|
|
1914
|
+
- id: "SEC-001"
|
|
1915
|
+
severity: high # ONLY: low|medium|high
|
|
1916
|
+
finding: "No rate limiting on login endpoint"
|
|
1917
|
+
suggested_action: "Add rate limiting middleware before production"
|
|
1918
|
+
- id: "TEST-001"
|
|
1919
|
+
severity: medium
|
|
1920
|
+
finding: "Missing integration tests for auth flow"
|
|
1921
|
+
suggested_action: "Add test coverage for critical paths"
|
|
1922
|
+
|
|
1923
|
+
when_waived: |
|
|
1924
|
+
waiver:
|
|
1925
|
+
active: true
|
|
1926
|
+
reason: "Accepted for MVP release - will address in next sprint"
|
|
1927
|
+
approved_by: "Product Owner"
|
|
2278
1928
|
|
|
2279
1929
|
# ============ Optional Extended Fields ============
|
|
2280
1930
|
# Uncomment and use if your team wants more detail
|
|
2281
1931
|
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
#
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
#
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
#
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
#
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
#
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
1932
|
+
optional_fields_examples:
|
|
1933
|
+
quality_and_expiry: |
|
|
1934
|
+
quality_score: 75 # 0-100 (optional scoring)
|
|
1935
|
+
expires: "2025-01-26T00:00:00Z" # Optional gate freshness window
|
|
1936
|
+
|
|
1937
|
+
evidence: |
|
|
1938
|
+
evidence:
|
|
1939
|
+
tests_reviewed: 15
|
|
1940
|
+
risks_identified: 3
|
|
1941
|
+
trace:
|
|
1942
|
+
ac_covered: [1, 2, 3] # AC numbers with test coverage
|
|
1943
|
+
ac_gaps: [4] # AC numbers lacking coverage
|
|
1944
|
+
|
|
1945
|
+
nfr_validation: |
|
|
1946
|
+
nfr_validation:
|
|
1947
|
+
security: { status: CONCERNS, notes: "Rate limiting missing" }
|
|
1948
|
+
performance: { status: PASS, notes: "" }
|
|
1949
|
+
reliability: { status: PASS, notes: "" }
|
|
1950
|
+
maintainability: { status: PASS, notes: "" }
|
|
1951
|
+
|
|
1952
|
+
history: |
|
|
1953
|
+
history: # Append-only audit trail
|
|
1954
|
+
- at: "2025-01-12T10:00:00Z"
|
|
1955
|
+
gate: FAIL
|
|
1956
|
+
note: "Initial review - missing tests"
|
|
1957
|
+
- at: "2025-01-12T15:00:00Z"
|
|
1958
|
+
gate: CONCERNS
|
|
1959
|
+
note: "Tests added but rate limiting still missing"
|
|
1960
|
+
|
|
1961
|
+
risk_summary: |
|
|
1962
|
+
risk_summary: # From risk-profile task
|
|
1963
|
+
totals:
|
|
1964
|
+
critical: 0
|
|
1965
|
+
high: 0
|
|
1966
|
+
medium: 0
|
|
1967
|
+
low: 0
|
|
1968
|
+
# 'highest' is emitted only when risks exist
|
|
1969
|
+
recommendations:
|
|
1970
|
+
must_fix: []
|
|
1971
|
+
monitor: []
|
|
1972
|
+
|
|
1973
|
+
recommendations: |
|
|
1974
|
+
recommendations:
|
|
1975
|
+
immediate: # Must fix before production
|
|
1976
|
+
- action: "Add rate limiting to auth endpoints"
|
|
1977
|
+
refs: ["api/auth/login.ts:42-68"]
|
|
1978
|
+
future: # Can be addressed later
|
|
1979
|
+
- action: "Consider caching for better performance"
|
|
1980
|
+
refs: ["services/data.service.ts"]
|
|
2324
1981
|
==================== END: .bmad-core/templates/qa-gate-tmpl.yaml ====================
|
|
2325
1982
|
|
|
2326
1983
|
==================== START: .bmad-core/data/technical-preferences.md ====================
|