@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
package/.tas/commands/tas-adr.md
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
|
13
|
-
|
|
14
|
-
| **Always** | Read
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 1 — Locate 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.
|