@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.
Files changed (68) hide show
  1. package/.claude/commands/ado-create.md +17 -17
  2. package/.claude/commands/ado-delete.md +11 -11
  3. package/.claude/commands/ado-get.md +12 -12
  4. package/.claude/commands/ado-status.md +12 -12
  5. package/.claude/commands/ado-update.md +15 -15
  6. package/.claude/commands/tas-adr.md +33 -33
  7. package/.claude/commands/tas-apitest-plan.md +173 -173
  8. package/.claude/commands/tas-apitest.md +143 -143
  9. package/.claude/commands/tas-brainstorm.md +14 -14
  10. package/.claude/commands/tas-bug.md +113 -113
  11. package/.claude/commands/tas-design.md +37 -37
  12. package/.claude/commands/tas-dev.md +128 -128
  13. package/.claude/commands/tas-e2e-mobile.md +155 -155
  14. package/.claude/commands/tas-e2e-web.md +163 -163
  15. package/.claude/commands/tas-e2e.md +102 -102
  16. package/.claude/commands/tas-epic.md +35 -35
  17. package/.claude/commands/tas-feature.md +47 -47
  18. package/.claude/commands/tas-fix.md +51 -51
  19. package/.claude/commands/tas-functest-mobile.md +144 -144
  20. package/.claude/commands/tas-functest-web.md +192 -192
  21. package/.claude/commands/tas-functest.md +76 -76
  22. package/.claude/commands/tas-init.md +14 -14
  23. package/.claude/commands/tas-plan.md +198 -200
  24. package/.claude/commands/tas-prd.md +37 -37
  25. package/.claude/commands/tas-review.md +111 -111
  26. package/.claude/commands/tas-sad.md +43 -43
  27. package/.claude/commands/tas-security.md +87 -81
  28. package/.claude/commands/tas-spec.md +20 -20
  29. package/.claude/commands/tas-status.md +13 -13
  30. package/.claude/commands/tas-story.md +91 -91
  31. package/.claude/commands/tas-verify.md +51 -51
  32. package/.claude/rules/common/post-review-agent.md +49 -49
  33. package/.claude/rules/common/project-status.md +14 -14
  34. package/.claude/rules/common/stack-detection.md +6 -6
  35. package/.claude/rules/common/token-logging.md +27 -27
  36. package/.claude/rules/csharp/api-testing.md +171 -171
  37. package/.claude/skills/ado-integration/SKILL.md +36 -36
  38. package/.claude/skills/tas-conventions/SKILL.md +32 -32
  39. package/.claude/skills/tas-implementation-complete/SKILL.md +100 -99
  40. package/.claude/skills/tas-tdd/SKILL.md +123 -123
  41. package/.claude/skills/token-logger/SKILL.md +19 -19
  42. package/.tas/README.md +266 -1520
  43. package/.tas/checklists/code-review.md +13 -13
  44. package/.tas/checklists/security.md +3 -3
  45. package/.tas/checklists/story-done.md +11 -11
  46. package/.tas/hooks/README.md +138 -0
  47. package/.tas/hooks/pre-commit +26 -0
  48. package/.tas/hooks/security-scan.js +599 -0
  49. package/.tas/project-status-example.yaml +3 -3
  50. package/.tas/tas-example.yaml +25 -8
  51. package/.tas/templates/ADR.md +16 -16
  52. package/.tas/templates/API-Test-Spec.md +3 -3
  53. package/.tas/templates/Bug.md +12 -12
  54. package/.tas/templates/Design-Spec.md +8 -8
  55. package/.tas/templates/E2E-Execution-Report.md +1 -1
  56. package/.tas/templates/Epic.md +1 -1
  57. package/.tas/templates/Feature.md +10 -10
  58. package/.tas/templates/Func-Test-Spec.md +3 -3
  59. package/.tas/templates/SAD.md +106 -106
  60. package/.tas/templates/Security-Report.md +3 -3
  61. package/.tas/templates/Story.md +9 -9
  62. package/.tas/tools/tas-ado-readme.md +169 -169
  63. package/.tas/tools/tas-ado.py +1 -1
  64. package/CLAUDE-Example.md +37 -58
  65. package/README.md +294 -42
  66. package/bin/cli.js +24 -7
  67. package/lib/install.js +161 -47
  68. package/package.json +1 -1
