@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,50 @@
|
|
|
1
|
+
# /tas-story $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: PE - Product Engineer
|
|
4
|
+
Tạo mới hoặc cập nhật User Story document.
|
|
5
|
+
|
|
6
|
+
## Prerequisite
|
|
7
|
+
- Ít nhất một Feature phải tồn tại
|
|
8
|
+
|
|
9
|
+
## Hành động
|
|
10
|
+
1. Cần context từ root/tas.yaml
|
|
11
|
+
2. Cần context từ .tas/templates/Story.md
|
|
12
|
+
3. Xác định chế độ dựa vào $ARGUMENTS:
|
|
13
|
+
|
|
14
|
+
### Chế độ CREATE ($ARGUMENTS là mô tả Story mới, hoặc không có $ARGUMENTS):
|
|
15
|
+
4. Đọc project.code từ root/tas.yaml (ví dụ: "MP"). Liệt kê Features hiện có (quét docs/epics/{code}-Epic-*/{code}-Feature-*/), hỏi user Story thuộc Feature nào
|
|
16
|
+
5. **Đọc đầy đủ context để trích xuất thông tin vào Story:**
|
|
17
|
+
- Đọc Feature đã chọn
|
|
18
|
+
- Đọc PRD (nếu có)
|
|
19
|
+
- Đọc SAD (nếu có)
|
|
20
|
+
- Đọc ADRs liên quan (nếu có)
|
|
21
|
+
6. Quét thư mục Feature đã chọn để xác định số thứ tự Story
|
|
22
|
+
7. Tạo file docs/epics/{code}-Epic-{NNN}-{slug}/{code}-Feature-{NNN}-{slug}/{code}-Story-{NNN}-{slug}.md
|
|
23
|
+
8. **Story phải NHÚNG TẤT CẢ thông tin cần thiết** để SE khi coding chỉ cần đọc file Story này, KHÔNG cần đọc lại file nào khác:
|
|
24
|
+
- User story format: "As a [role], I want [goal], so that [benefit]"
|
|
25
|
+
- Acceptance criteria (Given/When/Then format)
|
|
26
|
+
- Technical notes: files cần thay đổi, patterns áp dụng, constraints từ SAD/ADR
|
|
27
|
+
- Context từ PRD (chỉ thêm section nếu có business requirements đặc biệt)
|
|
28
|
+
- Context từ SAD/ADR (chỉ thêm section nếu có architecture decisions, patterns cần tuân thủ)
|
|
29
|
+
- Prerequisites từ Feature (chỉ thêm section nếu có dependency)
|
|
30
|
+
- Unit Test Cases
|
|
31
|
+
- Definition of Done checklist
|
|
32
|
+
9. **Test Case Prompting**: Sau khi PE điền acceptance criteria, TỰ ĐỘNG hỏi thêm:
|
|
33
|
+
- "Ngoài happy path, có edge case nào cần test không?" (ví dụ: input rỗng, giá trị biên, concurrent access)
|
|
34
|
+
- "Có negative case nào cần cover?" (ví dụ: unauthorized, invalid data, timeout)
|
|
35
|
+
- "Có dependency nào cần mock khi test?" (ví dụ: external API, database state)
|
|
36
|
+
Ghi tất cả vào section Unit Test Cases trong Story.
|
|
37
|
+
|
|
38
|
+
### Chế độ UPDATE ($ARGUMENTS là Story ID, ví dụ: "Story-005"):
|
|
39
|
+
4. Tìm file Story trong cây docs/epics/ (dùng glob)
|
|
40
|
+
5. Cần context từ file Story hiện tại
|
|
41
|
+
6. Hỏi user cần thay đổi gì (cập nhật AC, đổi status, thêm test cases...)
|
|
42
|
+
7. Cập nhật file, thêm changelog
|
|
43
|
+
|
|
44
|
+
## Nguyên tắc
|
|
45
|
+
- Story phải nhỏ đủ để hoàn thành trong 1-3 ngày
|
|
46
|
+
- PHẢI có acceptance criteria dạng Given/When/Then
|
|
47
|
+
- **Single Source of Truth:** Story file phải chứa TẤT CẢ thông tin cần thiết từ PRD, SAD, ADR, Feature. SE khi coding chỉ cần đọc file Story-*.md, KHÔNG cần đọc lại file nào khác để tiết kiệm token.
|
|
48
|
+
- Chỉ nhúng thông tin liên quan, không dư thừa - linh hoạt theo từng Story
|
|
49
|
+
- Unit Test Cases PHẢI cover: happy path, edge cases, negative cases
|
|
50
|
+
- Story status: New -> Committed -> In Progress -> Deploy Test -> Verify Test -> Deploy Stag -> Verify Stag -> Deploy Prod | Verify Prod -> Done
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# /tas-verify $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Vai trò: PE - Product Engineer
|
|
4
|
+
Verify Feature trên môi trường Staging (Phase 2).
|
|
5
|
+
|
|
6
|
+
## Prerequisite
|
|
7
|
+
- Feature phải có status "Ready To Verify"
|
|
8
|
+
- Môi trường Staging phải sẵn sàng
|
|
9
|
+
|
|
10
|
+
## Hành động
|
|
11
|
+
1. Cần context từ root/tas.yaml
|
|
12
|
+
2. $ARGUMENTS là Feature ID. Nếu không có, liệt kê features có status "Ready To Verify".
|
|
13
|
+
3. Tìm file Feature trong cây docs/epics/ (dùng glob)
|
|
14
|
+
4. Cần context từ file Feature hiện tại (đặc biệt section Integration Test Cases và E2E Test Cases)
|
|
15
|
+
|
|
16
|
+
### Workflow verify:
|
|
17
|
+
5. Hiển thị checklist từ 2 section test trong Feature:
|
|
18
|
+
a. **Integration Test Cases**: Liệt kê từng test case, hỏi PE kết quả (Pass/Fail)
|
|
19
|
+
b. **E2E / Acceptance Test Cases**: Liệt kê từng test case, hỏi PE kết quả (Pass/Fail)
|
|
20
|
+
6. Với mỗi test case FAIL:
|
|
21
|
+
- Hỏi PE mô tả lỗi
|
|
22
|
+
- Tự động tạo Bug trong thư mục Feature đó (dùng logic /tas-bug)
|
|
23
|
+
- Bug có reference đến test case gốc
|
|
24
|
+
7. Cập nhật file Feature:
|
|
25
|
+
- Ghi kết quả test (Pass/Fail + ngày) vào từng test case
|
|
26
|
+
- Nếu tất cả Pass: cập nhật Feature status thành "Verified"
|
|
27
|
+
- Nếu có Fail: giữ Feature status "Ready To Verify", liệt kê bugs
|
|
28
|
+
8. Cập nhật root/project-status.yaml
|
|
29
|
+
|
|
30
|
+
## Nguyên tắc
|
|
31
|
+
- KHÔNG skip test case nào, phải verify hết
|
|
32
|
+
- Bug phát hiện ở Phase 2 PHẢI được ghi thành Bug để track
|
|
33
|
+
- Feature chỉ được chuyển sang Phase 3 (Deploy) khi status = "Verified"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Read:*",
|
|
5
|
+
"Write:*",
|
|
6
|
+
"Edit:*",
|
|
7
|
+
"Bash:git:*",
|
|
8
|
+
"Bash:python:*",
|
|
9
|
+
"Bash:python3:*",
|
|
10
|
+
"Bash:dotnet:*",
|
|
11
|
+
"Bash:npm:*",
|
|
12
|
+
"Bash:node:*",
|
|
13
|
+
"Bash:az:*"
|
|
14
|
+
],
|
|
15
|
+
"deny": [
|
|
16
|
+
"Bash:sudo:*",
|
|
17
|
+
"Read:**/.env",
|
|
18
|
+
"Read:**/*.env"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ado-integration
|
|
3
|
+
description: |
|
|
4
|
+
Azure DevOps integration. Auto-invoke khi user nhắc đến:
|
|
5
|
+
sync ADO, push to board, pull work item, update status on ADO,
|
|
6
|
+
create work item on ADO, hoặc bất kỳ thao tác liên quan Azure DevOps.
|
|
7
|
+
allowed-tools: Read, Write, Edit, Bash, Grep
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ADO Integration Skill
|
|
11
|
+
|
|
12
|
+
Cho phép đồng bộ hai chiều giữa file .md trong repo và work items trên Azure DevOps.
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
- Azure CLI + extension azure-devops: `az extension add --name azure-devops --upgrade`
|
|
16
|
+
- Python 3.8+ với pyyaml: `pip install pyyaml`
|
|
17
|
+
- PAT trong file .env: `AzureDevops_Personal_AccessToken=your-pat-here`
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
Tất cả ADO commands chạy qua: `python .tas/tools/tas-ado.py <command> [args]`
|
|
21
|
+
|
|
22
|
+
Hoặc dùng slash commands:
|
|
23
|
+
- `/ado-create <type> <temp-id> [--parent-id <id>]`
|
|
24
|
+
- `/ado-get <ado-id>`
|
|
25
|
+
- `/ado-update <type> <ado-id> [--assign <name>] [--status <state>]`
|
|
26
|
+
- `/ado-status <ado-id> --status <state>`
|
|
27
|
+
- `/ado-delete <type> <ado-id>`
|
|
28
|
+
|
|
29
|
+
## File Convention
|
|
30
|
+
- Tên file: `{type}-{ado_id}-{slug-title}.md`
|
|
31
|
+
- Mỗi file có frontmatter YAML: ado_id, ado_type, ado_state, last_ado_sync
|
|
32
|
+
- File .md là single source of truth, sync lên ADO khi cần
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tas-conventions
|
|
3
|
+
description: |
|
|
4
|
+
Coding conventions và naming rules của dự án Torus.
|
|
5
|
+
Auto-invoke khi viết code mới, review code, refactor,
|
|
6
|
+
hoặc khi user hỏi về coding standards.
|
|
7
|
+
allowed-tools: Read, Grep, Glob
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TAS Conventions
|
|
11
|
+
|
|
12
|
+
Khi generate hoặc review code, PHẢI tuân thủ conventions được định nghĩa trong CLAUDE.md của project.
|
|
13
|
+
|
|
14
|
+
## Checklist
|
|
15
|
+
- Đọc CLAUDE.md để lấy naming conventions, branching, commit format
|
|
16
|
+
- Enforce các conventions đó trong code output
|
|
17
|
+
- Nếu code vi phạm conventions, chỉ ra cụ thể
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tas-tdd
|
|
3
|
+
description: |
|
|
4
|
+
TDD workflow. Auto-invoke khi implement feature,
|
|
5
|
+
write tests, hoặc khi use_tdd=true trong tas.yaml.
|
|
6
|
+
allowed-tools: Read, Write, Edit, Bash, Grep
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# TAS TDD Workflow
|
|
10
|
+
|
|
11
|
+
Khi use_tdd=true trong tas.yaml, enforce Red-Green-Refactor cycle:
|
|
12
|
+
|
|
13
|
+
## Red Phase
|
|
14
|
+
1. Viết test case TRƯỚC dựa trên acceptance criteria trong Story
|
|
15
|
+
2. Chạy test, xác nhận FAIL
|
|
16
|
+
3. KHÔNG viết implementation code ở phase này
|
|
17
|
+
|
|
18
|
+
## Green Phase
|
|
19
|
+
1. Viết code TỐI THIỂU để pass tests
|
|
20
|
+
2. Chạy test, xác nhận PASS
|
|
21
|
+
3. KHÔNG refactor ở phase này
|
|
22
|
+
|
|
23
|
+
## Refactor Phase
|
|
24
|
+
1. Clean up code, loại bỏ duplication
|
|
25
|
+
2. Chạy test, xác nhận vẫn PASS
|
|
26
|
+
3. Commit sau mỗi refactor thành công
|
package/.env.example
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
AZURE_DEVOPS_PAT=your-pat-here
|