siesa-agents 1.0.2 → 1.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 (108) hide show
  1. package/.bmad-core/config.json +11 -0
  2. package/.github/workflows/ci.yml +19 -0
  3. package/.vscode/settings.json +11 -0
  4. package/bin/install.js +83 -5
  5. package/package.json +4 -6
  6. package/bmad-core/agent-teams/team-all.yaml +0 -15
  7. package/bmad-core/agent-teams/team-fullstack.yaml +0 -19
  8. package/bmad-core/agent-teams/team-ide-minimal.yaml +0 -11
  9. package/bmad-core/agent-teams/team-no-ui.yaml +0 -14
  10. package/bmad-core/agents/analyst.md +0 -84
  11. package/bmad-core/agents/architect.md +0 -94
  12. package/bmad-core/agents/backend-agent.md +0 -190
  13. package/bmad-core/agents/bmad-master.md +0 -110
  14. package/bmad-core/agents/bmad-orchestrator.md +0 -147
  15. package/bmad-core/agents/dev.md +0 -81
  16. package/bmad-core/agents/frontend-agent.md +0 -169
  17. package/bmad-core/agents/pm.md +0 -84
  18. package/bmad-core/agents/po.md +0 -79
  19. package/bmad-core/agents/qa.md +0 -91
  20. package/bmad-core/agents/sm.md +0 -65
  21. package/bmad-core/agents/ux-expert.md +0 -69
  22. package/bmad-core/checklists/architect-checklist.md +0 -440
  23. package/bmad-core/checklists/backend-checklist.md +0 -143
  24. package/bmad-core/checklists/change-checklist.md +0 -184
  25. package/bmad-core/checklists/frontend-checklist.md +0 -106
  26. package/bmad-core/checklists/pm-checklist.md +0 -372
  27. package/bmad-core/checklists/po-master-checklist.md +0 -434
  28. package/bmad-core/checklists/story-dod-checklist.md +0 -96
  29. package/bmad-core/checklists/story-draft-checklist.md +0 -155
  30. package/bmad-core/core-config.yaml +0 -22
  31. package/bmad-core/data/backend-standards.md +0 -440
  32. package/bmad-core/data/bmad-kb.md +0 -809
  33. package/bmad-core/data/brainstorming-techniques.md +0 -38
  34. package/bmad-core/data/elicitation-methods.md +0 -156
  35. package/bmad-core/data/frontend-standards.md +0 -324
  36. package/bmad-core/data/technical-preferences.md +0 -5
  37. package/bmad-core/data/test-levels-framework.md +0 -148
  38. package/bmad-core/data/test-priorities-matrix.md +0 -174
  39. package/bmad-core/enhanced-ide-development-workflow.md +0 -248
  40. package/bmad-core/install-manifest.yaml +0 -230
  41. package/bmad-core/tasks/advanced-elicitation.md +0 -119
  42. package/bmad-core/tasks/apply-qa-fixes.md +0 -150
  43. package/bmad-core/tasks/brownfield-create-epic.md +0 -162
  44. package/bmad-core/tasks/brownfield-create-story.md +0 -149
  45. package/bmad-core/tasks/correct-course.md +0 -72
  46. package/bmad-core/tasks/create-brownfield-story.md +0 -314
  47. package/bmad-core/tasks/create-component.md +0 -103
  48. package/bmad-core/tasks/create-deep-research-prompt.md +0 -280
  49. package/bmad-core/tasks/create-doc.md +0 -103
  50. package/bmad-core/tasks/create-entity.md +0 -133
  51. package/bmad-core/tasks/create-feature.md +0 -91
  52. package/bmad-core/tasks/create-next-story.md +0 -114
  53. package/bmad-core/tasks/create-service.md +0 -118
  54. package/bmad-core/tasks/create-use-case.md +0 -141
  55. package/bmad-core/tasks/document-project.md +0 -345
  56. package/bmad-core/tasks/execute-checklist.md +0 -88
  57. package/bmad-core/tasks/facilitate-brainstorming-session.md +0 -138
  58. package/bmad-core/tasks/generate-ai-frontend-prompt.md +0 -53
  59. package/bmad-core/tasks/index-docs.md +0 -175
  60. package/bmad-core/tasks/kb-mode-interaction.md +0 -77
  61. package/bmad-core/tasks/nfr-assess.md +0 -345
  62. package/bmad-core/tasks/qa-gate.md +0 -163
  63. package/bmad-core/tasks/review-story.md +0 -316
  64. package/bmad-core/tasks/risk-profile.md +0 -355
  65. package/bmad-core/tasks/scaffold-backend.md +0 -111
  66. package/bmad-core/tasks/scaffold-frontend.md +0 -79
  67. package/bmad-core/tasks/shard-doc.md +0 -187
  68. package/bmad-core/tasks/test-design.md +0 -176
  69. package/bmad-core/tasks/trace-requirements.md +0 -266
  70. package/bmad-core/tasks/validate-next-story.md +0 -136
  71. package/bmad-core/templates/architecture-tmpl.yaml +0 -662
  72. package/bmad-core/templates/brainstorming-output-tmpl.yaml +0 -156
  73. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +0 -477
  74. package/bmad-core/templates/brownfield-prd-tmpl.yaml +0 -281
  75. package/bmad-core/templates/competitor-analysis-tmpl.yaml +0 -307
  76. package/bmad-core/templates/front-end-architecture-tmpl.yaml +0 -258
  77. package/bmad-core/templates/front-end-spec-tmpl.yaml +0 -350
  78. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +0 -824
  79. package/bmad-core/templates/market-research-tmpl.yaml +0 -253
  80. package/bmad-core/templates/prd-tmpl.yaml +0 -203
  81. package/bmad-core/templates/project-brief-tmpl.yaml +0 -222
  82. package/bmad-core/templates/qa-gate-tmpl.yaml +0 -103
  83. package/bmad-core/templates/story-tmpl.yaml +0 -138
  84. package/bmad-core/user-guide.md +0 -530
  85. package/bmad-core/utils/bmad-doc-template.md +0 -327
  86. package/bmad-core/utils/workflow-management.md +0 -71
  87. package/bmad-core/workflows/brownfield-fullstack.yaml +0 -298
  88. package/bmad-core/workflows/brownfield-service.yaml +0 -188
  89. package/bmad-core/workflows/brownfield-ui.yaml +0 -198
  90. package/bmad-core/workflows/greenfield-fullstack.yaml +0 -241
  91. package/bmad-core/workflows/greenfield-service.yaml +0 -207
  92. package/bmad-core/workflows/greenfield-ui.yaml +0 -236
  93. package/bmad-core/working-in-the-brownfield.md +0 -606
  94. package/github/b-mad-expert.md +0 -742
  95. package/github/chatmodes/analyst.chatmode.md +0 -89
  96. package/github/chatmodes/architect.chatmode.md +0 -97
  97. package/github/chatmodes/backend.chatmode.md +0 -195
  98. package/github/chatmodes/bmad-master.chatmode.md +0 -115
  99. package/github/chatmodes/bmad-orchestrator.chatmode.md +0 -152
  100. package/github/chatmodes/dev.chatmode.md +0 -86
  101. package/github/chatmodes/frontend.chatmode.md +0 -158
  102. package/github/chatmodes/pm.chatmode.md +0 -89
  103. package/github/chatmodes/po.chatmode.md +0 -84
  104. package/github/chatmodes/qa.chatmode.md +0 -96
  105. package/github/chatmodes/sm.chatmode.md +0 -70
  106. package/github/chatmodes/ux-expert.chatmode.md +0 -74
  107. package/vscode/mcp.json +0 -11
  108. package/vscode/settings.json +0 -13