@@ -1,91 +1,91 @@
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
- **Phạm vi:** Nghiệp vụ, trải nghiệm người dùng, acceptance criteria, test cases.
7
- **Không thuộc phạm vi:** Kỹ thuật implement, files cần sửa, database schema — đó là việc của `/tas-plan`.
8
-
9
- ## Always / Ask / Never
10
-
11
- | | Hành động |
12
- |---|---|
13
- | **Always** | Viết AC dạng Given/When/Then |
14
- | **Always** | Set `plan_status: pending` cho Story mới |
15
- | **Ask** | Khi Story > 8h — gợi ý tách nhỏ |
16
- | **Never** | Đọc SAD, ADR — kỹ thuật là việc của `/tas-plan` |
17
-
18
- ## Prerequisite
19
- - Ít nhất một Feature phải tồn tại
20
-
21
- ## Hành động
22
-
23
- ### Chế độ CREATE ($ARGUMENTS tả Story mới, hoặc không $ARGUMENTS)
24
-
25
- **Bước 1 — Xác định Feature**
26
- - Đọc `project.code` từ root/`tas.yaml`
27
- - Ưu tiên theo thứ tự:
28
- 1. Nếu `$ARGUMENTS` chứa Feature ID → dùng luôn
29
- 2. Nếu context `parent_id` → dùng luôn
30
- 3. Hỏi user: "Story này thuộc Feature nào?" — không quét thư mục
31
-
32
- **Bước 2 — Thu thập context nghiệp vụ**
33
- - Đọc file Feature đã xác định (lấy business context, scope, danh sách Stories hiện có)
34
- - Đọc PRD (nếu ) — chỉ lấy business requirements, user goals
35
-
36
- **Bước 3 — Xác định Story ID**
37
- - Đọc section Stories trong Feature file → xác định index tiếp theo từ danh sách đó
38
- - KHÔNG quét thư mục
39
-
40
- **Bước 4 — Soạn Story với user**
41
-
42
- Thảo luận để điền đầy đủ:
43
-
44
- a) **User Story**: "As a [role], I want [goal], so that [benefit]"
45
-
46
- b) **Business Requirements** (nếu ): business rules đặc thù, constraints từ stakeholders
47
-
48
- c) **Design Notes** (nếu ): UI/UX specs, mockup links, flow diagrams
49
-
50
- d) **Prerequisites** (nếu ): Stories khác phải done trước
51
-
52
- e) **Acceptance Criteria**: mỗi AC một kịch bản Given/When/Then rõ ràng
53
-
54
- **Bước 5 — Test Case Prompting**
55
-
56
- Sau khi AC được xác nhận, hỏi thêm:
57
- - "Ngoài happy path, edge case nào cần test không?" (input rỗng, giá trị biên, concurrent)
58
- - " negative case nào cần cover?" (unauthorized, invalid data, timeout, not found)
59
- - " external dependency nào cần mock khi test?" (API bên ngoài, database state)
60
-
61
- Ghi tất cả vào section `## Unit Test Cases`.
62
-
63
- **Bước 6 — Tạo file**
64
- - Đọc `.tas/templates/Story.md` để lấy format
65
- - Tạo `docs/epics/{code}-Epic-{NNN}-{slug}/{code}-Feature-{NNN}-{slug}/{code}-Story-{NNN}-{slug}.md`
66
- - Frontmatter: `plan_status: pending`, `plan_date:` để trống
67
-
68
- **Bước 7 — Cập nhật project-status.yaml**
69
- Theo `.claude/rules/common/project-status.md` — thêm entry vào `epics.{EPIC_ID}.features.{FEATURE_ID}.stories`.
70
-
71
- **Bước 8 — Thông báo next step**
72
- > "Story đã tạo. Trước khi SE bắt đầu code, cần chạy `/tas-plan {Story-ID}` để lập kế hoạch kỹ thuật."
73
-
74
- ---
75
-
76
- ### Chế độ UPDATE ($ARGUMENTS Story ID, dụ: "Story-005")
77
-
78
- 1. Tìm file qua glob `docs/epics/**/{code}-Story-{ID}-*.md`
79
- 2. Đọc file Story hiện tại
80
- 3. Hỏi user cần thay đổi (cập nhật AC, đổi status, thêm test cases, sửa business rule...)
81
- 4. Cập nhật file, thêm entry vào Changelog
82
- 5. Cập nhật `project-status.yaml` theo `.claude/rules/common/project-status.md`.
83
-
84
- ## Nguyên tắc
85
- - Story phải đủ nhỏ để hoàn thành trong **4-8 giờ**; nếu lớn hơn tách thành nhiều Stories
86
- - Story file = **product artifact**: tả *what* *why*, không phải *how*
87
- - Story status: New → Committed → In Progress → Deploy Test → Verify Test → Deploy Stag → Verify Stag → Deploy Prod → Verify Prod → Done
88
-
89
- ## Bước cuối — Token Log
90
-
91
- Invoke skill `token-logger`: ghi AI Usage Log vào file Story đang làm việc.
1
+ # /tas-story $ARGUMENTS
2
+
3
+ Role: PE - Product Engineer
4
+ Create or update User Story document.
5
+
6
+ **Scope:** Business logic, user experience, acceptance criteria, test cases.
7
+ **Out of scope:** Technical implementation, files to modify, database schema — that's `/tas-plan`'s job.
8
+
9
+ ## Always / Ask / Never
10
+
11
+ | | Action |
12
+ |---|---|
13
+ | **Always** | Write AC in Given/When/Then format |
14
+ | **Always** | Set `plan_status: pending` for new Story |
15
+ | **Ask** | When Story > 8h — suggest splitting |
16
+ | **Never** | Read SAD, ADR — technical is `/tas-plan`'s job |
17
+
18
+ ## Prerequisite
19
+ - At least one Feature must exist
20
+
21
+ ## Actions
22
+
23
+ ### CREATE mode ($ARGUMENTS is new Story description, or no $ARGUMENTS)
24
+
25
+ **Step 1 — Identify Feature**
26
+ - Read `project.code` from root/`tas.yaml`
27
+ - Prioritize in order:
28
+ 1. If `$ARGUMENTS` contains Feature ID → use it
29
+ 2. If context has `parent_id` → use it
30
+ 3. Ask user: "Which Feature does this Story belong to?" — no directory scan
31
+
32
+ **Step 2 — Gather business context**
33
+ - Read identified Feature file (get business context, scope, existing Stories list)
34
+ - Read PRD (if exists) — only business requirements, user goals
35
+
36
+ **Step 3 — Determine Story ID**
37
+ - Read Stories section in Feature file → determine next index from that list
38
+ - DO NOT scan directory
39
+
40
+ **Step 4 — Draft Story with user**
41
+
42
+ Discuss to fill in:
43
+
44
+ a) **User Story**: "As a [role], I want [goal], so that [benefit]"
45
+
46
+ b) **Business Requirements** (if any): specific business rules, stakeholder constraints
47
+
48
+ c) **Design Notes** (if any): UI/UX specs, mockup links, flow diagrams
49
+
50
+ d) **Prerequisites** (if any): other Stories that must be done first
51
+
52
+ e) **Acceptance Criteria**: each AC is a clear Given/When/Then scenario
53
+
54
+ **Step 5 — Test Case Prompting**
55
+
56
+ After AC confirmed, ask more:
57
+ - "Besides happy path, any edge cases to test?" (empty input, boundary values, concurrent)
58
+ - "Any negative cases to cover?" (unauthorized, invalid data, timeout, not found)
59
+ - "Any external dependencies to mock when testing?" (external APIs, database state)
60
+
61
+ Write all to `## Unit Test Cases` section.
62
+
63
+ **Step 6 — Create file**
64
+ - Read `.tas/templates/Story.md` for format
65
+ - Create `docs/epics/{code}-Epic-{NNN}-{slug}/{code}-Feature-{NNN}-{slug}/{code}-Story-{NNN}-{slug}.md`
66
+ - Frontmatter: `plan_status: pending`, `plan_date:` left empty
67
+
68
+ **Step 7 — Update project-status.yaml**
69
+ Per `.claude/rules/common/project-status.md` — add entry to `epics.{EPIC_ID}.features.{FEATURE_ID}.stories`.
70
+
71
+ **Step 8 — Notify next step**
72
+ > "Story created. Before SE starts coding, run `/tas-plan {Story-ID}` for technical planning."
73
+
74
+ ---
75
+
76
+ ### UPDATE mode ($ARGUMENTS is Story ID, e.g., "Story-005")
77
+
78
+ 1. Find file via glob `docs/epics/**/{code}-Story-{ID}-*.md`
79
+ 2. Read current Story file
80
+ 3. Ask user what needs changing (update AC, change status, add test cases, fix business rule...)
81
+ 4. Update file, add entry to Changelog
82
+ 5. Update `project-status.yaml` per `.claude/rules/common/project-status.md`.
83
+
84
+ ## Principles
85
+ - Story must be small enough to complete in **4-8 hours**; if largersplit into multiple Stories
86
+ - Story file = **product artifact**: describes *what* and *why*, not *how*
87
+ - Story status: New → Committed → In Progress → Deploy Test → Verify Test → Deploy Stag → Verify Stag → Deploy Prod → Verify Prod → Done
88
+
89
+ ## Final Step — Token Log
90
+
91
+ Invoke skill `token-logger`: write AI Usage Log to working Story file.
@@ -1,51 +1,51 @@
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 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 Feature ID. Nếu không có, liệt features 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 E2E Test Cases)
15
-
16
- ### Workflow verify:
17
- 4.5. **Chạy Automated Tests** (nếu ):
18
-
19
- **Functional Tests** (Layer 2):
20
- - Kiểm tra `docs/epics/{epic-dir}/{feature-dir}/Func-Test-*.md` đã có chưa
21
- - Nếu có, hỏi PE: "Chạy functional test suite? Command: `yarn functest:mobile:{feature-slug}` (hoặc `yarn functest:web:{feature-slug}`)"
22
- - Ghi nhận pass/fail của func suite
23
-
24
- **E2E Tests** (Layer 3 - nếu Feature E2E / Acceptance Test Cases):
25
- > Launch `e2e-runner`: E2E verification cho Feature {ID}.
26
- > Đọc section `## E2E / Acceptance Test Cases` từ Feature file — list từng test case.
27
- > Chạy các test cases đó, báo cáo kết quả: Pass/Fail per test case với do nếu Fail.
28
- > Không tự động fix lỗichỉ báo cáo kết quả để PE xác nhận.
29
-
30
- 5. **Tổng hợp kết quả xác nhận với PE**:
31
- - Hiển thị summary automated test results (Functional + E2E)
32
- - Hỏi PE: "Automated tests đã pass. Trên Staging thực vấn đề nào mà automated tests không catch được không? (UX, business logic, edge case thực tế...)"
33
-
34
- 6. Với mỗi issue PE báo cáo hoặc test case FAIL:
35
- - Hỏi PE tả lỗi
36
- - Tự động tạo Bug trong thư mục Feature đó (dùng logic /tas-bug)
37
- - Bug reference đến test case gốc (FT ID hoặc E2E ID), hoặc ghi "phát hiện qua manual verify Staging"
38
- 7. Cập nhật file Feature:
39
- - Ghi kết quả test (Pass/Fail + ngày) vào từng test case
40
- - Nếu tất cả Pass: cập nhật Feature status thành "Verified"
41
- - Nếu Fail: giữ Feature status "Ready To Verify", liệt bugs
42
- 8. Cập nhật root/project-status.yaml
43
-
44
- ## Nguyên tắc
45
- - KHÔNG skip test case nào, phải verify hết
46
- - Bug phát hiện Phase 2 PHẢI được ghi thành Bug để track
47
- - Feature chỉ được chuyển sang Phase 3 (Deploy) khi status = "Verified"
48
-
49
- ## Bước cuối — Token Log
50
-
51
- Invoke skill `token-logger`: ghi AI Usage Log vào file Feature đang verify.
1
+ # /tas-verify $ARGUMENTS
2
+
3
+ Role: PE - Product Engineer
4
+ Verify Feature on Staging environment (Phase 2).
5
+
6
+ ## Prerequisite
7
+ - Feature must have status "Ready To Verify"
8
+ - Staging environment must be ready
9
+
10
+ ## Actions
11
+ 1. Need context from root/tas.yaml
12
+ 2. $ARGUMENTS is Feature ID. If not provided, list features with status "Ready To Verify".
13
+ 3. Find Feature file in docs/epics/ tree (using glob)
14
+ 4. Need context from current Feature file (especially Integration Test Cases and E2E Test Cases sections)
15
+
16
+ ### Verification workflow:
17
+ 4.5. **Run Automated Tests** (if available):
18
+
19
+ **Functional Tests** (Layer 2):
20
+ - Check if `docs/epics/{epic-dir}/{feature-dir}/Func-Test-*.md` exists
21
+ - If yes, ask PE: "Run functional test suite? Command: `yarn functest:mobile:{feature-slug}` (or `yarn functest:web:{feature-slug}`)"
22
+ - Note pass/fail of func suite
23
+
24
+ **E2E Tests** (Layer 3 - if Feature has E2E / Acceptance Test Cases):
25
+ > Launch `e2e-runner`: E2E verification for Feature {ID}.
26
+ > Read `## E2E / Acceptance Test Cases` section from Feature file — list each test case.
27
+ > Run those test cases, report results: Pass/Fail per test case with reason if Fail.
28
+ > Don't auto-fix bugsonly report results for PE confirmation.
29
+
30
+ 5. **Synthesize results and confirm with PE**:
31
+ - Display automated test results summary (Functional + E2E)
32
+ - Ask PE: "Automated tests passed. Any issues on actual Staging that automated tests didn't catch? (UX, business logic, real-world edge cases...)"
33
+
34
+ 6. For each issue PE reports or test case FAIL:
35
+ - Ask PE to describe the bug
36
+ - Automatically create Bug in that Feature directory (use /tas-bug logic)
37
+ - Bug references original test case (FT ID or E2E ID), or notes "found via manual Staging verify"
38
+ 7. Update Feature file:
39
+ - Write test results (Pass/Fail + date) to each test case
40
+ - If all Pass: update Feature status to "Verified"
41
+ - If any Fail: keep Feature status "Ready To Verify", list bugs
42
+ 8. Update root/project-status.yaml
43
+
44
+ ## Principles
45
+ - DO NOT skip any test case, must verify all
46
+ - Bugs found in Phase 2 MUST be recorded as Bug for tracking
47
+ - Feature only moves to Phase 3 (Deploy) when status = "Verified"
48
+
49
+ ## Final Step — Token Log
50
+
51
+ Invoke skill `token-logger`: write AI Usage Log to Feature file being verified.
@@ -1,49 +1,49 @@
1
- # Post-Implementation Review (Isolated Agent)
2
-
3
- Sau khi implement hoặc fix xong, chạy review qua **Agent độc lập** — không dùng session hiện tại để tránh reviewer bias từ quá trình implement.
4
-
5
- ## Cách dùng
6
-
7
- Gọi `Agent` tool với prompt sau (thay thế các placeholder `{}`):
8
-
9
- ```
10
- Bạn code reviewer. Không context từ session trước hãy review hoàn toàn khách quan.
11
-
12
- Artifact: {path-to-artifact-file}
13
- Changed files: {danh sách files vừa thay đổi}
14
- Stack: {stack từ CLAUDE.md}
15
-
16
- Thực hiện:
17
- 1. Hygiene scan: debug code còn sót (console.log, debugger, print), secrets hardcoded,
18
- commented-out blocks lớn (>5 dòng).
19
- 1b. Silent failure scan — tìm các pattern sau:
20
- - Swallowed exceptions: empty catch {}, catch chỉ log nhưng tiếp tục chạy như không có lỗi
21
- - Silent async failures: fire-and-forget (unawaited task/Promise), async void (.NET),
22
- .catch(() => {}) không xử lý gì
23
- - Null blindspots: .FirstOrDefault() dùng trực tiếp không null-check (.NET),
24
- optional chaining thiếu trên deeply nested object access (TS/JS),
25
- dict.get() result dùng như non-None (Python)
26
- - Error propagation sai: HTTP calls không check status trước khi parse,
27
- hàm return bool/null khi lỗi thay throw (caller bỏ qua kết quả)
28
- - Config reads không check existence
29
- 2. Chạy tests: detect test runner (package.json → npm test / *.csproj → dotnet test /
30
- pytest.ini → python -m pytest), report kết quả.
31
- 3. Parallel review — launch đồng thời:
32
- - code-reviewer: đọc .tas/checklists/code-review.md + .claude/rules/common/code-review.md.
33
- Tập trung: naming, architecture, error handling, DRY, function size, nesting depth.
34
- - security-reviewer: đọc .claude/rules/common/security.md.
35
- Tập trung: OWASP Top 10, injection, hardcoded secrets, auth/authz.
36
- - {lang_agent}: đọc .claude/rules/[stack]/coding-style.md + .claude/rules/[stack]/patterns.md.
37
- Tập trung: async/await, null handling, type safety, anti-patterns của stack.
38
- 4. Tổng hợp findings: Critical / High / Medium / Low với file:line fix cụ thể.
39
-
40
- Trả về Review Summary đầy đủ.
41
- ```
42
-
43
- ## Gate Rule
44
-
45
- | Kết quả | Hành động |
46
- |---|---|
47
- | **Critical** hoặc **High** | List findings, **DỪNG**, yêu cầu fix trước khi tiếp tục |
48
- | Chỉ **Medium** / **Low** | List gợi ý, hỏi user muốn fix không, sau đó tiếp tục |
49
- | Không findings | Tiếp tục bình thường |
1
+ # Post-Implementation Review (Isolated Agent)
2
+
3
+ After implementing or fixing, run review through **independent Agent** — don't use current session to avoid reviewer bias from implementation process.
4
+
5
+ ## How to use
6
+
7
+ Call `Agent` tool with following prompt (replace placeholders `{}`):
8
+
9
+ ```
10
+ You are code reviewer. No context from previous session — review completely objectively.
11
+
12
+ Artifact: {path-to-artifact-file}
13
+ Changed files: {list of files just changed}
14
+ Stack: {stack from CLAUDE.md}
15
+
16
+ Execute:
17
+ 1. Hygiene scan: leftover debug code (console.log, debugger, print), hardcoded secrets,
18
+ large commented-out blocks (>5 lines).
19
+ 1b. Silent failure scan — find following patterns:
20
+ - Swallowed exceptions: empty catch {}, catch only logs but continues like no error
21
+ - Silent async failures: fire-and-forget (unawaited task/Promise), async void (.NET),
22
+ .catch(() => {}) with no handling
23
+ - Null blindspots: .FirstOrDefault() used directly without null-check (.NET),
24
+ missing optional chaining on deeply nested object access (TS/JS),
25
+ dict.get() result used as non-None (Python)
26
+ - Error propagation wrong: HTTP calls don't check status before parse,
27
+ function returns bool/null when error instead of throwing (caller ignores result)
28
+ - Config reads don't check existence
29
+ 2. Run tests: detect test runner (package.json → npm test / *.csproj → dotnet test /
30
+ pytest.ini → python -m pytest), report results.
31
+ 3. Parallel review — launch simultaneously:
32
+ - code-reviewer: read .tas/checklists/code-review.md + .claude/rules/common/code-review.md.
33
+ Focus: naming, architecture, error handling, DRY, function size, nesting depth.
34
+ - security-reviewer: read .claude/rules/common/security.md.
35
+ Focus: OWASP Top 10, injection, hardcoded secrets, auth/authz.
36
+ - {lang_agent}: read .claude/rules/[stack]/coding-style.md + .claude/rules/[stack]/patterns.md.
37
+ Focus: async/await, null handling, type safety, stack-specific anti-patterns.
38
+ 4. Synthesize findings: Critical / High / Medium / Low with file:line and specific fix.
39
+
40
+ Return full Review Summary.
41
+ ```
42
+
43
+ ## Gate Rule
44
+
45
+ | Result | Action |
46
+ |---|---|
47
+ | Has **Critical** or **High** | List findings, **STOP**, require fix before continuing |
48
+ | Only **Medium** / **Low** | List suggestions, ask if user wants to fix, then continue |
49
+ | No findings | Continue normally |
@@ -1,17 +1,17 @@
1
1
  # project-status.yaml — Update Convention
