@torus-engineering/tas-kit 1.9.0 → 1.11.1
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/.claude/commands/ado-create.md +17 -17
- package/.claude/commands/ado-delete.md +11 -11
- package/.claude/commands/ado-get.md +12 -12
- package/.claude/commands/ado-status.md +12 -12
- package/.claude/commands/ado-update.md +15 -15
- package/.claude/commands/tas-adr.md +33 -33
- package/.claude/commands/tas-apitest-plan.md +173 -173
- package/.claude/commands/tas-apitest.md +143 -143
- package/.claude/commands/tas-brainstorm.md +14 -14
- package/.claude/commands/tas-bug.md +113 -113
- package/.claude/commands/tas-design.md +37 -37
- package/.claude/commands/tas-dev.md +128 -128
- package/.claude/commands/tas-e2e-mobile.md +155 -155
- package/.claude/commands/tas-e2e-web.md +163 -163
- package/.claude/commands/tas-e2e.md +102 -102
- package/.claude/commands/tas-epic.md +35 -35
- package/.claude/commands/tas-feature.md +47 -47
- package/.claude/commands/tas-fix.md +51 -51
- package/.claude/commands/tas-functest-mobile.md +144 -144
- package/.claude/commands/tas-functest-web.md +192 -192
- package/.claude/commands/tas-functest.md +76 -76
- package/.claude/commands/tas-init.md +14 -14
- package/.claude/commands/tas-plan.md +198 -200
- package/.claude/commands/tas-prd.md +37 -37
- package/.claude/commands/tas-review.md +111 -111
- package/.claude/commands/tas-sad.md +43 -43
- package/.claude/commands/tas-security.md +87 -81
- package/.claude/commands/tas-spec.md +20 -20
- package/.claude/commands/tas-status.md +13 -13
- package/.claude/commands/tas-story.md +91 -91
- package/.claude/commands/tas-verify.md +51 -51
- package/.claude/rules/common/post-review-agent.md +49 -49
- package/.claude/rules/common/project-status.md +14 -14
- package/.claude/rules/common/stack-detection.md +6 -6
- package/.claude/rules/common/token-logging.md +27 -27
- package/.claude/rules/csharp/api-testing.md +171 -171
- package/.claude/skills/ado-integration/SKILL.md +36 -36
- package/.claude/skills/tas-conventions/SKILL.md +32 -32
- package/.claude/skills/tas-implementation-complete/SKILL.md +100 -99
- package/.claude/skills/tas-tdd/SKILL.md +123 -123
- package/.claude/skills/token-logger/SKILL.md +19 -19
- package/.tas/README.md +266 -1520
- package/.tas/checklists/code-review.md +13 -13
- package/.tas/checklists/security.md +3 -3
- package/.tas/checklists/story-done.md +11 -11
- package/.tas/hooks/README.md +138 -0
- package/.tas/hooks/pre-commit +26 -0
- package/.tas/hooks/security-scan.js +599 -0
- package/.tas/project-status-example.yaml +3 -3
- package/.tas/tas-example.yaml +25 -8
- package/.tas/templates/ADR.md +16 -16
- package/.tas/templates/API-Test-Spec.md +3 -3
- package/.tas/templates/Bug.md +12 -12
- package/.tas/templates/Design-Spec.md +8 -8
- package/.tas/templates/E2E-Execution-Report.md +1 -1
- package/.tas/templates/Epic.md +1 -1
- package/.tas/templates/Feature.md +10 -10
- package/.tas/templates/Func-Test-Spec.md +3 -3
- package/.tas/templates/SAD.md +106 -106
- package/.tas/templates/Security-Report.md +3 -3
- package/.tas/templates/Story.md +9 -9
- package/.tas/tools/tas-ado-readme.md +169 -169
- package/.tas/tools/tas-ado.py +1 -1
- package/CLAUDE-Example.md +37 -58
- package/README.md +294 -42
- package/bin/cli.js +24 -7
- package/lib/install.js +161 -47
- package/package.json +1 -1
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
# /tas-apitest $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Generate .NET xUnit automation test project
|
|
5
|
-
|
|
6
|
-
## Always / Ask / Never
|
|
7
|
-
|
|
8
|
-
| |
|
|
9
|
-
|---|---|
|
|
10
|
-
| **Always** |
|
|
11
|
-
| **Always** |
|
|
12
|
-
| **Always** | Append-only:
|
|
13
|
-
| **Always** | URL
|
|
14
|
-
| **Always** | XML doc comment
|
|
15
|
-
| **Ask** |
|
|
16
|
-
| **Never** |
|
|
17
|
-
| **Never** | Hardcode base URL, API key, credentials
|
|
18
|
-
| **Never** |
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
###
|
|
23
|
-
|
|
24
|
-
`$ARGUMENTS`
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
###
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- API version
|
|
37
|
-
- Endpoints
|
|
38
|
-
- Test cases
|
|
39
|
-
- Request/response schemas
|
|
40
|
-
- Auth requirements
|
|
41
|
-
- Test data requirements
|
|
42
|
-
- Setup/teardown notes
|
|
43
|
-
|
|
44
|
-
###
|
|
45
|
-
|
|
46
|
-
Glob
|
|
47
|
-
|
|
48
|
-
- **
|
|
49
|
-
- **
|
|
50
|
-
|
|
51
|
-
###
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Version folder: lowercase,
|
|
56
|
-
|
|
57
|
-
###
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- `ApiTests.csproj`
|
|
61
|
-
- `appsettings.json` (base) + `appsettings.Test.json` + `appsettings.Staging.json`
|
|
62
|
-
- `Shared/TestBase.cs` — load config, HttpClient, helper methods
|
|
63
|
-
- `Shared/ApiTestSettings.cs` — strongly typed settings
|
|
64
|
-
- `.gitignore`
|
|
65
|
-
|
|
66
|
-
###
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
1.
|
|
72
|
-
2. Map
|
|
73
|
-
3. Generate XML doc
|
|
74
|
-
4. Generate assertions
|
|
75
|
-
5. Add AC reference comment
|
|
76
|
-
|
|
77
|
-
Test class header comment:
|
|
78
|
-
```csharp
|
|
79
|
-
// ============================================================
|
|
80
|
-
// {Resource} API Tests — v{N}
|
|
81
|
-
// Spec: docs/tests/API-Test-Spec-{slug}.md
|
|
82
|
-
// Generated: {YYYY-MM-DD}
|
|
83
|
-
// Story: {ID} (if applicable)
|
|
84
|
-
// APPEND-ONLY:
|
|
85
|
-
// ============================================================
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
###
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- **File
|
|
92
|
-
- **File
|
|
93
|
-
- Method
|
|
94
|
-
- Method
|
|
95
|
-
|
|
96
|
-
###
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
###
|
|
103
|
-
|
|
104
|
-
Launch `csharp-reviewer` agent:
|
|
105
|
-
> Review `tests/ApiTests/{version}/`.
|
|
106
|
-
>
|
|
107
|
-
> Format: Critical / High / Medium / Low
|
|
108
|
-
|
|
109
|
-
Gate: Critical/High → fix
|
|
110
|
-
|
|
111
|
-
###
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
1. Test project path
|
|
115
|
-
2. Number of test classes generated
|
|
116
|
-
3. Number of test methods generated
|
|
117
|
-
4. Coverage matrix (
|
|
118
|
-
5. Next steps
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
## API Tests Generated
|
|
122
|
-
|
|
123
|
-
**Project**: `tests/ApiTests/`
|
|
124
|
-
**Version**: v{N}
|
|
125
|
-
**Test Classes**: {N}
|
|
126
|
-
**Test Methods**: {N}
|
|
127
|
-
|
|
128
|
-
### Generated Files
|
|
129
|
-
- tests/ApiTests/{version}/{Resource}ApiTests.cs
|
|
130
|
-
- tests/ApiTests/Shared/TestBase.cs (if new project)
|
|
131
|
-
|
|
132
|
-
### Coverage (vs Spec)
|
|
133
|
-
[Print coverage table: spec test cases vs generated methods]
|
|
134
|
-
|
|
135
|
-
### Next Steps
|
|
136
|
-
1. Configure test environment: edit tests/ApiTests/appsettings.Test.json
|
|
137
|
-
2. Add test data: tests/ApiTests/data/test-data.Test.json
|
|
138
|
-
3. Run tests: `dotnet test tests/ApiTests/`
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
##
|
|
142
|
-
|
|
143
|
-
Invoke skill `token-logger`:
|
|
1
|
+
# /tas-apitest $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Role: SE - Software Engineer
|
|
4
|
+
Generate .NET xUnit automation test project for REST API from API Test Spec file (Markdown).
|
|
5
|
+
|
|
6
|
+
## Always / Ask / Never
|
|
7
|
+
|
|
8
|
+
| | Action |
|
|
9
|
+
|---|---|
|
|
10
|
+
| **Always** | Read entire API Test Spec file before generating any test |
|
|
11
|
+
| **Always** | Organize tests by API version — each version separate folder |
|
|
12
|
+
| **Always** | Append-only: don't modify files in existing old version folder |
|
|
13
|
+
| **Always** | URL and credentials in `appsettings.json` — not hardcoded in code |
|
|
14
|
+
| **Always** | XML doc comment on each test method |
|
|
15
|
+
| **Ask** | When test spec unclear about expected response schema |
|
|
16
|
+
| **Never** | Modify or delete old version test files |
|
|
17
|
+
| **Never** | Hardcode base URL, API key, credentials in test code |
|
|
18
|
+
| **Never** | Skip error path — each endpoint needs ≥1 happy path + ≥1 error path |
|
|
19
|
+
|
|
20
|
+
## Actions
|
|
21
|
+
|
|
22
|
+
### Step 1 — Locate Input
|
|
23
|
+
|
|
24
|
+
`$ARGUMENTS` is path to API Test Spec file: `docs/tests/API-Test-Spec-{slug}.md`.
|
|
25
|
+
|
|
26
|
+
If not provided → ask user:
|
|
27
|
+
```
|
|
28
|
+
Enter path to API Test Spec file (e.g., docs/tests/API-Test-Spec-users.md)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 2 — Parse API Test Spec
|
|
32
|
+
|
|
33
|
+
Read `.claude/rules/csharp/api-testing.md` for conventions before generating.
|
|
34
|
+
|
|
35
|
+
From API Test Spec file, collect:
|
|
36
|
+
- API version
|
|
37
|
+
- Endpoints with method, path, params
|
|
38
|
+
- Test cases per endpoint (TC-XXX)
|
|
39
|
+
- Request/response schemas
|
|
40
|
+
- Auth requirements
|
|
41
|
+
- Test data requirements
|
|
42
|
+
- Setup/teardown notes
|
|
43
|
+
|
|
44
|
+
### Step 3 — Detect Existing Test Project
|
|
45
|
+
|
|
46
|
+
Glob find `**/ApiTests/*.csproj`, `**/Api.Tests/*.csproj`, `**/IntegrationTests/*.csproj`.
|
|
47
|
+
|
|
48
|
+
- **Found**: Read current framework (xUnit/NUnit/MSTest), glob `v*/` folders to know existing versions.
|
|
49
|
+
- **Not found**: Create new at `tests/ApiTests/` with xUnit + FluentAssertions (per `csharp/testing.md`).
|
|
50
|
+
|
|
51
|
+
### Step 4 — Get API Version from Spec
|
|
52
|
+
|
|
53
|
+
Read version from API Test Spec file (find frontmatter `api_version` or section headers `## v{N}`).
|
|
54
|
+
|
|
55
|
+
Version folder: lowercase, no dot — `v1`, `v2` (not `v1.0`).
|
|
56
|
+
|
|
57
|
+
### Step 5 — Generate Infrastructure (only when creating new project)
|
|
58
|
+
|
|
59
|
+
Read `.claude/rules/csharp/api-testing.md` section **Project Structure** and **Config Pattern** to generate:
|
|
60
|
+
- `ApiTests.csproj` with standard packages
|
|
61
|
+
- `appsettings.json` (base) + `appsettings.Test.json` + `appsettings.Staging.json` with values from spec
|
|
62
|
+
- `Shared/TestBase.cs` — load config, HttpClient, helper methods
|
|
63
|
+
- `Shared/ApiTestSettings.cs` — strongly typed settings
|
|
64
|
+
- `.gitignore` for `appsettings.*.local.json`
|
|
65
|
+
|
|
66
|
+
### Step 6 — Generate Test Classes from Spec
|
|
67
|
+
|
|
68
|
+
Group endpoints by resource. Each group → `tests/ApiTests/{version}/{Resource}ApiTests.cs`.
|
|
69
|
+
|
|
70
|
+
For each test case (TC-XXX) in spec:
|
|
71
|
+
1. Read test case details
|
|
72
|
+
2. Map to test method with naming: `{HttpMethod}_{Resource}_Returns{Status}_When{Condition}`
|
|
73
|
+
3. Generate XML doc from test case title
|
|
74
|
+
4. Generate assertions from expected response
|
|
75
|
+
5. Add AC reference comment if any
|
|
76
|
+
|
|
77
|
+
Test class header comment:
|
|
78
|
+
```csharp
|
|
79
|
+
// ============================================================
|
|
80
|
+
// {Resource} API Tests — v{N}
|
|
81
|
+
// Spec: docs/tests/API-Test-Spec-{slug}.md
|
|
82
|
+
// Generated: {YYYY-MM-DD}
|
|
83
|
+
// Story: {ID} (if applicable)
|
|
84
|
+
// APPEND-ONLY: don't modify existing methods.
|
|
85
|
+
// ============================================================
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Step 7 — Append-Only Guard
|
|
89
|
+
|
|
90
|
+
Before writing file: check if file already exists.
|
|
91
|
+
- **File doesn't exist** → create normally.
|
|
92
|
+
- **File exists** in version folder → check each test method:
|
|
93
|
+
- Method exists (same name) → **SKIP**, don't overwrite
|
|
94
|
+
- Method doesn't exist → append to end of class
|
|
95
|
+
|
|
96
|
+
### Step 8 — Generate Test Data Files (if spec requires)
|
|
97
|
+
|
|
98
|
+
If spec has `test-data.{env}.json` references:
|
|
99
|
+
- Create `tests/ApiTests/data/test-data.Test.json` with sample data from spec
|
|
100
|
+
- Guide user to create `test-data.Staging.json` and `test-data.local.json`
|
|
101
|
+
|
|
102
|
+
### Step 9 — Post-Generate Review
|
|
103
|
+
|
|
104
|
+
Launch `csharp-reviewer` agent:
|
|
105
|
+
> Review `tests/ApiTests/{version}/`. Read `.claude/rules/csharp/testing.md` + `.claude/rules/csharp/api-testing.md`.
|
|
106
|
+
> Focus: async/await, HttpClient disposal, assertion completeness, XML doc coverage.
|
|
107
|
+
> Format: Critical / High / Medium / Low with file:line.
|
|
108
|
+
|
|
109
|
+
Gate: Critical/High → fix immediately. Medium/Low → list suggestions.
|
|
110
|
+
|
|
111
|
+
### Step 10 — Summary
|
|
112
|
+
|
|
113
|
+
Display:
|
|
114
|
+
1. Test project path
|
|
115
|
+
2. Number of test classes generated
|
|
116
|
+
3. Number of test methods generated
|
|
117
|
+
4. Coverage matrix (vs spec)
|
|
118
|
+
5. Next steps to run tests
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
## API Tests Generated
|
|
122
|
+
|
|
123
|
+
**Project**: `tests/ApiTests/`
|
|
124
|
+
**Version**: v{N}
|
|
125
|
+
**Test Classes**: {N}
|
|
126
|
+
**Test Methods**: {N}
|
|
127
|
+
|
|
128
|
+
### Generated Files
|
|
129
|
+
- tests/ApiTests/{version}/{Resource}ApiTests.cs
|
|
130
|
+
- tests/ApiTests/Shared/TestBase.cs (if new project)
|
|
131
|
+
|
|
132
|
+
### Coverage (vs Spec)
|
|
133
|
+
[Print coverage table: spec test cases vs generated methods]
|
|
134
|
+
|
|
135
|
+
### Next Steps
|
|
136
|
+
1. Configure test environment: edit tests/ApiTests/appsettings.Test.json
|
|
137
|
+
2. Add test data: tests/ApiTests/data/test-data.Test.json
|
|
138
|
+
3. Run tests: `dotnet test tests/ApiTests/`
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Final Step — Token Log
|
|
142
|
+
|
|
143
|
+
Invoke skill `token-logger`: write AI Usage Log to API Test Spec file.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# /tas-brainstorm $ARGUMENTS
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Role: Any
|
|
4
|
+
Structured brainstorming before coding or designing.
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
1. $ARGUMENTS
|
|
8
|
-
2.
|
|
9
|
-
a. **Clarify**:
|
|
10
|
-
b. **Explore**:
|
|
11
|
-
c. **Evaluate**:
|
|
12
|
-
d. **Decide**:
|
|
6
|
+
## Actions
|
|
7
|
+
1. $ARGUMENTS is the brainstorming topic
|
|
8
|
+
2. Guide through 4 steps:
|
|
9
|
+
a. **Clarify**: Ask 3-5 questions to clarify the problem
|
|
10
|
+
b. **Explore**: Propose 3+ solution directions, each with pros/cons
|
|
11
|
+
c. **Evaluate**: Compare directions by criteria: complexity, maintainability, cost, time
|
|
12
|
+
d. **Decide**: Recommend best direction and reasoning
|
|
13
13
|
|
|
14
|
-
3.
|
|
14
|
+
3. If brainstorming result leads to architecture decision, suggest user run /tas-adr
|
|
15
15
|
|
|
16
|
-
##
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
## Principles
|
|
17
|
+
- DO NOT jump straight to solution
|
|
18
|
+
- Ask first, suggest later
|
|
19
|
+
- Always consider at least 2 alternatives
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
# /tas-bug $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Always / Ask / Never
|
|
7
|
-
|
|
8
|
-
| |
|
|
9
|
-
|---|---|
|
|
10
|
-
| **Always** |
|
|
11
|
-
| **Always** |
|
|
12
|
-
| **Always** | Launch review agent
|
|
13
|
-
| **Ask** |
|
|
14
|
-
| **Never** | Patch symptom —
|
|
15
|
-
| **Never** |
|
|
16
|
-
| **Never** |
|
|
17
|
-
|
|
18
|
-
## Stack Detection
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
###
|
|
24
|
-
|
|
25
|
-
`$ARGUMENTS`
|
|
26
|
-
`$ARGUMENTS`
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
###
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
1.
|
|
35
|
-
2.
|
|
36
|
-
-
|
|
37
|
-
- Severity: `Critical` | `High` | `Medium` | `Low`
|
|
38
|
-
- Steps to reproduce
|
|
39
|
-
- Expected vs Actual behavior
|
|
40
|
-
-
|
|
41
|
-
3.
|
|
42
|
-
4.
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
###
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
**
|
|
51
|
-
> "Bug-{NNN}
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
#### Status = `New` —
|
|
56
|
-
|
|
57
|
-
1.
|
|
58
|
-
2. Trace code flow,
|
|
59
|
-
3.
|
|
60
|
-
4.
|
|
61
|
-
5.
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
#### Status = `Committed` — Fix (SE)
|
|
66
|
-
|
|
67
|
-
**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- `.claude/rules/common/security.md` — fix
|
|
72
|
-
- `.claude/rules/common/testing.md` —
|
|
73
|
-
- `.claude/rules/[lang_agent stack]/coding-style.md` —
|
|
74
|
-
|
|
75
|
-
**Fix workflow:**
|
|
76
|
-
a.
|
|
77
|
-
b. Fix code
|
|
78
|
-
c.
|
|
79
|
-
d.
|
|
80
|
-
→
|
|
81
|
-
|
|
82
|
-
**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
- Output commit message
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
#### Status = `Verify Test` / `Verify Stag` — Verify (PE)
|
|
95
|
-
|
|
96
|
-
1. PE
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
2. **Pass** →
|
|
100
|
-
3. **Fail** →
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
##
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
- Review
|
|
108
|
-
-
|
|
109
|
-
- Flow: `New` → `Committed` → `Deploy Test` → `Verify Test` → `Deploy Stag` → `Verify Stag` → `Deploy Prod` → `Verify Prod` → `Done`
|
|
110
|
-
|
|
111
|
-
##
|
|
112
|
-
|
|
113
|
-
Invoke skill `token-logger`:
|
|
1
|
+
# /tas-bug $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Manage entire bug lifecycle: create, analyze, fix, verify.
|
|
4
|
+
Bug status determines next step — no role declaration needed.
|
|
5
|
+
|
|
6
|
+
## Always / Ask / Never
|
|
7
|
+
|
|
8
|
+
| | Action |
|
|
9
|
+
|---|---|
|
|
10
|
+
| **Always** | Display current status and next action before doing anything |
|
|
11
|
+
| **Always** | Write regression test BEFORE fixing |
|
|
12
|
+
| **Always** | Launch independent review agent after fix — no review in same session |
|
|
13
|
+
| **Ask** | When needing to read files outside Bug file (Status = Committed) |
|
|
14
|
+
| **Never** | Patch symptom — must fix root cause |
|
|
15
|
+
| **Never** | Skip review step after fix |
|
|
16
|
+
| **Never** | Auto-commit or push — wait for user manual testing first |
|
|
17
|
+
|
|
18
|
+
## Stack Detection
|
|
19
|
+
Read `.claude/rules/common/stack-detection.md`.
|
|
20
|
+
|
|
21
|
+
## Actions
|
|
22
|
+
|
|
23
|
+
### Step 1 — Determine mode
|
|
24
|
+
|
|
25
|
+
`$ARGUMENTS` is new bug description → **CREATE mode**
|
|
26
|
+
`$ARGUMENTS` is Bug ID (e.g., `Bug-001`) → **UPDATE mode**
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### CREATE mode
|
|
31
|
+
|
|
32
|
+
Role: PE or SE (whoever discovered the bug)
|
|
33
|
+
|
|
34
|
+
1. Read `project.code` from root/`tas.yaml`
|
|
35
|
+
2. Ask user:
|
|
36
|
+
- Which Feature does this bug belong to?
|
|
37
|
+
- Severity: `Critical` | `High` | `Medium` | `Low`
|
|
38
|
+
- Steps to reproduce
|
|
39
|
+
- Expected vs Actual behavior
|
|
40
|
+
- Environment where discovered: Test | Staging | Production
|
|
41
|
+
3. Create `docs/bugs/{code}-Bug-{NNN}-{slug}.md` from template `.tas/templates/Bug.md`
|
|
42
|
+
4. Initial bug status: `New`
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### UPDATE mode
|
|
47
|
+
|
|
48
|
+
Find Bug file via glob `docs/bugs/*-Bug-{ID}-*.md`, read current status.
|
|
49
|
+
|
|
50
|
+
**Display before acting:**
|
|
51
|
+
> "Bug-{NNN} is currently at status: **{status}** — next step is {action}. Continue?"
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
#### Status = `New` — Analyze (SE)
|
|
56
|
+
|
|
57
|
+
1. Read error logs/stack trace from Bug file
|
|
58
|
+
2. Trace code flow, identify file and line causing error
|
|
59
|
+
3. Write Root Cause Analysis into Bug file
|
|
60
|
+
4. Write Regression Test Cases (test that reproduces bug)
|
|
61
|
+
5. Update status: `New` → `Committed`
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
#### Status = `Committed` — Fix (SE)
|
|
66
|
+
|
|
67
|
+
**File reading rule:** ONLY read Bug file. DO NOT read PRD, SAD, ADR, Design-Spec, DO NOT scan directories.
|
|
68
|
+
If additional files needed → ask user confirmation first.
|
|
69
|
+
|
|
70
|
+
Before fixing, read:
|
|
71
|
+
- `.claude/rules/common/security.md` — fix must not create new security risks
|
|
72
|
+
- `.claude/rules/common/testing.md` — regression test writing patterns
|
|
73
|
+
- `.claude/rules/[lang_agent stack]/coding-style.md` — follow conventions
|
|
74
|
+
|
|
75
|
+
**Fix workflow:**
|
|
76
|
+
a. Run regression test case → confirm **FAIL** (reproduces bug)
|
|
77
|
+
b. Fix code at root cause
|
|
78
|
+
c. Run regression test → confirm **PASS**
|
|
79
|
+
d. Run full test suite → no new regressions
|
|
80
|
+
→ If build fails or test compile errors: launch `build-resolver` agent with error output before continuing.
|
|
81
|
+
|
|
82
|
+
**After fix — Post-Fix Review (Isolated Agent):**
|
|
83
|
+
|
|
84
|
+
Follow `.claude/rules/common/post-review-agent.md`.
|
|
85
|
+
Pass in: Bug file path, changed files list, stack (from CLAUDE.md), lang_agent.
|
|
86
|
+
|
|
87
|
+
After review passes:
|
|
88
|
+
- Update status: `Committed` → `Deploy Test`
|
|
89
|
+
- Output suggested commit message: `fix: {short description} - resolves Bug-{NNN}`
|
|
90
|
+
- Ask: "Have you tested manually? Want to commit and deploy to Test?"
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
#### Status = `Verify Test` / `Verify Stag` — Verify (PE)
|
|
95
|
+
|
|
96
|
+
1. PE verifies on corresponding environment:
|
|
97
|
+
- Run Steps to Reproduce again → confirm bug no longer exists
|
|
98
|
+
- Check regression test case has passed
|
|
99
|
+
2. **Pass** → update to next status (`Deploy Stag` or `Done`)
|
|
100
|
+
3. **Fail** → document reason, update status back to `Committed`, SE fixes again
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Principles
|
|
105
|
+
- DO NOT patch symptom — must fix root cause
|
|
106
|
+
- MUST have regression test case BEFORE fixing
|
|
107
|
+
- Review must run through independent Agent — not inline in current session
|
|
108
|
+
- `Critical`/`High` bugs must be fixed before Feature is Verified
|
|
109
|
+
- Flow: `New` → `Committed` → `Deploy Test` → `Verify Test` → `Deploy Stag` → `Verify Stag` → `Deploy Prod` → `Verify Prod` → `Done`
|
|
110
|
+
|
|
111
|
+
## Final Step — Token Log
|
|
112
|
+
|
|
113
|
+
Invoke skill `token-logger`: write AI Usage Log to working Bug file.
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
# /tas-design $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Prerequisite
|
|
7
|
-
- docs/prd.md
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
1.
|
|
11
|
-
2.
|
|
12
|
-
|
|
13
|
-
###
|
|
14
|
-
3.
|
|
15
|
-
4. $ARGUMENTS
|
|
16
|
-
5.
|
|
17
|
-
- User flows (Mermaid flowchart)
|
|
18
|
-
- Screen descriptions
|
|
19
|
-
- Navigation structure
|
|
20
|
-
- Interaction patterns
|
|
21
|
-
- Responsive behavior notes
|
|
22
|
-
6.
|
|
23
|
-
|
|
24
|
-
###
|
|
25
|
-
3.
|
|
26
|
-
4. $ARGUMENTS
|
|
27
|
-
5.
|
|
28
|
-
6.
|
|
29
|
-
|
|
30
|
-
##
|
|
31
|
-
- Focus
|
|
32
|
-
-
|
|
33
|
-
- Mermaid
|
|
34
|
-
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
Invoke skill `token-logger`:
|
|
1
|
+
# /tas-design $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Role: PE - Product Engineer
|
|
4
|
+
Create or update Design Specification document (UI/UX flows, wireframe descriptions).
|
|
5
|
+
|
|
6
|
+
## Prerequisite
|
|
7
|
+
- docs/prd.md must exist
|
|
8
|
+
|
|
9
|
+
## Actions
|
|
10
|
+
1. Need context from root/tas.yaml and docs/prd.md
|
|
11
|
+
2. Check if docs/design-spec.md already exists:
|
|
12
|
+
|
|
13
|
+
### CREATE mode (file doesn't exist):
|
|
14
|
+
3. Need context from .tas/templates/Design-Spec.md
|
|
15
|
+
4. $ARGUMENTS is design scope description. If not provided, base on PRD.
|
|
16
|
+
5. Create file docs/design-spec.md containing:
|
|
17
|
+
- User flows (Mermaid flowchart)
|
|
18
|
+
- Screen descriptions
|
|
19
|
+
- Navigation structure
|
|
20
|
+
- Interaction patterns
|
|
21
|
+
- Responsive behavior notes
|
|
22
|
+
6. Update `project-status.yaml` per `.claude/rules/common/project-status.md` — add `artifacts.design_spec`.
|
|
23
|
+
|
|
24
|
+
### UPDATE mode (file exists):
|
|
25
|
+
3. Need context from current docs/design-spec.md
|
|
26
|
+
4. $ARGUMENTS is change description. If not provided, ask user which section to update.
|
|
27
|
+
5. Update file, add changelog
|
|
28
|
+
6. Update `project-status.yaml` per `.claude/rules/common/project-status.md` — update `artifacts.design_spec`.
|
|
29
|
+
|
|
30
|
+
## Principles
|
|
31
|
+
- Focus on flows and behavior, not pixel-perfect design
|
|
32
|
+
- Each screen needs: purpose, key elements, actions available
|
|
33
|
+
- Mermaid compliance: :::mermaid wrapper, no () in node labels
|
|
34
|
+
|
|
35
|
+
## Final Step — Token Log
|
|
36
|
+
|
|
37
|
+
Invoke skill `token-logger`: write AI Usage Log to `docs/design-spec.md`.
|