@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.
Files changed (100) hide show
  1. package/.tas/_platform/claude-code/settings.json +58 -46
  2. package/.tas/_platform/hooks/code-quality.js +127 -127
  3. package/.tas/_platform/hooks/session-end.js +111 -111
  4. package/.tas/agents/architect.md +53 -53
  5. package/.tas/agents/aws-reviewer.md +71 -71
  6. package/.tas/agents/build-resolver.md +89 -59
  7. package/.tas/agents/code-explorer.md +63 -63
  8. package/.tas/agents/csharp-reviewer.md +62 -62
  9. package/.tas/agents/database-reviewer.md +73 -73
  10. package/.tas/agents/doc-updater.md +68 -66
  11. package/.tas/agents/python-reviewer.md +67 -67
  12. package/.tas/agents/security-reviewer.md +79 -79
  13. package/.tas/agents/software-engineer.md +53 -0
  14. package/.tas/agents/typescript-reviewer.md +65 -65
  15. package/.tas/commands/ado-create.md +33 -28
  16. package/.tas/commands/ado-delete.md +26 -22
  17. package/.tas/commands/ado-get.md +24 -20
  18. package/.tas/commands/ado-status.md +22 -18
  19. package/.tas/commands/ado-update.md +31 -27
  20. package/.tas/commands/tas-adr.md +37 -33
  21. package/.tas/commands/tas-apitest-plan.md +177 -173
  22. package/.tas/commands/tas-apitest.md +147 -143
  23. package/.tas/commands/tas-brainstorm.md +23 -19
  24. package/.tas/commands/tas-brd.md +50 -0
  25. package/.tas/commands/tas-bug.md +127 -113
  26. package/.tas/commands/tas-checklist.md +180 -0
  27. package/.tas/commands/tas-debug.md +103 -0
  28. package/.tas/commands/tas-design.md +41 -37
  29. package/.tas/commands/tas-dev.md +225 -125
  30. package/.tas/commands/tas-e2e-mobile.md +146 -155
  31. package/.tas/commands/tas-e2e-web.md +150 -163
  32. package/.tas/commands/tas-e2e.md +289 -102
  33. package/.tas/commands/tas-feature.md +181 -47
  34. package/.tas/commands/tas-fix.md +72 -51
  35. package/.tas/commands/tas-functest-mobile.md +138 -144
  36. package/.tas/commands/tas-functest-web.md +176 -192
  37. package/.tas/commands/tas-functest.md +225 -76
  38. package/.tas/commands/tas-init.md +22 -17
  39. package/.tas/commands/tas-master-plan.md +300 -0
  40. package/.tas/commands/tas-orchestrate.md +159 -0
  41. package/.tas/commands/tas-plan.md +152 -117
  42. package/.tas/commands/tas-prd.md +57 -37
  43. package/.tas/commands/tas-review-pr.md +174 -0
  44. package/.tas/commands/tas-review.md +115 -113
  45. package/.tas/commands/tas-sad.md +47 -43
  46. package/.tas/commands/tas-security.md +91 -87
  47. package/.tas/commands/tas-spec.md +54 -50
  48. package/.tas/commands/tas-status.md +25 -16
  49. package/.tas/project-status-example.yaml +3 -1
  50. package/.tas/rules/ado-integration.md +67 -65
  51. package/.tas/rules/common/api-design.md +517 -517
  52. package/.tas/rules/common/build-debug-loop.md +233 -0
  53. package/.tas/rules/common/code-review.md +4 -0
  54. package/.tas/rules/common/feature-done.md +42 -0
  55. package/.tas/rules/common/post-implementation-review.md +4 -0
  56. package/.tas/rules/common/project-status.md +33 -16
  57. package/.tas/rules/common/sad-impact.md +81 -0
  58. package/.tas/rules/common/tdd.md +104 -89
  59. package/.tas/rules/csharp/api-testing.md +2 -2
  60. package/.tas/rules/csharp/torus-core-framework.md +128 -0
  61. package/.tas/tas-example.yaml +9 -32
  62. package/.tas/templates/AGENTS.md +13 -0
  63. package/.tas/templates/API-Test-Spec.md +5 -4
  64. package/.tas/templates/BRD.md +133 -0
  65. package/.tas/templates/Bug.md +15 -0
  66. package/.tas/templates/E2E-Execution-Report.md +8 -8
  67. package/.tas/templates/E2E-Mobile-Spec.md +6 -8
  68. package/.tas/templates/E2E-Report.md +2 -2
  69. package/.tas/templates/E2E-Scenario.md +22 -22
  70. package/.tas/templates/E2E-Test-Spec.md +274 -0
  71. package/.tas/templates/E2E-Web-Spec.md +4 -4
  72. package/.tas/templates/Feature-Technical-Part.md +69 -0
  73. package/.tas/templates/Feature-Technical-Stack.md +74 -0
  74. package/.tas/templates/Feature-Technical.md +329 -0
  75. package/.tas/templates/Feature.md +50 -26
  76. package/.tas/templates/Func-Test-Script.md +29 -56
  77. package/.tas/templates/Func-Test-Spec.md +144 -142
  78. package/.tas/templates/PRD.md +173 -142
  79. package/.tas/templates/TestChecklist.md +96 -0
  80. package/.tas/templates/torus-dotnet-bootstrap.md +223 -0
  81. package/.tas/tools/tas-ado-readme.md +24 -27
  82. package/.tas/tools/tas-ado.py +328 -25
  83. package/.tas/tools/tas-github.py +339 -0
  84. package/README.md +142 -57
  85. package/bin/cli.js +90 -90
  86. package/lib/adapters/antigravity.js +131 -131
  87. package/lib/adapters/claude-code.js +71 -35
  88. package/lib/adapters/codex.js +157 -157
  89. package/lib/adapters/cursor.js +80 -80
  90. package/lib/adapters/index.js +20 -20
  91. package/lib/adapters/utils.js +81 -81
  92. package/lib/deleted-files.json +7 -0
  93. package/lib/install.js +546 -543
  94. package/package.json +2 -2
  95. package/.tas/README.md +0 -334
  96. package/.tas/commands/tas-epic.md +0 -35
  97. package/.tas/commands/tas-story.md +0 -91
  98. package/.tas/rules/common/story-done.md +0 -30
  99. package/.tas/templates/Epic.md +0 -46
  100. package/.tas/templates/Story.md +0 -90