2
2
 
3
- File `project-status.yaml` project root index tổng hợp trạng thái dự án.
4
- Commands cập nhật file này sau mỗi thay đổi artifact hoặc status.
3
+ File `project-status.yaml` at project root is aggregate index of project status.
4
+ Commands update this file after each artifact or status change.
5
5
 
6
- ## Luôn cập nhật
6
+ ## Always update
7
7
 
8
8
  ```yaml
9
- last_updated: YYYY-MM-DD # ngày hiện tại, mỗi lần thay đổi
9
+ last_updated: YYYY-MM-DD # current date, each time there's a change
10
10
  ```
11
11
 
12
- ## Artifacts (docs đơn lẻ)
12
+ ## Artifacts (individual docs)
13
13
 
14
- Cập nhật khi tạo mới hoặc thay đổi version:
14
+ Update when creating new or changing version:
15
15
 
16
16
  ```yaml
17
17
  artifacts:
@@ -19,8 +19,8 @@ artifacts:
19
19
  file: docs/prd.md
20
20
  status: Draft | Review | Approved
21
21
  last_updated: YYYY-MM-DD
22
- version: "1.0" # tăng minor khi update nội dung, major khi thay đổi lớn
23
- requirements_count: N # chỉ dành cho PRD — đếm số FR-xxx
22
+ version: "1.0" # increment minor when updating content, major for large changes
23
+ requirements_count: N # only for PRD — count of FR-xxx
24
24
 
25
25
  sad:
26
26
  file: docs/sad.md
@@ -42,7 +42,7 @@ artifacts:
42
42
 
43
43
  ## Epics / Features / Stories
44
44
 
45
- Cập nhật khi tạo mới hoặc status thay đổi:
45
+ Update when creating new or changing status:
46
46
 
47
47
  ```yaml
