@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.
Files changed (99) 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 +131 -54
  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 -546
  94. package/package.json +1 -1
  95. package/.tas/commands/tas-epic.md +0 -35
  96. package/.tas/commands/tas-story.md +0 -91
  97. package/.tas/rules/common/story-done.md +0 -30
  98. package/.tas/templates/Epic.md +0 -46
  99. package/.tas/templates/Story.md +0 -90
@@ -1,33 +1,37 @@
1
- # /tas-adr $ARGUMENTS
2
-
3
- Role: SE - Software Engineer
4
- Create or update Architecture Decision Record.
5
-
6
- ## Actions
7
- 1. Need context from .tas/templates/ADR.md
8
- 2. Scan docs/adr/ to identify existing ADRs
9
- 3. Determine mode based on $ARGUMENTS:
10
-
11
- ### CREATE mode ($ARGUMENTS is new title, e.g., "Use CQRS for Order Service"):
12
- 4. Determine next sequence number (ADR-001, ADR-002...)
13
- 5. If docs/sad.md exists, need context from SAD to ensure ADR consistency
14
- 6. Create file docs/adr/ADR-{NNN}-{slug}.md
15
- 7. Update `project-status.yaml` per `.tas/rules/common/project-status.md` add entry to `adrs`.
16
-
17
- ### UPDATE mode ($ARGUMENTS is ADR ID, e.g., "ADR-001"):
18
- 4. Need context from current ADR file
19
- 5. Ask user what needs changing (update status, add consequences, supersede...)
20
- 6. Update file, add changelog
21
- 7. If supersede: update old ADR status to "Superseded by ADR-{NNN}"
22
- 8. Update `project-status.yaml` per `.tas/rules/common/project-status.md` update `adrs.{ADR_ID}.status`.
23
-
24
- ## Principles
25
- - ADR must have: Context, Decision, Rationale, Consequences, Alternatives Considered
26
- - Status: Proposed | Accepted | Deprecated | Superseded
27
- - Each ADR is independent, self-contained with enough context to understand
28
- - Link to related ADRs if any (Supersedes, Related to)
29
- - Mermaid diagram rules: :::mermaid wrapper, no () in node labels
30
-
31
- ## Final Step Token Log
32
-
33
- Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to working ADR file.
1
+ ---
2
+ model: opus
3
+ ---
4
+
5
+ # /tas-adr $ARGUMENTS
6
+
7
+ Role: SE - Software Engineer
8
+ Create or update Architecture Decision Record.
9
+
10
+ ## Actions
11
+ 1. Need context from .tas/templates/ADR.md
12
+ 2. Scan docs/adr/ to identify existing ADRs
13
+ 3. Determine mode based on $ARGUMENTS:
14
+
15
+ ### CREATE mode ($ARGUMENTS is new title, e.g., "Use CQRS for Order Service"):
16
+ 4. Determine next sequence number (ADR-001, ADR-002...)
17
+ 5. If docs/sad.md exists, need context from SAD to ensure ADR consistency
18
+ 6. Create file docs/adr/ADR-{NNN}-{slug}.md
19
+ 7. Update `project-status.yaml` per `.tas/rules/common/project-status.md` add entry to `adrs`.
20
+
21
+ ### UPDATE mode ($ARGUMENTS is ADR ID, e.g., "ADR-001"):
22
+ 4. Need context from current ADR file
23
+ 5. Ask user what needs changing (update status, add consequences, supersede...)
24
+ 6. Update file, add changelog
25
+ 7. If supersede: update old ADR status to "Superseded by ADR-{NNN}"
26
+ 8. Update `project-status.yaml` per `.tas/rules/common/project-status.md` update `adrs.{ADR_ID}.status`.
27
+
28
+ ## Principles
29
+ - ADR must have: Context, Decision, Rationale, Consequences, Alternatives Considered
30
+ - Status: Proposed | Accepted | Deprecated | Superseded
31
+ - Each ADR is independent, self-contained with enough context to understand
32
+ - Link to related ADRs if any (Supersedes, Related to)
33
+ - Mermaid diagram rules: :::mermaid wrapper, no () in node labels
34
+
35
+ ## Final Step — Token Log
36
+
37
+ Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to working ADR file.
@@ -1,173 +1,177 @@
1
- # /tas-apitest-plan $ARGUMENTS
2
-
3
- Role: SE - Software Engineer
4
- Generate API Test Specification (Markdown) from API Spec (OpenAPI 3.0, Markdown, YAML) or analyze API code.
5
-
6
- ## Always / Ask / Never
7
-
8
- | | Action |
9
- |---|---|
10
- | **Always** | Read entire spec or analyze code before creating test spec |
11
- | **Always** | Organize test cases by API version — each version separate section |
12
- | **Always** | Append-only: don't modify sections in existing old version |
13
- | **Always** | Coverage matrix: each endpoint needs ≥1 happy path + ≥1 error path |
14
- | **Always** | Read `.tas/rules/csharp/api-testing.md` for conventions |
15
- | **Ask** | When spec unclear about expected response schema or business rule |
16
- | **Never** | Use version folder/syntax in test spec file (use section headers instead) |
17
- | **Never** | Skip error path — each endpoint needs cover validation errors |
18
-
19
- ## Actions
20
-
21
- ### Step 1Locate Inputs
22
-
23
- `$ARGUMENTS` is path to:
24
- - API Spec file (OpenAPI 3.0 JSON/YAML, Markdown)
25
- - Or Story ID glob find `docs/epics/**/Story-{ID}*.md`
26
- - Or path to API code project to analyze
27
-
28
- If not provided ask user:
29
- ```
30
- Enter input for /tas-apitest-plan:
31
- 1. Path to API Spec file (OpenAPI/Markdown/YAML)
32
- 2. Story ID (to find spec link in Story)
33
- 3. Path to API code to auto-analyze
34
- ```
35
-
36
- ### Step 2 Detect Existing Test Spec
37
-
38
- Glob find `docs/tests/API-Test-Spec-*.md`.
39
-
40
- - **Found**: Read file, detect existing versions (find section headers `## v{N}`)
41
- - **Not found**: Create new with version v1
42
-
43
- ### Step 3 — Parse Input
44
-
45
- **If API Spec file:**
46
- - Read and parse OpenAPI/Markdown/YAML
47
- - Collect for each endpoint:
48
- - HTTP method + path, path/query params, request body schema
49
- - Response schemas per status code
50
- - Auth requirement, description/summary
51
- - Tags to group endpoints
52
-
53
- **If Story:**
54
- - Read Story to find spec link in `## Technical Plan` or `## Acceptance Criteria`
55
- - Parse spec as above
56
- - Add AC mapping to test spec
57
-
58
- **If code path:**
59
- - Glob find controller/handler files (`.cs`, `.ts`, `.py` per stack)
60
- - Analyze attributes/routes to detect endpoints
61
- - Extract DTO classes to know request/response schema
62
- - Ask user confirm if detection unclear
63
-
64
- ### Step 4 Detect API Version
65
-
66
- Prioritize in order:
67
- 1. `info.version` in OpenAPI
68
- 2. Prefix in URL path (v1/, v2/)
69
- 3. Ask user
70
-
71
- Version format: `v1`, `v2` (no dot).
72
-
73
- ### Step 5 — Determine Output Path
74
-
75
- Output: `docs/tests/API-Test-Spec-{slug}.md`
76
-
77
- **Slug generation:**
78
- - From `api_name` in spec → lowercase, replace spaces with dashes
79
- - Or ask user for short slug (e.g., `users`, `orders`, `products`)
80
-
81
- ### Step 6 — Determine Update Mode
82
-
83
- If spec file exists and version already exists:
84
- - **Append mode** (default): add new test cases to end of current version section
85
- - Ask user if want new version (v2, v3...):
86
-
87
- ```
88
- Spec file already exists with version {current}. You want:
89
- 1. Append test cases to version {current} (default)
90
- 2. Create new version (v{next}) for test cases
91
- ```
92
-
93
- ### Step 7 Generate Test Spec
94
-
95
- Read template `.tas/templates/API-Test-Spec.md` for structure.
96
-
97
- **Analyze endpoints to create coverage matrix:**
98
-
99
- For each endpoint, generate test cases for:
100
- 1. **Happy path** (2xx) — always have
101
- 2. **Unauthorized** (401) if endpoint requires auth
102
- 3. **Forbidden** (403) — if has RBAC/ownership check
103
- 4. **Not found** (404) if has path param
104
- 5. **Validation error** (400/422) — if has required fields or business rules
105
- 6. **Business rules** — from Story ACs or spec descriptions
106
-
107
- **Coverage matrix format:**
108
- ```
109
- | Endpoint | Happy Path | 401 Unauthorized | 403 Forbidden | 404 Not Found | 400/422 Validation | Business Rule |
110
- |----------|:---------:|:----------------:|:-------------:|:-------------:|:------------------:|:-------------:|
111
- | GET /api/users | ✓ | ✓ | | | | |
112
- | POST /api/users | ✓ | ✓ | | | ✓ | |
113
- ```
114
-
115
- **Test case detail format:**
116
- ```
117
- #### TC-XXX: {Title} — {Modifier}
118
- - **Endpoint**: `{METHOD} {path}`
119
- - **Auth**: Required/Not Required
120
- - **Preconditions**:
121
- - {List preconditions}
122
- - **Request Query/Path/Body**:
123
- - {Request details}
124
- - **Expected Response**:
125
- - Status: {code}
126
- - Body: {schema}
127
- - **Assertions**:
128
- - {List assertions}
129
- - **AC Reference**: AC-{N} (if any)
130
- - **Test Method Name**: `{Method}_{Resource}_Returns{Status}_When{Condition}`
131
- ```
132
-
133
- ### Step 8 Write Test Spec File
134
-
135
- **File doesn't exist:** Create new from template.
136
-
137
- **File exists (append mode):**
138
- - Read current file
139
- - Find section `## v{N}` being worked on
140
- - Append new test cases to end of section before `## Version History` or `## Changelog`
141
- - Preserve all old content
142
-
143
- ### Step 9 Summary
144
-
145
- Display:
146
- 1. Output file path
147
- 2. Number of endpoints detected
148
- 3. Number of test cases generated
149
- 4. Coverage matrix
150
- 5. Next steps:
151
- - Review test spec file
152
- - Run `/tas-apitest docs/tests/API-Test-Spec-{slug}.md` to generate code
153
-
154
- ```
155
- ## API Test Spec Generated
156
-
157
- **Output**: `docs/tests/API-Test-Spec-{slug}.md`
158
- **Version**: v{N}
159
- **Endpoints**: {N}
160
- **Test Cases**: {N}
161
-
162
- ### Coverage Matrix
163
- [Print coverage matrix]
164
-
165
- ### Next Steps
166
- 1. Review test spec: `docs/tests/API-Test-Spec-{slug}.md`
167
- 2. Generate test code: `/tas-apitest docs/tests/API-Test-Spec-{slug}.md`
168
- 3. Run tests: `dotnet test tests/ApiTests/`
169
- ```
170
-
171
- ## Final Step Token Log
172
-
173
- Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to test spec file.
1
+ ---
2
+ model: sonnet
3
+ ---
4
+
5
+ # /tas-apitest-plan $ARGUMENTS
6
+
7
+ Role: SE - Software Engineer
8
+ Generate API Test Specification (Markdown) from API Spec (OpenAPI 3.0, Markdown, YAML) or analyze API code.
9
+
10
+ ## Always / Ask / Never
11
+
12
+ | | Action |
13
+ |---|---|
14
+ | **Always** | Read entire spec or analyze code before creating test spec |
15
+ | **Always** | Organize test cases by API version each version separate section |
16
+ | **Always** | Append-only: don't modify sections in existing old version |
17
+ | **Always** | Coverage matrix: each endpoint needs ≥1 happy path + ≥1 error path |
18
+ | **Always** | Read `.tas/rules/csharp/api-testing.md` for conventions |
19
+ | **Ask** | When spec unclear about expected response schema or business rule |
20
+ | **Never** | Use version folder/syntax in test spec file (use section headers instead) |
21
+ | **Never** | Skip error path each endpoint needs cover validation errors |
22
+
23
+ ## Actions
24
+
25
+ ### Step 1Locate Inputs
26
+
27
+ `$ARGUMENTS` is path to:
28
+ - API Spec file (OpenAPI 3.0 JSON/YAML, Markdown)
29
+ - Or Feature ID — glob find `docs/features/{CODE}-Feature-{ID}-*/{CODE}-Feature-{ID}-*.md`
30
+ - Or path to API code project to analyze
31
+
32
+ If not provided ask user:
33
+ ```
34
+ Enter input for /tas-apitest-plan:
35
+ 1. Path to API Spec file (OpenAPI/Markdown/YAML)
36
+ 2. Feature ID (to find spec link in Feature/Feature-Technical)
37
+ 3. Path to API code to auto-analyze
38
+ ```
39
+
40
+ ### Step 2 Detect Existing Test Spec
41
+
42
+ Glob find `docs/tests/API-Test-Spec-*.md`.
43
+
44
+ - **Found**: Read file, detect existing versions (find section headers `## v{N}`)
45
+ - **Not found**: Create new with version v1
46
+
47
+ ### Step 3 Parse Input
48
+
49
+ **If API Spec file:**
50
+ - Read and parse OpenAPI/Markdown/YAML
51
+ - Collect for each endpoint:
52
+ - HTTP method + path, path/query params, request body schema
53
+ - Response schemas per status code
54
+ - Auth requirement, description/summary
55
+ - Tags to group endpoints
56
+
57
+ **If Feature:**
58
+ - Read Feature file (business AC) + Feature-Technical file (Logic Flow / Data Flow / API spec)
59
+ - Parse spec as above
60
+ - Add AC mapping to test spec (use `{PROJECT}_F{FEATURE}_AC{N}_*` ID scheme)
61
+
62
+ **If code path:**
63
+ - Glob find controller/handler files (`.cs`, `.ts`, `.py` per stack)
64
+ - Analyze attributes/routes to detect endpoints
65
+ - Extract DTO classes to know request/response schema
66
+ - Ask user confirm if detection unclear
67
+
68
+ ### Step 4 Detect API Version
69
+
70
+ Prioritize in order:
71
+ 1. `info.version` in OpenAPI
72
+ 2. Prefix in URL path (v1/, v2/)
73
+ 3. Ask user
74
+
75
+ Version format: `v1`, `v2` (no dot).
76
+
77
+ ### Step 5 — Determine Output Path
78
+
79
+ Output: `docs/tests/API-Test-Spec-{slug}.md`
80
+
81
+ **Slug generation:**
82
+ - From `api_name` in spec → lowercase, replace spaces with dashes
83
+ - Or ask user for short slug (e.g., `users`, `orders`, `products`)
84
+
85
+ ### Step 6 Determine Update Mode
86
+
87
+ If spec file exists and version already exists:
88
+ - **Append mode** (default): add new test cases to end of current version section
89
+ - Ask user if want new version (v2, v3...):
90
+
91
+ ```
92
+ Spec file already exists with version {current}. You want:
93
+ 1. Append test cases to version {current} (default)
94
+ 2. Create new version (v{next}) for test cases
95
+ ```
96
+
97
+ ### Step 7 Generate Test Spec
98
+
99
+ Read template `.tas/templates/API-Test-Spec.md` for structure.
100
+
101
+ **Analyze endpoints to create coverage matrix:**
102
+
103
+ For each endpoint, generate test cases for:
104
+ 1. **Happy path** (2xx) — always have
105
+ 2. **Unauthorized** (401) if endpoint requires auth
106
+ 3. **Forbidden** (403) — if has RBAC/ownership check
107
+ 4. **Not found** (404) — if has path param
108
+ 5. **Validation error** (400/422) — if has required fields or business rules
109
+ 6. **Business rules** from Feature ACs or spec descriptions
110
+
111
+ **Coverage matrix format:**
112
+ ```
113
+ | Endpoint | Happy Path | 401 Unauthorized | 403 Forbidden | 404 Not Found | 400/422 Validation | Business Rule |
114
+ |----------|:---------:|:----------------:|:-------------:|:-------------:|:------------------:|:-------------:|
115
+ | GET /api/users | ✓ | ✓ | | | | |
116
+ | POST /api/users | ✓ | ✓ | | | ✓ | |
117
+ ```
118
+
119
+ **Test case detail format:**
120
+ ```
121
+ #### TC-XXX: {Title} — {Modifier}
122
+ - **Endpoint**: `{METHOD} {path}`
123
+ - **Auth**: Required/Not Required
124
+ - **Preconditions**:
125
+ - {List preconditions}
126
+ - **Request Query/Path/Body**:
127
+ - {Request details}
128
+ - **Expected Response**:
129
+ - Status: {code}
130
+ - Body: {schema}
131
+ - **Assertions**:
132
+ - {List assertions}
133
+ - **AC Reference**: AC-{N} (if any)
134
+ - **Test Method Name**: `{Method}_{Resource}_Returns{Status}_When{Condition}`
135
+ ```
136
+
137
+ ### Step 8 — Write Test Spec File
138
+
139
+ **File doesn't exist:** Create new from template.
140
+
141
+ **File exists (append mode):**
142
+ - Read current file
143
+ - Find section `## v{N}` being worked on
144
+ - Append new test cases to end of section before `## Version History` or `## Changelog`
145
+ - Preserve all old content
146
+
147
+ ### Step 9 Summary
148
+
149
+ Display:
150
+ 1. Output file path
151
+ 2. Number of endpoints detected
152
+ 3. Number of test cases generated
153
+ 4. Coverage matrix
154
+ 5. Next steps:
155
+ - Review test spec file
156
+ - Run `/tas-apitest docs/tests/API-Test-Spec-{slug}.md` to generate code
157
+
158
+ ```
159
+ ## API Test Spec Generated
160
+
161
+ **Output**: `docs/tests/API-Test-Spec-{slug}.md`
162
+ **Version**: v{N}
163
+ **Endpoints**: {N}
164
+ **Test Cases**: {N}
165
+
166
+ ### Coverage Matrix
167
+ [Print coverage matrix]
168
+
169
+ ### Next Steps
170
+ 1. Review test spec: `docs/tests/API-Test-Spec-{slug}.md`
171
+ 2. Generate test code: `/tas-apitest docs/tests/API-Test-Spec-{slug}.md`
172
+ 3. Run tests: `dotnet test tests/ApiTests/`
173
+ ```
174
+
175
+ ## Final Step — Token Log
176
+
177
+ Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to test spec file.