@torus-engineering/tas-kit 1.9.0 → 1.11.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/.claude/commands/ado-create.md +17 -17
- package/.claude/commands/ado-delete.md +11 -11
- package/.claude/commands/ado-get.md +12 -12
- package/.claude/commands/ado-status.md +12 -12
- package/.claude/commands/ado-update.md +15 -15
- package/.claude/commands/tas-adr.md +33 -33
- package/.claude/commands/tas-apitest-plan.md +173 -173
- package/.claude/commands/tas-apitest.md +143 -143
- package/.claude/commands/tas-brainstorm.md +14 -14
- package/.claude/commands/tas-bug.md +113 -113
- package/.claude/commands/tas-design.md +37 -37
- package/.claude/commands/tas-dev.md +128 -128
- package/.claude/commands/tas-e2e-mobile.md +155 -155
- package/.claude/commands/tas-e2e-web.md +163 -163
- package/.claude/commands/tas-e2e.md +102 -102
- package/.claude/commands/tas-epic.md +35 -35
- package/.claude/commands/tas-feature.md +47 -47
- package/.claude/commands/tas-fix.md +51 -51
- package/.claude/commands/tas-functest-mobile.md +144 -144
- package/.claude/commands/tas-functest-web.md +192 -192
- package/.claude/commands/tas-functest.md +76 -76
- package/.claude/commands/tas-init.md +14 -14
- package/.claude/commands/tas-plan.md +198 -200
- package/.claude/commands/tas-prd.md +37 -37
- package/.claude/commands/tas-review.md +111 -111
- package/.claude/commands/tas-sad.md +43 -43
- package/.claude/commands/tas-security.md +87 -81
- package/.claude/commands/tas-spec.md +20 -20
- package/.claude/commands/tas-status.md +13 -13
- package/.claude/commands/tas-story.md +91 -91
- package/.claude/commands/tas-verify.md +51 -51
- package/.claude/rules/common/post-review-agent.md +49 -49
- package/.claude/rules/common/project-status.md +14 -14
- package/.claude/rules/common/stack-detection.md +6 -6
- package/.claude/rules/common/token-logging.md +27 -27
- package/.claude/rules/csharp/api-testing.md +171 -171
- package/.claude/skills/ado-integration/SKILL.md +36 -36
- package/.claude/skills/tas-conventions/SKILL.md +32 -32
- package/.claude/skills/tas-implementation-complete/SKILL.md +100 -99
- package/.claude/skills/tas-tdd/SKILL.md +123 -123
- package/.claude/skills/token-logger/SKILL.md +19 -19
- package/.tas/README.md +266 -1520
- package/.tas/checklists/code-review.md +13 -13
- package/.tas/checklists/security.md +3 -3
- package/.tas/checklists/story-done.md +11 -11
- package/.tas/hooks/README.md +138 -0
- package/.tas/hooks/pre-commit +26 -0
- package/.tas/hooks/security-scan.js +599 -0
- package/.tas/project-status-example.yaml +3 -3
- package/.tas/tas-example.yaml +25 -8
- package/.tas/templates/ADR.md +16 -16
- package/.tas/templates/API-Test-Spec.md +3 -3
- package/.tas/templates/Bug.md +12 -12
- package/.tas/templates/Design-Spec.md +8 -8
- package/.tas/templates/E2E-Execution-Report.md +1 -1
- package/.tas/templates/Epic.md +1 -1
- package/.tas/templates/Feature.md +10 -10
- package/.tas/templates/Func-Test-Spec.md +3 -3
- package/.tas/templates/SAD.md +106 -106
- package/.tas/templates/Security-Report.md +3 -3
- package/.tas/templates/Story.md +9 -9
- package/.tas/tools/tas-ado-readme.md +169 -169
- package/.tas/tools/tas-ado.py +1 -1
- package/CLAUDE-Example.md +37 -58
- package/README.md +294 -42
- package/bin/cli.js +24 -7
- package/lib/install.js +161 -47
- package/package.json +1 -1
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
# /tas-e2e-web $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Generate Playwright E2E test scripts
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
-
|
|
8
|
-
- Scripts
|
|
9
|
-
- REUSE helpers
|
|
10
|
-
- Cross-browser testing (Chromium, Firefox, WebKit)
|
|
11
|
-
- Chain functional test steps
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
###
|
|
16
|
-
1. $ARGUMENTS
|
|
17
|
-
2.
|
|
18
|
-
3. List scenarios
|
|
19
|
-
|
|
20
|
-
###
|
|
21
|
-
1.
|
|
22
|
-
> "Web app
|
|
23
|
-
>
|
|
24
|
-
2.
|
|
25
|
-
- Scenario steps
|
|
26
|
-
- FT ID references
|
|
27
|
-
- FT Reuse Map
|
|
28
|
-
- Test data per environment
|
|
29
|
-
3.
|
|
30
|
-
|
|
31
|
-
###
|
|
32
|
-
|
|
33
|
-
1.
|
|
34
|
-
2. Verify helper functions
|
|
35
|
-
3.
|
|
36
|
-
4. Import map: FT ID → file path → function name
|
|
37
|
-
|
|
38
|
-
###
|
|
39
|
-
|
|
40
|
-
**File output**: `apps/web/e2e/flows/{scenario-slug}.spec.ts`
|
|
41
|
-
|
|
42
|
-
**Structure**:
|
|
43
|
-
```typescript
|
|
44
|
-
/**
|
|
45
|
-
* E2E Flow: {Scenario Name}
|
|
46
|
-
* Scenario: {Scenario_ID}
|
|
47
|
-
* Epic(s): {Epic_ID(s)}
|
|
48
|
-
* Type: {single-epic | cross-epic}
|
|
49
|
-
*
|
|
50
|
-
* Generated by /tas-e2e-web
|
|
51
|
-
* Spec: {path to E2E-Scenario-*.md}
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
import { test, expect, Page } from '@playwright/test';
|
|
55
|
-
import { loadTestData, getCredentials } from '../helpers/data-loader';
|
|
56
|
-
|
|
57
|
-
// Layer 2 helpers (reuse from functional tests)
|
|
58
|
-
import { fillLoginForm, verifyLoginSuccess } from '../features/{epic}/{feature}/helpers';
|
|
59
|
-
import { viewAllergenList } from '../features/{epic2}/{feature2}/helpers';
|
|
60
|
-
|
|
61
|
-
const testData = loadTestData();
|
|
62
|
-
|
|
63
|
-
test.describe('E2E Flow: {Scenario Name}', () => {
|
|
64
|
-
test.beforeEach(async ({ page }) => {
|
|
65
|
-
await page.goto(testData.baseUrl);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// Main Flow
|
|
69
|
-
test.describe('{PROJECT}_E{EPIC}_E2E_001_H: {Flow Title}', () => {
|
|
70
|
-
test('Complete flow', async ({ page }) => {
|
|
71
|
-
// Step 1: Login (reuses AL_E002_F002_S001_FT_001_H)
|
|
72
|
-
const creds = getCredentials();
|
|
73
|
-
await fillLoginForm(page, creds.email, creds.password);
|
|
74
|
-
await verifyLoginSuccess(page);
|
|
75
|
-
|
|
76
|
-
// Step 2: View allergen list (reuses AL_E003_F001_S001_FT_001_H)
|
|
77
|
-
await viewAllergenList(page);
|
|
78
|
-
|
|
79
|
-
// Step 3: New logic (no FT reference)
|
|
80
|
-
await page.getByTestId('scan-button').click();
|
|
81
|
-
await expect(page.getByTestId('scan-result')).toBeVisible();
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// Cross-browser validation
|
|
86
|
-
test.describe('{PROJECT}_E{EPIC}_E2E_001_H - Cross-browser', () => {
|
|
87
|
-
test('should complete flow on all browsers', async ({ page, browserName }) => {
|
|
88
|
-
test.info().annotations.push({ type: 'browser', description: browserName });
|
|
89
|
-
// Same flow, validated across browsers via Playwright projects config
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
// Alternate/Error flows
|
|
94
|
-
test.describe('{PROJECT}_E{EPIC}_E2E_002_N: {Error Flow}', () => {
|
|
95
|
-
test('should handle {error condition}', async ({ page }) => {
|
|
96
|
-
// ...
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
###
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
"e2e:flow:{scenario-slug}": "npx playwright test e2e/flows/{scenario-slug}"
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
###
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
- Viewport testing results
|
|
112
|
-
- Performance metrics (LCP, INP, CLS)
|
|
113
|
-
|
|
114
|
-
## File Structure Output
|
|
115
|
-
```
|
|
116
|
-
apps/web/e2e/flows/
|
|
117
|
-
├── {scenario-1-slug}.spec.ts
|
|
118
|
-
├── {scenario-2-slug}.spec.ts
|
|
119
|
-
└── ...
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Reuse Strategy
|
|
123
|
-
```
|
|
124
|
-
Layer 2 (features/) Layer 3 (flows/)
|
|
125
|
-
┌───────────────────┐ ┌──────────────────────────┐
|
|
126
|
-
│ helpers.ts │──────>│ {scenario}.spec.ts │
|
|
127
|
-
│ - fillLogin(page)│ │ import { fillLogin } │
|
|
128
|
-
│ - verify(page) │ │ import { viewList } │
|
|
129
|
-
└───────────────────┘ │ │
|
|
130
|
-
┌───────────────────┐ │ Step 1: fillLogin(page) │
|
|
131
|
-
│ helpers.ts │──────>│ Step 2: viewList(page) │
|
|
132
|
-
│ - viewList(page) │ │ Step 3: new logic │
|
|
133
|
-
└───────────────────┘ └──────────────────────────┘
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Note: Web helpers
|
|
137
|
-
|
|
138
|
-
##
|
|
139
|
-
```bash
|
|
140
|
-
#
|
|
141
|
-
yarn e2e:flow:{scenario-slug}
|
|
142
|
-
|
|
143
|
-
#
|
|
144
|
-
npx playwright test e2e/flows/
|
|
145
|
-
|
|
146
|
-
#
|
|
147
|
-
npx playwright test --project=firefox e2e/flows/{scenario}
|
|
148
|
-
|
|
149
|
-
#
|
|
150
|
-
npx playwright test --ui e2e/flows/{scenario}
|
|
151
|
-
|
|
152
|
-
#
|
|
153
|
-
npx playwright test e2e/flows/{scenario} --reporter=html
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
##
|
|
157
|
-
-
|
|
158
|
-
- Web helpers
|
|
159
|
-
- Scripts
|
|
160
|
-
-
|
|
161
|
-
- Cross-browser: Chromium, Firefox, WebKit (
|
|
162
|
-
- describe block
|
|
163
|
-
- import paths: relative
|
|
1
|
+
# /tas-e2e-web $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Role: SE / QA
|
|
4
|
+
Generate Playwright E2E test scripts from an E2E Scenario markdown file.
|
|
5
|
+
|
|
6
|
+
## IMPORTANT - Layer 3: Web E2E Scripts
|
|
7
|
+
- Create Playwright test scripts from E2E-Scenario (markdown)
|
|
8
|
+
- Scripts located in `apps/web/e2e/flows/`
|
|
9
|
+
- REUSE helpers from Layer 2 functional tests (features/)
|
|
10
|
+
- Cross-browser testing (Chromium, Firefox, WebKit)
|
|
11
|
+
- Chain functional test steps into end-to-end flows
|
|
12
|
+
|
|
13
|
+
## Actions
|
|
14
|
+
|
|
15
|
+
### Step 1: Identify Scenario
|
|
16
|
+
1. $ARGUMENTS is path to E2E-Scenario-*.md file
|
|
17
|
+
2. If not provided: scan `docs/epics/**/E2E-Scenario-*.md` and `docs/e2e-scenarios/E2E-Scenario-*.md`
|
|
18
|
+
3. List scenarios and ask user to choose
|
|
19
|
+
|
|
20
|
+
### Step 2: Check Prerequisites
|
|
21
|
+
1. Check `apps/web/` exists. If not → report:
|
|
22
|
+
> "Web app doesn't exist in this project. If project only has mobile, use /tas-e2e-mobile."
|
|
23
|
+
> STOP, DO NOT create file.
|
|
24
|
+
2. Read scenario file to get:
|
|
25
|
+
- Scenario steps and flow
|
|
26
|
+
- FT ID references
|
|
27
|
+
- FT Reuse Map
|
|
28
|
+
- Test data per environment
|
|
29
|
+
3. Read `apps/web/playwright.config.ts` (if exists)
|
|
30
|
+
|
|
31
|
+
### Step 3: Find Functional Test Helpers
|
|
32
|
+
From FT Reuse Map in scenario:
|
|
33
|
+
1. Find source files in `apps/web/e2e/features/`
|
|
34
|
+
2. Verify helper functions and page objects exist
|
|
35
|
+
3. If helper doesn't exist → create stub and note "TODO: implement helper"
|
|
36
|
+
4. Import map: FT ID → file path → function name
|
|
37
|
+
|
|
38
|
+
### Step 4: Generate E2E Script
|
|
39
|
+
|
|
40
|
+
**File output**: `apps/web/e2e/flows/{scenario-slug}.spec.ts`
|
|
41
|
+
|
|
42
|
+
**Structure**:
|
|
43
|
+
```typescript
|
|
44
|
+
/**
|
|
45
|
+
* E2E Flow: {Scenario Name}
|
|
46
|
+
* Scenario: {Scenario_ID}
|
|
47
|
+
* Epic(s): {Epic_ID(s)}
|
|
48
|
+
* Type: {single-epic | cross-epic}
|
|
49
|
+
*
|
|
50
|
+
* Generated by /tas-e2e-web
|
|
51
|
+
* Spec: {path to E2E-Scenario-*.md}
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
import { test, expect, Page } from '@playwright/test';
|
|
55
|
+
import { loadTestData, getCredentials } from '../helpers/data-loader';
|
|
56
|
+
|
|
57
|
+
// Layer 2 helpers (reuse from functional tests)
|
|
58
|
+
import { fillLoginForm, verifyLoginSuccess } from '../features/{epic}/{feature}/helpers';
|
|
59
|
+
import { viewAllergenList } from '../features/{epic2}/{feature2}/helpers';
|
|
60
|
+
|
|
61
|
+
const testData = loadTestData();
|
|
62
|
+
|
|
63
|
+
test.describe('E2E Flow: {Scenario Name}', () => {
|
|
64
|
+
test.beforeEach(async ({ page }) => {
|
|
65
|
+
await page.goto(testData.baseUrl);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Main Flow
|
|
69
|
+
test.describe('{PROJECT}_E{EPIC}_E2E_001_H: {Flow Title}', () => {
|
|
70
|
+
test('Complete flow', async ({ page }) => {
|
|
71
|
+
// Step 1: Login (reuses AL_E002_F002_S001_FT_001_H)
|
|
72
|
+
const creds = getCredentials();
|
|
73
|
+
await fillLoginForm(page, creds.email, creds.password);
|
|
74
|
+
await verifyLoginSuccess(page);
|
|
75
|
+
|
|
76
|
+
// Step 2: View allergen list (reuses AL_E003_F001_S001_FT_001_H)
|
|
77
|
+
await viewAllergenList(page);
|
|
78
|
+
|
|
79
|
+
// Step 3: New logic (no FT reference)
|
|
80
|
+
await page.getByTestId('scan-button').click();
|
|
81
|
+
await expect(page.getByTestId('scan-result')).toBeVisible();
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// Cross-browser validation
|
|
86
|
+
test.describe('{PROJECT}_E{EPIC}_E2E_001_H - Cross-browser', () => {
|
|
87
|
+
test('should complete flow on all browsers', async ({ page, browserName }) => {
|
|
88
|
+
test.info().annotations.push({ type: 'browser', description: browserName });
|
|
89
|
+
// Same flow, validated across browsers via Playwright projects config
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// Alternate/Error flows
|
|
94
|
+
test.describe('{PROJECT}_E{EPIC}_E2E_002_N: {Error Flow}', () => {
|
|
95
|
+
test('should handle {error condition}', async ({ page }) => {
|
|
96
|
+
// ...
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Step 5: Update package.json Script
|
|
103
|
+
Add or update script in `apps/web/package.json`:
|
|
104
|
+
```json
|
|
105
|
+
"e2e:flow:{scenario-slug}": "npx playwright test e2e/flows/{scenario-slug}"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Step 6: Generate Execution Report (Optional)
|
|
109
|
+
From `.tas/templates/E2E-Execution-Report.md`:
|
|
110
|
+
- Include browser-specific results
|
|
111
|
+
- Viewport testing results
|
|
112
|
+
- Performance metrics (LCP, INP, CLS)
|
|
113
|
+
|
|
114
|
+
## File Structure Output
|
|
115
|
+
```
|
|
116
|
+
apps/web/e2e/flows/
|
|
117
|
+
├── {scenario-1-slug}.spec.ts
|
|
118
|
+
├── {scenario-2-slug}.spec.ts
|
|
119
|
+
└── ...
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Reuse Strategy
|
|
123
|
+
```
|
|
124
|
+
Layer 2 (features/) Layer 3 (flows/)
|
|
125
|
+
┌───────────────────┐ ┌──────────────────────────┐
|
|
126
|
+
│ helpers.ts │──────>│ {scenario}.spec.ts │
|
|
127
|
+
│ - fillLogin(page)│ │ import { fillLogin } │
|
|
128
|
+
│ - verify(page) │ │ import { viewList } │
|
|
129
|
+
└───────────────────┘ │ │
|
|
130
|
+
┌───────────────────┐ │ Step 1: fillLogin(page) │
|
|
131
|
+
│ helpers.ts │──────>│ Step 2: viewList(page) │
|
|
132
|
+
│ - viewList(page) │ │ Step 3: new logic │
|
|
133
|
+
└───────────────────┘ └──────────────────────────┘
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Note: Web helpers receive `page: Page` parameter (unlike mobile using global Detox API).
|
|
137
|
+
|
|
138
|
+
## Run Tests
|
|
139
|
+
```bash
|
|
140
|
+
# Run specific E2E flow
|
|
141
|
+
yarn e2e:flow:{scenario-slug}
|
|
142
|
+
|
|
143
|
+
# Run all E2E flows
|
|
144
|
+
npx playwright test e2e/flows/
|
|
145
|
+
|
|
146
|
+
# Run only on Firefox
|
|
147
|
+
npx playwright test --project=firefox e2e/flows/{scenario}
|
|
148
|
+
|
|
149
|
+
# Run with debug UI
|
|
150
|
+
npx playwright test --ui e2e/flows/{scenario}
|
|
151
|
+
|
|
152
|
+
# Run and generate HTML report
|
|
153
|
+
npx playwright test e2e/flows/{scenario} --reporter=html
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Principles
|
|
157
|
+
- MUST reuse helpers from Layer 2 when possible
|
|
158
|
+
- Web helpers MUST receive `page: Page` parameter (dependency injection)
|
|
159
|
+
- Scripts MUST be runnable from CLI
|
|
160
|
+
- If apps/web/ doesn't exist → graceful error, DO NOT create
|
|
161
|
+
- Cross-browser: Chromium, Firefox, WebKit (from playwright.config.ts)
|
|
162
|
+
- describe block uses full E2E ID
|
|
163
|
+
- import paths: relative from flows/ up to features/
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
# /tas-e2e $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Generate E2E test scenario documents
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
- E2E tests
|
|
8
|
-
- E2E scenario
|
|
9
|
-
- E2E scripts (
|
|
10
|
-
- Output
|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
###
|
|
15
|
-
$ARGUMENTS
|
|
16
|
-
- **Epic ID** (
|
|
17
|
-
- **Flow description** (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
###
|
|
22
|
-
|
|
23
|
-
####
|
|
24
|
-
1.
|
|
25
|
-
2.
|
|
26
|
-
3.
|
|
27
|
-
|
|
28
|
-
####
|
|
29
|
-
1. Search across `docs/epics/`
|
|
30
|
-
2.
|
|
31
|
-
3.
|
|
32
|
-
|
|
33
|
-
###
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
###
|
|
38
|
-
|
|
39
|
-
#### Naming Convention:
|
|
40
|
-
- **Single-epic**: `{PROJECT}_E{EPIC}_E2E_{NNN}_{MODIFIER}`
|
|
41
|
-
- Example: `AL_E002_E2E_001_H`
|
|
42
|
-
- **Cross-epic**: `{PROJECT}_XEPIC_E2E_{NNN}_{MODIFIER}`
|
|
43
|
-
- Example: `AL_XEPIC_E2E_001_H`
|
|
44
|
-
|
|
45
|
-
#### Scenario Steps Table:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```markdown
|
|
49
|
-
| Step | Screen/Page | Action | Expected Result | Builds on FT IDs |
|
|
50
|
-
|------|-------------|--------|-----------------|-------------------|
|
|
51
|
-
| 1 | Login Screen | User logs in | Home screen shown | AL_E002_F002_S001_FT_001_H |
|
|
52
|
-
| 2 | Home Screen | View allergen list | List displayed | AL_E003_F001_S001_FT_001_H |
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
####
|
|
58
|
-
1. Flow Overview (narrative description)
|
|
59
|
-
2. Scenario Steps table
|
|
60
|
-
3. Step Details (
|
|
61
|
-
4. Alternate Flows (
|
|
62
|
-
5. Error Flows (
|
|
63
|
-
6. Test Data per environment
|
|
64
|
-
7. Prerequisites checklist
|
|
65
|
-
8. Success Criteria
|
|
66
|
-
9. FT Reuse Map (map step → FT ID → helper function)
|
|
67
|
-
|
|
68
|
-
###
|
|
69
|
-
- **Single-epic**: `docs/epics/{epic-dir}/E2E-Scenario-{NNN}-{slug}.md`
|
|
70
|
-
- **Cross-epic**: `docs/e2e-scenarios/E2E-Scenario-{NNN}-{slug}.md`
|
|
71
|
-
|
|
72
|
-
Auto-create `docs/e2e-scenarios/` directory
|
|
73
|
-
|
|
74
|
-
###
|
|
75
|
-
|
|
76
|
-
- "
|
|
77
|
-
- "
|
|
78
|
-
- "Test data
|
|
79
|
-
- "
|
|
80
|
-
|
|
81
|
-
## FT Reuse Map
|
|
82
|
-
|
|
83
|
-
- Map scenario step → FT ID → source file → helper function
|
|
84
|
-
- /tas-e2e-mobile
|
|
85
|
-
|
|
86
|
-
```markdown
|
|
87
|
-
## FT Reuse Map
|
|
88
|
-
| Step | FT ID | Source File | Helper Function |
|
|
89
|
-
|------|-------|-------------|-----------------|
|
|
90
|
-
| 1 | AL_E002_F002_S001_FT_001_H | features/auth/login/helpers.ts | fillLoginForm() |
|
|
91
|
-
| 2 | AL_E003_F001_S001_FT_001_H | features/home/allergens/helpers.ts | viewAllergenList() |
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Status Flow
|
|
95
|
-
Draft → Ready → Implemented → Verified
|
|
96
|
-
|
|
97
|
-
##
|
|
98
|
-
- Output
|
|
99
|
-
- Test code
|
|
100
|
-
-
|
|
101
|
-
- Scenario
|
|
102
|
-
- Cross-epic scenarios
|
|
1
|
+
# /tas-e2e $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Role: QA / PE
|
|
4
|
+
Generate E2E test scenario documents from an Epic or user flow description.
|
|
5
|
+
|
|
6
|
+
## IMPORTANT - Layer 3: E2E Testing
|
|
7
|
+
- E2E tests verify ENTIRE flow linking multiple features/stories
|
|
8
|
+
- E2E scenario MUST reference FT IDs from Layer 2 (Functional Tests)
|
|
9
|
+
- E2E scripts (created by /tas-e2e-mobile or /tas-e2e-web) will REUSE helpers from Layer 2
|
|
10
|
+
- Output is markdown scenario file, NOT test code
|
|
11
|
+
|
|
12
|
+
## Actions
|
|
13
|
+
|
|
14
|
+
### Step 1: Determine Input
|
|
15
|
+
$ARGUMENTS can be:
|
|
16
|
+
- **Epic ID** (e.g., "Epic-002", "AL-Epic-002-authentication") → generate scenarios from all features/stories in epic
|
|
17
|
+
- **Flow description** (e.g., "user registration to first scan") → generate cross-epic scenario
|
|
18
|
+
|
|
19
|
+
If no $ARGUMENTS: list existing Epics and ask user to choose.
|
|
20
|
+
|
|
21
|
+
### Step 2: Gather Context
|
|
22
|
+
|
|
23
|
+
#### If Epic ID:
|
|
24
|
+
1. Read Epic file and all Feature files within
|
|
25
|
+
2. Read all Story files of those Features
|
|
26
|
+
3. Find all `Func-Test-*.md` files to get FT IDs
|
|
27
|
+
|
|
28
|
+
#### If Flow Description:
|
|
29
|
+
1. Search across `docs/epics/` to find related Features/Stories
|
|
30
|
+
2. Identify related Epics (cross-epic scenario)
|
|
31
|
+
3. Collect FT IDs from Func-Test-*.md files
|
|
32
|
+
|
|
33
|
+
### Step 3: Read template
|
|
34
|
+
Read `.tas/templates/E2E-Scenario.md`
|
|
35
|
+
Read `root/tas.yaml` to get project code
|
|
36
|
+
|
|
37
|
+
### Step 4: Generate Scenario
|
|
38
|
+
|
|
39
|
+
#### Naming Convention:
|
|
40
|
+
- **Single-epic**: `{PROJECT}_E{EPIC}_E2E_{NNN}_{MODIFIER}`
|
|
41
|
+
- Example: `AL_E002_E2E_001_H`
|
|
42
|
+
- **Cross-epic**: `{PROJECT}_XEPIC_E2E_{NNN}_{MODIFIER}`
|
|
43
|
+
- Example: `AL_XEPIC_E2E_001_H`
|
|
44
|
+
|
|
45
|
+
#### Scenario Steps Table:
|
|
46
|
+
Each step MUST have "Builds on FT IDs" column to reference Layer 2:
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
| Step | Screen/Page | Action | Expected Result | Builds on FT IDs |
|
|
50
|
+
|------|-------------|--------|-----------------|-------------------|
|
|
51
|
+
| 1 | Login Screen | User logs in | Home screen shown | AL_E002_F002_S001_FT_001_H |
|
|
52
|
+
| 2 | Home Screen | View allergen list | List displayed | AL_E003_F001_S001_FT_001_H |
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If step has NO FT reference → write "-" (new logic, no func test yet)
|
|
56
|
+
|
|
57
|
+
#### Generated content:
|
|
58
|
+
1. Flow Overview (narrative description)
|
|
59
|
+
2. Scenario Steps table
|
|
60
|
+
3. Step Details (detail each step)
|
|
61
|
+
4. Alternate Flows (if any)
|
|
62
|
+
5. Error Flows (if any)
|
|
63
|
+
6. Test Data per environment
|
|
64
|
+
7. Prerequisites checklist
|
|
65
|
+
8. Success Criteria
|
|
66
|
+
9. FT Reuse Map (map step → FT ID → helper function)
|
|
67
|
+
|
|
68
|
+
### Step 5: Output File
|
|
69
|
+
- **Single-epic**: `docs/epics/{epic-dir}/E2E-Scenario-{NNN}-{slug}.md`
|
|
70
|
+
- **Cross-epic**: `docs/e2e-scenarios/E2E-Scenario-{NNN}-{slug}.md`
|
|
71
|
+
|
|
72
|
+
Auto-create `docs/e2e-scenarios/` directory if not exists.
|
|
73
|
+
|
|
74
|
+
### Step 6: Prompting
|
|
75
|
+
After generating, ask user:
|
|
76
|
+
- "Any alternate flows to cover?"
|
|
77
|
+
- "Any error scenarios to add?"
|
|
78
|
+
- "Test data for all environments sufficient?"
|
|
79
|
+
- "Need to test on both mobile and web?"
|
|
80
|
+
|
|
81
|
+
## FT Reuse Map
|
|
82
|
+
Each scenario file has "FT Reuse Map" section to:
|
|
83
|
+
- Map scenario step → FT ID → source file → helper function
|
|
84
|
+
- /tas-e2e-mobile and /tas-e2e-web read this section to import helpers from Layer 2
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
## FT Reuse Map
|
|
88
|
+
| Step | FT ID | Source File | Helper Function |
|
|
89
|
+
|------|-------|-------------|-----------------|
|
|
90
|
+
| 1 | AL_E002_F002_S001_FT_001_H | features/auth/login/helpers.ts | fillLoginForm() |
|
|
91
|
+
| 2 | AL_E003_F001_S001_FT_001_H | features/home/allergens/helpers.ts | viewAllergenList() |
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Status Flow
|
|
95
|
+
Draft → Ready → Implemented → Verified
|
|
96
|
+
|
|
97
|
+
## Principles
|
|
98
|
+
- Output is MARKDOWN scenario, NOT test code
|
|
99
|
+
- Test code created by /tas-e2e-mobile or /tas-e2e-web
|
|
100
|
+
- Each step SHOULD reference FT IDs when possible (to reuse, not rewrite)
|
|
101
|
+
- Scenario must be testable: has preconditions, test data, clear success criteria
|
|
102
|
+
- Cross-epic scenarios use XEPIC prefix instead of Epic number
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# /tas-epic $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Prerequisite
|
|
7
|
-
- docs/prd.md
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
1.
|
|
11
|
-
2.
|
|
12
|
-
3.
|
|
13
|
-
|
|
14
|
-
###
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
17
|
-
6.
|
|
18
|
-
7.
|
|
19
|
-
8.
|
|
20
|
-
|
|
21
|
-
###
|
|
22
|
-
4.
|
|
23
|
-
5.
|
|
24
|
-
6.
|
|
25
|
-
7.
|
|
26
|
-
8.
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
-
|
|
30
|
-
- Epic
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
Invoke skill `token-logger`:
|
|
1
|
+
# /tas-epic $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Role: PE - Product Engineer
|
|
4
|
+
Create or update Epic document.
|
|
5
|
+
|
|
6
|
+
## Prerequisite
|
|
7
|
+
- docs/prd.md must exist
|
|
8
|
+
|
|
9
|
+
## Actions
|
|
10
|
+
1. Need context from root/tas.yaml and docs/prd.md
|
|
11
|
+
2. Need context from .tas/templates/Epic.md
|
|
12
|
+
3. Determine mode based on $ARGUMENTS:
|
|
13
|
+
|
|
14
|
+
### CREATE mode ($ARGUMENTS is new Epic description, or no $ARGUMENTS):
|
|
15
|
+
4. If no $ARGUMENTS, ask user for Epic description.
|
|
16
|
+
5. Read project.code from root/tas.yaml. Scan docs/epics/ to determine sequence number.
|
|
17
|
+
6. Create directory docs/epics/{code}-Epic-{NNN}-{slug}/
|
|
18
|
+
7. Create file docs/epics/{code}-Epic-{NNN}-{slug}/{code}-Epic-{NNN}-{slug}.md
|
|
19
|
+
8. Update `project-status.yaml` per `.claude/rules/common/project-status.md` — add entry to `epics`.
|
|
20
|
+
|
|
21
|
+
### UPDATE mode ($ARGUMENTS is Epic ID, e.g., "Epic-001"):
|
|
22
|
+
4. Find directory docs/epics/{code}-Epic-001-*/
|
|
23
|
+
5. Need context from current Epic file
|
|
24
|
+
6. Ask user what needs changing (update scope, add feature, change status...)
|
|
25
|
+
7. Update file, add changelog
|
|
26
|
+
8. Update `project-status.yaml` per `.claude/rules/common/project-status.md` — update `epics.{EPIC_ID}.status`.
|
|
27
|
+
|
|
28
|
+
## Principles
|
|
29
|
+
- Each Epic maps to one business capability in PRD
|
|
30
|
+
- Epic does NOT contain technical details, only business value
|
|
31
|
+
- Effort estimation at T-shirt size level: S/M/L/XL
|
|
32
|
+
|
|
33
|
+
## Final Step — Token Log
|
|
34
|
+
|
|
35
|
+
Invoke skill `token-logger`: write AI Usage Log to working Epic file.
|