48
48
  epics:
@@ -72,9 +72,9 @@ adrs:
72
72
  title: "..."
73
73
  ```
74
74
 
75
- ## Quy tắc
75
+ ## Rules
76
76
 
77
- - Chỉ cập nhật key liên quan đến thay đổi vừa xảy ra không rewrite toàn bộ file
78
- - Nếu key chưa tồn tại: thêm mới
79
- - Nếu key đã tồn tại: cập nhật giá trị
80
- - Version: minor (+0.1) khi update nội dung; major (+1.0) khi thay đổi cấu trúc lớn
77
+ - Only update key related to change just occurreddon't rewrite entire file
78
+ - If key doesn't exist yet: add new
79
+ - If key exists: update value
80
+ - Version: minor (+0.1) when updating content; major (+1.0) when large structure change
@@ -1,25 +1,25 @@
1
1
  # Stack Detection
2
2
 
3
- Đọc `CLAUDE.md` tại root, tìm section `## Tech Stack`, xác định các biến sau để dùng trong agent prompts rule file lookups.
3
+ Read `CLAUDE.md` at root, find `## Tech Stack` section, determine following variables for use in agent prompts and rule file lookups.
4
4
 
5
5
  ## lang_agent — Backend
6
6
 
7
- | Tech Stack chứa | lang_agent |
7
+ | Tech Stack contains | lang_agent |
8
8
  |---|---|
