@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.
Files changed (162) hide show
  1. package/.tas/README.md +70 -70
  2. package/{.claude → .tas/_platform/claude-code}/settings.json +0 -12
  3. package/{.claude → .tas/_platform}/hooks/code-quality.js +1 -1
  4. package/{.claude → .tas/_platform}/hooks/session-end.js +20 -25
  5. package/.tas/commands/ado-create.md +28 -0
  6. package/.tas/commands/ado-delete.md +22 -0
  7. package/.tas/commands/ado-get.md +20 -0
  8. package/.tas/commands/ado-status.md +18 -0
  9. package/.tas/commands/ado-update.md +27 -0
  10. package/.tas/commands/tas-adr.md +33 -0
  11. package/.tas/commands/tas-apitest-plan.md +173 -0
  12. package/.tas/commands/tas-apitest.md +143 -0
  13. package/.tas/commands/tas-brainstorm.md +19 -0
  14. package/.tas/commands/tas-bug.md +113 -0
  15. package/.tas/commands/tas-design.md +37 -0
  16. package/.tas/commands/tas-dev.md +125 -0
  17. package/{.claude → .tas}/commands/tas-e2e-mobile.md +155 -155
  18. package/{.claude → .tas}/commands/tas-e2e-web.md +163 -163
  19. package/.tas/commands/tas-e2e.md +102 -0
  20. package/.tas/commands/tas-epic.md +35 -0
  21. package/.tas/commands/tas-feature.md +47 -0
  22. package/.tas/commands/tas-fix.md +51 -0
  23. package/.tas/commands/tas-functest-mobile.md +144 -0
  24. package/{.claude → .tas}/commands/tas-functest-web.md +192 -192
  25. package/.tas/commands/tas-functest.md +76 -0
  26. package/.tas/commands/tas-init.md +17 -0
  27. package/.tas/commands/tas-plan.md +198 -0
  28. package/.tas/commands/tas-prd.md +37 -0
  29. package/.tas/commands/tas-review.md +113 -0
  30. package/.tas/commands/tas-sad.md +43 -0
  31. package/.tas/commands/tas-security.md +87 -0
  32. package/.tas/commands/tas-spec.md +50 -0
  33. package/.tas/commands/tas-status.md +16 -0
  34. package/.tas/commands/tas-story.md +91 -0
  35. package/.tas/platforms.json +5 -0
  36. package/.tas/project-status-example.yaml +17 -17
  37. package/.tas/rules/ado-integration.md +65 -0
  38. package/{.claude/skills/api-design/SKILL.md → .tas/rules/common/api-design.md} +517 -530
  39. package/{.claude → .tas}/rules/common/code-review.md +30 -6
  40. package/.tas/rules/common/post-implementation-review.md +51 -0
  41. package/{.claude → .tas}/rules/common/project-status.md +80 -80
  42. package/.tas/rules/common/stack-detection.md +29 -0
  43. package/.tas/rules/common/story-done.md +30 -0
  44. package/.tas/rules/common/tdd.md +89 -0
  45. package/{.claude → .tas}/rules/common/testing.md +3 -8
  46. package/.tas/rules/common/token-logging.md +36 -0
  47. package/{.claude → .tas}/rules/csharp/api-testing.md +20 -20
  48. package/{.claude → .tas}/rules/csharp/coding-style.md +0 -2
  49. package/{.claude → .tas}/rules/csharp/security.md +10 -0
  50. package/{.claude → .tas}/rules/python/coding-style.md +0 -2
  51. package/{.claude → .tas}/rules/typescript/coding-style.md +0 -2
  52. package/.tas/rules/typescript/patterns.md +142 -0
  53. package/.tas/rules/typescript/security.md +88 -0
  54. package/{.claude → .tas}/rules/typescript/testing.md +0 -4
  55. package/{.claude → .tas}/rules/web/coding-style.md +0 -2
  56. package/.tas/tas-example.yaml +10 -11
  57. package/.tas/templates/ADR.md +47 -47
  58. package/.tas/templates/AGENTS.md +37 -0
  59. package/.tas/templates/API-Test-Spec.md +3 -3
  60. package/.tas/templates/Bug.md +67 -67
  61. package/.tas/templates/Design-Spec.md +36 -36
  62. package/.tas/templates/E2E-Execution-Report.md +1 -1
  63. package/.tas/templates/Epic.md +46 -46
  64. package/.tas/templates/Feature.md +10 -10
  65. package/.tas/templates/Func-Test-Spec.md +3 -3
  66. package/.tas/templates/SAD.md +106 -106
  67. package/.tas/templates/Security-Report.md +27 -27
  68. package/.tas/templates/Story.md +9 -9
  69. package/.tas/tools/tas-ado-readme.md +68 -68
  70. package/.tas/tools/tas-ado.py +621 -621
  71. package/README.md +78 -78
  72. package/bin/cli.js +91 -73
  73. package/lib/adapters/antigravity.js +137 -0
  74. package/lib/adapters/claude-code.js +35 -0
  75. package/lib/adapters/codex.js +163 -0
  76. package/lib/adapters/cursor.js +80 -0
  77. package/lib/adapters/index.js +20 -0
  78. package/lib/adapters/utils.js +81 -0
  79. package/lib/deleted-files.json +99 -0
  80. package/lib/install.js +403 -327
  81. package/package.json +4 -3
  82. package/.claude/agents/code-reviewer.md +0 -41
  83. package/.claude/agents/e2e-runner.md +0 -61
  84. package/.claude/agents/planner.md +0 -82
  85. package/.claude/agents/tdd-guide.md +0 -84
  86. package/.claude/commands/ado-create.md +0 -27
  87. package/.claude/commands/ado-delete.md +0 -21
  88. package/.claude/commands/ado-get.md +0 -20
  89. package/.claude/commands/ado-status.md +0 -18
  90. package/.claude/commands/ado-update.md +0 -26
  91. package/.claude/commands/tas-adr.md +0 -33
  92. package/.claude/commands/tas-apitest-plan.md +0 -173
  93. package/.claude/commands/tas-apitest.md +0 -143
  94. package/.claude/commands/tas-brainstorm.md +0 -19
  95. package/.claude/commands/tas-bug.md +0 -113
  96. package/.claude/commands/tas-design.md +0 -37
  97. package/.claude/commands/tas-dev.md +0 -128
  98. package/.claude/commands/tas-e2e.md +0 -102
  99. package/.claude/commands/tas-epic.md +0 -35
  100. package/.claude/commands/tas-feature.md +0 -47
  101. package/.claude/commands/tas-fix.md +0 -51
  102. package/.claude/commands/tas-functest-mobile.md +0 -144
  103. package/.claude/commands/tas-functest.md +0 -76
  104. package/.claude/commands/tas-init.md +0 -17
  105. package/.claude/commands/tas-plan.md +0 -200
  106. package/.claude/commands/tas-prd.md +0 -37
  107. package/.claude/commands/tas-review.md +0 -111
  108. package/.claude/commands/tas-sad.md +0 -43
  109. package/.claude/commands/tas-security.md +0 -87
  110. package/.claude/commands/tas-spec.md +0 -50
  111. package/.claude/commands/tas-status.md +0 -16
  112. package/.claude/commands/tas-story.md +0 -91
  113. package/.claude/commands/tas-verify.md +0 -51
  114. package/.claude/rules/common/post-review-agent.md +0 -49
  115. package/.claude/rules/common/stack-detection.md +0 -29
  116. package/.claude/rules/common/token-logging.md +0 -27
  117. package/.claude/rules/typescript/patterns.md +0 -62
  118. package/.claude/rules/typescript/security.md +0 -28
  119. package/.claude/settings.local.json +0 -38
  120. package/.claude/skills/ado-integration/SKILL.md +0 -75
  121. package/.claude/skills/ai-regression-testing/SKILL.md +0 -364
  122. package/.claude/skills/architecture-decision-records/SKILL.md +0 -184
  123. package/.claude/skills/benchmark/SKILL.md +0 -98
  124. package/.claude/skills/browser-qa/SKILL.md +0 -92
  125. package/.claude/skills/canary-watch/SKILL.md +0 -104
  126. package/.claude/skills/js-backend-patterns/SKILL.md +0 -603
  127. package/.claude/skills/tas-conventions/SKILL.md +0 -65
  128. package/.claude/skills/tas-implementation-complete/SKILL.md +0 -99
  129. package/.claude/skills/tas-tdd/SKILL.md +0 -123
  130. package/.claude/skills/token-logger/SKILL.md +0 -19
  131. package/.tas/checklists/code-review.md +0 -29
  132. package/.tas/checklists/security.md +0 -21
  133. package/.tas/checklists/story-done.md +0 -23
  134. package/CLAUDE-Example.md +0 -61
  135. /package/{.claude → .tas}/agents/architect.md +0 -0
  136. /package/{.claude → .tas}/agents/aws-reviewer.md +0 -0
  137. /package/{.claude → .tas}/agents/build-resolver.md +0 -0
  138. /package/{.claude → .tas}/agents/code-explorer.md +0 -0
  139. /package/{.claude → .tas}/agents/csharp-reviewer.md +0 -0
  140. /package/{.claude → .tas}/agents/database-reviewer.md +0 -0
  141. /package/{.claude → .tas}/agents/doc-updater.md +0 -0
  142. /package/{.claude → .tas}/agents/python-reviewer.md +0 -0
  143. /package/{.claude → .tas}/agents/security-reviewer.md +0 -0
  144. /package/{.claude → .tas}/agents/typescript-reviewer.md +0 -0
  145. /package/{.claude → .tas}/rules/.gitkeep +0 -0
  146. /package/{.claude → .tas}/rules/common/hooks.md +0 -0
  147. /package/{.claude → .tas}/rules/common/patterns.md +0 -0
  148. /package/{.claude → .tas}/rules/common/security.md +0 -0
  149. /package/{.claude → .tas}/rules/csharp/hooks.md +0 -0
  150. /package/{.claude → .tas}/rules/csharp/patterns.md +0 -0
  151. /package/{.claude → .tas}/rules/csharp/testing.md +0 -0
  152. /package/{.claude → .tas}/rules/python/hooks.md +0 -0
  153. /package/{.claude → .tas}/rules/python/patterns.md +0 -0
  154. /package/{.claude → .tas}/rules/python/security.md +0 -0
  155. /package/{.claude → .tas}/rules/python/testing.md +0 -0
  156. /package/{.claude → .tas}/rules/typescript/hooks.md +0 -0
  157. /package/{.claude → .tas}/rules/web/design-quality.md +0 -0
  158. /package/{.claude → .tas}/rules/web/hooks.md +0 -0
  159. /package/{.claude → .tas}/rules/web/patterns.md +0 -0
  160. /package/{.claude → .tas}/rules/web/performance.md +0 -0
  161. /package/{.claude → .tas}/rules/web/security.md +0 -0
  162. /package/{.claude → .tas}/rules/web/testing.md +0 -0
