@torus-engineering/tas-kit 1.10.0 → 1.12.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/README.md +70 -70
- package/{.claude → .tas/_platform/claude-code}/settings.json +0 -12
- package/{.claude → .tas/_platform}/hooks/code-quality.js +1 -1
- package/{.claude → .tas/_platform}/hooks/session-end.js +20 -25
- package/.tas/commands/ado-create.md +28 -0
- package/.tas/commands/ado-delete.md +22 -0
- package/.tas/commands/ado-get.md +20 -0
- package/.tas/commands/ado-status.md +18 -0
- package/.tas/commands/ado-update.md +27 -0
- package/.tas/commands/tas-adr.md +33 -0
- package/.tas/commands/tas-apitest-plan.md +173 -0
- package/.tas/commands/tas-apitest.md +143 -0
- package/.tas/commands/tas-brainstorm.md +19 -0
- package/.tas/commands/tas-bug.md +113 -0
- package/.tas/commands/tas-design.md +37 -0
- package/.tas/commands/tas-dev.md +125 -0
- package/{.claude → .tas}/commands/tas-e2e-mobile.md +155 -155
- package/{.claude → .tas}/commands/tas-e2e-web.md +163 -163
- package/.tas/commands/tas-e2e.md +102 -0
- package/.tas/commands/tas-epic.md +35 -0
- package/.tas/commands/tas-feature.md +47 -0
- package/.tas/commands/tas-fix.md +51 -0
- package/.tas/commands/tas-functest-mobile.md +144 -0
- package/{.claude → .tas}/commands/tas-functest-web.md +192 -192
- package/.tas/commands/tas-functest.md +76 -0
- package/.tas/commands/tas-init.md +17 -0
- package/.tas/commands/tas-plan.md +198 -0
- package/.tas/commands/tas-prd.md +37 -0
- package/.tas/commands/tas-review.md +113 -0
- package/.tas/commands/tas-sad.md +43 -0
- package/.tas/commands/tas-security.md +87 -0
- package/.tas/commands/tas-spec.md +50 -0
- package/.tas/commands/tas-status.md +16 -0
- package/.tas/commands/tas-story.md +91 -0
- package/.tas/platforms.json +5 -0
- package/.tas/project-status-example.yaml +17 -17
- package/.tas/rules/ado-integration.md +65 -0
- package/{.claude/skills/api-design/SKILL.md → .tas/rules/common/api-design.md} +517 -530
- package/{.claude → .tas}/rules/common/code-review.md +30 -6
- package/.tas/rules/common/post-implementation-review.md +51 -0
- package/{.claude → .tas}/rules/common/project-status.md +80 -80
- package/.tas/rules/common/stack-detection.md +29 -0
- package/.tas/rules/common/story-done.md +30 -0
- package/.tas/rules/common/tdd.md +89 -0
- package/{.claude → .tas}/rules/common/testing.md +3 -8
- package/.tas/rules/common/token-logging.md +36 -0
- package/{.claude → .tas}/rules/csharp/api-testing.md +20 -20
- package/{.claude → .tas}/rules/csharp/coding-style.md +0 -2
- package/{.claude → .tas}/rules/csharp/security.md +10 -0
- package/{.claude → .tas}/rules/python/coding-style.md +0 -2
- package/{.claude → .tas}/rules/typescript/coding-style.md +0 -2
- package/.tas/rules/typescript/patterns.md +142 -0
- package/.tas/rules/typescript/security.md +88 -0
- package/{.claude → .tas}/rules/typescript/testing.md +0 -4
- package/{.claude → .tas}/rules/web/coding-style.md +0 -2
- package/.tas/tas-example.yaml +10 -11
- package/.tas/templates/ADR.md +47 -47
- package/.tas/templates/AGENTS.md +37 -0
- package/.tas/templates/API-Test-Spec.md +3 -3
- package/.tas/templates/Bug.md +67 -67
- package/.tas/templates/Design-Spec.md +36 -36
- package/.tas/templates/E2E-Execution-Report.md +1 -1
- package/.tas/templates/Epic.md +46 -46
- 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 +27 -27
- package/.tas/templates/Story.md +9 -9
- package/.tas/tools/tas-ado-readme.md +68 -68
- package/.tas/tools/tas-ado.py +621 -621
- package/README.md +78 -78
- package/bin/cli.js +91 -73
- package/lib/adapters/antigravity.js +137 -0
- package/lib/adapters/claude-code.js +35 -0
- package/lib/adapters/codex.js +163 -0
- package/lib/adapters/cursor.js +80 -0
- package/lib/adapters/index.js +20 -0
- package/lib/adapters/utils.js +81 -0
- package/lib/deleted-files.json +99 -0
- package/lib/install.js +403 -327
- package/package.json +4 -3
- package/.claude/agents/code-reviewer.md +0 -41
- package/.claude/agents/e2e-runner.md +0 -61
- package/.claude/agents/planner.md +0 -82
- package/.claude/agents/tdd-guide.md +0 -84
- package/.claude/commands/ado-create.md +0 -27
- package/.claude/commands/ado-delete.md +0 -21
- package/.claude/commands/ado-get.md +0 -20
- package/.claude/commands/ado-status.md +0 -18
- package/.claude/commands/ado-update.md +0 -26
- package/.claude/commands/tas-adr.md +0 -33
- package/.claude/commands/tas-apitest-plan.md +0 -173
- package/.claude/commands/tas-apitest.md +0 -143
- package/.claude/commands/tas-brainstorm.md +0 -19
- package/.claude/commands/tas-bug.md +0 -113
- package/.claude/commands/tas-design.md +0 -37
- package/.claude/commands/tas-dev.md +0 -128
- package/.claude/commands/tas-e2e.md +0 -102
- package/.claude/commands/tas-epic.md +0 -35
- package/.claude/commands/tas-feature.md +0 -47
- package/.claude/commands/tas-fix.md +0 -51
- package/.claude/commands/tas-functest-mobile.md +0 -144
- package/.claude/commands/tas-functest.md +0 -76
- package/.claude/commands/tas-init.md +0 -17
- package/.claude/commands/tas-plan.md +0 -200
- package/.claude/commands/tas-prd.md +0 -37
- package/.claude/commands/tas-review.md +0 -111
- package/.claude/commands/tas-sad.md +0 -43
- package/.claude/commands/tas-security.md +0 -87
- package/.claude/commands/tas-spec.md +0 -50
- package/.claude/commands/tas-status.md +0 -16
- package/.claude/commands/tas-story.md +0 -91
- package/.claude/commands/tas-verify.md +0 -51
- package/.claude/rules/common/post-review-agent.md +0 -49
- package/.claude/rules/common/stack-detection.md +0 -29
- package/.claude/rules/common/token-logging.md +0 -27
- package/.claude/rules/typescript/patterns.md +0 -62
- package/.claude/rules/typescript/security.md +0 -28
- package/.claude/settings.local.json +0 -38
- package/.claude/skills/ado-integration/SKILL.md +0 -75
- package/.claude/skills/ai-regression-testing/SKILL.md +0 -364
- package/.claude/skills/architecture-decision-records/SKILL.md +0 -184
- package/.claude/skills/benchmark/SKILL.md +0 -98
- package/.claude/skills/browser-qa/SKILL.md +0 -92
- package/.claude/skills/canary-watch/SKILL.md +0 -104
- package/.claude/skills/js-backend-patterns/SKILL.md +0 -603
- package/.claude/skills/tas-conventions/SKILL.md +0 -65
- package/.claude/skills/tas-implementation-complete/SKILL.md +0 -99
- package/.claude/skills/tas-tdd/SKILL.md +0 -123
- package/.claude/skills/token-logger/SKILL.md +0 -19
- package/.tas/checklists/code-review.md +0 -29
- package/.tas/checklists/security.md +0 -21
- package/.tas/checklists/story-done.md +0 -23
- package/CLAUDE-Example.md +0 -61
- /package/{.claude → .tas}/agents/architect.md +0 -0
- /package/{.claude → .tas}/agents/aws-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/build-resolver.md +0 -0
- /package/{.claude → .tas}/agents/code-explorer.md +0 -0
- /package/{.claude → .tas}/agents/csharp-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/database-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/doc-updater.md +0 -0
- /package/{.claude → .tas}/agents/python-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/security-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/typescript-reviewer.md +0 -0
- /package/{.claude → .tas}/rules/.gitkeep +0 -0
- /package/{.claude → .tas}/rules/common/hooks.md +0 -0
- /package/{.claude → .tas}/rules/common/patterns.md +0 -0
- /package/{.claude → .tas}/rules/common/security.md +0 -0
- /package/{.claude → .tas}/rules/csharp/hooks.md +0 -0
- /package/{.claude → .tas}/rules/csharp/patterns.md +0 -0
- /package/{.claude → .tas}/rules/csharp/testing.md +0 -0
- /package/{.claude → .tas}/rules/python/hooks.md +0 -0
- /package/{.claude → .tas}/rules/python/patterns.md +0 -0
- /package/{.claude → .tas}/rules/python/security.md +0 -0
- /package/{.claude → .tas}/rules/python/testing.md +0 -0
- /package/{.claude → .tas}/rules/typescript/hooks.md +0 -0
- /package/{.claude → .tas}/rules/web/design-quality.md +0 -0
- /package/{.claude → .tas}/rules/web/hooks.md +0 -0
- /package/{.claude → .tas}/rules/web/patterns.md +0 -0
- /package/{.claude → .tas}/rules/web/performance.md +0 -0
- /package/{.claude → .tas}/rules/web/security.md +0 -0
- /package/{.claude → .tas}/rules/web/testing.md +0 -0
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# /tas-apitest $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai trò: SE - Software Engineer
|
|
4
|
-
Generate .NET xUnit automation test project cho REST API từ API Test Spec file (Markdown).
|
|
5
|
-
|
|
6
|
-
## Always / Ask / Never
|
|
7
|
-
|
|
8
|
-
| | Hành động |
|
|
9
|
-
|---|---|
|
|
10
|
-
| **Always** | Đọc toàn bộ API Test Spec file trước khi generate bất kỳ test nào |
|
|
11
|
-
| **Always** | Tổ chức tests theo API version — mỗi version một folder riêng |
|
|
12
|
-
| **Always** | Append-only: không sửa files trong version folder cũ đã tồn tại |
|
|
13
|
-
| **Always** | URL và credentials ra `appsettings.json` — không hardcode trong code |
|
|
14
|
-
| **Always** | XML doc comment trên mỗi test method |
|
|
15
|
-
| **Ask** | Khi test spec không rõ expected response schema |
|
|
16
|
-
| **Never** | Sửa hoặc xóa test files của version cũ hơn |
|
|
17
|
-
| **Never** | Hardcode base URL, API key, credentials trong test code |
|
|
18
|
-
| **Never** | Bỏ qua error path — mỗi endpoint cần ≥1 happy path + ≥1 error path |
|
|
19
|
-
|
|
20
|
-
## Hành động
|
|
21
|
-
|
|
22
|
-
### Bước 1 — Locate Input
|
|
23
|
-
|
|
24
|
-
`$ARGUMENTS` là path đến API Test Spec file: `docs/tests/API-Test-Spec-{slug}.md`.
|
|
25
|
-
|
|
26
|
-
Nếu không có → hỏi user:
|
|
27
|
-
```
|
|
28
|
-
Nhập path đến API Test Spec file (vd: docs/tests/API-Test-Spec-users.md)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Bước 2 — Parse API Test Spec
|
|
32
|
-
|
|
33
|
-
Đọc `.claude/rules/csharp/api-testing.md` để nắm convention trước khi generate.
|
|
34
|
-
|
|
35
|
-
Từ API Test Spec file, thu thập:
|
|
36
|
-
- API version
|
|
37
|
-
- Endpoints với method, path, params
|
|
38
|
-
- Test cases theo từng endpoint (TC-XXX)
|
|
39
|
-
- Request/response schemas
|
|
40
|
-
- Auth requirements
|
|
41
|
-
- Test data requirements
|
|
42
|
-
- Setup/teardown notes
|
|
43
|
-
|
|
44
|
-
### Bước 3 — Detect Existing Test Project
|
|
45
|
-
|
|
46
|
-
Glob tìm `**/ApiTests/*.csproj`, `**/Api.Tests/*.csproj`, `**/IntegrationTests/*.csproj`.
|
|
47
|
-
|
|
48
|
-
- **Tìm thấy**: Đọc framework đang dùng (xUnit/NUnit/MSTest), glob `v*/` folders để biết versions đã có.
|
|
49
|
-
- **Không tìm thấy**: Tạo mới tại `tests/ApiTests/` với xUnit + FluentAssertions (per `csharp/testing.md`).
|
|
50
|
-
|
|
51
|
-
### Bước 4 — Get API Version from Spec
|
|
52
|
-
|
|
53
|
-
Đọc version từ API Test Spec file (tìm frontmatter `api_version` hoặc section headers `## v{N}`).
|
|
54
|
-
|
|
55
|
-
Version folder: lowercase, không có dot — `v1`, `v2` (không phải `v1.0`).
|
|
56
|
-
|
|
57
|
-
### Bước 5 — Generate Infrastructure (chỉ khi tạo project mới)
|
|
58
|
-
|
|
59
|
-
Đọc `.claude/rules/csharp/api-testing.md` section **Project Structure** và **Config Pattern** để generate:
|
|
60
|
-
- `ApiTests.csproj` với packages chuẩn
|
|
61
|
-
- `appsettings.json` (base) + `appsettings.Test.json` + `appsettings.Staging.json` với values từ spec
|
|
62
|
-
- `Shared/TestBase.cs` — load config, HttpClient, helper methods
|
|
63
|
-
- `Shared/ApiTestSettings.cs` — strongly typed settings
|
|
64
|
-
- `.gitignore` cho `appsettings.*.local.json`
|
|
65
|
-
|
|
66
|
-
### Bước 6 — Generate Test Classes từ Spec
|
|
67
|
-
|
|
68
|
-
Nhóm endpoints theo resource. Mỗi nhóm → `tests/ApiTests/{version}/{Resource}ApiTests.cs`.
|
|
69
|
-
|
|
70
|
-
Với mỗi test case (TC-XXX) trong spec:
|
|
71
|
-
1. Đọc test case details
|
|
72
|
-
2. Map sang test method với naming: `{HttpMethod}_{Resource}_Returns{Status}_When{Condition}`
|
|
73
|
-
3. Generate XML doc từ test case title
|
|
74
|
-
4. Generate assertions từ expected response
|
|
75
|
-
5. Add AC reference comment nếu có
|
|
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: không sửa methods đã tồn tại.
|
|
85
|
-
// ============================================================
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Bước 7 — Append-Only Guard
|
|
89
|
-
|
|
90
|
-
Trước khi ghi file: kiểm tra file đã tồn tại chưa.
|
|
91
|
-
- **File chưa có** → tạo mới bình thường.
|
|
92
|
-
- **File đã có** trong version folder → check từng test method:
|
|
93
|
-
- Method đã tồn tại (cùng tên) → **SKIP**, không ghi đè
|
|
94
|
-
- Method chưa có → append vào cuối class
|
|
95
|
-
|
|
96
|
-
### Bước 8 — Generate Test Data Files (nếu spec yêu cầu)
|
|
97
|
-
|
|
98
|
-
Nếu spec có `test-data.{env}.json` references:
|
|
99
|
-
- Tạo `tests/ApiTests/data/test-data.Test.json` với sample data từ spec
|
|
100
|
-
- Hướng dẫn user tạo `test-data.Staging.json` và `test-data.local.json`
|
|
101
|
-
|
|
102
|
-
### Bước 9 — Post-Generate Review
|
|
103
|
-
|
|
104
|
-
Launch `csharp-reviewer` agent:
|
|
105
|
-
> Review `tests/ApiTests/{version}/`. Đọc `.claude/rules/csharp/testing.md` + `.claude/rules/csharp/api-testing.md`.
|
|
106
|
-
> Tập trung: async/await, HttpClient disposal, assertion completeness, XML doc coverage.
|
|
107
|
-
> Format: Critical / High / Medium / Low với file:line.
|
|
108
|
-
|
|
109
|
-
Gate: Critical/High → fix ngay. Medium/Low → list gợi ý.
|
|
110
|
-
|
|
111
|
-
### Bước 10 — Summary
|
|
112
|
-
|
|
113
|
-
Hiển thị:
|
|
114
|
-
1. Test project path
|
|
115
|
-
2. Number of test classes generated
|
|
116
|
-
3. Number of test methods generated
|
|
117
|
-
4. Coverage matrix (so với spec)
|
|
118
|
-
5. Next steps để chạy 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
|
-
## Bước cuối — Token Log
|
|
142
|
-
|
|
143
|
-
Invoke skill `token-logger`: ghi AI Usage Log vào API Test Spec file.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# /tas-brainstorm $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai trò: Bất kỳ
|
|
4
|
-
Brainstorm có cấu trúc trước khi code hoặc thiết kế.
|
|
5
|
-
|
|
6
|
-
## Hành động
|
|
7
|
-
1. $ARGUMENTS là chủ đề brainstorm
|
|
8
|
-
2. Dẫn dắt qua 4 bước:
|
|
9
|
-
a. **Clarify**: Hỏi 3-5 câu hỏi làm rõ vấn đề
|
|
10
|
-
b. **Explore**: Đưa ra 3+ hướng giải quyết, mỗi hướng có pros/cons
|
|
11
|
-
c. **Evaluate**: So sánh các hướng theo tiêu chí: complexity, maintainability, cost, time
|
|
12
|
-
d. **Decide**: Đề xuất hướng tốt nhất và lý do
|
|
13
|
-
|
|
14
|
-
3. Nếu kết quả brainstorm dẫn đến quyết định kiến trúc, gợi ý user chạy /tas-adr
|
|
15
|
-
|
|
16
|
-
## Nguyên tắc
|
|
17
|
-
- KHÔNG nhảy thẳng vào giải pháp
|
|
18
|
-
- Hỏi trước, suggest sau
|
|
19
|
-
- Luôn xem xét ít nhất 2 alternatives
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# /tas-bug $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Quản lý toàn bộ lifecycle của bug: tạo, phân tích, fix, verify.
|
|
4
|
-
Status của bug xác định bước tiếp theo — không cần khai báo role.
|
|
5
|
-
|
|
6
|
-
## Always / Ask / Never
|
|
7
|
-
|
|
8
|
-
| | Hành động |
|
|
9
|
-
|---|---|
|
|
10
|
-
| **Always** | Hiển thị status hiện tại và action tiếp theo trước khi làm gì |
|
|
11
|
-
| **Always** | Viết regression test TRƯỚC khi fix |
|
|
12
|
-
| **Always** | Launch review agent độc lập sau khi fix — không review trong cùng session |
|
|
13
|
-
| **Ask** | Khi cần đọc thêm file ngoài Bug file (Status = Committed) |
|
|
14
|
-
| **Never** | Patch symptom — phải fix root cause |
|
|
15
|
-
| **Never** | Bỏ qua bước review sau khi fix |
|
|
16
|
-
| **Never** | Tự commit hay push — đợi user test thủ công trước |
|
|
17
|
-
|
|
18
|
-
## Stack Detection
|
|
19
|
-
Đọc `.claude/rules/common/stack-detection.md`.
|
|
20
|
-
|
|
21
|
-
## Hành động
|
|
22
|
-
|
|
23
|
-
### Bước 1 — Xác định chế độ
|
|
24
|
-
|
|
25
|
-
`$ARGUMENTS` là mô tả bug mới → **Chế độ CREATE**
|
|
26
|
-
`$ARGUMENTS` là Bug ID (ví dụ: `Bug-001`) → **Chế độ UPDATE**
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
### Chế độ CREATE
|
|
31
|
-
|
|
32
|
-
Vai trò: PE hoặc SE (ai phát hiện bug)
|
|
33
|
-
|
|
34
|
-
1. Đọc `project.code` từ root/`tas.yaml`
|
|
35
|
-
2. Hỏi user:
|
|
36
|
-
- Bug thuộc Feature nào?
|
|
37
|
-
- Severity: `Critical` | `High` | `Medium` | `Low`
|
|
38
|
-
- Steps to reproduce
|
|
39
|
-
- Expected vs Actual behavior
|
|
40
|
-
- Môi trường phát hiện: Test | Staging | Production
|
|
41
|
-
3. Tạo `docs/bugs/{code}-Bug-{NNN}-{slug}.md` từ template `.tas/templates/Bug.md`
|
|
42
|
-
4. Bug status ban đầu: `New`
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
### Chế độ UPDATE
|
|
47
|
-
|
|
48
|
-
Tìm file Bug qua glob `docs/bugs/*-Bug-{ID}-*.md`, đọc status hiện tại.
|
|
49
|
-
|
|
50
|
-
**Hiển thị trước khi làm gì:**
|
|
51
|
-
> "Bug-{NNN} đang ở status: **{status}** — bước tiếp theo là {action}. Tiếp tục không?"
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
#### Status = `New` — Phân tích (SE)
|
|
56
|
-
|
|
57
|
-
1. Đọc error logs/stack trace từ Bug file
|
|
58
|
-
2. Trace code flow, xác định file và dòng gây lỗi
|
|
59
|
-
3. Ghi Root Cause Analysis vào Bug file
|
|
60
|
-
4. Viết Regression Test Cases (test reproduce bug)
|
|
61
|
-
5. Cập nhật status: `New` → `Committed`
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
#### Status = `Committed` — Fix (SE)
|
|
66
|
-
|
|
67
|
-
**Quy tắc đọc file:** CHỈ đọc Bug file. KHÔNG đọc PRD, SAD, ADR, Design-Spec, KHÔNG quét thư mục.
|
|
68
|
-
Nếu cần thêm file → hỏi user xác nhận trước.
|
|
69
|
-
|
|
70
|
-
Trước khi fix, đọc:
|
|
71
|
-
- `.claude/rules/common/security.md` — fix không tạo security risk mới
|
|
72
|
-
- `.claude/rules/common/testing.md` — pattern viết regression test
|
|
73
|
-
- `.claude/rules/[lang_agent stack]/coding-style.md` — tuân thủ conventions
|
|
74
|
-
|
|
75
|
-
**Fix workflow:**
|
|
76
|
-
a. Chạy regression test case → xác nhận **FAIL** (reproduce bug)
|
|
77
|
-
b. Fix code đúng root cause
|
|
78
|
-
c. Chạy regression test → xác nhận **PASS**
|
|
79
|
-
d. Chạy toàn bộ test suite → không có regression mới
|
|
80
|
-
→ Nếu build fail hoặc test lỗi compile: launch `build-resolver` agent với error output trước khi tiếp tục.
|
|
81
|
-
|
|
82
|
-
**Sau khi fix — Post-Fix Review (Isolated Agent):**
|
|
83
|
-
|
|
84
|
-
Thực hiện theo `.claude/rules/common/post-review-agent.md`.
|
|
85
|
-
Truyền vào: Bug file path, danh sách changed files, stack (từ CLAUDE.md), lang_agent.
|
|
86
|
-
|
|
87
|
-
Sau khi review pass:
|
|
88
|
-
- Cập nhật status: `Committed` → `Deploy Test`
|
|
89
|
-
- Output commit message gợi ý: `fix: {mô tả ngắn} - resolves Bug-{NNN}`
|
|
90
|
-
- Hỏi: "Bạn đã test thủ công chưa? Muốn commit và deploy lên Test không?"
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
#### Status = `Verify Test` / `Verify Stag` — Verify (PE)
|
|
95
|
-
|
|
96
|
-
1. PE verify trên môi trường tương ứng:
|
|
97
|
-
- Chạy lại Steps to Reproduce → xác nhận bug không còn
|
|
98
|
-
- Kiểm tra regression test case đã pass
|
|
99
|
-
2. **Pass** → cập nhật status tiếp theo (`Deploy Stag` hoặc `Done`)
|
|
100
|
-
3. **Fail** → ghi lý do, cập nhật status về `Committed`, SE fix lại
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Nguyên tắc
|
|
105
|
-
- KHÔNG patch symptom — phải fix root cause
|
|
106
|
-
- PHẢI có regression test case TRƯỚC khi fix
|
|
107
|
-
- Review phải chạy qua Agent độc lập — không inline trong session hiện tại
|
|
108
|
-
- Bug `Critical`/`High` phải fix trước khi Feature được Verified
|
|
109
|
-
- Flow: `New` → `Committed` → `Deploy Test` → `Verify Test` → `Deploy Stag` → `Verify Stag` → `Deploy Prod` → `Verify Prod` → `Done`
|
|
110
|
-
|
|
111
|
-
## Bước cuối — Token Log
|
|
112
|
-
|
|
113
|
-
Invoke skill `token-logger`: ghi AI Usage Log vào file Bug đang làm việc.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# /tas-design $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai trò: PE - Product Engineer
|
|
4
|
-
Tạo hoặc cập nhật Design Specification document (UI/UX flows, wireframe descriptions).
|
|
5
|
-
|
|
6
|
-
## Prerequisite
|
|
7
|
-
- docs/prd.md phải tồn tại
|
|
8
|
-
|
|
9
|
-
## Hành động
|
|
10
|
-
1. Cần context từ root/tas.yaml và docs/prd.md
|
|
11
|
-
2. Kiểm tra docs/design-spec.md đã tồn tại chưa:
|
|
12
|
-
|
|
13
|
-
### Chế độ CREATE (file chưa tồn tại):
|
|
14
|
-
3. Cần context từ .tas/templates/Design-Spec.md
|
|
15
|
-
4. $ARGUMENTS là mô tả scope của design. Nếu không có, dựa vào PRD.
|
|
16
|
-
5. Tạo file docs/design-spec.md chứa:
|
|
17
|
-
- User flows (Mermaid flowchart)
|
|
18
|
-
- Screen descriptions
|
|
19
|
-
- Navigation structure
|
|
20
|
-
- Interaction patterns
|
|
21
|
-
- Responsive behavior notes
|
|
22
|
-
6. Cập nhật `project-status.yaml` theo `.claude/rules/common/project-status.md` — thêm `artifacts.design_spec`.
|
|
23
|
-
|
|
24
|
-
### Chế độ UPDATE (file đã tồn tại):
|
|
25
|
-
3. Cần context từ docs/design-spec.md hiện tại
|
|
26
|
-
4. $ARGUMENTS là mô tả thay đổi. Nếu không có, hỏi user cần cập nhật section nào.
|
|
27
|
-
5. Cập nhật file, thêm changelog
|
|
28
|
-
6. Cập nhật `project-status.yaml` theo `.claude/rules/common/project-status.md` — cập nhật `artifacts.design_spec`.
|
|
29
|
-
|
|
30
|
-
## Nguyên tắc
|
|
31
|
-
- Focus vào flows và behavior, không vào pixel-perfect design
|
|
32
|
-
- Mỗi screen cần mô tả: purpose, key elements, actions available
|
|
33
|
-
- Mermaid tuân thủ: :::mermaid wrapper, không dùng ()
|
|
34
|
-
|
|
35
|
-
## Bước cuối — Token Log
|
|
36
|
-
|
|
37
|
-
Invoke skill `token-logger`: ghi AI Usage Log vào `docs/design-spec.md`.
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# /tas-dev $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai trò: SE - Software Engineer
|
|
4
|
-
Implement một User Story theo Technical Plan đã được duyệt.
|
|
5
|
-
|
|
6
|
-
## Always / Ask / Never
|
|
7
|
-
|
|
8
|
-
| | Hành động |
|
|
9
|
-
|---|---|
|
|
10
|
-
| **Always** | Kiểm tra `plan_status` trước khi implement |
|
|
11
|
-
| **Always** | Follow tasks trong `## Technical Plan` của Story |
|
|
12
|
-
| **Always** | Launch review agent độc lập sau khi implement — không review trong cùng session |
|
|
13
|
-
| **Ask** | Khi phát hiện plan cần thay đổi đáng kể trong lúc code |
|
|
14
|
-
| **Ask** | Khi cần đọc thêm file ngoài scope của plan |
|
|
15
|
-
| **Never** | Implement ngoài scope Story |
|
|
16
|
-
| **Never** | Skip bước review sau khi implement |
|
|
17
|
-
|
|
18
|
-
## QUAN TRỌNG - Quy tắc đọc file
|
|
19
|
-
- CHỈ đọc Story file — Technical Plan đã có đủ context kỹ thuật.
|
|
20
|
-
- Không tự đọc PRD, SAD, ADR, Design-Spec trừ khi user xác nhận.
|
|
21
|
-
- Không list thư mục, không quét project structure.
|
|
22
|
-
- Không đọc `.tas/checklists/story-done.md` ở bước đầu (chỉ đọc ở bước cuối).
|
|
23
|
-
|
|
24
|
-
## Stack Detection
|
|
25
|
-
Đọc `.claude/rules/common/stack-detection.md`.
|
|
26
|
-
|
|
27
|
-
## Hành động
|
|
28
|
-
|
|
29
|
-
### Bước 1 — Xác định Story
|
|
30
|
-
|
|
31
|
-
`$ARGUMENTS` là Story ID hoặc file path.
|
|
32
|
-
Nếu không có: đọc `project-status.yaml`, tìm stories có `status: Committed` hoặc `status: In Progress`. Nếu nhiều hơn một, liệt kê để user chọn.
|
|
33
|
-
Đọc Story file.
|
|
34
|
-
|
|
35
|
-
### Bước 1.5 — Gate: Kiểm tra plan_status
|
|
36
|
-
|
|
37
|
-
Đọc `plan_status` từ frontmatter của Story.
|
|
38
|
-
|
|
39
|
-
**Nếu `plan_status: pending`:**
|
|
40
|
-
Đọc `require_plan` từ root/`tas.yaml`:
|
|
41
|
-
- `require_plan: true` (hoặc field không tồn tại) → **DỪNG LẠI**:
|
|
42
|
-
> "Story này chưa có Technical Plan. Chạy `/tas-plan {Story-ID}` trước khi implement."
|
|
43
|
-
- `require_plan: false` → tiếp tục, hiển thị warning và chờ xác nhận:
|
|
44
|
-
> "⚠️ Quick mode: Story chưa có Technical Plan. Tiếp tục implement không?"
|
|
45
|
-
|
|
46
|
-
**Nếu `plan_status: completed`:** tiếp tục bình thường.
|
|
47
|
-
|
|
48
|
-
### Bước 2 — Đọc Technical Plan
|
|
49
|
-
|
|
50
|
-
Từ Story file, đọc section `## Technical Plan`:
|
|
51
|
-
- Approach đã chọn
|
|
52
|
-
- Files to Change / Files to Create
|
|
53
|
-
- Database Changes, Config Changes
|
|
54
|
-
- Tasks list (checklist thực hiện theo thứ tự)
|
|
55
|
-
|
|
56
|
-
Nếu không có Technical Plan (quick mode) → phân tích AC và implement trực tiếp theo AC.
|
|
57
|
-
|
|
58
|
-
### Bước 3 — Implement
|
|
59
|
-
|
|
60
|
-
**Nếu stack là Node.js/Express/Next.js** → invoke skill `js-backend-patterns` để tham khảo
|
|
61
|
-
repository pattern, service layer, N+1 prevention, caching, error handling trước khi code.
|
|
62
|
-
|
|
63
|
-
#### Nếu `use_tdd = true` trong `tas.yaml`:
|
|
64
|
-
a. **Red phase** — Viết test cases TRƯỚC theo AC trong Story. Chạy tests, xác nhận FAIL.
|
|
65
|
-
|
|
66
|
-
Platform-specific (từ stack detection):
|
|
67
|
-
- **Mobile (React Native)**: Jest + React Testing Library — Components (`render`, `fireEvent`, `screen`), Hooks (`renderHook`), Services/API (Jest mocks + MSW), Utils, Zustand stores. File: `src/**/*.test.ts(x)`
|
|
68
|
-
- **Web (React + Node)**: Vitest/Jest + React Testing Library — Components, Hooks, Services (MSW/Nock), Backend services (Jest). File: `src/**/*.test.ts(x)`
|
|
69
|
-
- **Backend (.NET)**: xUnit — Unit (services, repositories), Integration (TestServer), API (WebApplicationFactory). File: `tests/Unit/`, `tests/Integration/`, `tests/Api/`
|
|
70
|
-
|
|
71
|
-
b. **Green phase** — Viết code tối thiểu để pass tests.
|
|
72
|
-
c. **Refactor** — Clean up, đảm bảo tests vẫn pass.
|
|
73
|
-
|
|
74
|
-
#### Nếu `use_tdd = false`:
|
|
75
|
-
a. Implement code theo AC + Tasks trong Technical Plan
|
|
76
|
-
b. Viết unit tests cover các cases trong `## Unit Test Cases`
|
|
77
|
-
c. Chạy tests, fix nếu fail
|
|
78
|
-
→ Nếu tests vẫn fail sau 1 lần tự fix: launch `build-resolver` agent với error output để diagnose.
|
|
79
|
-
|
|
80
|
-
Trong quá trình implement, tick từng task hoàn thành trong Story file: `- [x] Task 1: ...`
|
|
81
|
-
|
|
82
|
-
Nếu phát hiện plan cần thay đổi đáng kể → thông báo user trước khi thay đổi hướng.
|
|
83
|
-
|
|
84
|
-
### Bước 4 — Post-Implementation Review (Isolated Agent)
|
|
85
|
-
|
|
86
|
-
Thực hiện theo `.claude/rules/common/post-review-agent.md`.
|
|
87
|
-
Truyền vào: Story file path, danh sách changed files, stack (từ CLAUDE.md), lang_agent.
|
|
88
|
-
|
|
89
|
-
### Bước 5 — Definition of Done
|
|
90
|
-
|
|
91
|
-
Đọc `.tas/checklists/story-done.md`, verify từng mục, tick vào Story:
|
|
92
|
-
- `- [x] Technical plan completed` — nếu plan_status: completed (hoặc quick mode xác nhận)
|
|
93
|
-
- `- [x] Code implemented` — nếu implement xong
|
|
94
|
-
- `- [x] Unit tests pass` — nếu tests đã pass
|
|
95
|
-
- `- [x] No regression` — nếu toàn bộ test suite pass
|
|
96
|
-
- `- [x] Documentation updated (if needed)` — nếu đã cập nhật
|
|
97
|
-
- `- [x] Code review passed` — nếu review gate pass (không có Critical/High)
|
|
98
|
-
- `- [ ] Acceptance criteria verified` — KHÔNG tick, để PE verify
|
|
99
|
-
|
|
100
|
-
**Optional — nếu Story thay đổi API public, database schema, hoặc setup:**
|
|
101
|
-
Launch `doc-updater` agent: cập nhật docs liên quan (README, SAD section, API docs).
|
|
102
|
-
> Scope: [danh sách changed files]. Story: [Story ID + title].
|
|
103
|
-
> Chỉ cập nhật phần docs đã lỗi thời — không viết lại từ đầu.
|
|
104
|
-
|
|
105
|
-
### Bước 6 — Wrap up
|
|
106
|
-
|
|
107
|
-
Cập nhật Story status → `In Progress` (nếu chưa).
|
|
108
|
-
Tạo commit message theo conventions trong `CLAUDE.md`.
|
|
109
|
-
Hỏi: "Tests OK và review passed rồi — bạn đã test thủ công chưa? Muốn chuyển sang Deploy Test không?"
|
|
110
|
-
|
|
111
|
-
Nếu Yes:
|
|
112
|
-
- Cập nhật Story status → `Deploy Test`
|
|
113
|
-
- Thêm Changelog entry
|
|
114
|
-
- Cập nhật `project-status.yaml`
|
|
115
|
-
- Gợi ý: `/ado-update story {ado-id} --status "Deploy Test"` nếu dùng ADO
|
|
116
|
-
|
|
117
|
-
## Nguyên tắc
|
|
118
|
-
- KHÔNG implement ngoài scope của Story
|
|
119
|
-
- Mỗi public method PHẢI có XML doc comment (C#) hoặc JSDoc (TypeScript) hoặc docstring (Python)
|
|
120
|
-
- Review phải chạy qua Agent độc lập — không inline trong session hiện tại
|
|
121
|
-
- **Khi nào cần tạo ADR** (nếu Technical Plan chưa đề cập):
|
|
122
|
-
- Thay đổi kiến trúc ảnh hưởng nhiều components
|
|
123
|
-
- Thêm mới design pattern hoặc framework
|
|
124
|
-
- Quyết định trade-off kỹ thuật quan trọng
|
|
125
|
-
|
|
126
|
-
## Bước cuối — Token Log
|
|
127
|
-
|
|
128
|
-
Invoke skill `token-logger`: ghi AI Usage Log vào file Story đang làm việc.
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# /tas-e2e $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai tro: QA / PE
|
|
4
|
-
Generate E2E test scenario documents tu mot Epic hoac user flow description.
|
|
5
|
-
|
|
6
|
-
## QUAN TRONG - Layer 3: E2E Testing
|
|
7
|
-
- E2E tests kiem tra TOAN BO flow lien ket giua nhieu features/stories
|
|
8
|
-
- E2E scenario PHAI reference FT IDs tu Layer 2 (Functional Tests)
|
|
9
|
-
- E2E scripts (tao boi /tas-e2e-mobile hoac /tas-e2e-web) se REUSE helpers tu Layer 2
|
|
10
|
-
- Output la markdown scenario file, KHONG phai test code
|
|
11
|
-
|
|
12
|
-
## Hanh dong
|
|
13
|
-
|
|
14
|
-
### Buoc 1: Xac dinh Input
|
|
15
|
-
$ARGUMENTS co the la:
|
|
16
|
-
- **Epic ID** (vd: "Epic-002", "AL-Epic-002-authentication") → generate scenarios tu tat ca features/stories trong epic
|
|
17
|
-
- **Flow description** (vd: "user registration to first scan") → generate cross-epic scenario
|
|
18
|
-
|
|
19
|
-
Neu khong co $ARGUMENTS: list cac Epics hien co va hoi user chon.
|
|
20
|
-
|
|
21
|
-
### Buoc 2: Thu thap Context
|
|
22
|
-
|
|
23
|
-
#### Neu la Epic ID:
|
|
24
|
-
1. Doc Epic file va tat ca Feature files ben trong
|
|
25
|
-
2. Doc tat ca Story files cua cac Features
|
|
26
|
-
3. Tim tat ca `Func-Test-*.md` files de lay FT IDs
|
|
27
|
-
|
|
28
|
-
#### Neu la Flow Description:
|
|
29
|
-
1. Search across `docs/epics/` de tim Features/Stories lien quan
|
|
30
|
-
2. Xac dinh cac Epics lien quan (cross-epic scenario)
|
|
31
|
-
3. Thu thap FT IDs tu Func-Test-*.md files
|
|
32
|
-
|
|
33
|
-
### Buoc 3: Doc template
|
|
34
|
-
Doc `.tas/templates/E2E-Scenario.md`
|
|
35
|
-
Doc `root/tas.yaml` de lay project code
|
|
36
|
-
|
|
37
|
-
### Buoc 4: Generate Scenario
|
|
38
|
-
|
|
39
|
-
#### Naming Convention:
|
|
40
|
-
- **Single-epic**: `{PROJECT}_E{EPIC}_E2E_{NNN}_{MODIFIER}`
|
|
41
|
-
- Example: `AL_E002_E2E_001_H`
|
|
42
|
-
- **Cross-epic**: `{PROJECT}_XEPIC_E2E_{NNN}_{MODIFIER}`
|
|
43
|
-
- Example: `AL_XEPIC_E2E_001_H`
|
|
44
|
-
|
|
45
|
-
#### Scenario Steps Table:
|
|
46
|
-
Moi step PHAI co cot "Builds on FT IDs" de reference Layer 2:
|
|
47
|
-
|
|
48
|
-
```markdown
|
|
49
|
-
| Step | Screen/Page | Action | Expected Result | Builds on FT IDs |
|
|
50
|
-
|------|-------------|--------|-----------------|-------------------|
|
|
51
|
-
| 1 | Login Screen | User logs in | Home screen shown | AL_E002_F002_S001_FT_001_H |
|
|
52
|
-
| 2 | Home Screen | View allergen list | List displayed | AL_E003_F001_S001_FT_001_H |
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Neu step KHONG co FT reference → ghi "-" (new logic, chua co func test)
|
|
56
|
-
|
|
57
|
-
#### Noi dung generate:
|
|
58
|
-
1. Flow Overview (narrative description)
|
|
59
|
-
2. Scenario Steps table
|
|
60
|
-
3. Step Details (chi tiet tung buoc)
|
|
61
|
-
4. Alternate Flows (neu co)
|
|
62
|
-
5. Error Flows (neu co)
|
|
63
|
-
6. Test Data per environment
|
|
64
|
-
7. Prerequisites checklist
|
|
65
|
-
8. Success Criteria
|
|
66
|
-
9. FT Reuse Map (map step → FT ID → helper function)
|
|
67
|
-
|
|
68
|
-
### Buoc 5: Output File
|
|
69
|
-
- **Single-epic**: `docs/epics/{epic-dir}/E2E-Scenario-{NNN}-{slug}.md`
|
|
70
|
-
- **Cross-epic**: `docs/e2e-scenarios/E2E-Scenario-{NNN}-{slug}.md`
|
|
71
|
-
|
|
72
|
-
Auto-create `docs/e2e-scenarios/` directory neu chua ton tai.
|
|
73
|
-
|
|
74
|
-
### Buoc 6: Prompting
|
|
75
|
-
Sau khi generate, hoi user:
|
|
76
|
-
- "Co flow phu nao can cover khong?"
|
|
77
|
-
- "Co error scenario nao can them khong?"
|
|
78
|
-
- "Test data cho cac environment da day du chua?"
|
|
79
|
-
- "Co can test tren ca mobile va web khong?"
|
|
80
|
-
|
|
81
|
-
## FT Reuse Map
|
|
82
|
-
Moi scenario file co section "FT Reuse Map" de:
|
|
83
|
-
- Map scenario step → FT ID → source file → helper function
|
|
84
|
-
- /tas-e2e-mobile va /tas-e2e-web doc section nay de import helpers tu Layer 2
|
|
85
|
-
|
|
86
|
-
```markdown
|
|
87
|
-
## FT Reuse Map
|
|
88
|
-
| Step | FT ID | Source File | Helper Function |
|
|
89
|
-
|------|-------|-------------|-----------------|
|
|
90
|
-
| 1 | AL_E002_F002_S001_FT_001_H | features/auth/login/helpers.ts | fillLoginForm() |
|
|
91
|
-
| 2 | AL_E003_F001_S001_FT_001_H | features/home/allergens/helpers.ts | viewAllergenList() |
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Status Flow
|
|
95
|
-
Draft → Ready → Implemented → Verified
|
|
96
|
-
|
|
97
|
-
## Nguyen tac
|
|
98
|
-
- Output la MARKDOWN scenario, KHONG phai test code
|
|
99
|
-
- Test code duoc tao boi /tas-e2e-mobile hoac /tas-e2e-web
|
|
100
|
-
- Moi step NEN reference FT IDs khi co the (de reuse, khong viet lai)
|
|
101
|
-
- Scenario phai testable: co preconditions, test data, success criteria ro rang
|
|
102
|
-
- Cross-epic scenarios dung prefix XEPIC thay vi Epic number
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# /tas-epic $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai trò: PE - Product Engineer
|
|
4
|
-
Tạo mới hoặc cập nhật Epic document.
|
|
5
|
-
|
|
6
|
-
## Prerequisite
|
|
7
|
-
- docs/prd.md phải tồn tại
|
|
8
|
-
|
|
9
|
-
## Hành động
|
|
10
|
-
1. Cần context từ root/tas.yaml và docs/prd.md
|
|
11
|
-
2. Cần context từ .tas/templates/Epic.md
|
|
12
|
-
3. Xác định chế độ dựa vào $ARGUMENTS:
|
|
13
|
-
|
|
14
|
-
### Chế độ CREATE ($ARGUMENTS là mô tả Epic mới, hoặc không có $ARGUMENTS):
|
|
15
|
-
4. Nếu không có $ARGUMENTS, hỏi user mô tả Epic.
|
|
16
|
-
5. Đọc project.code từ root/tas.yaml. Quét docs/epics/ để xác định số thứ tự.
|
|
17
|
-
6. Tạo thư mục docs/epics/{code}-Epic-{NNN}-{slug}/
|
|
18
|
-
7. Tạo file docs/epics/{code}-Epic-{NNN}-{slug}/{code}-Epic-{NNN}-{slug}.md
|
|
19
|
-
8. Cập nhật `project-status.yaml` theo `.claude/rules/common/project-status.md` — thêm entry vào `epics`.
|
|
20
|
-
|
|
21
|
-
### Chế độ UPDATE ($ARGUMENTS là Epic ID, ví dụ: "Epic-001"):
|
|
22
|
-
4. Tìm thư mục docs/epics/{code}-Epic-001-*/
|
|
23
|
-
5. Cần context từ file Epic hiện tại
|
|
24
|
-
6. Hỏi user cần thay đổi gì (cập nhật scope, thêm feature, đổi status...)
|
|
25
|
-
7. Cập nhật file, thêm changelog
|
|
26
|
-
8. Cập nhật `project-status.yaml` theo `.claude/rules/common/project-status.md` — cập nhật `epics.{EPIC_ID}.status`.
|
|
27
|
-
|
|
28
|
-
## Nguyên tắc
|
|
29
|
-
- Mỗi Epic map với một business capability trong PRD
|
|
30
|
-
- Epic KHÔNG chứa chi tiết kỹ thuật, chỉ chứa business value
|
|
31
|
-
- Ước lượng effort ở mức T-shirt size: S/M/L/XL
|
|
32
|
-
|
|
33
|
-
## Bước cuối — Token Log
|
|
34
|
-
|
|
35
|
-
Invoke skill `token-logger`: ghi AI Usage Log vào file Epic đang làm việc.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# /tas-feature $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai trò: PE - Product Engineer
|
|
4
|
-
Tạo mới hoặc cập nhật Feature document, bao gồm thiết kế Integration Test và E2E/Acceptance Test.
|
|
5
|
-
|
|
6
|
-
## Prerequisite
|
|
7
|
-
- Ít nhất một Epic phải tồn tại trong docs/epics/
|
|
8
|
-
|
|
9
|
-
## Hành động
|
|
10
|
-
1. Cần context từ root/tas.yaml
|
|
11
|
-
2. Cần context từ .tas/templates/Feature.md
|
|
12
|
-
3. Xác định chế độ dựa vào $ARGUMENTS:
|
|
13
|
-
|
|
14
|
-
### Chế độ CREATE ($ARGUMENTS là mô tả Feature mới, hoặc không có $ARGUMENTS):
|
|
15
|
-
4. Đọc project.code từ root/tas.yaml. Liệt kê các Epic hiện có, hỏi user Feature này thuộc Epic nào.
|
|
16
|
-
5. Quét thư mục Epic đã chọn để xác định số thứ tự Feature.
|
|
17
|
-
6. Tạo thư mục docs/epics/{code}-Epic-{NNN}-{slug}/{code}-Feature-{NNN}-{slug}/
|
|
18
|
-
7. Tạo file {code}-Feature-{NNN}-{slug}.md trong thư mục đó
|
|
19
|
-
8. Sau khi PE điền mô tả và acceptance criteria, TỰ ĐỘNG chuyển sang thiết kế test:
|
|
20
|
-
a. **Integration Test Cases**: Hỏi PE:
|
|
21
|
-
- "Feature này tương tác với service/module nào khác?"
|
|
22
|
-
- "Các flow liên kết giữa stories cần test những gì?"
|
|
23
|
-
- "Có data flow nào cần verify end-to-end trong feature này?"
|
|
24
|
-
Ghi vào section Integration Test Cases.
|
|
25
|
-
b. **E2E / Acceptance Test Cases**: Hỏi PE:
|
|
26
|
-
- "User scenario chính để verify feature này trên Staging là gì?"
|
|
27
|
-
- "Có scenario nào cần test với data thật hoặc gần thật?"
|
|
28
|
-
- "Acceptance criteria nào cần PE verify thủ công?"
|
|
29
|
-
Ghi vào section E2E Test Cases. Đây là checklist PE dùng ở Phase 2 khi chạy /tas-verify.
|
|
30
|
-
9. Cập nhật `project-status.yaml` theo `.claude/rules/common/project-status.md` — thêm entry vào `epics.{EPIC_ID}.features`.
|
|
31
|
-
|
|
32
|
-
### Chế độ UPDATE ($ARGUMENTS là Feature ID, ví dụ: "Feature-003"):
|
|
33
|
-
4. Tìm file Feature trong cây docs/epics/ (dùng glob)
|
|
34
|
-
5. Cần context từ file Feature hiện tại
|
|
35
|
-
6. Hỏi user cần thay đổi gì (thêm story, cập nhật AC, thêm test cases, đổi status...)
|
|
36
|
-
7. Cập nhật file, thêm changelog
|
|
37
|
-
8. Cập nhật `project-status.yaml` theo `.claude/rules/common/project-status.md` — cập nhật `epics.{EPIC_ID}.features.{FEATURE_ID}.status`.
|
|
38
|
-
|
|
39
|
-
## Nguyên tắc
|
|
40
|
-
- Feature là một chức năng cụ thể, có thể demo được
|
|
41
|
-
- Feature PHẢI có acceptance criteria rõ ràng, testable
|
|
42
|
-
- Integration Test Cases PHẢI cover các flow liên kết giữa stories
|
|
43
|
-
- E2E Test Cases PHẢI đủ để PE verify feature trên Staging ở Phase 2
|
|
44
|
-
|
|
45
|
-
## Bước cuối — Token Log
|
|
46
|
-
|
|
47
|
-
Invoke skill `token-logger`: ghi AI Usage Log vào file Feature đang làm việc.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# /tas-fix $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Vai trò: SE - Software Engineer
|
|
4
|
-
Quick fix cho bug nhỏ hoặc lỗi rõ ràng — không cần tạo ticket, không cần full lifecycle.
|
|
5
|
-
Dùng khi: solo dev, hotfix nhanh, bug tìm thấy trong lúc dev.
|
|
6
|
-
Khác với /tas-bug: không tạo Bug file, không track status, không deploy flow.
|
|
7
|
-
|
|
8
|
-
## Stack Detection
|
|
9
|
-
Đọc `.claude/rules/common/stack-detection.md`.
|
|
10
|
-
|
|
11
|
-
## Hành động
|
|
12
|
-
|
|
13
|
-
### 1. Hiểu bug
|
|
14
|
-
$ARGUMENTS là mô tả lỗi, error message, hoặc file:line_number.
|
|
15
|
-
- Nếu có error message/stack trace: parse ngay, xác định file và dòng lỗi
|
|
16
|
-
- Nếu chỉ có mô tả: hỏi 1 câu duy nhất để làm rõ (reproduce steps hoặc expected vs actual)
|
|
17
|
-
- KHÔNG hỏi nhiều hơn 1 câu
|
|
18
|
-
|
|
19
|
-
### 2. Diagnose (tối đa 3 file đọc)
|
|
20
|
-
- Đọc file lỗi và các file liên quan trực tiếp
|
|
21
|
-
- Xác định root cause trong 1-2 câu ngắn
|
|
22
|
-
- KHÔNG đọc toàn bộ project, KHÔNG quét cấu trúc folder
|
|
23
|
-
- Nếu cần đọc thêm file ngoài 3 file đầu tiên: hỏi user xác nhận
|
|
24
|
-
|
|
25
|
-
### 3. Fix với regression test
|
|
26
|
-
|
|
27
|
-
Trước khi fix, đọc các rules liên quan:
|
|
28
|
-
- `.claude/rules/common/security.md` — kiểm tra fix có tạo ra security risk không
|
|
29
|
-
- `.claude/rules/common/testing.md` — pattern viết regression test
|
|
30
|
-
- `.claude/rules/[lang_rules]/coding-style.md` — conventions của stack hiện tại (nếu xác định được)
|
|
31
|
-
|
|
32
|
-
Sau đó:
|
|
33
|
-
a. Viết 1 test case tối thiểu reproduce bug (nếu project có test framework)
|
|
34
|
-
b. Xác nhận test FAIL
|
|
35
|
-
c. Fix code đúng root cause
|
|
36
|
-
d. Xác nhận test PASS
|
|
37
|
-
e. Chạy nhanh test suite nếu có (để check regression)
|
|
38
|
-
|
|
39
|
-
### 4. Wrap up
|
|
40
|
-
- Output commit message: `fix: <mô tả ngắn gọn>`
|
|
41
|
-
- Nhắc: "Nếu bug này có khả năng tái phát hoặc ảnh hưởng production, cân nhắc dùng /tas-bug để track đầy đủ."
|
|
42
|
-
|
|
43
|
-
## Nguyên tắc
|
|
44
|
-
- Tổng số file đọc ≤ 3 trừ khi được cho phép
|
|
45
|
-
- Fix đúng root cause, KHÔNG patch symptom
|
|
46
|
-
- Nếu fix kéo theo thay đổi architecture → dừng, gợi ý dùng /tas-bug + /tas-adr
|
|
47
|
-
- Nếu bug thuộc production và severity cao → dừng, gợi ý dùng /tas-bug với severity Critical/High
|
|
48
|
-
|
|
49
|
-
## Bước cuối — Token Log
|
|
50
|
-
|
|
51
|
-
Invoke skill `token-logger`: ghi AI Usage Log vào file Story hoặc Bug liên quan (nếu có).
|