9
9
  | `.NET` / `C#` | `csharp-reviewer` |
10
10
  | `Node.js` / `TypeScript` / `NestJS` / `Express` | `typescript-reviewer` |
11
11
  | `Python` / `FastAPI` / `Django` / `Flask` | `python-reviewer` |
12
12
 
13
- **Frontend bổ sung:** nếu Tech Stack chứa `React` → thêm `typescript-reviewer` vào lang_agent (nếu chưa ).
13
+ **Frontend addition:** if Tech Stack contains `React` → add `typescript-reviewer` to lang_agent (if not already).
14
14
 
15
- ## infra_agent db_agent — Tùy chọn
15
+ ## infra_agent and db_agent — Optional
16
16
 
17
- | Tech Stack chứa | Biến | Value |
17
+ | Tech Stack contains | Variable | Value |
18
18
  |---|---|---|
19
19
  | `AWS` (Infrastructure) | `infra_agent` | `aws-reviewer` |
20
20
  | `MySQL` / `PostgreSQL` / `MSSQL` / `SQL Server` / `SQLite` | `db_agent` | `database-reviewer` |
21
21
 
22
- ## Rules directory theo stack
22
+ ## Rules directory by stack
23
23
 
24
24
  | lang_agent | Rules directory |
25
25
  |---|---|
