@torus-engineering/tas-kit 1.14.0 → 2.1.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.
- package/.tas/_platform/claude-code/settings.json +58 -46
- package/.tas/_platform/hooks/code-quality.js +127 -127
- package/.tas/_platform/hooks/session-end.js +111 -111
- package/.tas/agents/architect.md +53 -53
- package/.tas/agents/aws-reviewer.md +71 -71
- package/.tas/agents/build-resolver.md +89 -59
- package/.tas/agents/code-explorer.md +63 -63
- package/.tas/agents/csharp-reviewer.md +62 -62
- package/.tas/agents/database-reviewer.md +73 -73
- package/.tas/agents/doc-updater.md +68 -66
- package/.tas/agents/python-reviewer.md +67 -67
- package/.tas/agents/security-reviewer.md +79 -79
- package/.tas/agents/software-engineer.md +53 -0
- package/.tas/agents/typescript-reviewer.md +65 -65
- package/.tas/commands/ado-create.md +33 -28
- package/.tas/commands/ado-delete.md +26 -22
- package/.tas/commands/ado-get.md +24 -20
- package/.tas/commands/ado-status.md +22 -18
- package/.tas/commands/ado-update.md +31 -27
- package/.tas/commands/tas-adr.md +37 -33
- package/.tas/commands/tas-apitest-plan.md +177 -173
- package/.tas/commands/tas-apitest.md +147 -143
- package/.tas/commands/tas-brainstorm.md +23 -19
- package/.tas/commands/tas-brd.md +50 -0
- package/.tas/commands/tas-bug.md +127 -113
- package/.tas/commands/tas-checklist.md +180 -0
- package/.tas/commands/tas-debug.md +103 -0
- package/.tas/commands/tas-design.md +41 -37
- package/.tas/commands/tas-dev.md +225 -125
- package/.tas/commands/tas-e2e-mobile.md +146 -155
- package/.tas/commands/tas-e2e-web.md +150 -163
- package/.tas/commands/tas-e2e.md +289 -102
- package/.tas/commands/tas-feature.md +181 -47
- package/.tas/commands/tas-fix.md +72 -51
- package/.tas/commands/tas-functest-mobile.md +138 -144
- package/.tas/commands/tas-functest-web.md +176 -192
- package/.tas/commands/tas-functest.md +225 -76
- package/.tas/commands/tas-init.md +22 -17
- package/.tas/commands/tas-master-plan.md +300 -0
- package/.tas/commands/tas-orchestrate.md +159 -0
- package/.tas/commands/tas-plan.md +152 -117
- package/.tas/commands/tas-prd.md +57 -37
- package/.tas/commands/tas-review-pr.md +174 -0
- package/.tas/commands/tas-review.md +115 -113
- package/.tas/commands/tas-sad.md +47 -43
- package/.tas/commands/tas-security.md +91 -87
- package/.tas/commands/tas-spec.md +54 -50
- package/.tas/commands/tas-status.md +25 -16
- package/.tas/project-status-example.yaml +3 -1
- package/.tas/rules/ado-integration.md +67 -65
- package/.tas/rules/common/api-design.md +517 -517
- package/.tas/rules/common/build-debug-loop.md +233 -0
- package/.tas/rules/common/code-review.md +4 -0
- package/.tas/rules/common/feature-done.md +42 -0
- package/.tas/rules/common/post-implementation-review.md +4 -0
- package/.tas/rules/common/project-status.md +33 -16
- package/.tas/rules/common/sad-impact.md +81 -0
- package/.tas/rules/common/tdd.md +104 -89
- package/.tas/rules/csharp/api-testing.md +2 -2
- package/.tas/rules/csharp/torus-core-framework.md +128 -0
- package/.tas/tas-example.yaml +9 -32
- package/.tas/templates/AGENTS.md +13 -0
- package/.tas/templates/API-Test-Spec.md +5 -4
- package/.tas/templates/BRD.md +133 -0
- package/.tas/templates/Bug.md +15 -0
- package/.tas/templates/E2E-Execution-Report.md +8 -8
- package/.tas/templates/E2E-Mobile-Spec.md +6 -8
- package/.tas/templates/E2E-Report.md +2 -2
- package/.tas/templates/E2E-Scenario.md +22 -22
- package/.tas/templates/E2E-Test-Spec.md +274 -0
- package/.tas/templates/E2E-Web-Spec.md +4 -4
- package/.tas/templates/Feature-Technical-Part.md +69 -0
- package/.tas/templates/Feature-Technical-Stack.md +74 -0
- package/.tas/templates/Feature-Technical.md +329 -0
- package/.tas/templates/Feature.md +50 -26
- package/.tas/templates/Func-Test-Script.md +29 -56
- package/.tas/templates/Func-Test-Spec.md +144 -142
- package/.tas/templates/PRD.md +173 -142
- package/.tas/templates/TestChecklist.md +96 -0
- package/.tas/templates/torus-dotnet-bootstrap.md +223 -0
- package/.tas/tools/tas-ado-readme.md +24 -27
- package/.tas/tools/tas-ado.py +328 -25
- package/.tas/tools/tas-github.py +339 -0
- package/README.md +131 -54
- package/bin/cli.js +90 -90
- package/lib/adapters/antigravity.js +131 -131
- package/lib/adapters/claude-code.js +71 -35
- package/lib/adapters/codex.js +157 -157
- package/lib/adapters/cursor.js +80 -80
- package/lib/adapters/index.js +20 -20
- package/lib/adapters/utils.js +81 -81
- package/lib/deleted-files.json +7 -0
- package/lib/install.js +546 -546
- package/package.json +1 -1
- package/.tas/commands/tas-epic.md +0 -35
- package/.tas/commands/tas-story.md +0 -91
- package/.tas/rules/common/story-done.md +0 -30
- package/.tas/templates/Epic.md +0 -46
- package/.tas/templates/Story.md +0 -90
package/.tas/commands/tas-e2e.md
CHANGED
|
@@ -1,102 +1,289 @@
|
|
|
1
|
-
# /tas-e2e $
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
1
|
+
# /tas-e2e $FEATURE_IDS $FLOW_DESCRIPTION
|
|
2
|
+
|
|
3
|
+
You are a Senior QA Engineer creating End-to-End (E2E) Test Specifications by combining multiple Functional Test Specifications into complete user journey workflows.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Generate E2E test scenarios that validate complete user journeys across multiple features, simulating real-world workflows and validating integration points between systems.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- Run after Functional Test Specifications are complete
|
|
12
|
+
- Run when you need to validate cross-feature workflows
|
|
13
|
+
- Run before implementing E2E automation
|
|
14
|
+
- Run when critical user journeys need validation
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
1. One or more Functional Test Specifications exist (`*-FuncTest-Spec.md`)
|
|
19
|
+
2. Feature documents exist for context
|
|
20
|
+
3. Template exists at `.tas/templates/E2E-Test-Spec.md`
|
|
21
|
+
4. `tas.yaml` exists at project root
|
|
22
|
+
|
|
23
|
+
## Step-by-Step Actions
|
|
24
|
+
|
|
25
|
+
### Step 1: Determine Input Scope
|
|
26
|
+
|
|
27
|
+
**Input options:**
|
|
28
|
+
1. **$FEATURE_IDS** (comma-separated): E.g., "Feature-001,Feature-005,Feature-012"
|
|
29
|
+
- Generate E2E scenarios chaining these specific features
|
|
30
|
+
|
|
31
|
+
2. **$FLOW_DESCRIPTION** (text): E.g., "complete purchase journey from browse to payment"
|
|
32
|
+
- Search features that match this flow
|
|
33
|
+
- Generate scenarios based on the described workflow
|
|
34
|
+
|
|
35
|
+
3. **No arguments:**
|
|
36
|
+
- Scan directory for `*-FuncTest-Spec.md` files
|
|
37
|
+
- Group features by business domain
|
|
38
|
+
- Ask user to select features for the E2E flow
|
|
39
|
+
|
|
40
|
+
### Step 2: Gather Context Documents
|
|
41
|
+
|
|
42
|
+
For each feature in the flow:
|
|
43
|
+
|
|
44
|
+
1. **Read Feature Document:**
|
|
45
|
+
- File: `*-Feature-*.md`
|
|
46
|
+
- Extract: Feature ID, Feature Name, Epic ID, Acceptance Criteria
|
|
47
|
+
|
|
48
|
+
2. **Read Functional Test Spec:**
|
|
49
|
+
- File: `*-FuncTest-Spec.md`
|
|
50
|
+
- Extract: All test cases, TC IDs, test types, priorities
|
|
51
|
+
- Note which test cases are automatable (Autoable=Yes)
|
|
52
|
+
|
|
53
|
+
3. **Identify User Journey:**
|
|
54
|
+
- Determine the logical flow between features
|
|
55
|
+
- Identify entry point (where user starts)
|
|
56
|
+
- Identify exit point (where user ends)
|
|
57
|
+
- Map touchpoints between features
|
|
58
|
+
|
|
59
|
+
### Step 3: Read Template
|
|
60
|
+
|
|
61
|
+
Read `.tas/templates/E2E-Test-Spec.md` to understand structure.
|
|
62
|
+
|
|
63
|
+
### Step 4: Design E2E Scenarios
|
|
64
|
+
|
|
65
|
+
#### A. Identify User Personas
|
|
66
|
+
Determine who performs this journey:
|
|
67
|
+
- Customer/User
|
|
68
|
+
- Admin/Staff
|
|
69
|
+
- Partner/External
|
|
70
|
+
- Multiple personas (complex flows)
|
|
71
|
+
|
|
72
|
+
#### B. Map Functional TCs to E2E Steps
|
|
73
|
+
|
|
74
|
+
For each logical step in the user journey:
|
|
75
|
+
1. Find corresponding Functional Test Cases
|
|
76
|
+
2. Group related TCs into E2E steps
|
|
77
|
+
3. Identify integration points between steps
|
|
78
|
+
4. Note data flow dependencies
|
|
79
|
+
|
|
80
|
+
**Mapping example:**
|
|
81
|
+
```
|
|
82
|
+
E2E Step 1: Browse Products
|
|
83
|
+
└─ Uses: Feature-001 → FT-001_H, FT-002_H
|
|
84
|
+
|
|
85
|
+
E2E Step 2: Add to Cart
|
|
86
|
+
└─ Uses: Feature-001 → FT-005_H, FT-006_N
|
|
87
|
+
|
|
88
|
+
E2E Step 3: Checkout
|
|
89
|
+
└─ Uses: Feature-002 → FT-010_H, FT-012_H
|
|
90
|
+
|
|
91
|
+
E2E Step 4: Payment
|
|
92
|
+
└─ Uses: Feature-003 → FT-020_H, FT-025_NEG
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### C. Generate E2E Test Scenarios
|
|
96
|
+
|
|
97
|
+
Create 4 types of E2E scenarios:
|
|
98
|
+
|
|
99
|
+
**1. Happy Path (HP):**
|
|
100
|
+
- Main user journey from start to finish
|
|
101
|
+
- All steps succeed
|
|
102
|
+
- Primary business value achieved
|
|
103
|
+
- At least 1 per flow (P0)
|
|
104
|
+
|
|
105
|
+
**2. Negative Flows (NEG):**
|
|
106
|
+
- Error scenarios at integration points
|
|
107
|
+
- System failures (payment gateway, email service)
|
|
108
|
+
- Invalid data handling
|
|
109
|
+
- User errors and recovery
|
|
110
|
+
|
|
111
|
+
**3. Edge Cases (EDGE):**
|
|
112
|
+
- Boundary conditions
|
|
113
|
+
- Concurrent operations
|
|
114
|
+
- Large data volumes
|
|
115
|
+
- Unusual but valid scenarios
|
|
116
|
+
|
|
117
|
+
**4. Performance Flows (PERF):**
|
|
118
|
+
- Load testing scenarios
|
|
119
|
+
- Response time validation
|
|
120
|
+
- Concurrent user simulation
|
|
121
|
+
|
|
122
|
+
### Step 5: Fill Template Sections
|
|
123
|
+
|
|
124
|
+
#### Frontmatter:
|
|
125
|
+
```yaml
|
|
126
|
+
created_date: {YYYY-MM-DD}
|
|
127
|
+
updated_date: {YYYY-MM-DD}
|
|
128
|
+
executor: {User or placeholder}
|
|
129
|
+
reviewer: {Placeholder}
|
|
130
|
+
status: Draft
|
|
131
|
+
epic_id: {From features}
|
|
132
|
+
feature_ids: [Feature-001, Feature-002, ...]
|
|
133
|
+
scenario_id: {E2E_001, E2E_002, ...}
|
|
134
|
+
platform: {web | mobile | backend | cross-stack}
|
|
135
|
+
tags: [e2e, {flow_name}]
|
|
136
|
+
ver: 1.0
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### Section 1: Scenario Overview
|
|
140
|
+
- Scenario Name: {Business Flow Name}
|
|
141
|
+
- Business Value: Why this flow matters
|
|
142
|
+
- User Persona: Who performs it
|
|
143
|
+
- Entry/Exit Points
|
|
144
|
+
- Success Criteria
|
|
145
|
+
|
|
146
|
+
#### Section 2: Integrated Systems
|
|
147
|
+
- List all systems involved
|
|
148
|
+
- Integration types
|
|
149
|
+
- Failure impacts
|
|
150
|
+
- Prerequisites
|
|
151
|
+
|
|
152
|
+
#### Section 3: Functional TC Mapping
|
|
153
|
+
- Map E2E steps to Functional TCs
|
|
154
|
+
- Show traceability
|
|
155
|
+
|
|
156
|
+
#### Section 4: E2E Test Scenarios
|
|
157
|
+
Generate detailed tables for:
|
|
158
|
+
- 4.1 Happy Path E2E Scenarios
|
|
159
|
+
- 4.2 Negative Flow E2E Scenarios
|
|
160
|
+
- 4.3 Edge Case E2E Scenarios
|
|
161
|
+
- 4.4 Performance E2E Scenarios
|
|
162
|
+
|
|
163
|
+
**Each E2E scenario includes:**
|
|
164
|
+
- E2E Case ID: `{PROJECT}_E2E_{SCENARIO_ID}_{TYPE}_{NUMBER}`
|
|
165
|
+
- User Persona
|
|
166
|
+
- Business Flow
|
|
167
|
+
- Pre-Conditions
|
|
168
|
+
- Cross-Functional Steps (with system/module labels)
|
|
169
|
+
- Expected Final State
|
|
170
|
+
- Priority (P0/P1/P2)
|
|
171
|
+
- Autoable (Yes/None)
|
|
172
|
+
- Traceability to Functional TCs
|
|
173
|
+
|
|
174
|
+
#### Section 5: Data Flow Validation
|
|
175
|
+
- Critical data points to verify
|
|
176
|
+
- Source systems
|
|
177
|
+
- Expected values
|
|
178
|
+
- Verification methods (SQL queries, API calls)
|
|
179
|
+
|
|
180
|
+
#### Section 6: Integration Points
|
|
181
|
+
- Critical checkpoints between systems
|
|
182
|
+
- Test methods
|
|
183
|
+
- Success criteria
|
|
184
|
+
- Failure handling
|
|
185
|
+
|
|
186
|
+
#### Section 7: Platform Matrix
|
|
187
|
+
- Browsers, devices, versions
|
|
188
|
+
- Required vs optional
|
|
189
|
+
|
|
190
|
+
#### Section 8: Success Criteria
|
|
191
|
+
- Must Have (P0)
|
|
192
|
+
- Should Have (P1)
|
|
193
|
+
- Nice to Have (P2)
|
|
194
|
+
|
|
195
|
+
#### Section 9: Risk Matrix
|
|
196
|
+
- Integration risks
|
|
197
|
+
- Mitigation strategies
|
|
198
|
+
- Owners
|
|
199
|
+
|
|
200
|
+
#### Section 10: Automation Strategy
|
|
201
|
+
- Framework recommendations
|
|
202
|
+
- Execution commands
|
|
203
|
+
- CI/CD integration
|
|
204
|
+
|
|
205
|
+
#### Section 11: Coverage Summary
|
|
206
|
+
- Feature coverage
|
|
207
|
+
- Scenario breakdown
|
|
208
|
+
- Automatable vs manual
|
|
209
|
+
|
|
210
|
+
### Step 6: Write Output File
|
|
211
|
+
|
|
212
|
+
Create file: `{Scenario_ID}-E2E-Test-Spec.md`
|
|
213
|
+
|
|
214
|
+
**Location options:**
|
|
215
|
+
1. In `docs/e2e-scenarios/` (create if missing)
|
|
216
|
+
2. In feature directory if single-feature E2E
|
|
217
|
+
3. In project root if cross-project
|
|
218
|
+
|
|
219
|
+
### Step 7: Output Summary
|
|
220
|
+
|
|
221
|
+
Report to user:
|
|
222
|
+
```
|
|
223
|
+
✓ E2E Test Spec created: {filename}
|
|
224
|
+
|
|
225
|
+
Scope:
|
|
226
|
+
├─ Features Linked: {count}
|
|
227
|
+
│ └─ {Feature-001}, {Feature-002}, ...
|
|
228
|
+
├─ Epic: {Epic_ID}
|
|
229
|
+
└─ Scenario: {Scenario_ID}
|
|
230
|
+
|
|
231
|
+
Scenarios Generated:
|
|
232
|
+
├─ Total E2E Scenarios: {count}
|
|
233
|
+
│ ├─ Happy Path: {count}
|
|
234
|
+
│ ├─ Negative Flows: {count}
|
|
235
|
+
│ ├─ Edge Cases: {count}
|
|
236
|
+
│ └─ Performance: {count}
|
|
237
|
+
|
|
238
|
+
Integration Points:
|
|
239
|
+
├─ Systems Involved: {count}
|
|
240
|
+
├─ External APIs: {count}
|
|
241
|
+
└─ Data Validations: {count}
|
|
242
|
+
|
|
243
|
+
Automation Readiness:
|
|
244
|
+
├─ Automatable: {count} ({percent}%)
|
|
245
|
+
└─ Manual Only: {count} ({percent}%)
|
|
246
|
+
|
|
247
|
+
Next Steps:
|
|
248
|
+
1. Review E2E scenarios with stakeholders
|
|
249
|
+
2. Verify integration test data setup
|
|
250
|
+
3. Implement E2E automation using {framework}
|
|
251
|
+
4. Schedule E2E runs in CI/CD pipeline
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Important Notes
|
|
255
|
+
|
|
256
|
+
1. **E2E ≠ Functional:** E2E tests complete workflows, not single features
|
|
257
|
+
2. **Traceability:** Each E2E step should reference Functional TCs
|
|
258
|
+
3. **Integration Focus:** Emphasize system boundaries and data flow
|
|
259
|
+
4. **Real User Journeys:** Simulate actual user behavior, not artificial flows
|
|
260
|
+
5. **Automation First:** Most E2E scenarios should be automatable
|
|
261
|
+
6. **Environment Matters:** E2E requires production-like staging environment
|
|
262
|
+
|
|
263
|
+
## Best Practices
|
|
264
|
+
|
|
265
|
+
1. **Start with Happy Path:** Ensure main flow works before testing edge cases
|
|
266
|
+
2. **Think Like a User:** What would a real user actually do?
|
|
267
|
+
3. **Validate Data:** Don't just check UI - verify database state
|
|
268
|
+
4. **Test Integrations:** Pay special attention to third-party systems
|
|
269
|
+
5. **Handle Failures:** Test what happens when systems fail
|
|
270
|
+
6. **Performance Matters:** E2E flows should meet SLA requirements
|
|
271
|
+
|
|
272
|
+
## Error Handling
|
|
273
|
+
|
|
274
|
+
- No Functional Specs found: "No FuncTest-Spec.md files found. Run /tas-functest first."
|
|
275
|
+
- Features don't form logical flow: "Warning: Features may not form a coherent workflow. Continue anyway?"
|
|
276
|
+
- Template missing: "Error: E2E-Test-Spec.md template not found in .tas/templates/"
|
|
277
|
+
- No integration points identified: "Warning: No integration points found. This may be a single-feature E2E."
|
|
278
|
+
|
|
279
|
+
## Difference from Functional Tests
|
|
280
|
+
|
|
281
|
+
| Aspect | Functional Tests | E2E Tests |
|
|
282
|
+
|--------|-----------------|-----------|
|
|
283
|
+
| Scope | Single feature | Multiple features |
|
|
284
|
+
| Focus | Feature logic | User journey |
|
|
285
|
+
| Data | Isolated | Shared across steps |
|
|
286
|
+
| Systems | One module | Multiple systems |
|
|
287
|
+
| Duration | Fast | Slower |
|
|
288
|
+
| Maintenance | Lower | Higher |
|
|
289
|
+
| Priority | P0-P2 | P0 (critical flows) |
|
|
@@ -1,47 +1,181 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
---
|
|
2
|
+
model: sonnet
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tas-feature $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Role: PE - Product Engineer
|
|
8
|
+
Create or update a Feature document. Feature is the **only** unit of business work in TAS — Epic and Story are removed.
|
|
9
|
+
|
|
10
|
+
**Scope:** Business logic, AC, NFR.
|
|
11
|
+
**Out of scope:** Technical implementation, file changes, ERD, ADR — that's `/tas-plan`'s job (writes `Feature-{NNN}-Technical.md`).
|
|
12
|
+
|
|
13
|
+
## Always / Ask / Never
|
|
14
|
+
|
|
15
|
+
| | Action |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **Always** | Write AC in Given/When/Then format |
|
|
18
|
+
| **Always** | Set `plan_status: pending` for new Feature |
|
|
19
|
+
| **Always** | Read PRD + SAD before proposing Features |
|
|
20
|
+
| **Always** | Infer stacks from SAD architecture — do NOT ask user to specify stacks |
|
|
21
|
+
| **Always** | In ad-hoc mode: write Feature first (Gate 1), then PRD delta (Gate 2) — never show both drafts simultaneously |
|
|
22
|
+
| **Always** | In ad-hoc mode: check ADRs for conflicts before drafting |
|
|
23
|
+
| **Never** | Write Technical Plan content here |
|
|
24
|
+
| **Never** | Suggest or create ADRs — `/tas-plan` documents decisions, human approves ADRs |
|
|
25
|
+
| **Never** | Use SAD for technical analysis — read SAD only for system layers and dependency order |
|
|
26
|
+
| **Never** | Write PRD before Feature is approved in ad-hoc mode |
|
|
27
|
+
|
|
28
|
+
## Prerequisites
|
|
29
|
+
- `tas.yaml` exists at project root
|
|
30
|
+
- (Optional but preferred) `docs/prd.md` — for FR list and business context
|
|
31
|
+
- (Optional but preferred) `docs/sad.md` (or linked SAD file) — for system architecture layers and component dependency order
|
|
32
|
+
|
|
33
|
+
## Actions
|
|
34
|
+
|
|
35
|
+
### CREATE mode (`$ARGUMENTS` is new Feature description, or no `$ARGUMENTS`)
|
|
36
|
+
|
|
37
|
+
**Step 1 — Read context**
|
|
38
|
+
- Read `project.code` from root `tas.yaml`
|
|
39
|
+
- Read `docs/prd.md` if exists — extract FR list and business context per FR
|
|
40
|
+
- Read SAD if exists — extract:
|
|
41
|
+
- Which layers/stacks exist in this system (`app`, `web`, `service`, `integration` — only layers actually present)
|
|
42
|
+
- Component or layer dependencies (which components must exist before others)
|
|
43
|
+
|
|
44
|
+
**Step 1.5 — Match $ARGUMENTS against PRD (only when $ARGUMENTS is a description)**
|
|
45
|
+
|
|
46
|
+
If `$ARGUMENTS` is a description (not a Feature ID, not empty):
|
|
47
|
+
- Compare against existing FRs in PRD
|
|
48
|
+
- If **clear match found** → continue to Step 2 (normal flow for that FR)
|
|
49
|
+
- If **no match** → enter **Ad-hoc Mode** below
|
|
50
|
+
|
|
51
|
+
#### Ad-hoc Mode — New Requirement Not in PRD
|
|
52
|
+
|
|
53
|
+
Used when customer brings a requirement not covered by existing PRD FRs.
|
|
54
|
+
|
|
55
|
+
**a. Announce:**
|
|
56
|
+
> "Requirement not found in PRD. Entering ad-hoc mode — will survey, create Feature, then update PRD."
|
|
57
|
+
|
|
58
|
+
**b. Q&A — use `AskUserQuestion` tool (popup UI), split into 2 calls:**
|
|
59
|
+
|
|
60
|
+
**Popup call 1** (up to 4 questions):
|
|
61
|
+
- "What business value does this deliver? Who benefits?" — header: `Business`
|
|
62
|
+
- "Who are the actors / triggers? Any external systems?" — header: `Actors`
|
|
63
|
+
- "Key business rules or constraints?" — header: `Rules`
|
|
64
|
+
- "NFR priorities?" — header: `NFR`, `multiSelect: true`, options: Performance / Security / Compliance / Scalability / Accessibility
|
|
65
|
+
|
|
66
|
+
**Popup call 2** (after call 1 answers received):
|
|
67
|
+
- "Which stacks does this touch?" — header: `Stacks`, `multiSelect: true`, options: list only stacks found in SAD (web / service / integration / app — only those present)
|
|
68
|
+
|
|
69
|
+
Wait for all answers before proceeding to step c.
|
|
70
|
+
|
|
71
|
+
**c. ADR conflict check:**
|
|
72
|
+
Read `docs/adr/*.md` if exists. Flag any conflict:
|
|
73
|
+
> "⚠️ Conflict with ADR-XXX: [decision]. This requirement may require revisiting [constraint]."
|
|
74
|
+
|
|
75
|
+
**d. Draft Feature (in-conversation):**
|
|
76
|
+
Using PE answers + ADR check, draft full Feature content following `.tas/templates/Feature.md` structure (Description, User Story, Actor, Business Flow, Business Rules, UI/UX, NFR, AC in Given/When/Then).
|
|
77
|
+
|
|
78
|
+
**e. Gate 1 — Feature approval:**
|
|
79
|
+
> "Feature draft above OK? Approve to write file."
|
|
80
|
+
- Approved → assign next Feature ID (scan `docs/features/`), create directory + write file → **skip Steps 2–6, go to step f**
|
|
81
|
+
- Feedback → update draft, ask again
|
|
82
|
+
|
|
83
|
+
**f. Draft PRD delta (in-conversation):**
|
|
84
|
+
After Feature file written, draft PRD addition for the new FR. Default: FR title + one-line description + reference to Feature file. Show draft and note:
|
|
85
|
+
> "Default: minimal FR entry. Expand if more business context needed."
|
|
86
|
+
|
|
87
|
+
**g. Gate 2 — PRD approval:**
|
|
88
|
+
> "PRD update above OK? Approve to write."
|
|
89
|
+
- Approved → append new FR to `docs/prd.md` (in appropriate section)
|
|
90
|
+
- Feedback → update draft, ask again
|
|
91
|
+
|
|
92
|
+
**h. Proceed to Step 7** (update `project-status.yaml`)
|
|
93
|
+
|
|
94
|
+
**i. Update master plan (if exists):**
|
|
95
|
+
- Check if `docs/master-plan.md` exists
|
|
96
|
+
- If exists → invoke `/tas-master-plan AMEND` inline (follow that command's AMEND mode steps); do not end turn, wait for result before continuing
|
|
97
|
+
- If not → skip
|
|
98
|
+
|
|
99
|
+
**Proceed to Step 8** (notify).
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
**Step 2 — Infer stacks per FR + determine order**
|
|
104
|
+
- For each FR in PRD:
|
|
105
|
+
- Read FR description and understand what parts of the system it touches
|
|
106
|
+
- Cross-reference SAD architecture to confirm which layers are involved
|
|
107
|
+
- Example: "User Login FR" touching web UI + auth API + external IdP → inferred stacks: `web`, `service`, `integration`
|
|
108
|
+
- Order FRs by SAD dependency (foundation layers first — e.g., `service` before `web`, `web` before `integration` adapters)
|
|
109
|
+
- Result: one Feature per FR, with inferred stacks noted as context for PE
|
|
110
|
+
|
|
111
|
+
**Step 3 — Present proposed Feature list + confirm**
|
|
112
|
+
|
|
113
|
+
Show ordered list with inferred stacks as context. Example:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Proposed Features (ordered by dependency):
|
|
117
|
+
|
|
118
|
+
[ ] Feature-NNN-auth FR-001: Authentication (touches: service, integration, web)
|
|
119
|
+
[ ] Feature-NNN-checkout FR-002: Checkout (touches: service, web)
|
|
120
|
+
|
|
121
|
+
Select which to create now (all, or specific numbers):
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
User can select all or a subset. Proceed only for selected items.
|
|
125
|
+
|
|
126
|
+
**Step 4 — Assign Feature IDs**
|
|
127
|
+
- Scan `docs/features/` for existing `{CODE}-Feature-NNN-*` directories
|
|
128
|
+
- Assign next sequential ID (max existing NNN + 1, +1 per new Feature in this batch)
|
|
129
|
+
- IDs assigned in the order shown in Step 3
|
|
130
|
+
|
|
131
|
+
**Step 5 — Create directory + file for each selected Feature**
|
|
132
|
+
- Directory: `docs/features/{CODE}-Feature-{NNN}-{slug}/`
|
|
133
|
+
- File: `docs/features/{CODE}-Feature-{NNN}-{slug}/{CODE}-Feature-{NNN}-{slug}.md`
|
|
134
|
+
- Use template `.tas/templates/Feature.md`
|
|
135
|
+
- Frontmatter: `plan_status: pending`, `plan_date:` empty
|
|
136
|
+
|
|
137
|
+
**Step 6 — Walk PE through filling each Feature (one at a time)**
|
|
138
|
+
|
|
139
|
+
For each created Feature file, ask PE to provide:
|
|
140
|
+
|
|
141
|
+
a. **Description**: short summary + business value
|
|
142
|
+
b. **User Story**: "As a [role], I want [goal], so that [benefit]"
|
|
143
|
+
c. **Actor**: "Who interacts with this Feature? Roles, personas, external systems?"
|
|
144
|
+
d. **Business Flow**: "Step-by-step business flow / user journey?"
|
|
145
|
+
e. **Business Rules**: "BR-1, BR-2... validations, constraints, calculations?"
|
|
146
|
+
f. **UI/UX Rules**: "Any UI/UX rules or design-spec.md ref? (skip if backend-only)"
|
|
147
|
+
g. **Non-Functional Requirements**: "Performance, security, scalability, accessibility — measurable?"
|
|
148
|
+
h. **Acceptance Criteria** (Given/When/Then): "AC-1, AC-2... each testable?"
|
|
149
|
+
|
|
150
|
+
After completing one Feature, move to next selected Feature.
|
|
151
|
+
|
|
152
|
+
**Step 7 — Update `project-status.yaml`**
|
|
153
|
+
- Per `.tas/rules/common/project-status.md` — add one entry per created Feature to flat `features.{FEATURE_ID}` map.
|
|
154
|
+
|
|
155
|
+
**Step 8 — Notify next step**
|
|
156
|
+
> "Features created. For each Feature, run `/tas-plan {Feature-ID}` to generate `Feature-{NNN}-Technical.md` before SE codes."
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### UPDATE mode (`$ARGUMENTS` is Feature ID, e.g., `Feature-003`)
|
|
161
|
+
|
|
162
|
+
1. Find file via glob `docs/features/{CODE}-Feature-{ID}-*/**.md` (excluding `*-Technical.md`)
|
|
163
|
+
2. Read current Feature file
|
|
164
|
+
3. Ask user what to change (description, actor, business flow, business rules, UI/UX, NFR, AC, status...)
|
|
165
|
+
4. Update file, add Changelog entry: date + changes + author
|
|
166
|
+
5. Update `project-status.yaml` per `.tas/rules/common/project-status.md` — update `features.{FEATURE_ID}.status`
|
|
167
|
+
6. If AC changed: warn user that downstream artifacts may be stale — `Feature-{NNN}-Technical.md`, `Func-Test-*.md`
|
|
168
|
+
|
|
169
|
+
## Principles
|
|
170
|
+
- Feature is a **complete business flow** that can be released to production after coding
|
|
171
|
+
- One Feature = one business requirement. A Feature may span multiple stacks (`app`, `web`, `service`, `integration`) — per-stack technical breakdown lives in `Feature-{NNN}-Technical.md`
|
|
172
|
+
- Each Feature lives in its own directory under `docs/features/`
|
|
173
|
+
- Feature MUST have clear, testable Acceptance Criteria in Given/When/Then format
|
|
174
|
+
- Business Rules MUST be unambiguous and verifiable
|
|
175
|
+
- Non-Functional Requirements MUST be measurable when applicable
|
|
176
|
+
- Test cases (Functional / E2E) live in separate files in same directory — NOT in Feature doc
|
|
177
|
+
- Technical content (ERD, files, config, ADR, per-stack breakdown) lives in `Feature-{NNN}-Technical.md` — generated by `/tas-plan`
|
|
178
|
+
|
|
179
|
+
## Final Step — Token Log
|
|
180
|
+
|
|
181
|
+
Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to working Feature file.
|