@torus-engineering/tas-kit 1.13.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 +142 -57
- 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 -543
- package/package.json +2 -2
- package/.tas/README.md +0 -334
- 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-fix.md
CHANGED
|
@@ -1,51 +1,72 @@
|
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
model: sonnet
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tas-fix $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Role: SE - Software Engineer
|
|
8
|
+
Quick fix for small bugs or obvious errors — no ticket needed, no full lifecycle.
|
|
9
|
+
Use when: solo dev, quick hotfix, bug found during development.
|
|
10
|
+
Differs from /tas-bug: no Bug file created, no status tracking, no deploy flow.
|
|
11
|
+
|
|
12
|
+
## Stack Detection
|
|
13
|
+
Read `.tas/rules/common/stack-detection.md`.
|
|
14
|
+
|
|
15
|
+
## Actions
|
|
16
|
+
|
|
17
|
+
### 1. Understand bug
|
|
18
|
+
$ARGUMENTS is error description, error message, or file:line_number.
|
|
19
|
+
- If error message/stack trace provided: parse immediately, identify error file and line
|
|
20
|
+
- If only description: ask exactly 1 clarifying question (reproduce steps or expected vs actual)
|
|
21
|
+
- DO NOT ask more than 1 question
|
|
22
|
+
|
|
23
|
+
### 2. Diagnose (max 3 files read)
|
|
24
|
+
- Read error file and directly related files
|
|
25
|
+
- Identify root cause in 1-2 short sentences
|
|
26
|
+
- DO NOT read entire project, DO NOT scan folder structure
|
|
27
|
+
- If need to read more files beyond first 3: ask user confirmation
|
|
28
|
+
|
|
29
|
+
### 3. Fix with regression test
|
|
30
|
+
|
|
31
|
+
Before fixing, read relevant rules:
|
|
32
|
+
- `.tas/rules/common/security.md` — check if fix creates security risks
|
|
33
|
+
- `.tas/rules/common/testing.md` — regression test writing patterns
|
|
34
|
+
- `.tas/rules/[lang_rules]/coding-style.md` — current stack conventions (if identifiable)
|
|
35
|
+
|
|
36
|
+
Then:
|
|
37
|
+
a. Write 1 minimal test case reproducing bug (if project has test framework)
|
|
38
|
+
b. Confirm test FAILS
|
|
39
|
+
c. Fix code at root cause
|
|
40
|
+
d. Confirm test PASSES
|
|
41
|
+
e. Quick run of test suite if available (to check regression)
|
|
42
|
+
|
|
43
|
+
### 3.5 SAD Impact Heuristic (pre-commit)
|
|
44
|
+
|
|
45
|
+
Read `.tas/rules/common/sad-impact.md` "Quick Heuristic" section. Grep staged / changed files for trigger patterns:
|
|
46
|
+
|
|
47
|
+
- `package.json` / `*.csproj` / `requirements.txt` / `go.mod` / `Cargo.toml` — deps section `+` lines
|
|
48
|
+
- `.env*` / `appsettings*.json` — new key
|
|
49
|
+
- `Dockerfile*` / `docker-compose*.yml` — `EXPOSE` / `ENV` / new service
|
|
50
|
+
- `migrations/**` / `*.sql` — schema change
|
|
51
|
+
- `terraform/**` / `cdk/**` / `k8s/**` / `helm/**` — infra change
|
|
52
|
+
- `.github/workflows/**` / `azure-pipelines*.yml` — CI gate change
|
|
53
|
+
- New top-level dir under `apps/` / `services/`
|
|
54
|
+
|
|
55
|
+
**Any hit → STOP.** Output:
|
|
56
|
+
> "Fix touches SAD trigger ({matched signal}). `/tas-fix` cannot update SAD properly. Re-run as `/tas-bug` with severity ≥ Medium for proper SAD impact tracking and Changelog audit."
|
|
57
|
+
|
|
58
|
+
Do NOT commit. Do NOT continue to step 4.
|
|
59
|
+
|
|
60
|
+
### 4. Wrap up
|
|
61
|
+
- Output commit message: `fix: <short description>`
|
|
62
|
+
- Remind: "If this bug may recur or affects production, consider using /tas-bug for full tracking."
|
|
63
|
+
|
|
64
|
+
## Principles
|
|
65
|
+
- Total files read ≤ 3 unless permitted
|
|
66
|
+
- Fix at root cause, DO NOT patch symptom
|
|
67
|
+
- If fix leads to architecture change OR matches SAD Impact Heuristic → stop, suggest `/tas-bug` (which handles SAD update + Changelog) + `/tas-adr` if cross-cutting
|
|
68
|
+
- If bug is in production with high severity → stop, suggest using /tas-bug with severity Critical/High
|
|
69
|
+
|
|
70
|
+
## Final Step — Token Log
|
|
71
|
+
|
|
72
|
+
Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to related Feature or Bug file (if any).
|
|
@@ -1,144 +1,138 @@
|
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- **
|
|
123
|
-
- **
|
|
124
|
-
- **
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
## Principles
|
|
140
|
-
- Script MUST be runnable directly from CLI, WITHOUT Claude window
|
|
141
|
-
- Each describe block uses full FT ID for grep-ability
|
|
142
|
-
- Helpers MUST export for Layer 3 reuse
|
|
143
|
-
- DO NOT import from Layer 3 (flows/), only export UP to Layer 3
|
|
144
|
-
- If apps/mobile/ doesn't exist → graceful error, DO NOT create
|
|
1
|
+
---
|
|
2
|
+
model: sonnet
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tas-functest-mobile $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Role: SE / QA
|
|
8
|
+
Generate all Detox automation test scripts for a mobile Feature.
|
|
9
|
+
|
|
10
|
+
## IMPORTANT — Layer 2: Mobile Functional Test Scripts
|
|
11
|
+
- Create Detox test scripts from Func-Test-Spec (markdown)
|
|
12
|
+
- Scripts located in `apps/mobile/e2e/features/`
|
|
13
|
+
- Reusable helpers exported for Layer 3 (E2E) reuse
|
|
14
|
+
- Hardcoded data in tests, credentials from `.env`
|
|
15
|
+
|
|
16
|
+
## Actions
|
|
17
|
+
|
|
18
|
+
### Step 1: Identify Feature
|
|
19
|
+
1. `$ARGUMENTS` is Feature ID or file path
|
|
20
|
+
2. If not provided: scan `docs/features/{CODE}-Feature-*/{CODE}-Feature-*.md` for Features with status `In Development`
|
|
21
|
+
3. Read Feature file to get Feature ID + slug
|
|
22
|
+
|
|
23
|
+
### Step 2: Check Prerequisites
|
|
24
|
+
1. Check `apps/mobile/` exists. If not → error:
|
|
25
|
+
> "Mobile app doesn't exist. Create `apps/mobile/` first."
|
|
26
|
+
2. Find `Func-Test-Spec.md` in Feature directory:
|
|
27
|
+
```
|
|
28
|
+
docs/features/{CODE}-Feature-{NNN}-{slug}/Func-Test-Spec.md
|
|
29
|
+
```
|
|
30
|
+
3. If missing → error:
|
|
31
|
+
> "No Func-Test-Spec for this Feature. Run `/tas-functest {Feature-ID}` first."
|
|
32
|
+
4. Read `apps/mobile/e2e/test-ids.ts` to know existing testIDs
|
|
33
|
+
5. Read `apps/mobile/e2e/helpers/data-loader.ts` and `test-utils.ts` for patterns
|
|
34
|
+
|
|
35
|
+
### Step 3: Aggregate FT Test Cases
|
|
36
|
+
- From Func-Test-Spec, list all FT test cases grouped by AC
|
|
37
|
+
- Pull test data requirements from spec
|
|
38
|
+
|
|
39
|
+
### Step 4: Generate Test Scripts
|
|
40
|
+
|
|
41
|
+
**File output**: `apps/mobile/e2e/features/{feature-slug}/{feature-slug}.func.e2e.ts`
|
|
42
|
+
|
|
43
|
+
(One test file per Feature — Stories no longer exist.)
|
|
44
|
+
|
|
45
|
+
**Structure**:
|
|
46
|
+
```typescript
|
|
47
|
+
/**
|
|
48
|
+
* Functional Tests: {Feature Name}
|
|
49
|
+
* Feature: {Feature_ID}
|
|
50
|
+
* Stack: app
|
|
51
|
+
*
|
|
52
|
+
* Generated by /tas-functest-mobile
|
|
53
|
+
* Spec: docs/features/{feature-dir}/Func-Test-Spec.md
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
import { device, element, expect, by, waitFor } from 'detox';
|
|
57
|
+
import { TEST_IDS } from '../../test-ids';
|
|
58
|
+
import { loadTestData, getCredentials } from '../../helpers/data-loader';
|
|
59
|
+
import { login, navigateTo } from '../../helpers/test-utils';
|
|
60
|
+
|
|
61
|
+
const testData = loadTestData();
|
|
62
|
+
|
|
63
|
+
describe('{Feature Name}', () => {
|
|
64
|
+
beforeAll(async () => {
|
|
65
|
+
await device.launchApp({ newInstance: true });
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
beforeEach(async () => {
|
|
69
|
+
await device.reloadReactNative();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// AC Reference: AC-1
|
|
73
|
+
describe('{PROJECT}_F{FEATURE}_AC1_FT_001_H', () => {
|
|
74
|
+
it('should {description from spec}', async () => {
|
|
75
|
+
// Given: {precondition}
|
|
76
|
+
// When: {action}
|
|
77
|
+
// Then: {expected}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Step 5: Update test-ids.ts (if needed)
|
|
84
|
+
- Add new testIDs per current naming convention
|
|
85
|
+
- Keep nested-object structure with dot notation
|
|
86
|
+
|
|
87
|
+
### Step 6: Generate Feature Helpers
|
|
88
|
+
Create `apps/mobile/e2e/features/{feature-slug}/helpers.ts`:
|
|
89
|
+
```typescript
|
|
90
|
+
/**
|
|
91
|
+
* Reusable helpers for {Feature Name}
|
|
92
|
+
* Exported for Layer 3 E2E scripts reuse.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
export async function {featureSpecificHelper}() {
|
|
96
|
+
// Helper logic extracted from functional tests
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Step 7: Update package.json Script
|
|
101
|
+
```json
|
|
102
|
+
"functest:mobile:{feature-slug}": "detox test --configuration ios.sim.debug --testPathPattern='e2e/features/{feature-slug}'"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 8: Generate Index
|
|
106
|
+
`apps/mobile/e2e/features/{feature-slug}/index.ts`:
|
|
107
|
+
```typescript
|
|
108
|
+
export * from './helpers';
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## File Structure Output
|
|
112
|
+
```
|
|
113
|
+
apps/mobile/e2e/features/
|
|
114
|
+
└── {feature-slug}/
|
|
115
|
+
├── {feature-slug}.func.e2e.ts
|
|
116
|
+
├── helpers.ts
|
|
117
|
+
└── index.ts
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Test Data Convention
|
|
121
|
+
- **Hardcoded values**: Directly in test
|
|
122
|
+
- **Credentials**: `getCredentials()` → password from process.env
|
|
123
|
+
- **Environment data**: `loadTestData()` → from test-data.{env}.json
|
|
124
|
+
- **NEVER** hardcode passwords/tokens
|
|
125
|
+
|
|
126
|
+
## Run Tests
|
|
127
|
+
```bash
|
|
128
|
+
yarn functest:mobile:{feature-slug}
|
|
129
|
+
npx detox test --configuration ios.sim.debug --testPathPattern='e2e/features/{feature-slug}'
|
|
130
|
+
npx detox test --configuration android.emu.debug --testPathPattern='e2e/features/{feature-slug}'
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Principles
|
|
134
|
+
- Script MUST be runnable directly from CLI
|
|
135
|
+
- Each describe block uses full FT ID for grep-ability
|
|
136
|
+
- Helpers MUST export for Layer 3 reuse
|
|
137
|
+
- DO NOT import from Layer 3 (`flows/`)
|
|
138
|
+
- If `apps/mobile/` doesn't exist → graceful error
|