@@ -1,27 +1,27 @@
1
- # Token Usage Logging
2
-
3
- Ghi `## AI Usage Log` vào cuối artifact file khi TAS command hoàn thành.
4
-
5
- ## Token Estimation
6
-
7
- Ước tính từ session awareness: số tự mỗi file đã `Read` ÷ 4 ≈ tokens (English/code), ÷ 2 (Vietnamese).
8
- Số tự output artifact ÷ 4. Luôn append `(est.)`. User verify bằng `/cost` (CLI) hoặc `/context` (Desktop app).
9
-
10
- ## Format
11
-
12
- ```markdown
13
- ---
14
-
15
- ## AI Usage Log
16
-
17
- | # | Date | Command | Input (est.) | Output (est.) |
18
- |---|------|---------|-------------|---------------|
19
- | 1 | YYYY-MM-DD | /tas-{name} | ~{N}k | ~{N}k |
20
- | 2 | YYYY-MM-DD | /tas-{name} (revision) | ~{N}k | ~{N}k |
21
- | **Total** | | | **~{N}k** | **~{N}k** |
22
- ```
23
-
24
- ## Update Rules
25
-
26
- - **Lần đầu**: section chưa tồn tại → append toàn bộ section với row đầu tiên row Total
27
- - **Lần sau**: append row mới trước row Total, cập nhật Total (cộng dồn)
1
+ # Token Usage Logging
2
+
3
+ Write `## AI Usage Log` at end of artifact file when TAS command completes.
4
+
5
+ ## Token Estimation
6
+
7
+ Estimate from session awareness: character count of each file `Read` ÷ 4 ≈ tokens (English/code), ÷ 2 (Vietnamese).
8
+ Character count of artifact output ÷ 4. Always append `(est.)`. User verifies with `/cost` (CLI) or `/context` (Desktop app).
9
+
10
+ ## Format
11
+
12
+ ```markdown
13
+ ---
14
+
15
+ ## AI Usage Log
16
+
17
+ | # | Date | Command | Input (est.) | Output (est.) |
18
+ |---|------|---------|-------------|---------------|
19
+ | 1 | YYYY-MM-DD | /tas-{name} | ~{N}k | ~{N}k |
20
+ | 2 | YYYY-MM-DD | /tas-{name} (revision) | ~{N}k | ~{N}k |
21
+ | **Total** | | | **~{N}k** | **~{N}k** |
22
+ ```
23
+
24
+ ## Update Rules
25
+
26
+ - **First time**: section doesn't exist → append entire section with first row and Total row
27
+ - **Subsequent**: append new row before Total row, update Total (cumulative)