@@ -1,46 +1,46 @@
1
- ---
2
- ado_id:
3
- ado_type: Epic
4
- ado_title: "{Title}"
5
- ado_state: New
6
- ado_assigned_to:
7
- ado_created:
8
- last_ado_sync:
9
- ---
10
- # Epic-{NNN}: {Title}
11
-
12
- > **Status:** New | Pending | In Design | In Progress | In Monitoring | In Closing | Done | Removed
13
- > **Owner:** {PE name}
14
- > **Created:** {Date}
15
- > **PRD Reference:** {link to PRD section}
16
-
17
- ## Business Value
18
- { tả giá trị kinh doanh}
19
-
20
- ## Scope
21
- ### In Scope
22
- - Item 1
23
- - Item 2
24
-
25
- ### Out of Scope
26
- - Item 1
27
-
28
- ## Acceptance Criteria (High-level)
29
- - [ ] Criteria 1
30
- - [ ] Criteria 2
31
-
32
- ## Features
33
- | ID | Feature | Priority | Estimate |
34
- |----|---------|----------|----------|
35
- | Feature-001 | {name} | Must | M |
36
- | Feature-002 | {name} | Should | L |
37
-
38
- ## Dependencies
39
- - {dependency 1}
40
-
41
- ## Risks
42
- - {risk 1}
43
-
44
- ## Changelog
45
- | Date | Changes | Author |
46
- |------|---------|--------|
1
+ ---
2
+ ado_id:
3
+ ado_type: Epic
4
+ ado_title: "{Title}"
5
+ ado_state: New
6
+ ado_assigned_to:
7
+ ado_created:
8
+ last_ado_sync:
9
+ ---
10
+ # Epic-{NNN}: {Title}
11
+
12
+ > **Status:** New | Pending | In Design | In Progress | In Monitoring | In Closing | Done | Removed
13
+ > **Owner:** {PE name}
14
+ > **Created:** {Date}
15
+ > **PRD Reference:** {link to PRD section}
16
+
17
+ ## Business Value
18
+ {Business value description}
19
+
20
+ ## Scope
21
+ ### In Scope
22
+ - Item 1
23
+ - Item 2
24
+
25
+ ### Out of Scope
26
+ - Item 1
27
+
28
+ ## Acceptance Criteria (High-level)
29
+ - [ ] Criteria 1
30
+ - [ ] Criteria 2
31
+
32
+ ## Features
33
+ | ID | Feature | Priority | Estimate |
34
+ |----|---------|----------|----------|
35
+ | Feature-001 | {name} | Must | M |
36
+ | Feature-002 | {name} | Should | L |
37
+
38
+ ## Dependencies
39
+ - {dependency 1}
40
+
41
+ ## Risks
42
+ - {risk 1}
43
+
44
+ ## Changelog
45
+ | Date | Changes | Author |
46
+ |------|---------|--------|
@@ -14,10 +14,10 @@ parent_ado_id:
14
14
  > **Epic:** Epic-{NNN}