@@ -1,51 +1,72 @@
1
- # /tas-fix $ARGUMENTS
2
-
3
- Role: SE - Software Engineer
4
- Quick fix for small bugs or obvious errors — no ticket needed, no full lifecycle.
5
- Use when: solo dev, quick hotfix, bug found during development.
6
- Differs from /tas-bug: no Bug file created, no status tracking, no deploy flow.
7
-
8
- ## Stack Detection
9
- Read `.tas/rules/common/stack-detection.md`.
10
-
11
- ## Actions
12
-
13
- ### 1. Understand bug
14
- $ARGUMENTS is error description, error message, or file:line_number.
15
- - If error message/stack trace provided: parse immediately, identify error file and line
16
- - If only description: ask exactly 1 clarifying question (reproduce steps or expected vs actual)
17
- - DO NOT ask more than 1 question
18
-
19
- ### 2. Diagnose (max 3 files read)
20
- - Read error file and directly related files
21
- - Identify root cause in 1-2 short sentences
22
- - DO NOT read entire project, DO NOT scan folder structure
23
- - If need to read more files beyond first 3: ask user confirmation
24
-
25
- ### 3. Fix with regression test
26
-
27
- Before fixing, read relevant rules:
28
- - `.tas/rules/common/security.md` — check if fix creates security risks
29
- - `.tas/rules/common/testing.md` regression test writing patterns
30
- - `.tas/rules/[lang_rules]/coding-style.md` — current stack conventions (if identifiable)
31
-
32
- Then:
33
- a. Write 1 minimal test case reproducing bug (if project has test framework)
34
- b. Confirm test FAILS
35
- c. Fix code at root cause
36
- d. Confirm test PASSES
37
- e. Quick run of test suite if available (to check regression)
38
-
39
- ### 4. Wrap up
40
- - Output commit message: `fix: <short description>`
41
- - Remind: "If this bug may recur or affects production, consider using /tas-bug for full tracking."
42
-
43
- ## Principles
44
- - Total files read ≤ 3 unless permitted
45
- - Fix at root cause, DO NOT patch symptom
46
- - If fix leads to architecture change → stop, suggest using /tas-bug + /tas-adr
47
- - If bug is in production with high severity stop, suggest using /tas-bug with severity Critical/High
48
-
49
- ## Final StepToken Log
50
-
51
- Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to related Story or Bug file (if any).
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
- # /tas-functest-mobile $ARGUMENTS
2
-
3
- Role: SE / QA
4
- Generate all Detox automation test scripts for a mobile Feature.
5
-
6
- ## IMPORTANT - Layer 2: Mobile Functional Test Scripts
7
- - Create Detox test scripts from Func-Test-Spec (markdown)
8
- - Scripts located in `apps/mobile/e2e/features/`
9
- - Reusable helpers exported for Layer 3 (E2E) reuse
10
- - Hardcoded data in tests, credentials from .env
11
-
12
- ## Actions
13
-
14
- ### Step 1: Identify Feature
15
- 1. $ARGUMENTS is Feature ID or file path
16
- 2. If not provided: scan `docs/epics/**/Feature-*.md` for features with status In Progress
17
- 3. Read Feature file to get Epic/Feature numbers and list of Stories
18
-
19
- ### Step 2: Check Prerequisites
20
- 1. Check `apps/mobile/` exists. If not error:
21
- > "Mobile app doesn't exist in this project. Please create apps/mobile/ first."
22
- 2. Find all `Func-Test-*.md` files in Feature directory:
23
- ```
24
- docs/epics/{epic-dir}/{feature-dir}/Func-Test-*.md
25
- ```
26
- 3. If no Func-Test-Spec exists error:
27
- > "No Func-Test-Spec for this Feature yet. Run /tas-functest {story-ID} first."
28
- 4. Read `apps/mobile/e2e/test-ids.ts` to know existing testIDs
29
- 5. Read `apps/mobile/e2e/helpers/data-loader.ts` and `test-utils.ts` to understand patterns
30
-
31
- ### Step 3: Aggregate FT Test Cases
32
- - From all Func-Test-Spec files, aggregate list of FT test cases
33
- - Group by Story
34
- - Get test data requirements from each spec
35
-
36
- ### Step 4: Generate Test Scripts
37
- For EACH Story with Func-Test-Spec:
38
-
39
- **File output**: `apps/mobile/e2e/features/{epic-slug}/{feature-slug}/{story-slug}.func.e2e.ts`
40
-
41
- **Structure**:
42
- ```typescript
43
- /**
44
- * Functional Tests: {Story Name}
45
- * Story: {Story_ID}
46
- * Feature: {Feature_ID}
47
- * Epic: {Epic_ID}
48
- *
49
- * Generated by /tas-functest-mobile
50
- * Spec: docs/epics/{epic-dir}/{feature-dir}/Func-Test-{story-slug}.md
51
- */
52
-
53
- import { device, element, expect, by, waitFor } from 'detox';
54
- import { TEST_IDS } from '../../../test-ids';
55
- import { loadTestData, getCredentials } from '../../../helpers/data-loader';
56
- import { login, navigateTo } from '../../../helpers/test-utils';
57
-
58
- const testData = loadTestData();
59
-
60
- describe('{Feature Name} - {Story Name}', () => {
61
- beforeAll(async () => {
62
- await device.launchApp({ newInstance: true });
63
- });
64
-
65
- beforeEach(async () => {
66
- await device.reloadReactNative();
67
- });
68
-
69
- // AC Reference: AC-1
70
- describe('{PROJECT}_E{EPIC}_F{FEATURE}_S{STORY}_FT_001_H', () => {
71
- it('should {description from spec}', async () => {
72
- // Given: {precondition}
73
- // When: {action}
74
- // Then: {expected}
75
- });
76
- });
77
- });
78
- ```
79
-
80
- ### Step 5: Update test-ids.ts (if needed)
81
- - If test cases need testID not in test-ids.ts
82
- - Add new testID per current naming convention
83
- - Keep structure: nested object with dot notation
84
-
85
- ### Step 6: Generate Feature Helpers
86
- Create file `apps/mobile/e2e/features/{epic-slug}/{feature-slug}/helpers.ts`:
87
- ```typescript
88
- /**
89
- * Reusable helpers for {Feature Name}
90
- * Exported for Layer 3 E2E scripts reuse
91
- */
92
-
93
- export async function {featureSpecificHelper}() {
94
- // Helper logic extracted from functional tests
95
- }
96
- ```
97
-
98
- ### Step 7: Update package.json Script
99
- Add or update script in `apps/mobile/package.json`:
100
- ```json
101
- "functest:mobile:{feature-slug}": "detox test --configuration ios.sim.debug --testPathPattern='e2e/features/{epic-slug}/{feature-slug}'"
102
- ```
103
-
104
- ### Step 8: Generate Index
105
- Create `apps/mobile/e2e/features/{epic-slug}/{feature-slug}/index.ts`:
106
- ```typescript
107
- export * from './helpers';
108
- ```
109
-
110
- ## File Structure Output
111
- ```
112
- apps/mobile/e2e/features/
113
- └── {epic-slug}/
114
- └── {feature-slug}/
115
- ├── {story-1-slug}.func.e2e.ts
116
- ├── {story-2-slug}.func.e2e.ts
117
- ├── helpers.ts
118
- └── index.ts
119
- ```
120
-
121
- ## Test Data Convention
122
- - **Hardcoded values**: Directly in test (e.g., "invalid@email", "short")
123
- - **Credentials**: `const creds = getCredentials();`password from process.env
124
- - **Environment data**: `const testData = loadTestData();` → read from test-data.{env}.json
125
- - **NEVER** hardcode passwords/tokens in test files
126
-
127
- ## Run Tests
128
- ```bash
129
- # Run all func tests for feature
130
- yarn functest:mobile:{feature-slug}
131
-
132
- # Run only one story
133
- npx detox test --configuration ios.sim.debug --testPathPattern='e2e/features/{epic}/{feature}/{story}'
134
-
135
- # Run with Android
136
- npx detox test --configuration android.emu.debug --testPathPattern='e2e/features/{epic}/{feature}'
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