@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
|
@@ -1,192 +1,176 @@
|
|
|
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
|
-
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
import {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{ width:
|
|
81
|
-
{ width:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Step 5: Generate Feature Helpers
|
|
95
|
-
|
|
96
|
-
```typescript
|
|
97
|
-
import { Page, expect } from '@playwright/test';
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
npx playwright test e2e/features/{epic}/{feature}/{story}
|
|
178
|
-
|
|
179
|
-
# Run with specific browser
|
|
180
|
-
npx playwright test --project=firefox e2e/features/{epic}/{feature}
|
|
181
|
-
|
|
182
|
-
# Run with debug UI
|
|
183
|
-
npx playwright test --ui e2e/features/{epic}/{feature}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## Principles
|
|
187
|
-
- Script MUST be runnable directly from CLI
|
|
188
|
-
- Each describe block uses full FT ID
|
|
189
|
-
- Helpers MUST export for Layer 3 reuse
|
|
190
|
-
- DO NOT import from Layer 3 (flows/)
|
|
191
|
-
- If apps/web/ doesn't exist → graceful error, DO NOT create
|
|
192
|
-
- Tests must work on all viewports (mobile, tablet, desktop)
|
|
1
|
+
---
|
|
2
|
+
model: sonnet
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tas-functest-web $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Role: SE / QA
|
|
8
|
+
Generate all Playwright automation test scripts for a web Feature.
|
|
9
|
+
|
|
10
|
+
## IMPORTANT — Layer 2: Web Functional Test Scripts
|
|
11
|
+
- Create Playwright test scripts from Func-Test-Spec (markdown)
|
|
12
|
+
- Scripts located in `apps/web/e2e/features/`
|
|
13
|
+
- Reusable helpers exported for Layer 3 (E2E) reuse
|
|
14
|
+
- Hardcoded data in tests, credentials from `.env`
|
|
15
|
+
- Cross-viewport testing (mobile, tablet, desktop)
|
|
16
|
+
|
|
17
|
+
## Actions
|
|
18
|
+
|
|
19
|
+
### Step 1: Identify Feature
|
|
20
|
+
1. `$ARGUMENTS` is Feature ID or file path
|
|
21
|
+
2. If not provided: scan `docs/features/{CODE}-Feature-*/{CODE}-Feature-*.md` for Features with status `In Development`
|
|
22
|
+
3. Read Feature file to get Feature ID + slug
|
|
23
|
+
|
|
24
|
+
### Step 2: Check Prerequisites
|
|
25
|
+
1. Check `apps/web/` exists. If not → report:
|
|
26
|
+
> "Web app doesn't exist. If project only has mobile, use `/tas-functest-mobile`."
|
|
27
|
+
> STOP, DO NOT create file.
|
|
28
|
+
2. Find `Func-Test-Spec.md` in Feature directory:
|
|
29
|
+
```
|
|
30
|
+
docs/features/{CODE}-Feature-{NNN}-{slug}/Func-Test-Spec.md
|
|
31
|
+
```
|
|
32
|
+
3. If missing → report:
|
|
33
|
+
> "No Func-Test-Spec for this Feature. Run `/tas-functest {Feature-ID}` first."
|
|
34
|
+
4. Read `apps/web/playwright.config.ts` (if exists) for current config
|
|
35
|
+
5. Read `apps/web/e2e/helpers/` for patterns
|
|
36
|
+
|
|
37
|
+
### Step 3: Aggregate FT Test Cases
|
|
38
|
+
- From Func-Test-Spec, list all FT test cases grouped by AC
|
|
39
|
+
- Pull test data requirements from spec
|
|
40
|
+
|
|
41
|
+
### Step 4: Generate Test Scripts
|
|
42
|
+
|
|
43
|
+
**File output**: `apps/web/e2e/features/{feature-slug}/{feature-slug}.func.spec.ts`
|
|
44
|
+
|
|
45
|
+
**Structure**:
|
|
46
|
+
```typescript
|
|
47
|
+
/**
|
|
48
|
+
* Functional Tests: {Feature Name}
|
|
49
|
+
* Feature: {Feature_ID}
|
|
50
|
+
* Stack: web
|
|
51
|
+
*
|
|
52
|
+
* Generated by /tas-functest-web
|
|
53
|
+
* Spec: docs/features/{feature-dir}/Func-Test-Spec.md
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
import { test, expect } from '@playwright/test';
|
|
57
|
+
import { loadTestData, getCredentials } from '../../helpers/data-loader';
|
|
58
|
+
|
|
59
|
+
const testData = loadTestData();
|
|
60
|
+
|
|
61
|
+
test.describe('{Feature Name}', () => {
|
|
62
|
+
test.beforeEach(async ({ page }) => {
|
|
63
|
+
await page.goto('/target-page');
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// AC Reference: AC-1
|
|
67
|
+
test.describe('{PROJECT}_F{FEATURE}_AC1_FT_001_H', () => {
|
|
68
|
+
test('should {description from spec}', async ({ page }) => {
|
|
69
|
+
// Given: {precondition}
|
|
70
|
+
// When: {action}
|
|
71
|
+
await page.getByTestId('element-id').click();
|
|
72
|
+
// Then: {expected}
|
|
73
|
+
await expect(page.getByTestId('result')).toBeVisible();
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// Viewport testing for responsive features
|
|
78
|
+
test.describe('{PROJECT}_F{FEATURE}_AC1_FT_001_H - Viewports', () => {
|
|
79
|
+
const viewports = [
|
|
80
|
+
{ width: 375, height: 812, name: 'mobile' },
|
|
81
|
+
{ width: 768, height: 1024, name: 'tablet' },
|
|
82
|
+
{ width: 1280, height: 720, name: 'desktop' },
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
for (const vp of viewports) {
|
|
86
|
+
test(`should work on ${vp.name} (${vp.width}x${vp.height})`, async ({ page }) => {
|
|
87
|
+
await page.setViewportSize({ width: vp.width, height: vp.height });
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Step 5: Generate Feature Helpers
|
|
95
|
+
`apps/web/e2e/features/{feature-slug}/helpers.ts`:
|
|
96
|
+
```typescript
|
|
97
|
+
import { Page, expect } from '@playwright/test';
|
|
98
|
+
|
|
99
|
+
export async function {featureSpecificHelper}(page: Page) {
|
|
100
|
+
// Helper logic extracted from functional tests
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 6: Generate/Update Data Loader (if missing)
|
|
105
|
+
```typescript
|
|
106
|
+
type TestEnv = 'dev' | 'staging' | 'prod';
|
|
107
|
+
|
|
108
|
+
export function loadTestData(env?: TestEnv) {
|
|
109
|
+
const targetEnv = env || (process.env.TEST_ENV as TestEnv) || 'dev';
|
|
110
|
+
return require(`../data/test-data.${targetEnv}.json`);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function getCredentials(userType = 'default') {
|
|
114
|
+
const data = loadTestData();
|
|
115
|
+
const user = data.users[userType] || data.users.default;
|
|
116
|
+
return {
|
|
117
|
+
email: user.email,
|
|
118
|
+
password: process.env.TEST_USER_PASSWORD || '',
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Step 7: Update package.json Script
|
|
124
|
+
```json
|
|
125
|
+
"functest:web:{feature-slug}": "npx playwright test e2e/features/{feature-slug}"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Step 8: Generate Index
|
|
129
|
+
`apps/web/e2e/features/{feature-slug}/index.ts`:
|
|
130
|
+
```typescript
|
|
131
|
+
export * from './helpers';
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## File Structure Output
|
|
135
|
+
```
|
|
136
|
+
apps/web/e2e/features/
|
|
137
|
+
└── {feature-slug}/
|
|
138
|
+
├── {feature-slug}.func.spec.ts
|
|
139
|
+
├── helpers.ts
|
|
140
|
+
└── index.ts
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Selector Strategy (Playwright)
|
|
144
|
+
- **Priority**: `data-testid` → `page.getByTestId('login-submit')`
|
|
145
|
+
- **Text**: `page.getByText('Welcome')`
|
|
146
|
+
- **Role**: `page.getByRole('button', { name: 'Submit' })`
|
|
147
|
+
- **Label**: `page.getByLabel('Email')`
|
|
148
|
+
- DO NOT use traditional CSS selectors unless required
|
|
149
|
+
|
|
150
|
+
## Cross-Browser
|
|
151
|
+
- Chromium (required)
|
|
152
|
+
- Firefox (required)
|
|
153
|
+
- WebKit (required)
|
|
154
|
+
- Config in `playwright.config.ts` projects section
|
|
155
|
+
|
|
156
|
+
## Test Data Convention
|
|
157
|
+
- **Hardcoded values**: Directly in test
|
|
158
|
+
- **Credentials**: `getCredentials()` → password from process.env
|
|
159
|
+
- **Environment data**: `loadTestData()` → from test-data.{env}.json
|
|
160
|
+
- **NEVER** hardcode passwords/tokens
|
|
161
|
+
|
|
162
|
+
## Run Tests
|
|
163
|
+
```bash
|
|
164
|
+
yarn functest:web:{feature-slug}
|
|
165
|
+
npx playwright test e2e/features/{feature-slug}
|
|
166
|
+
npx playwright test --project=firefox e2e/features/{feature-slug}
|
|
167
|
+
npx playwright test --ui e2e/features/{feature-slug}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Principles
|
|
171
|
+
- Script MUST be runnable directly from CLI
|
|
172
|
+
- Each describe block uses full FT ID
|
|
173
|
+
- Helpers MUST export for Layer 3 reuse
|
|
174
|
+
- DO NOT import from Layer 3 (`flows/`)
|
|
175
|
+
- If `apps/web/` doesn't exist → graceful error
|
|
176
|
+
- Tests must work on all viewports
|