15
15
  > **Owner:** {PE name}
16
16
  > **Created:** {Date}
17
- > **Verified Date:** {Date khi status = Verified}
17
+ > **Verified Date:** {Date when status = Verified}
18
18
 
19
19
  ## Description
20
- { tả chức năng}
20
+ {Feature description}
21
21
 
22
22
  ## User Stories
23
23
  | ID | Story | Priority | Estimate | Status |
@@ -29,26 +29,26 @@ parent_ado_id:
29
29
  - [ ] AC-2: {criteria}
30
30
 
31
31
  ## UI/UX Notes
32
- {Nếu có, reference đến design-spec.md}
32
+ {If any, reference to design-spec.md}
33
33
 
34
34
  ## Technical Notes
35
- {Nếu có, reference đến SAD/ADR}
35
+ {If any, reference to SAD/ADR}
36
36
 
37
37
  ## Integration Test Cases
38
- PE thiết kế khi tạo Feature. SE implement trong code.
38
+ PE designs when creating Feature. SE implements in code.
39
39
 
40
40
  | ID | AC Ref | Scenario | Expected Result | Status |
41
41
  |----|--------|----------|-----------------|--------|
42
- | IT-1 | AC-1 | { tả flow liên kết} | {Kết quả mong đợi} | - |
43
- | IT-2 | AC-2 | { tả flow liên kết} | {Kết quả mong đợi} | - |
42
+ | IT-1 | AC-1 | {Integration flow description} | {Expected result} | - |
43
+ | IT-2 | AC-2 | {Integration flow description} | {Expected result} | - |
44
44
 
45
45
  ## E2E / Acceptance Test Cases
46
- PE thiết kế khi tạo Feature. PE verify trên Staging Phase 2 bằng /tas-verify.
46
+ PE designs when creating Feature. PE verifies on Staging in Phase 2 using /tas-functest + /tas-e2e.
47
47
 