@@ -1,187 +0,0 @@
1
- <!-- Powered by BMAD™ Core -->
2
-
3
- # Document Sharding Task
4
-
5
- ## Purpose
6
-
7
- - Split a large document into multiple smaller documents based on level 2 sections
8
- - Create a folder structure to organize the sharded documents
9
- - Maintain all content integrity including code blocks, diagrams, and markdown formatting
10
-
11
- ## Primary Method: Automatic with markdown-tree
12
-
13
- [[LLM: First, check if markdownExploder is set to true in .bmad-core/core-config.yaml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`.
14
-
15
- If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
16
-
17
- If the command fails (especially with an error indicating the command is not found or not available), inform the user: "The markdownExploder setting is enabled but the md-tree command is not available. Please either:
18
-
19
- 1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
20
- 2. Or set markdownExploder to false in .bmad-core/core-config.yaml
21
-
22
- **IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
23
-
24
- If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
25
-
26
- 1. Set markdownExploder to true in .bmad-core/core-config.yaml
27
- 2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
28
-
29
- I will now proceed with the manual sharding process."
30
-
31
- Then proceed with the manual method below ONLY if markdownExploder is false.]]
32
-
33
- ### Installation and Usage
34
-
35
- 1. **Install globally**:
36
-
37
- ```bash
38
- npm install -g @kayvan/markdown-tree-parser
39
- ```
40
-
41
- 2. **Use the explode command**:
42
-
43
- ```bash
44
- # For PRD
45
- md-tree explode docs/prd.md docs/prd
46
-
47
- # For Architecture
48
- md-tree explode docs/architecture.md docs/architecture
49
-
50
- # For any document
51
- md-tree explode [source-document] [destination-folder]
52
- ```
53
-
54
- 3. **What it does**:
55
- - Automatically splits the document by level 2 sections
56
- - Creates properly named files
57
- - Adjusts heading levels appropriately
58
- - Handles all edge cases with code blocks and special markdown
59
-
60
- If the user has @kayvan/markdown-tree-parser installed, use it and skip the manual process below.
61
-
62
- ---
63
-
64
- ## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
65
-
66
- ### Task Instructions
67
-
68
- 1. Identify Document and Target Location
69
-
70
- - Determine which document to shard (user-provided path)
71
- - Create a new folder under `docs/` with the same name as the document (without extension)
72
- - Example: `docs/prd.md` → create folder `docs/prd/`
73
-
74
- 2. Parse and Extract Sections
75
-
76
- CRITICAL AEGNT SHARDING RULES:
77
-
78
- 1. Read the entire document content
79
- 2. Identify all level 2 sections (## headings)
80
- 3. For each level 2 section:
81
- - Extract the section heading and ALL content until the next level 2 section
82
- - Include all subsections, code blocks, diagrams, lists, tables, etc.
83
- - Be extremely careful with:
84
- - Fenced code blocks (```) - ensure you capture the full block including closing backticks and account for potential misleading level 2's that are actually part of a fenced section example
85
- - Mermaid diagrams - preserve the complete diagram syntax
86
- - Nested markdown elements
87
- - Multi-line content that might contain ## inside code blocks
88
-
89
- CRITICAL: Use proper parsing that understands markdown context. A ## inside a code block is NOT a section header.]]
90
-
91
- ### 3. Create Individual Files
92
-
93
- For each extracted section:
94
-
95
- 1. **Generate filename**: Convert the section heading to lowercase-dash-case
96
- - Remove special characters
97
- - Replace spaces with dashes
98
- - Example: "## Tech Stack" → `tech-stack.md`
99
-
100
- 2. **Adjust heading levels**:
101
- - The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
102
- - All subsection levels decrease by 1:
103
-
104
- ```txt
105
- - ### → ##
106
- - #### → ###
107
- - ##### → ####
108
- - etc.
109
- ```
110
-
111
- 3. **Write content**: Save the adjusted content to the new file
112
-
113
- ### 4. Create Index File
114
-
115
- Create an `index.md` file in the sharded folder that:
116
-
117
- 1. Contains the original level 1 heading and any content before the first level 2 section
118
- 2. Lists all the sharded files with links:
119
-
120
- ```markdown
121
- # Original Document Title
122
-
123
- [Original introduction content if any]
124
-
125
- ## Sections
126
-
127
- - [Section Name 1](./section-name-1.md)
128
- - [Section Name 2](./section-name-2.md)
129
- - [Section Name 3](./section-name-3.md)
130
- ...
131
- ```
132
-
133
- ### 5. Preserve Special Content
134
-
135
- 1. **Code blocks**: Must capture complete blocks including:
136
-
137
- ```language
138
- content
139
- ```
140
-
141
- 2. **Mermaid diagrams**: Preserve complete syntax:
142
-
143
- ```mermaid
144
- graph TD
145
- ...
146
- ```
147
-
148
- 3. **Tables**: Maintain proper markdown table formatting
149
-
150
- 4. **Lists**: Preserve indentation and nesting
151
-
152
- 5. **Inline code**: Preserve backticks
153
-
154
- 6. **Links and references**: Keep all markdown links intact
155
-
156
- 7. **Template markup**: If documents contain {{placeholders}} ,preserve exactly
157
-
158
- ### 6. Validation
159
-
160
- After sharding:
161
-
162
- 1. Verify all sections were extracted
163
- 2. Check that no content was lost
164
- 3. Ensure heading levels were properly adjusted
165
- 4. Confirm all files were created successfully
166
-
167
- ### 7. Report Results
168
-
169
- Provide a summary:
170
-
171
- ```text
172
- Document sharded successfully:
173
- - Source: [original document path]
174
- - Destination: docs/[folder-name]/
175
- - Files created: [count]
176
- - Sections:
177
- - section-name-1.md: "Section Title 1"
178
- - section-name-2.md: "Section Title 2"
179
- ...
180
- ```
181
-
182
- ## Important Notes
183
-
184
- - Never modify the actual content, only adjust heading levels
185
- - Preserve ALL formatting, including whitespace where significant
186
- - Handle edge cases like sections with code blocks containing ## symbols
187
- - Ensure the sharding is reversible (could reconstruct the original from shards)
@@ -1,176 +0,0 @@
1
- <!-- Powered by BMAD™ Core -->
2
-
3
- # test-design
4
-
5
- Create comprehensive test scenarios with appropriate test level recommendations for story implementation.
6
-
7
- ## Inputs
8
-
9
- ```yaml
10
- required:
11
- - story_id: '{epic}.{story}' # e.g., "1.3"
12
- - story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
13
- - story_title: '{title}' # If missing, derive from story file H1
14
- - story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
15
- ```
16
-
17
- ## Purpose
18
-
19
- 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.
20
-
21
- ## Dependencies
22
-
23
- ```yaml
24
- data:
25
- - test-levels-framework.md # Unit/Integration/E2E decision criteria
26
- - test-priorities-matrix.md # P0/P1/P2/P3 classification system
27
- ```
28
-
29
- ## Process
30
-
31
- ### 1. Analyze Story Requirements
32
-
33
- Break down each acceptance criterion into testable scenarios. For each AC:
34
-
35
- - Identify the core functionality to test
36
- - Determine data variations needed
37
- - Consider error conditions
38
- - Note edge cases
39
-
40
- ### 2. Apply Test Level Framework
41
-
42
- **Reference:** Load `test-levels-framework.md` for detailed criteria
43
-
44
- Quick rules:
45
-
46
- - **Unit**: Pure logic, algorithms, calculations
47
- - **Integration**: Component interactions, DB operations
48
- - **E2E**: Critical user journeys, compliance
49
-
50
- ### 3. Assign Priorities
51
-
52
- **Reference:** Load `test-priorities-matrix.md` for classification
53
-
54
- Quick priority assignment:
55
-
56
- - **P0**: Revenue-critical, security, compliance
57
- - **P1**: Core user journeys, frequently used
58
- - **P2**: Secondary features, admin functions
59
- - **P3**: Nice-to-have, rarely used
60
-
61
- ### 4. Design Test Scenarios
62
-
63
- For each identified test need, create:
64
-
65
- ```yaml
66
- test_scenario:
67
- id: '{epic}.{story}-{LEVEL}-{SEQ}'
68
- requirement: 'AC reference'
69
- priority: P0|P1|P2|P3
70
- level: unit|integration|e2e
71
- description: 'What is being tested'
72
- justification: 'Why this level was chosen'
73
- mitigates_risks: ['RISK-001'] # If risk profile exists
74
- ```
75
-
76
- ### 5. Validate Coverage
77
-
78
- Ensure:
79
-
80
- - Every AC has at least one test
81
- - No duplicate coverage across levels
82
- - Critical paths have multiple levels
83
- - Risk mitigations are addressed
84
-
85
- ## Outputs
86
-
87
- ### Output 1: Test Design Document
88
-
89
- **Save to:** `qa.qaLocation/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md`
90
-
91
- ```markdown
92
- # Test Design: Story {epic}.{story}
93
-
94
- Date: {date}
95
- Designer: Quinn (Test Architect)
96
-
97
- ## Test Strategy Overview
98
-
99
- - Total test scenarios: X
100
- - Unit tests: Y (A%)
101
- - Integration tests: Z (B%)
102
- - E2E tests: W (C%)
103
- - Priority distribution: P0: X, P1: Y, P2: Z
104
-
105
- ## Test Scenarios by Acceptance Criteria
106
-
107
- ### AC1: {description}
108
-
109
- #### Scenarios
110
-
111
- | ID | Level | Priority | Test | Justification |
112
- | ------------ | ----------- | -------- | ------------------------- | ------------------------ |
113
- | 1.3-UNIT-001 | Unit | P0 | Validate input format | Pure validation logic |
114
- | 1.3-INT-001 | Integration | P0 | Service processes request | Multi-component flow |
115
- | 1.3-E2E-001 | E2E | P1 | User completes journey | Critical path validation |
116
-
117
- [Continue for all ACs...]
118
-
119
- ## Risk Coverage
120
-
121
- [Map test scenarios to identified risks if risk profile exists]
122
-
123
- ## Recommended Execution Order
124
-
125
- 1. P0 Unit tests (fail fast)
126
- 2. P0 Integration tests
127
- 3. P0 E2E tests
128
- 4. P1 tests in order
129
- 5. P2+ as time permits
130
- ```
131
-
132
- ### Output 2: Gate YAML Block
133
-
134
- Generate for inclusion in quality gate:
135
-
136
- ```yaml
137
- test_design:
138
- scenarios_total: X
139
- by_level:
140
- unit: Y
141
- integration: Z
142
- e2e: W
143
- by_priority:
144
- p0: A
145
- p1: B
146
- p2: C
147
- coverage_gaps: [] # List any ACs without tests
148
- ```
149
-
150
- ### Output 3: Trace References
151
-
152
- Print for use by trace-requirements task:
153
-
154
- ```text
155
- Test design matrix: qa.qaLocation/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
156
- P0 tests identified: {count}
157
- ```
158
-
159
- ## Quality Checklist
160
-
161
- Before finalizing, verify:
162
-
163
- - [ ] Every AC has test coverage
164
- - [ ] Test levels are appropriate (not over-testing)
165
- - [ ] No duplicate coverage across levels
166
- - [ ] Priorities align with business risk
167
- - [ ] Test IDs follow naming convention
168
- - [ ] Scenarios are atomic and independent
169
-
170
- ## Key Principles
171
-
172
- - **Shift left**: Prefer unit over integration, integration over E2E
173
- - **Risk-based**: Focus on what could go wrong
174
- - **Efficient coverage**: Test once at the right level
175
- - **Maintainability**: Consider long-term test maintenance
176
- - **Fast feedback**: Quick tests run first
@@ -1,266 +0,0 @@
1
- <!-- Powered by BMAD™ Core -->
2
-
3
- # trace-requirements
4
-
5
- Map story requirements to test cases using Given-When-Then patterns for comprehensive traceability.
6
-
7
- ## Purpose
8
-
9
- Create a requirements traceability matrix that ensures every acceptance criterion has corresponding test coverage. This task helps identify gaps in testing and ensures all requirements are validated.
10
-
11
- **IMPORTANT**: Given-When-Then is used here for documenting the mapping between requirements and tests, NOT for writing the actual test code. Tests should follow your project's testing standards (no BDD syntax in test code).
12
-
13
- ## Prerequisites
14
-
15
- - Story file with clear acceptance criteria
16
- - Access to test files or test specifications
17
- - Understanding of the implementation
18
-
19
- ## Traceability Process
20
-
21
- ### 1. Extract Requirements
22
-
23
- Identify all testable requirements from:
24
-
25
- - Acceptance Criteria (primary source)
26
- - User story statement
27
- - Tasks/subtasks with specific behaviors
28
- - Non-functional requirements mentioned
29
- - Edge cases documented
30
-
31
- ### 2. Map to Test Cases
32
-
33
- For each requirement, document which tests validate it. Use Given-When-Then to describe what the test validates (not how it's written):
34
-
35
- ```yaml
36
- requirement: 'AC1: User can login with valid credentials'
37
- test_mappings:
38
- - test_file: 'auth/login.test.ts'
39
- test_case: 'should successfully login with valid email and password'
40
- # Given-When-Then describes WHAT the test validates, not HOW it's coded
41
- given: 'A registered user with valid credentials'
42
- when: 'They submit the login form'
43
- then: 'They are redirected to dashboard and session is created'
44
- coverage: full
45
-
46
- - test_file: 'e2e/auth-flow.test.ts'
47
- test_case: 'complete login flow'
48
- given: 'User on login page'
49
- when: 'Entering valid credentials and submitting'
50
- then: 'Dashboard loads with user data'
51
- coverage: integration
52
- ```
53
-
54
- ### 3. Coverage Analysis
55
-
56
- Evaluate coverage for each requirement:
57
-
58
- **Coverage Levels:**
59
-
60
- - `full`: Requirement completely tested
61
- - `partial`: Some aspects tested, gaps exist
62
- - `none`: No test coverage found
63
- - `integration`: Covered in integration/e2e tests only
64
- - `unit`: Covered in unit tests only
65
-
66
- ### 4. Gap Identification
67
-
68
- Document any gaps found:
69
-
70
- ```yaml
71
- coverage_gaps:
72
- - requirement: 'AC3: Password reset email sent within 60 seconds'
73
- gap: 'No test for email delivery timing'
74
- severity: medium
75
- suggested_test:
76
- type: integration
77
- description: 'Test email service SLA compliance'
78
-
79
- - requirement: 'AC5: Support 1000 concurrent users'
80
- gap: 'No load testing implemented'
81
- severity: high
82
- suggested_test:
83
- type: performance
84
- description: 'Load test with 1000 concurrent connections'
85
- ```
86
-
87
- ## Outputs
88
-
89
- ### Output 1: Gate YAML Block
90
-
91
- **Generate for pasting into gate file under `trace`:**
92
-
93
- ```yaml
94
- trace:
95
- totals:
96
- requirements: X
97
- full: Y
98
- partial: Z
99
- none: W
100
- planning_ref: 'qa.qaLocation/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md'
101
- uncovered:
102
- - ac: 'AC3'
103
- reason: 'No test found for password reset timing'
104
- notes: 'See qa.qaLocation/assessments/{epic}.{story}-trace-{YYYYMMDD}.md'
105
- ```
106
-
107
- ### Output 2: Traceability Report
108
-
109
- **Save to:** `qa.qaLocation/assessments/{epic}.{story}-trace-{YYYYMMDD}.md`
110
-
111
- Create a traceability report with:
112
-
113
- ```markdown
114
- # Requirements Traceability Matrix
115
-
116
- ## Story: {epic}.{story} - {title}
117
-
118
- ### Coverage Summary
119
-
120
- - Total Requirements: X
121
- - Fully Covered: Y (Z%)
122
- - Partially Covered: A (B%)
123
- - Not Covered: C (D%)
124
-
125
- ### Requirement Mappings
126
-
127
- #### AC1: {Acceptance Criterion 1}
128
-
129
- **Coverage: FULL**
130
-
131
- Given-When-Then Mappings:
132
-
133
- - **Unit Test**: `auth.service.test.ts::validateCredentials`
134
- - Given: Valid user credentials
135
- - When: Validation method called
136
- - Then: Returns true with user object
137
-
138
- - **Integration Test**: `auth.integration.test.ts::loginFlow`
139
- - Given: User with valid account
140
- - When: Login API called
141
- - Then: JWT token returned and session created
142
-
143
- #### AC2: {Acceptance Criterion 2}
144
-
145
- **Coverage: PARTIAL**
146
-
147
- [Continue for all ACs...]
148
-
149
- ### Critical Gaps
150
-
151
- 1. **Performance Requirements**
152
- - Gap: No load testing for concurrent users
153
- - Risk: High - Could fail under production load
154
- - Action: Implement load tests using k6 or similar
155
-
156
- 2. **Security Requirements**
157
- - Gap: Rate limiting not tested
158
- - Risk: Medium - Potential DoS vulnerability
159
- - Action: Add rate limit tests to integration suite
160
-
161
- ### Test Design Recommendations
162
-
163
- Based on gaps identified, recommend:
164
-
165
- 1. Additional test scenarios needed
166
- 2. Test types to implement (unit/integration/e2e/performance)
167
- 3. Test data requirements
168
- 4. Mock/stub strategies
169
-
170
- ### Risk Assessment
171
-
172
- - **High Risk**: Requirements with no coverage
173
- - **Medium Risk**: Requirements with only partial coverage
174
- - **Low Risk**: Requirements with full unit + integration coverage
175
- ```
176
-
177
- ## Traceability Best Practices
178
-
179
- ### Given-When-Then for Mapping (Not Test Code)
180
-
181
- Use Given-When-Then to document what each test validates:
182
-
183
- **Given**: The initial context the test sets up
184
-
185
- - What state/data the test prepares
186
- - User context being simulated
187
- - System preconditions
188
-
189
- **When**: The action the test performs
190
-
191
- - What the test executes
192
- - API calls or user actions tested
193
- - Events triggered
194
-
195
- **Then**: What the test asserts
196
-
197
- - Expected outcomes verified
198
- - State changes checked
199
- - Values validated
200
-
201
- **Note**: This is for documentation only. Actual test code follows your project's standards (e.g., describe/it blocks, no BDD syntax).
202
-
203
- ### Coverage Priority
204
-
205
- Prioritize coverage based on:
206
-
207
- 1. Critical business flows
208
- 2. Security-related requirements
209
- 3. Data integrity requirements
210
- 4. User-facing features
211
- 5. Performance SLAs
212
-
213
- ### Test Granularity
214
-
215
- Map at appropriate levels:
216
-
217
- - Unit tests for business logic
218
- - Integration tests for component interaction
219
- - E2E tests for user journeys
220
- - Performance tests for NFRs
221
-
222
- ## Quality Indicators
223
-
224
- Good traceability shows:
225
-
226
- - Every AC has at least one test
227
- - Critical paths have multiple test levels
228
- - Edge cases are explicitly covered
229
- - NFRs have appropriate test types
230
- - Clear Given-When-Then for each test
231
-
232
- ## Red Flags
233
-
234
- Watch for:
235
-
236
- - ACs with no test coverage
237
- - Tests that don't map to requirements
238
- - Vague test descriptions
239
- - Missing edge case coverage
240
- - NFRs without specific tests
241
-
242
- ## Integration with Gates
243
-
244
- This traceability feeds into quality gates:
245
-
246
- - Critical gaps → FAIL
247
- - Minor gaps → CONCERNS
248
- - Missing P0 tests from test-design → CONCERNS
249
-
250
- ### Output 3: Story Hook Line
251
-
252
- **Print this line for review task to quote:**
253
-
254
- ```text
255
- Trace matrix: qa.qaLocation/assessments/{epic}.{story}-trace-{YYYYMMDD}.md
256
- ```
257
-
258
- - Full coverage → PASS contribution
259
-
260
- ## Key Principles
261
-
262
- - Every requirement must be testable
263
- - Use Given-When-Then for clarity
264
- - Identify both presence and absence
265
- - Prioritize based on risk
266
- - Make recommendations actionable