@torus-engineering/tas-kit 1.5.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/.claude/agents/ado-agent.md +39 -0
- package/.claude/agents/code-reviewer.md +41 -0
- package/.claude/commands/ado-create.md +26 -0
- package/.claude/commands/ado-delete.md +20 -0
- package/.claude/commands/ado-get.md +19 -0
- package/.claude/commands/ado-status.md +17 -0
- package/.claude/commands/ado-update.md +25 -0
- package/.claude/commands/tas-adr.md +28 -0
- package/.claude/commands/tas-brainstorm.md +19 -0
- package/.claude/commands/tas-bug.md +62 -0
- package/.claude/commands/tas-design.md +31 -0
- package/.claude/commands/tas-dev-story.md +61 -0
- package/.claude/commands/tas-epic.md +29 -0
- package/.claude/commands/tas-feature.md +41 -0
- package/.claude/commands/tas-init.md +17 -0
- package/.claude/commands/tas-prd.md +31 -0
- package/.claude/commands/tas-review-code.md +42 -0
- package/.claude/commands/tas-sad.md +37 -0
- package/.claude/commands/tas-security-check.md +30 -0
- package/.claude/commands/tas-status.md +16 -0
- package/.claude/commands/tas-story.md +50 -0
- package/.claude/commands/tas-verify.md +33 -0
- package/.claude/settings.json +21 -0
- package/.claude/skills/ado-integration/SKILL.md +32 -0
- package/.claude/skills/tas-conventions/SKILL.md +17 -0
- package/.claude/skills/tas-tdd/SKILL.md +26 -0
- package/.env.example +1 -0
- package/.tas/README.md +1583 -0
- package/.tas/checklists/code-review.md +29 -0
- package/.tas/checklists/security.md +21 -0
- package/.tas/checklists/story-done.md +23 -0
- package/.tas/project-status-example.yaml +17 -0
- package/.tas/tas-example.yaml +108 -0
- package/.tas/templates/ADR.md +47 -0
- package/.tas/templates/Bug.md +67 -0
- package/.tas/templates/Design-Spec.md +36 -0
- package/.tas/templates/Epic.md +46 -0
- package/.tas/templates/Feature.md +55 -0
- package/.tas/templates/PRD.md +142 -0
- package/.tas/templates/Performance-Report.md +30 -0
- package/.tas/templates/SAD.md +64 -0
- package/.tas/templates/Security-Report.md +27 -0
- package/.tas/templates/Story.md +88 -0
- package/.tas/tools/tas-ado-readme.md +169 -0
- package/.tas/tools/tas-ado.py +621 -0
- package/CLAUDE-Example.md +58 -0
- package/README.md +67 -0
- package/bin/cli.js +49 -0
- package/lib/install.js +114 -0
- package/package.json +34 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ado-agent
|
|
3
|
+
description: Specialized agent for Azure DevOps operations. Use when syncing work items, pushing/pulling ADO data, or performing batch ADO updates that require isolated execution.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ADO Agent
|
|
8
|
+
|
|
9
|
+
You are a specialized Azure DevOps integration agent. Your job is to execute ADO operations cleanly and return only the result — success, failure, or data — to the calling session.
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
- Read artifact .md files (Epic, Feature, Story, Bug) and extract frontmatter (ado_id, ado_type, ado_state)
|
|
13
|
+
- Run `python .tas/tools/tas-ado.py` commands to sync with Azure DevOps
|
|
14
|
+
- Report what changed, what failed, and why — nothing else
|
|
15
|
+
|
|
16
|
+
## How to operate
|
|
17
|
+
1. Read `tas.yaml` at project root for ADO project config (org, project, team)
|
|
18
|
+
2. Read the target artifact file(s) to get current state
|
|
19
|
+
3. Execute the appropriate `tas-ado.py` command
|
|
20
|
+
4. Report back: operation performed, ADO ID(s) affected, new state
|
|
21
|
+
|
|
22
|
+
## Commands available
|
|
23
|
+
```
|
|
24
|
+
python .tas/tools/tas-ado.py create <type> <temp-id> [--parent-id <id>]
|
|
25
|
+
python .tas/tools/tas-ado.py get <ado-id>
|
|
26
|
+
python .tas/tools/tas-ado.py update <type> <ado-id> [--assign <name>] [--status <state>]
|
|
27
|
+
python .tas/tools/tas-ado.py delete <type> <ado-id>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Output format
|
|
31
|
+
Return a concise summary:
|
|
32
|
+
- Operation: what was done
|
|
33
|
+
- Result: success/failure
|
|
34
|
+
- ADO IDs: affected work items
|
|
35
|
+
- Changes: what was updated (state, fields)
|
|
36
|
+
- Errors: if any, exact error message
|
|
37
|
+
|
|
38
|
+
Do NOT make assumptions about ADO project config — always read `tas.yaml` first.
|
|
39
|
+
Do NOT update .md files unless explicitly instructed.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: Specialized agent for objective code review. Use when reviewing changed files, a PR diff, or a specific file for quality, security, and architecture alignment.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Reviewer Agent
|
|
8
|
+
|
|
9
|
+
You are a specialized code review agent. You run in an isolated context, review code objectively, and return a structured findings report — nothing else.
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
- Review code changes against conventions, architecture, and security standards
|
|
13
|
+
- Reference the project's `CLAUDE.md` for conventions and `docs/sad.md` for architecture
|
|
14
|
+
- Reference `.tas/checklists/code-review.md` for the review checklist
|
|
15
|
+
- Reference `docs/adr/` for architectural decisions that constrain the code
|
|
16
|
+
|
|
17
|
+
## Review criteria (in priority order)
|
|
18
|
+
1. **Security** — injection, auth bypass, data exposure, OWASP Top 10
|
|
19
|
+
2. **Architecture** — violations of SAD, ADR decisions, layer boundaries
|
|
20
|
+
3. **Correctness** — logic errors, edge cases, null handling
|
|
21
|
+
4. **Conventions** — naming, structure, commit/branch format per CLAUDE.md
|
|
22
|
+
5. **Test coverage** — missing tests for new logic
|
|
23
|
+
6. **Performance** — obvious inefficiencies (N+1, unbounded loops, large allocations)
|
|
24
|
+
|
|
25
|
+
## Output format
|
|
26
|
+
Return findings grouped by severity only — skip categories with no findings:
|
|
27
|
+
|
|
28
|
+
### Critical
|
|
29
|
+
- `file.cs:42` — description of issue + suggested fix
|
|
30
|
+
|
|
31
|
+
### Major
|
|
32
|
+
- `file.cs:15` — description of issue + suggested fix
|
|
33
|
+
|
|
34
|
+
### Minor / Info
|
|
35
|
+
- `file.cs:8` — description
|
|
36
|
+
|
|
37
|
+
### Summary
|
|
38
|
+
X critical, Y major, Z minor. Overall: [Pass / Needs fixes].
|
|
39
|
+
|
|
40
|
+
Do NOT make general comments. Every finding must reference a specific file and line.
|
|
41
|
+
Do NOT fix the code — report only.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# /ado-create $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Tạo work item mới trên Azure DevOps từ file .md local.
|
|
4
|
+
|
|
5
|
+
## Cú pháp
|
|
6
|
+
/ado-create <type> <temp-id> [--parent-id <id>]
|
|
7
|
+
|
|
8
|
+
- type: epic | feature | story | bug
|
|
9
|
+
- temp-id: ID tạm trong tên file local (sẽ được rename sau khi tạo trên ADO)
|
|
10
|
+
- --parent-id: ADO ID của parent work item (optional)
|
|
11
|
+
|
|
12
|
+
## Ví dụ
|
|
13
|
+
/ado-create story 789 --parent-id 456
|
|
14
|
+
/ado-create epic 001
|
|
15
|
+
/ado-create bug 003 --parent-id 123
|
|
16
|
+
|
|
17
|
+
## Hành động
|
|
18
|
+
1. Chạy: python .tas/tools/tas-ado.py create-<type> <temp-id> [--parent-id <id>]
|
|
19
|
+
2. Script sẽ:
|
|
20
|
+
- Tìm file theo pattern {type}-{temp-id}-*.md
|
|
21
|
+
- Extract title và description
|
|
22
|
+
- Tạo work item trên ADO
|
|
23
|
+
- Rename file thành {type}-{ado_id}-*.md
|
|
24
|
+
- Thêm parent relation nếu có --parent-id
|
|
25
|
+
- Cập nhật frontmatter: ado_id, last_ado_sync
|
|
26
|
+
3. Cập nhật root/project-status.yaml
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# /ado-delete $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Xóa work item trên Azure DevOps. KHÔNG xóa file local.
|
|
4
|
+
|
|
5
|
+
## Cú pháp
|
|
6
|
+
/ado-delete <type> <ado-id>
|
|
7
|
+
|
|
8
|
+
- type: epic | feature | story | bug
|
|
9
|
+
|
|
10
|
+
## Ví dụ
|
|
11
|
+
/ado-delete story 1234
|
|
12
|
+
/ado-delete bug 5678
|
|
13
|
+
|
|
14
|
+
## Hành động
|
|
15
|
+
1. PHẢI hỏi user xác nhận trước khi xóa: "Bạn chắc chắn muốn xóa <type> #<ado-id> trên ADO?"
|
|
16
|
+
2. Sau khi user xác nhận, chạy: python .tas/tools/tas-ado.py delete-<type> <ado-id>
|
|
17
|
+
3. Script sẽ:
|
|
18
|
+
- Xóa work item trên ADO
|
|
19
|
+
- KHÔNG xóa file local (giữ lại để tham khảo)
|
|
20
|
+
- Cập nhật frontmatter: ado_state = Removed, last_ado_sync
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# /ado-get $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Pull work item từ Azure DevOps về file .md local.
|
|
4
|
+
|
|
5
|
+
## Cú pháp
|
|
6
|
+
/ado-get <ado-id>
|
|
7
|
+
|
|
8
|
+
## Ví dụ
|
|
9
|
+
/ado-get 5345
|
|
10
|
+
/ado-get 1234
|
|
11
|
+
|
|
12
|
+
## Hành động
|
|
13
|
+
1. Chạy: python .tas/tools/tas-ado.py get <ado-id>
|
|
14
|
+
2. Script sẽ:
|
|
15
|
+
- Lấy work item từ ADO
|
|
16
|
+
- Convert description HTML sang Markdown
|
|
17
|
+
- Tạo file {type}-{ado_id}-{slug}.md với frontmatter + nội dung
|
|
18
|
+
- Cập nhật last_ado_sync
|
|
19
|
+
3. Nếu file đã tồn tại, hỏi user có muốn overwrite không
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# /ado-status $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Cập nhật chỉ trạng thái work item trên Azure DevOps (nhanh, không push nội dung).
|
|
4
|
+
|
|
5
|
+
## Cú pháp
|
|
6
|
+
/ado-status <ado-id> --status <state> [--assign <name/email>]
|
|
7
|
+
|
|
8
|
+
## Ví dụ
|
|
9
|
+
/ado-status 1234 --status "In Progress"
|
|
10
|
+
/ado-status 5678 --status "Resolved" --assign "nguyenvana@torus.vn"
|
|
11
|
+
|
|
12
|
+
## Hành động
|
|
13
|
+
1. Chạy: python .tas/tools/tas-ado.py update-status <ado-id> --status <state> [--assign ...]
|
|
14
|
+
2. Script sẽ:
|
|
15
|
+
- Chỉ cập nhật state và/hoặc assigned-to trên ADO
|
|
16
|
+
- Tìm file local, cập nhật frontmatter: ado_state, last_ado_sync
|
|
17
|
+
- Cập nhật root/project-status.yaml
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# /ado-update $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Cập nhật work item trên Azure DevOps từ file .md local.
|
|
4
|
+
|
|
5
|
+
## Cú pháp
|
|
6
|
+
/ado-update <type> <ado-id> [--assign <name/email>] [--status <state>]
|
|
7
|
+
|
|
8
|
+
- type: epic | feature | story | bug
|
|
9
|
+
- ado-id: ADO work item ID
|
|
10
|
+
- --assign: gán cho người (optional)
|
|
11
|
+
- --status: cập nhật trạng thái (optional)
|
|
12
|
+
|
|
13
|
+
## Ví dụ
|
|
14
|
+
/ado-update story 1234 --status "In Progress"
|
|
15
|
+
/ado-update bug 5678 --assign "tranvanb@torus.vn" --status "Committed"
|
|
16
|
+
/ado-update feature 456
|
|
17
|
+
|
|
18
|
+
## Hành động
|
|
19
|
+
1. Chạy: python .tas/tools/tas-ado.py update-<type> <ado-id> [--assign ...] [--status ...]
|
|
20
|
+
2. Script sẽ:
|
|
21
|
+
- Tìm file local theo pattern *-<ado-id>-*.md
|
|
22
|
+
- Đọc title và description từ file
|
|
23
|
+
- Cập nhật work item trên ADO
|
|
24
|
+
- Cập nhật frontmatter: ado_state, ado_assigned_to, last_ado_sync
|
|
25
|
+
3. Nếu không có --assign và --status, push toàn bộ nội dung file lên ADO
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# /tas-adr $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: SE - Software Engineer
|
|
4
|
+
Tạo mới hoặc cập nhật Architecture Decision Record.
|
|
5
|
+
|
|
6
|
+
## Hành động
|
|
7
|
+
1. Cần context từ root/tas.yaml
|
|
8
|
+
2. Cần context từ .tas/templates/ADR.md
|
|
9
|
+
3. Quét docs/adr/ để xác định các ADR hiện có
|
|
10
|
+
4. Xác định chế độ dựa vào $ARGUMENTS:
|
|
11
|
+
|
|
12
|
+
### Chế độ CREATE ($ARGUMENTS là tiêu đề mới, ví dụ: "Use CQRS for Order Service"):
|
|
13
|
+
5. Xác định số thứ tự tiếp theo (ADR-001, ADR-002...)
|
|
14
|
+
6. Nếu docs/sad.md tồn tại, cần context từ SAD để đảm bảo ADR consistent
|
|
15
|
+
7. Tạo file docs/adr/ADR-{NNN}-{slug}.md
|
|
16
|
+
|
|
17
|
+
### Chế độ UPDATE ($ARGUMENTS là ADR ID, ví dụ: "ADR-001"):
|
|
18
|
+
5. Cần context từ file ADR hiện tại
|
|
19
|
+
6. Hỏi user cần thay đổi gì (cập nhật status, thêm consequences, supersede...)
|
|
20
|
+
7. Cập nhật file, thêm changelog
|
|
21
|
+
8. Nếu supersede: cập nhật status ADR cũ thành "Superseded by ADR-{NNN}"
|
|
22
|
+
|
|
23
|
+
## Nguyên tắc
|
|
24
|
+
- ADR phải có: Context, Decision, Rationale, Consequences, Alternatives Considered
|
|
25
|
+
- Status: Proposed | Accepted | Deprecated | Superseded
|
|
26
|
+
- Mỗi ADR độc lập, tự chứa đủ context để hiểu
|
|
27
|
+
- Link sang ADR liên quan nếu có (Supersedes, Related to)
|
|
28
|
+
- Sơ đồ Mermaid tuân thủ quy tắc: :::mermaid wrapper, không dùng ()
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
Vai trò thay đổi theo status của bug.
|
|
5
|
+
|
|
6
|
+
## Hành động
|
|
7
|
+
1. Cần context từ root/tas.yaml
|
|
8
|
+
2. Cần context từ .tas/templates/Bug.md
|
|
9
|
+
3. Xác định chế độ dựa vào $ARGUMENTS:
|
|
10
|
+
|
|
11
|
+
### Chế độ CREATE ($ARGUMENTS là mô tả bug mới):
|
|
12
|
+
Vai trò: PE hoặc SE (ai phát hiện bug)
|
|
13
|
+
4. Đọc project.code từ root/tas.yaml (ví dụ: "MP"). Hỏi user:
|
|
14
|
+
- Bug thuộc Feature nào? (ghi vào frontmatter để tham chiếu)
|
|
15
|
+
- Severity: Critical | High | Medium | Low
|
|
16
|
+
- Steps to reproduce
|
|
17
|
+
- Expected vs Actual behavior
|
|
18
|
+
- Môi trường phát hiện (Test | Staging | Production)
|
|
19
|
+
5. Quét docs/bugs/ để xác định số thứ tự Bug
|
|
20
|
+
6. Tạo file docs/bugs/{code}-Bug-{NNN}-{slug}.md
|
|
21
|
+
7. Bug status ban đầu: New
|
|
22
|
+
8. Cập nhật root/project-status.yaml
|
|
23
|
+
|
|
24
|
+
### Chế độ UPDATE ($ARGUMENTS là Bug ID, ví dụ: "Bug-001"):
|
|
25
|
+
Tìm file Bug trong docs/bugs/ (dùng glob), detect status hiện tại:
|
|
26
|
+
|
|
27
|
+
**Status = New -> Phân tích (SE)**
|
|
28
|
+
4. SE phân tích root cause:
|
|
29
|
+
- Đọc error logs/stack trace
|
|
30
|
+
- Trace code flow
|
|
31
|
+
- Xác định file và dòng gây lỗi
|
|
32
|
+
5. Ghi Root Cause Analysis vào Bug file
|
|
33
|
+
6. Viết Regression Test Cases (test reproduce bug)
|
|
34
|
+
7. Cập nhật status: New -> Committed
|
|
35
|
+
8. Cập nhật project-status.yaml
|
|
36
|
+
|
|
37
|
+
**Status = Committed -> Fix (SE)**
|
|
38
|
+
4. CHỈ đọc DUY NHẤT Bug file. KHÔNG đọc PRD, SAD, ADR, Design-Spec.
|
|
39
|
+
KHÔNG list thư mục, KHÔNG quét project structure.
|
|
40
|
+
Nếu cần tra cứu thêm, PHẢI hỏi user xác nhận trước khi đọc bất kỳ file nào.
|
|
41
|
+
5. Workflow:
|
|
42
|
+
a. Chạy regression test case, xác nhận FAIL (reproduce bug)
|
|
43
|
+
b. Fix code đúng root cause
|
|
44
|
+
c. Chạy regression test, xác nhận PASS
|
|
45
|
+
d. Chạy toàn bộ test suite, đảm bảo không regression mới
|
|
46
|
+
7. Cập nhật status: Committed -> In Progress -> Deploy Test
|
|
47
|
+
8. Cập nhật project-status.yaml
|
|
48
|
+
9. Commit message format: "fix: [mô tả] - resolves Bug-{NNN}"
|
|
49
|
+
|
|
50
|
+
**Status = Verify Test/Verify Stag -> Verify (PE)**
|
|
51
|
+
4. PE verify trên môi trường tương ứng:
|
|
52
|
+
- Chạy lại Steps to Reproduce, xác nhận bug không còn
|
|
53
|
+
- Kiểm tra regression test case đã pass
|
|
54
|
+
5. Nếu Pass: cập nhật status tiếp theo trong flow (Deploy Stag hoặc Done)
|
|
55
|
+
6. Nếu Fail: ghi lý do, cập nhật status quay lại Committed, SE phải fix lại
|
|
56
|
+
7. Cập nhật project-status.yaml
|
|
57
|
+
|
|
58
|
+
## Nguyên tắc
|
|
59
|
+
- KHÔNG patch symptom, phải fix root cause
|
|
60
|
+
- PHẢI có regression test case TRƯỚC khi fix
|
|
61
|
+
- Bug status theo cùng flow Story: New -> Committed -> In Progress -> Deploy Test -> Verify Test -> Deploy Stag -> Verify Stag -> Deploy Prod -> Verify Prod -> Done
|
|
62
|
+
- Bug Critical/High phải fix trước khi Feature được Verified
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
|
|
23
|
+
### Chế độ UPDATE (file đã tồn tại):
|
|
24
|
+
3. Cần context từ docs/design-spec.md hiện tại
|
|
25
|
+
4. $ARGUMENTS là mô tả thay đổi. Nếu không có, hỏi user cần cập nhật section nào.
|
|
26
|
+
5. Cập nhật file, thêm changelog
|
|
27
|
+
|
|
28
|
+
## Nguyên tắc
|
|
29
|
+
- Focus vào flows và behavior, không vào pixel-perfect design
|
|
30
|
+
- Mỗi screen cần mô tả: purpose, key elements, actions available
|
|
31
|
+
- Mermaid tuân thủ: :::mermaid wrapper, không dùng ()
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# /tas-dev-story $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: SE - Software Engineer
|
|
4
|
+
Implement một User Story.
|
|
5
|
+
|
|
6
|
+
## QUAN TRỌNG - Quy tắc đọc file
|
|
7
|
+
- CHỈ đọc DUY NHẤT Story file. Không đọc thêm bất kỳ file nào khác.
|
|
8
|
+
- KHÔNG đọc PRD, SAD, ADR, Design-Spec.
|
|
9
|
+
- KHÔNG list thư mục, KHÔNG quét project structure.
|
|
10
|
+
- KHÔNG đọc .tas/checklists/story-done.md ở bước đầu (chỉ đọc ở bước cuối).
|
|
11
|
+
- Nếu cần tra cứu thêm, PHẢI hỏi user xác nhận trước khi đọc bất kỳ file nào.
|
|
12
|
+
|
|
13
|
+
## Hành động
|
|
14
|
+
1. $ARGUMENTS là Story ID hoặc file path. Nếu không có, quét docs/epics/**/Story-*.md tìm stories có status Committed.
|
|
15
|
+
2. Đọc Story file.
|
|
16
|
+
3. **Phân tích kiến trúc:**
|
|
17
|
+
- Kiểm tra vấn đề kỹ thuật đã được mô tả trong SAD/ADR chưa (qua section Context from SAD/ADR trong Story)
|
|
18
|
+
- Nếu có và không thay đổi kiến trúc → Chuyển sang implement, mô tả giải pháp thi công (API, DB, FE component, config...)
|
|
19
|
+
- Nếu chưa có hoặc là thay đổi kiến trúc lớn → **TẠO ADR mới**:
|
|
20
|
+
- Command: `/tas-adr "{Tiêu đề quyết định kiến trúc}"`
|
|
21
|
+
- Template: `.tas/templates/ADR.md`
|
|
22
|
+
- Điền đầy đủ: Context, Decision, Rationale, Alternatives, Consequences
|
|
23
|
+
- Trong section Consequences, thêm subsection **SAD Updates** liệt kê các thay đổi cần cập nhật vào SAD
|
|
24
|
+
4. Bắt đầu implement dựa trên nội dung Story và ADR (nếu đã tạo).
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
### Nếu use_tdd = true trong root/tas.yaml:
|
|
28
|
+
a. Viết test cases TRƯỚC (Red phase)
|
|
29
|
+
- Unit tests theo acceptance criteria trong Story
|
|
30
|
+
- Chạy tests, xác nhận FAIL
|
|
31
|
+
b. Implement code (Green phase)
|
|
32
|
+
- Viết code tối thiểu để pass tests
|
|
33
|
+
c. Refactor
|
|
34
|
+
- Clean up code
|
|
35
|
+
- Đảm bảo tests vẫn pass
|
|
36
|
+
|
|
37
|
+
### Nếu use_tdd = false:
|
|
38
|
+
a. Implement code theo acceptance criteria trong Story
|
|
39
|
+
b. Viết unit tests cover các cases
|
|
40
|
+
c. Chạy tests, fix nếu fail
|
|
41
|
+
|
|
42
|
+
## Sau khi code xong
|
|
43
|
+
3. Đọc .tas/checklists/story-done.md, verify từng mục, sau đó tick vào section ## Definition of Done trong file Story:
|
|
44
|
+
- `- [x] Code implemented` nếu đã implement xong
|
|
45
|
+
- `- [x] Unit tests pass` nếu tests đã chạy pass
|
|
46
|
+
- `- [x] No regression` nếu toàn bộ test suite pass
|
|
47
|
+
- `- [x] Documentation updated (if needed)` nếu đã cập nhật
|
|
48
|
+
- `- [ ] Code review passed` — KHÔNG tick, để sau khi chạy /tas-review-code
|
|
49
|
+
- `- [ ] Acceptance criteria verified` — KHÔNG tick, để PE verify
|
|
50
|
+
4. Tạo commit message theo conventions trong CLAUDE.md
|
|
51
|
+
5. Nhắc user: chạy /tas-review-code để review và tự test lại ở local trước khi chuyển status
|
|
52
|
+
|
|
53
|
+
## Nguyên tắc
|
|
54
|
+
- KHÔNG implement ngoài scope của Story
|
|
55
|
+
- Mỗi public method PHẢI có XML doc comment
|
|
56
|
+
- **Khi nào cần tạo ADR:**
|
|
57
|
+
- Thay đổi kiến trúc ảnh hưởng nhiều components
|
|
58
|
+
- Thêm mới design pattern hoặc framework
|
|
59
|
+
- Đổi data flow hoặc integration pattern
|
|
60
|
+
- Quyết định trade-off kỹ thuật quan trọng
|
|
61
|
+
- Thay đổi đã ảnh hưởng đến SAD
|
|
@@ -0,0 +1,29 @@
|
|
|
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 (ví dụ: "MP"). 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
|
+
|
|
20
|
+
### Chế độ UPDATE ($ARGUMENTS là Epic ID, ví dụ: "Epic-001"):
|
|
21
|
+
4. Tìm thư mục docs/epics/{code}-Epic-001-*/
|
|
22
|
+
5. Cần context từ file Epic hiện tại
|
|
23
|
+
6. Hỏi user cần thay đổi gì (cập nhật scope, thêm feature, đổi status...)
|
|
24
|
+
7. Cập nhật file, thêm changelog
|
|
25
|
+
|
|
26
|
+
## Nguyên tắc
|
|
27
|
+
- Mỗi Epic map với một business capability trong PRD
|
|
28
|
+
- Epic KHÔNG chứa chi tiết kỹ thuật, chỉ chứa business value
|
|
29
|
+
- Ước lượng effort ở mức T-shirt size: S/M/L/XL
|
|
@@ -0,0 +1,41 @@
|
|
|
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 (ví dụ: "MP"). Liệt kê các Epic hiện có (quét docs/epics/{code}-Epic-*/), 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
|
+
|
|
31
|
+
### Chế độ UPDATE ($ARGUMENTS là Feature ID, ví dụ: "Feature-003"):
|
|
32
|
+
4. Tìm file Feature trong cây docs/epics/ (dùng glob)
|
|
33
|
+
5. Cần context từ file Feature hiện tại
|
|
34
|
+
6. Hỏi user cần thay đổi gì (thêm story, cập nhật AC, thêm test cases, đổi status...)
|
|
35
|
+
7. Cập nhật file, thêm changelog
|
|
36
|
+
|
|
37
|
+
## Nguyên tắc
|
|
38
|
+
- Feature là một chức năng cụ thể, có thể demo được
|
|
39
|
+
- Feature PHẢI có acceptance criteria rõ ràng, testable
|
|
40
|
+
- Integration Test Cases PHẢI cover các flow liên kết giữa stories
|
|
41
|
+
- E2E Test Cases PHẢI đủ để PE verify feature trên Staging ở Phase 2
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# /tas-init
|
|
2
|
+
|
|
3
|
+
Khởi tạo bộ TAS cho dự án hiện tại.
|
|
4
|
+
|
|
5
|
+
## Hành động
|
|
6
|
+
1. Cần context từ root/tas.yaml. Nếu chưa có, copy từ .tas/tas-example.yaml ra root và hỏi user điền thông tin cần thiết.
|
|
7
|
+
2. Tạo cấu trúc thư mục: .tas/templates/, .tas/checklists/, docs/, docs/adr/, docs/epics/, docs/bugs/
|
|
8
|
+
3. Tạo file root/project-status.yaml với trạng thái ban đầu (artifacts, epics, adrs đều rỗng).
|
|
9
|
+
4. Copy các template mặc định vào .tas/templates/ nếu chưa có.
|
|
10
|
+
5. Nếu project type là brownfield và codebase_scan_on_init = true:
|
|
11
|
+
- Quét codebase hiện tại
|
|
12
|
+
- Tạo file docs/codebase-overview.md tóm tắt kiến trúc hiện có
|
|
13
|
+
6. Hiển thị trạng thái: project type, team roles, workflow phases đang bật.
|
|
14
|
+
|
|
15
|
+
## Lưu ý
|
|
16
|
+
- KHÔNG tạo lại file nếu đã tồn tại
|
|
17
|
+
- Hỏi xác nhận trước khi thực hiện
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# /tas-prd $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: PE - Product Engineer
|
|
4
|
+
Tạo hoặc cập nhật Product Requirements Document.
|
|
5
|
+
|
|
6
|
+
## Hành động
|
|
7
|
+
1. Cần context từ root/tas.yaml để lấy project context
|
|
8
|
+
2. Kiểm tra docs/prd.md đã tồn tại chưa:
|
|
9
|
+
|
|
10
|
+
### Chế độ CREATE (file chưa tồn tại):
|
|
11
|
+
3. Cần context từ .tas/templates/PRD.md
|
|
12
|
+
4. Nếu $ARGUMENTS có nội dung, dùng làm input mô tả sản phẩm
|
|
13
|
+
5. Nếu không có $ARGUMENTS, hỏi user:
|
|
14
|
+
- Sản phẩm giải quyết vấn đề gì?
|
|
15
|
+
- Đối tượng người dùng chính?
|
|
16
|
+
- Các tính năng cốt lõi?
|
|
17
|
+
- Ràng buộc kỹ thuật/kinh doanh?
|
|
18
|
+
6. Tạo file docs/prd.md theo template
|
|
19
|
+
|
|
20
|
+
### Chế độ UPDATE (file đã tồn tại):
|
|
21
|
+
3. Cần context từ docs/prd.md hiện tại
|
|
22
|
+
4. $ARGUMENTS là mô tả thay đổi. Nếu không có, hỏi user cần cập nhật section nào.
|
|
23
|
+
5. Cập nhật file, giữ nguyên các section không thay đổi
|
|
24
|
+
6. Thêm dòng vào section Changelog cuối file: ngày, mô tả thay đổi
|
|
25
|
+
|
|
26
|
+
## Nguyên tắc
|
|
27
|
+
- Viết ở mức đủ chi tiết để SE có thể hiểu và thiết kế kiến trúc
|
|
28
|
+
- Phân loại requirements theo MoSCoW: Must/Should/Could/Won't
|
|
29
|
+
- Mỗi requirement có ID duy nhất: FR-001, NFR-001
|
|
30
|
+
- Luôn có section Non-Goals để giới hạn scope
|
|
31
|
+
- Sơ đồ Mermaid phải dùng :::mermaid wrapper, KHÔNG dùng ký tự ()
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# /tas-review-code $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: SE - Software Engineer
|
|
4
|
+
Review code thay đổi gần nhất hoặc một file/PR cụ thể.
|
|
5
|
+
|
|
6
|
+
## Hành động
|
|
7
|
+
1. Cần context từ root/tas.yaml và .tas/checklists/code-review.md
|
|
8
|
+
2. $ARGUMENTS có thể là: file path, hoặc để trống (review git diff)
|
|
9
|
+
3. Nếu $ARGUMENTS trống: lấy git diff của staged changes hoặc last commit
|
|
10
|
+
4. Review theo checklist:
|
|
11
|
+
- Naming conventions
|
|
12
|
+
- Architecture alignment (so với SAD)
|
|
13
|
+
- Error handling
|
|
14
|
+
- Security concerns
|
|
15
|
+
- Test coverage
|
|
16
|
+
- Performance implications
|
|
17
|
+
5. Output: danh sách findings phân loại theo severity (Critical/Major/Minor/Info)
|
|
18
|
+
|
|
19
|
+
## Sau khi review
|
|
20
|
+
6. Nếu có findings Critical/Major: liệt kê rõ, yêu cầu human fix trước khi tiếp tục.
|
|
21
|
+
7. Khi human xác nhận đã fix hết tất cả issues:
|
|
22
|
+
- Tick `- [x] Code review passed` trong section ## Definition of Done của file Story
|
|
23
|
+
8. Hỏi: "Bạn đã tự test lại ở local chưa? Nếu OK, có muốn chuyển ticket sang Deploy Test không?"
|
|
24
|
+
9. Nếu human xác nhận Yes, cập nhật file Story:
|
|
25
|
+
a. Dòng **Status:** trong header → Deploy Test
|
|
26
|
+
b. Cập nhật Technical notes nếu có thay đổi phát sinh trong quá trình review
|
|
27
|
+
c. Thêm dòng vào section Changelog trong Story: ngày, "Code review passed, moved to Deploy Test"
|
|
28
|
+
10. Cập nhật Story trên ADO:
|
|
29
|
+
- Chạy /ado-update story <ado-id> --status "Deploy Test" để push nội dung mới nhất và đổi state
|
|
30
|
+
11. Cập nhật file Feature cha:
|
|
31
|
+
a. Dòng **Status:** trong header → In Progress
|
|
32
|
+
b. Cột Status của Story trong bảng ## User Stories → Deploy Test
|
|
33
|
+
c. Thêm dòng Changelog trong Feature: ngày, "Story <id> moved to Deploy Test"
|
|
34
|
+
12. Cập nhật Feature trên ADO:
|
|
35
|
+
- Chạy /ado-update feature <feature-ado-id> --status "In Progress" để push nội dung mới nhất và đổi state
|
|
36
|
+
13. Cập nhật root/project-status.yaml: Story → Deploy Test, Feature → In Progress
|
|
37
|
+
|
|
38
|
+
## Nguyên tắc
|
|
39
|
+
- Review khách quan, chỉ ra cụ thể dòng code và lý do
|
|
40
|
+
- Đề xuất fix cụ thể, không chỉ nói "code xấu"
|
|
41
|
+
- Check xem code có vi phạm ADR nào không
|
|
42
|
+
- KHÔNG tự động chuyển status mà không có xác nhận của human
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# /tas-sad $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: SE - Software Engineer
|
|
4
|
+
Tạo hoặc cập nhật Solution Architecture Document.
|
|
5
|
+
|
|
6
|
+
## Prerequisite
|
|
7
|
+
- docs/prd.md phải tồn tại. Nếu chưa có, thông báo user chạy /tas-prd trước.
|
|
8
|
+
|
|
9
|
+
## Hành động
|
|
10
|
+
1. Cần context từ root/tas.yaml để lấy project info, workflow config
|
|
11
|
+
2. Cần context từ docs/prd.md để hiểu requirements
|
|
12
|
+
3. Nếu brownfield: cần context từ docs/codebase-overview.md nếu có
|
|
13
|
+
4. Kiểm tra docs/sad.md đã tồn tại chưa:
|
|
14
|
+
|
|
15
|
+
### Chế độ CREATE (file chưa tồn tại):
|
|
16
|
+
5. Cần context từ .tas/templates/SAD.md
|
|
17
|
+
6. Tạo file docs/sad.md theo template SAD của Torus
|
|
18
|
+
|
|
19
|
+
### Chế độ UPDATE (file đã tồn tại):
|
|
20
|
+
5. Cần context từ docs/sad.md hiện tại
|
|
21
|
+
6. $ARGUMENTS là mô tả thay đổi. Nếu không có, hỏi user cần cập nhật section nào.
|
|
22
|
+
7. Cập nhật file, giữ nguyên các section không thay đổi
|
|
23
|
+
8. Thêm dòng vào section Changelog cuối file
|
|
24
|
+
9. Nếu thay đổi là quyết định kiến trúc quan trọng, gợi ý user chạy /tas-adr
|
|
25
|
+
|
|
26
|
+
## Quy tắc Mermaid
|
|
27
|
+
- Các sơ đồ C4 PHẢI dùng Mermaid flow diagram
|
|
28
|
+
- Bắt đầu bằng :::mermaid, kết thúc bằng :::
|
|
29
|
+
- KHÔNG dùng ký tự () trong node labels, thay bằng []
|
|
30
|
+
- Ví dụ: A["Web App"] --> B["API Gateway"]
|
|
31
|
+
- Bao gồm các view: System Context, Container, Component, Data, Deployment
|
|
32
|
+
|
|
33
|
+
## Nguyên tắc
|
|
34
|
+
- SAD phải align với tech stack trong CLAUDE.md
|
|
35
|
+
- Mỗi architectural decision quan trọng cần reference sang ADR
|
|
36
|
+
- ERD phải dùng Mermaid erDiagram
|
|
37
|
+
- Sequence diagram dùng Mermaid sequenceDiagram
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# /tas-security-check $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: DSE - DevSecOps Engineer
|
|
4
|
+
Kiểm tra bảo mật codebase, lưu báo cáo vào docs/security-report.md.
|
|
5
|
+
|
|
6
|
+
## Hành động
|
|
7
|
+
1. Cần context từ .tas/checklists/security.md
|
|
8
|
+
2. $ARGUMENTS có thể là: file path, hoặc để trống (scan toàn bộ)
|
|
9
|
+
3. Kiểm tra theo OWASP Top 10:
|
|
10
|
+
- SQL Injection
|
|
11
|
+
- XSS
|
|
12
|
+
- Authentication/Authorization issues
|
|
13
|
+
- Sensitive data exposure
|
|
14
|
+
- Security misconfiguration
|
|
15
|
+
- Insecure deserialization
|
|
16
|
+
4. Kiểm tra thêm cho .NET:
|
|
17
|
+
- Anti-forgery tokens
|
|
18
|
+
- CORS configuration
|
|
19
|
+
- Connection string exposure
|
|
20
|
+
- Proper use of Data Protection API
|
|
21
|
+
5. Kiểm tra docs/security-report.md đã tồn tại chưa:
|
|
22
|
+
- Chưa có: tạo mới theo template
|
|
23
|
+
- Đã có: append thêm report mới, cập nhật status findings cũ nếu đã fix
|
|
24
|
+
6. Lưu output vào docs/security-report.md
|
|
25
|
+
7. Cập nhật root/project-status.yaml: artifacts.security_report
|
|
26
|
+
|
|
27
|
+
## Nguyên tắc
|
|
28
|
+
- Phân loại: Critical/High/Medium/Low
|
|
29
|
+
- Mỗi finding phải có recommended fix cụ thể
|
|
30
|
+
- Finding có status: Open | In Progress | Fixed | Accepted Risk
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# /tas-status
|
|
2
|
+
|
|
3
|
+
Kiểm tra trạng thái hiện tại của dự án TAS.
|
|
4
|
+
|
|
5
|
+
## Hành động
|
|
6
|
+
1. Cần context từ root/project-status.yaml (CHỈ đọc file này, KHÔNG quét thư mục docs/)
|
|
7
|
+
2. Cần context từ root/tas.yaml để biết workflow config
|
|
8
|
+
3. Dựa vào project-status.yaml, tổng hợp:
|
|
9
|
+
- Số lượng artifacts đã tạo và status
|
|
10
|
+
- Số lượng epics/features/stories theo từng status
|
|
11
|
+
- Phase hiện tại dựa trên trạng thái tổng hợp
|
|
12
|
+
4. Hiển thị bảng trạng thái phases và chi tiết stories theo status.
|
|
13
|
+
|
|
14
|
+
## Lưu ý
|
|
15
|
+
- Đây là command chỉ đọc, không thay đổi gì
|
|
16
|
+
- Nếu nghi ngờ project-status.yaml lệch thực tế, user có thể chạy /tas-init để quét lại và đồng bộ
|