48
48
  | ID | AC Ref | User Scenario | Steps | Expected Result | Status | Verified Date |
49
49
  |----|--------|---------------|-------|-----------------|--------|---------------|
50
- | E2E-1 | AC-1 | {Scenario} | {Bước thực hiện} | {Kết quả mong đợi} | - | - |
51
- | E2E-2 | AC-2 | {Scenario} | {Bước thực hiện} | {Kết quả mong đợi} | - | - |
50
+ | E2E-1 | AC-1 | {Scenario} | {Execution steps} | {Expected result} | - | - |
51
+ | E2E-2 | AC-2 | {Scenario} | {Execution steps} | {Expected result} | - | - |
52
52
 
53
53
  ## Changelog
54
54
  | Date | Changes | Author |
@@ -23,7 +23,7 @@ platform: # mobile | web | backend
23
23
 
24
24
  ## Test Case Naming Convention
25
25
 
26
- > Functional Tests dung type code **FT** theo format chuẩn TAS
26
+ > Functional Tests use type code **FT** following TAS standard format
27
27
 
28
28
  ### Format
29
29
  ```
@@ -60,8 +60,8 @@ AL_E002_F002_S001_FT_003_E - Functional Test Edge case
60
60
 
61
61
  ## AC to Functional Test Mapping
62
62
 
63
- > QUAN TRONG: Moi FT case PHAI reference AC-ID de dam bao traceability.
64
- > Khi AC thay doi, grep theo AC-ID de biet FT nao can update.
63
+ > IMPORTANT: Every FT case MUST reference AC-ID to ensure traceability.
64
+ > When AC changes, grep by AC-ID to know which FTs need update.
65
65
 
66
66
  | AC ID | AC Description (Given/When/Then) | FT Test ID | Test Scenario | Modifier | Priority | Status |
67
67
  |-------|----------------------------------|------------|---------------|----------|----------|--------|
@@ -8,12 +8,12 @@
8
8
 
9
9
  ## 1. Executive Summary
10
10
 
11
- <!-- MANDATORY. Viết cho người đọc không có technical background.
12
- Bắt buộc:
13
- - 1.1 Purpose: Tại sao SAD này tồn tại, vấn đề cần giải quyết
14
- - 1.2 Scope: Hệ thống nào, ranh giới nào được/không được cover
15
- - 1.3 Key Objectives: 3-5 mục tiêu kiến trúc cụ thể, đo lường được
16
- Format: Prose ngắn, tối đa 1 trang tổng cộng -->
11
+ <!-- MANDATORY. Written for readers without technical background.
12
+ Required:
13
+ - 1.1 Purpose: Why this SAD exists, what problem it solves
14
+ - 1.2 Scope: Which systems, boundaries are/aren't covered
15
+ - 1.3 Key Objectives: 3-5 specific, measurable architecture objectives
16
+ Format: Short prose, max 1 page total -->
17
17
 
18
18
  ### 1.1 Purpose
19
19
  ### 1.2 Scope
@@ -24,12 +24,12 @@
24
24
  ## 2. Architecture Vision
25
25
 
26
26
  <!-- MANDATORY.
27
- Bắt buộc:
28
- - 2.1 Vision Statement: 1-2 câu tả "kiến trúc này hướng tới điều gì"
29
- - 2.2 Architecture Principles: 4-8 nguyên tắc dẫn dắt quyết định thiết kế
30
- (vd: Stateless services, API-first, Defense in depth, Fail fast)
31
- - 2.3 Constraints & Assumptions: Ràng buộc kỹ thuật/tổ chức, giả định đang được chấp nhận
32
- Format: Bullet list cho principles constraints -->
27
+ Required:
28
+ - 2.1 Vision Statement: 1-2 sentences describing "what this architecture aims for"
29
+ - 2.2 Architecture Principles: 4-8 principles guiding design decisions
30
+ (e.g.: Stateless services, API-first, Defense in depth, Fail fast)
31
+ - 2.3 Constraints & Assumptions: Technical/organizational constraints, accepted assumptions
32
+ Format: Bullet list for principles and constraints -->
33
33
 
34
34
  ### 2.1 Vision Statement
35
35
  ### 2.2 Architecture Principles
@@ -40,14 +40,14 @@
40
40
  ## 3. Business Requirements
41
41
 
42
42
  <!-- MANDATORY.
43
- Bắt buộc:
44
- - 3.1 Business Problem: tả bài toán kinh doanh cần giải quyết
45
- - 3.2 Stakeholders: Bảng stakeholder (role, concerns, influence)
46
- - 3.3 Functional Requirements: Danh sách FR-xxx, mỗi item ID để trace
47
- - 3.4 Non-Functional Requirements: Danh sách NFR với metric cụ thể
48
- (vd: Latency P99 < 300ms, Availability 99.9%, RPS 5000)
49
- Nên có: Priority (Must/Should/Could) cho mỗi requirement
50
- Format: Table hoặc numbered list với ID (FR-001, NFR-001) -->
43
+ Required:
44
+ - 3.1 Business Problem: Describe the business problem to solve
45
+ - 3.2 Stakeholders: Stakeholder table (role, concerns, influence)
46
+ - 3.3 Functional Requirements: List FR-xxx, each item has ID for traceability
47
+ - 3.4 Non-Functional Requirements: List NFR with specific metrics
48
+ (e.g.: Latency P99 < 300ms, Availability 99.9%, RPS 5000)
49
+ Should have: Priority (Must/Should/Could) for each requirement
50
+ Format: Table or numbered list with ID (FR-001, NFR-001) -->
51
51
 
52
52
  ### 3.1 Business Problem
53
53
  ### 3.2 Stakeholders
@@ -59,13 +59,13 @@
59
59
  ## 4. Technology Baseline
60
60
 
61
61
  <!-- MANDATORY.
62
- Bắt buộc:
63
- - 4.1 Current State: Hệ thống hiện tại (nếu greenfield thì ghi rõ)
64
- - 4.2 Technology Stack: Bảng layer → technology → version → rationale
62
+ Required:
63
+ - 4.1 Current State: Current system (specify if greenfield)
64
+ - 4.2 Technology Stack: Table layer → technology → version → rationale
65
65
  (Frontend / Backend / Database / Infrastructure / Messaging / Monitoring)
66
66
  - 4.3 Dependencies: External services, third-party APIs, shared platforms
67
- Nên có: Diagram current-state nếu migration/modernization
68
- Format: Table cho Technology Stack -->
67
+ Should have: Current-state diagram if migration/modernization
68
+ Format: Table for Technology Stack -->
69
69
 
70
70
  ### 4.1 Current State
71
71
  ### 4.2 Technology Stack
@@ -75,14 +75,14 @@
75
75
 
76
76
  ## 5. System Context (C4 Level 1)
77
77
 
78
- <!-- MANDATORY. Trả lời: "Hệ thống này nằm đâu trong hệ sinh thái?"
79
- Bắt buộc:
80
- - Mermaid flowchart: hệ thống ở giữa, xung quanh là users external systems
81
- - Chú thích mỗi external system: tên, vai trò, protocol giao tiếp
82
- Không cần: chi tiết nội bộ của hệ thống (để C4 Level 2)
83
- Format: Mermaid flowchart (dùng :::mermaid wrapper, không dùng () trong node label)
78
+ <!-- MANDATORY. Answers: "Where does this system sit in the ecosystem?"
79
+ Required:
80
+ - Mermaid flowchart: system in center, users and external systems around it
81
+ - Annotate each external system: name, role, communication protocol
82
+ Not needed: internal system details (leave for C4 Level 2)
83
+ Format: Mermaid flowchart (use :::mermaid wrapper, no () in node labels)
84
84
 
85
- Ví dụ:
85
+ Example:
86
86
  :::mermaid
87
87
  flowchart TD
88
88
  U[fa:fa-user End User] -- |HTTPS| SYS[Your System]
@@ -95,33 +95,33 @@
95
95
 
96
96
  ## 6. Logical View (C4 Level 2 — Container)
97
97
 
98
- <!-- MANDATORY. Trả lời: "Hệ thống gồm những container nào?"
99
- Bắt buộc:
100
- - Mermaid flowchart: tất cả containers (web app, API, DB, cache, queue, ...)
101
- - Mỗi container: tên, technology, vai trò chính
102
- - Luồng tương tác giữa containers với protocol/label
103
- Nên có: Phân nhóm theo bounded context nếu hệ thống lớn
104
- Format: Mermaid flowchart với subgraph để nhóm theo domain
98
+ <!-- MANDATORY. Answers: "What containers does this system consist of?"
99
+ Required:
100
+ - Mermaid flowchart: all containers (web app, API, DB, cache, queue, ...)
101
+ - Each container: name, technology, main role
102
+ - Interaction flows between containers with protocol/label
103
+ Should have: Group by bounded context if large system
104
+ Format: Mermaid flowchart with subgraph to group by domain
105
105
 
106
- dụ node: WebApp["Web App\n(Next.js / Vercel)"] -->
106
+ Example node: WebApp["Web App\n(Next.js / Vercel)"] -->
107
107
 
108
108
  ---
109
109
 
110
110
  ## 7. Component View (C4 Level 3)
111
111
 
112
- <!-- CONDITIONAL — Bắt buộc nếu hệ thống độ phức tạp cao hoặc team mới.
113
- Trả lời: "Bên trong mỗi container components nào?"
114
- Hướng dẫn:
115
- - Mỗi container phức tạp một subsection riêng (7.1, 7.2, ...)
116
- - Container đơn giản (chỉ proxy, static file, thin wrapper) → bỏ qua
117
- - Không cần drill vào mọi container — chỉ những container internal logic đáng kể
118
- Mỗi subsection bắt buộc:
119
- - Mermaid flowchart liệt components bên trong container đó
120
- - Mỗi component: tên, trách nhiệm chính, interface exposed
121
- - Dependency direction giữa components (tránh circular)
122
- Format: Mermaid flowchart với subgraph bao ngoài (tên container), nodes components
123
-
124
- Ví dụ:
112
+ <!-- CONDITIONAL — Required if system has high complexity or new team.
113
+ Answers: "What components are inside each container?"
114
+ Guidelines:
115
+ - Each complex container → separate subsection (7.1, 7.2, ...)
116
+ - Simple containers (proxy only, static files, thin wrapper) → skip
117
+ - Don't drill into every container — only those with significant internal logic
118
+ Each subsection requires:
119
+ - Mermaid flowchart listing components inside that container
120
+ - Each component: name, main responsibility, exposed interface
121
+ - Dependency direction between components (avoid circular)
122
+ Format: Mermaid flowchart with subgraph wrapper (container name), nodes are components
123
+
124
+ Example:
125
125
  :::mermaid
126
126
  flowchart TD
127
127
  subgraph API["API Service (NestJS)"]
@@ -135,89 +135,89 @@
135
135
 
136
136
  ### 7.1 [Container Name]
137
137
 
138
- <!-- Bắt buộc: Mermaid component diagram như hướng dẫn trên.
139
- Nên có: tả ngắn vai trò của container này trước diagram. -->
138
+ <!-- Required: Mermaid component diagram as per above guidelines.
139
+ Should have: Brief description of this container's role before diagram. -->
140
140
 
141
141
  ### 7.2 [Container Name]
142
142
 
143
- <!-- Thêm subsection cho mỗi container phức tạp. Xóa subsection này nếu không cần. -->
143
+ <!-- Add subsection for each complex container. Delete this subsection if not needed. -->
144
144
 
145
145
  ---
146
146
 
147
147
  ## 8. Data Architecture & ERD
148
148
 
149
- <!-- MANDATORY nếu hệ thống persistence layer.
150
- Bắt buộc:
151
- - ERD: entities, attributes (chỉ key fields), relationships với cardinality
152
- - Data flow overview: data đi từ đâu đến đâu, transform ở đâu
153
- Nên có:
154
- - Data classification: PII / Sensitive / Internal / Public cho mỗi entity
155
- - Retention policy nếu compliance requirement
156
- - Sharding/partitioning strategy nếu data scale lớn
157
- Format: Mermaid erDiagram cho ERD -->
149
+ <!-- MANDATORY if system has persistence layer.
150
+ Required:
151
+ - ERD: entities, attributes (key fields only), relationships with cardinality
152
+ - Data flow overview: where data comes from/goes to, transforms where
153
+ Should have:
154
+ - Data classification: PII / Sensitive / Internal / Public for each entity
155
+ - Retention policy if compliance requirement exists
156
+ - Sharding/partitioning strategy if large data scale
157
+ Format: Mermaid erDiagram for ERD -->
158
158
 
159
159
  ---
160
160
 
161
161
  ## 9. Integration & Data Flow
162
162
 
163
- <!-- MANDATORY nếu hệ thống tích hợp với external services hoặc async flows.
164
- Bắt buộc:
165
- - Sequence diagram cho mỗi critical flow (auth, payment, order, ...)
166
- - Async flows: queue/event-driven patterns phải được diagram
167
- Nên có: Error/retry flows cho critical paths
168
- Format: Mermaid sequenceDiagram, một diagram per flow -->
163
+ <!-- MANDATORY if system integrates with external services or has async flows.
164
+ Required:
165
+ - Sequence diagram for each critical flow (auth, payment, order, ...)
166
+ - Async flows: queue/event-driven patterns must be clearly diagrammed
167
+ Should have: Error/retry flows for critical paths
168
+ Format: Mermaid sequenceDiagram, one diagram per flow -->
169
169
 
170
170
  ### 9.1 API Design Principles
171
171
 
172
- <!-- MANDATORY nếu hệ thống expose API (internal hoặc external).
173
- Bắt buộc:
174
- - API Style: REST / GraphQL / gRPC / Event-driven — lý do chọn
172
+ <!-- MANDATORY if system exposes API (internal or external).
173
+ Required:
174
+ - API Style: REST / GraphQL / gRPC / Event-driven — and rationale
175
175
  - Versioning strategy: URL path (/v1/) vs header vs query param
176
176
  - Authentication scheme: Bearer JWT / API Key / OAuth2 / mTLS
177
177
  - Standard error format: HTTP status codes, error body structure
178
- Nên có:
178
+ Should have:
179
179
  - Rate limiting approach (per-user, per-IP, tiered)
180
180
  - Pagination convention (cursor vs offset)
181
- - Idempotency handling cho mutating operations
182
- Không đưa vào đây: endpoint list, request/response schema chi tiết
183
- Những thứ đó thuộc API Contract document riêng (viết khi implement)
184
- Format: Bullet list hoặc table ngắn gọn -->
181
+ - Idempotency handling for mutating operations
182
+ Don't include here: endpoint list, detailed request/response schemas
183
+ Those belong to separate API Contract document (written when implementing)
184
+ Format: Bullet list or short table -->
185
185
 
186
186
  ---
187
187
 
188
188
  ## 10. Security Architecture
189
189
 
190
- <!-- MANDATORY. Đây architectural concern, không phải implementation detail.
191
- Bắt buộc:
192
- - Threat Model: attack surfaces, trust boundaries, top threats (dùng STRIDE nếu cần)
190
+ <!-- MANDATORY. This is an architectural concern, not implementation detail.
191
+ Required:
192
+ - Threat Model: attack surfaces, trust boundaries, top threats (use STRIDE if needed)
193
193
  - Identity & Auth Flow: AuthN/AuthZ mechanism, token lifecycle, privilege escalation path
194
194
  - Data Classification: PII / Sensitive / Internal / Public — handling rules per class
195
- - Network Security Zones: public / DMZ / private / data tier rules giữa các zones
196
- - Encryption: at-rest (algorithm, key management) in-transit (TLS version, cert strategy)
197
- Nên có:
195
+ - Network Security Zones: public / DMZ / private / data tier and rules between zones
196
+ - Encryption: at-rest (algorithm, key management) and in-transit (TLS version, cert strategy)
197
+ Should have:
198
198
  - Secrets management approach (Vault, AWS SSM, env vars strategy)
199
199
  - Audit logging scope: what events must be logged, retention
200
- - Compliance requirements: GDPR, PCI-DSS, SOC2, ... nếu applicable
200
+ - Compliance requirements: GDPR, PCI-DSS, SOC2, ... if applicable
201
201
  Format:
202
202
  - Threat model: table (Threat | Vector | Mitigation)
203
203
  - Auth flow: Mermaid sequenceDiagram
204
- - Network zones: Mermaid flowchart với subgraph per zone -->
204
+ - Network zones: Mermaid flowchart with subgraph per zone -->
205
205
 
206
206
  ---
207
207
 
208
208
  ## 11. NFR Strategies
209
209
 
210
- <!-- MANDATORY. Mỗi NFR-xxx trong Section 3.4 phải strategy tương ứng ở đây (reference bằng ID).
211
- Bắt buộc — cover các categories sau nếu NFR liên quan:
210
+ <!-- MANDATORY. Each NFR-xxx in Section 3.4 must have corresponding strategy here (reference by ID).
211
+ Required — cover following categories if related NFR exists:
212
212
  - Performance: caching strategy (L1/L2/CDN), DB indexing, query optimization approach
213
213
  - Scalability: horizontal vs vertical, stateless design, queue-based decoupling
214
214
  - Availability: redundancy model (Active-Active/Active-Passive), failover mechanism, SLA target
215
215
  - Resilience: circuit breaker, retry with backoff, bulkhead, timeout policy
216
216
  - Observability: structured logging, distributed tracing, metrics & alerting thresholds
217
- Nên có:
217
+ Should have:
218
218
  - Capacity planning baseline: expected load, growth projection, scale trigger points
219
219
  - DR strategy: RPO/RTO targets, backup frequency, restore procedure overview
220
- Format: Table với cột NFR ID để trace ngược về Section 3.4
220
+ Format: Table with NFR ID column to trace back to Section 3.4
221
221
  | NFR ID | Category | Target | Strategy | Notes |
222
222
  |--------|----------|--------|----------|-------|
223
223
  | NFR-001 | Latency | P99 < 300ms | Redis cache L2, read replicas | Cache TTL 5m |
@@ -227,28 +227,28 @@
227
227
 
228
228
  ## 12. Deployment Topology
229
229
 
230
- <!-- MANDATORY. Trả lời: "Các components chạy đâu trong infrastructure?"
231
- Bắt buộc:
230
+ <!-- MANDATORY. Answers: "Where do components run in the infrastructure?"
231
+ Required:
232
232
  - Infrastructure diagram: regions, AZs, VPC/subnets, load balancers, entry points
233
233
  - Component-to-infrastructure mapping: service X → ECS Fargate, DB → RDS Multi-AZ, ...
234
234
  - Traffic entry points: CDN → ALB → API Gateway → Service flow
235
- - Environment matrix: dev / staging / prod — sự khác nhau về scale, config, isolation
236
- Nên có:
237
- - Network topology: public subnet / private subnet / data subnet routing rules
238
- - CI/CD pipeline overview: build → test → deploy flow approval gates
239
- - Container orchestration config nếu dùng K8s/ECS (namespace, resource limits)
235
+ - Environment matrix: dev / staging / prod — differences in scale, config, isolation
236
+ Should have:
237
+ - Network topology: public subnet / private subnet / data subnet and routing rules
238
+ - CI/CD pipeline overview: build → test → deploy flow and approval gates
239
+ - Container orchestration config if using K8s/ECS (namespace, resource limits)
240
240
  Format:
241
- - Mermaid flowchart với subgraph per environment tier hoặc per network zone
241
+ - Mermaid flowchart with subgraph per environment tier or per network zone
242
242
  - Environment matrix: table (Component | Dev | Staging | Prod) -->
243
243
 
244
244
  ---
245
245
 
246
246
  ## 13. Architectural Decisions
247
247
 
248
- <!-- MANDATORY. Ghi lại mọi quyết định kiến trúc quan trọng và lý do.
249
- Bắt buộc: Mỗi ADR entry gồm Decision, Status, Date, Rationale
250
- Nên có: Alternatives considered tại sao không chọn
251
- Format: Table — thêm row mỗi khi quyết định mới
248
+ <!-- MANDATORY. Record all important architectural decisions and rationale.
249
+ Required: Each ADR entry includes Decision, Status, Date, Rationale
250
+ Should have: Alternatives considered and why not chosen
251
+ Format: Table — add row when new decision is made
252
252
  Status values: Proposed | Accepted | Deprecated | Superseded -->
253
253
 
254
254
  | ID | Decision | Status | Date | Rationale |
@@ -259,9 +259,9 @@
259
259
  ## 14. Risks & Mitigation
260
260
 
261
261
  <!-- MANDATORY.
262
- Bắt buộc: Risk, Impact (H/M/L), Probability (H/M/L), Mitigation action
263
- Nên có: Owner review date cho mỗi risk
264
- Format: Table, sắp xếp theo Impact × Probability giảm dần -->
262
+ Required: Risk, Impact (H/M/L), Probability (H/M/L), Mitigation action
263
+ Should have: Owner and review date for each risk
264
+ Format: Table, sorted by Impact × Probability descending -->
265
265
 
266
266
  | Risk | Impact | Probability | Mitigation | Owner |
267
267
  |------|--------|-------------|------------|-------|
@@ -1,27 +1,27 @@
1
- # Security Report
2
-
3
- > **Last Scan:** {Date}
4
- > **Scope:** {Full scan | File/Module specific}
5
- > **Scanned by:** {DSE name}
6
-
7
- ## Summary
8
- | Severity | Open | Fixed | Accepted Risk | Total |
9
- |----------|------|-------|---------------|-------|
10
- | Critical | 0 | 0 | 0 | 0 |
11
- | High | 0 | 0 | 0 | 0 |
12
- | Medium | 0 | 0 | 0 | 0 |
13
- | Low | 0 | 0 | 0 | 0 |
14
-
15
- ## Findings
16
-
17
- ### SEC-001: {Title}
18
- - **Severity:** Critical | High | Medium | Low
19
- - **Status:** Open | In Progress | Fixed | Accepted Risk
20
- - **Location:** {file:line}
21
- - **Description:** { tả vấn đề}
22
- - **Recommended Fix:** {Cách fix cụ thể}
23
- - **Fixed Date:** {Date, nếu đã fix}
24
-
25
- ## Scan History
26
- | Date | Scope | New Findings | Fixed | Remaining |
27
- |------|-------|-------------|-------|-----------|
1
+ # Security Report
2
+
3
+ > **Last Scan:** {Date}
4
+ > **Scope:** {Full scan | File/Module specific}
5
+ > **Scanned by:** {DSE name}
6
+
7
+ ## Summary
8
+ | Severity | Open | Fixed | Accepted Risk | Total |
9
+ |----------|------|-------|---------------|-------|
10
+ | Critical | 0 | 0 | 0 | 0 |
11
+ | High | 0 | 0 | 0 | 0 |
12
+ | Medium | 0 | 0 | 0 | 0 |
13
+ | Low | 0 | 0 | 0 | 0 |
14
+
15
+ ## Findings
16
+
17
+ ### SEC-001: {Title}
18
+ - **Severity:** Critical | High | Medium | Low
19
+ - **Status:** Open | In Progress | Fixed | Accepted Risk
20
+ - **Location:** {file:line}
21
+ - **Description:** {Issue description}
22
+ - **Recommended Fix:** {Specific fix approach}
23
+ - **Fixed Date:** {Date, if fixed}
24
+
25
+ ## Scan History
26
+ | Date | Scope | New Findings | Fixed | Remaining |
27
+ |------|-------|-------------|-------|-----------|
@@ -22,16 +22,16 @@ plan_date:
22
22
  As a {role}, I want {goal}, so that {benefit}.
23
23
 
24
24
  ---
25
- ## Business Requirements (nếu )
26
- *(Yêu cầu nghiệp vụ đặc biệt, business rules, constraints từ stakeholders — chỉ thêm khi cần)*
25
+ ## Business Requirements (if any)
26
+ *(Special business requirements, business rules, constraints from stakeholders — add only when needed)*
27
27
 
28
28
  ---
29
- ## Design Notes (nếu )
30
- *(UI/UX specs, mockup links, design decisions, flow diagrams — chỉ thêm khi cần)*
29
+ ## Design Notes (if any)
30
+ *(UI/UX specs, mockup links, design decisions, flow diagrams — add only when needed)*
31
31
 
32
32
  ---
33
- ## Prerequisites (nếu )
34
- *(Dependencies từ Stories khác hoặc điều kiện phải có trước chỉ thêm khi cần)*
33
+ ## Prerequisites (if any)
34
+ *(Dependencies from other Stories or required conditionsadd only when needed)*
35
35
 
36
36
  ---
37
37
  ## Acceptance Criteria
@@ -40,17 +40,17 @@ As a {role}, I want {goal}, so that {benefit}.
40
40
  - **Given** {precondition}
41
41
  - **When** {action}
42
42
  - **Then** {expected result}
43
- - **Functional Tests**: *(điền FT IDs sau khi chạy `/tas-functest` — vd: `{PROJECT}_E{EPIC}_F{FEATURE}_S{STORY}_FT_001_H`, `FT_002_N`)*
43
+ - **Functional Tests**: *(fill FT IDs after running `/tas-functest` — e.g.: `{PROJECT}_E{EPIC}_F{FEATURE}_S{STORY}_FT_001_H`, `FT_002_N`)*
44
44
 
45
45
  ### AC-2: {title}
46
46
  - **Given** {precondition}
47
47
  - **When** {action}
48
48
  - **Then** {expected result}
49
- - **Functional Tests**: *(điền FT IDs sau khi chạy `/tas-functest`)*
49
+ - **Functional Tests**: *(fill FT IDs after running `/tas-functest`)*
50
50
 
51
51
  ---
52
52
  ## Unit Test Cases
53
- *(PE thiết kế happy path + edge cases + negative cases. SE implement trong code.)*
53
+ *(PE designs happy path + edge cases + negative cases. SE implements in code.)*
54
54
 
55
55
  ### Happy Path
56
56
  | ID | AC Ref | Description | Input | Expected Output |