@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
package/README.md CHANGED
@@ -1,45 +1,45 @@
1
1
  # TAS Kit
2
2
 
3
- **Torus Agentic SDLC Kit** — Bộ công cụ AI-assisted SDLC cho Claude Code, được thiết kế theo triết lý Spec-Driven Development Context-Aware Architecture.
3
+ **Torus Agentic SDLC Kit** — AI-assisted SDLC toolkit, designed following Spec-Driven Development philosophy and Context-Aware Architecture.
4
4
 
5
5
  ---
6
6
 
7
- ## Mục đích
7
+ ## Purpose
8
8
 
9
- TAS Kit giúp các team phát triển phần mềm:
10
- - **Chuẩn hóa quy trình SDLC** với các artifacts rõ ràng (PRD, SAD, ADR, Epic, Feature, Story)
11
- - **Tối ưu hóa token usage** thông qua Context Layer — đầu phase thiết kế, tiết kiệm ở phase code
12
- - **Hỗ trợ nhiều mô hình làm việc**: từ solo developer đến full team với các role PE/SE/DSE
13
- - **Tự động hóa** với Hybrid Autonomous agents hoạt động 24/7
9
+ TAS Kit helps software development teams:
10
+ - **Standardize SDLC process** with clear artifacts (PRD, SAD, ADR, Epic, Feature, Story)
11
+ - **Optimize token usage** through Context Layer — invest in design phase, save in code phase
12
+ - **Support multiple workflows**: from solo developer to full team with PE/SE/DSE roles
13
+ - **Automate** with Hybrid and Autonomous agents operating 24/7
14
14
 
15
15
  ---
16
16
 
17
- ## Triết lý thiết kế
17
+ ## Design Philosophy
18
18
 
19
19
  ### Spec-Driven Development
20
- Tất cả code bắt đầu từ spec. Story.md "context digest" đã hấp thụ toàn bộ thông tin từ PRD, SAD, ADR, Feature. Mỗi session implement chỉ cần đọc CLAUDE.md + Story.md — không cần load lại toàn bộ artifacts.
20
+ All code starts from spec. Story.md is "context digest" that has absorbed all information from PRD, SAD, ADR, Feature. Each implementation session only needs to read CLAUDE.md + Story.md — no need to reload all artifacts.
21
21
 
22
22
  ### Human-Led, AI-Powered
23
- - **Con người chủ đạo**: Quyết định architecture, approve design, review code
24
- - **AI hỗ trợ**: Tạo draft, implement theo spec, chạy tests, phát hiện bugs
23
+ - **Human-led**: Architecture decisions, design approval, code review
24
+ - **AI-assisted**: Draft creation, implementation per spec, test execution, bug detection
25
25
 
26
26
  ### Dual Mode Operation
27
- - **Hybrid Mode**: Developer AI làm việc cùng nhau trong session
28
- - **Autonomous Mode**: AI tự động develop 24/7, report kết quả khi xong
27
+ - **Hybrid Mode**: Developer and AI work together in session
28
+ - **Autonomous Mode**: AI automatically develops 24/7, reports results when done
29
29
 
30
30
  ### Lightweight & Context-Aware
31
- - Mỗi skill < 3KB, tổng kit < 50KB
32
- - Context Layer: đầu token phase thiết kế để tiết kiệm gấp nhiều lần ở phase code
33
- - Khi code: PHẢI bắt đầu session mới (không tận dụng session đã load PRD/SAD sẽ phình Window Context)
31
+ - Each skill < 3KB, total kit < 50KB
32
+ - Context Layer: invest tokens in design phase to save many times in code phase
33
+ - When coding: MUST start new session (don't reuse old session that loaded PRD/SAD to avoid Window Context bloat)
34
34
 
35
35
  ### Role-Based & Template-Driven
36
- - 3 role thực tế của Torus: PE (Product Engineer), SE (Software Engineer), DSE (DevOps Engineer)
37
- - Templates riêng cho PRD, SAD, ADR, Epic, Feature, Story theo chuẩn Torus
38
- - Flow configurable qua file `tas.yaml`
36
+ - 3 actual roles at Torus: PE (Product Engineer), SE (Software Engineer), DSE (DevOps Engineer)
37
+ - Separate templates for PRD, SAD, ADR, Epic, Feature, Story per Torus standards
38
+ - Flow configurable via `tas.yaml` file
39
39
 
40
40
  ### Azure DevOps Compatible
41
- - Output Markdown tương thích Azure DevOps Wiki
42
- - Mermaid diagrams không dùng ký tự `()` (tránh conflict với ADO syntax)
41
+ - Markdown output compatible with Azure DevOps Wiki
42
+ - Mermaid diagrams don't use `()` characters (avoid conflict with ADO syntax)
43
43
 
44
44
  ---
45
45
 
@@ -57,7 +57,7 @@ graph TD
57
57
  PRD_ARTIFACT -->|Software Engineer| ADR
58
58
  SAD --> SAD_ARTIFACT["SAD.md"]
59
59
  ADR --> ADR_ARTIFACT["ADR-XXX.md"]
60
- PRD_ARTIFACT -->|Software Engineer| DESIGN
60
+ PRD_ARTIFACT -->|Product Engineer| DESIGN
61
61
  DESIGN --> DESIGN_ARTIFACT["design-spec.md"]
62
62
  end
63
63
 
@@ -65,17 +65,14 @@ graph TD
65
65
  EPIC["/tas-epic"]
66
66
  FEATURE["/tas-feature"]
67
67
  STORY["/tas-story"]
68
- FUNctest["/tas-functest"]
69
- PRD_ARTIFACT -->|Software Engineer| EPIC
68
+ PRD_ARTIFACT -->|Product Engineer| EPIC
70
69
  EPIC --> EPIC_ARTIFACT["Epic-XXX/"]
71
- EPIC_ARTIFACT -->|Software Engineer| FEATURE
70
+ EPIC_ARTIFACT -->|Product Engineer| FEATURE
72
71
  FEATURE --> FEATURE_ARTIFACT["Feature-XXX/"]
73
72
  SAD_ARTIFACT --> FEATURE
74
73
  DESIGN_ARTIFACT --> FEATURE
75
- FEATURE_ARTIFACT -->|Software Engineer| STORY
74
+ FEATURE_ARTIFACT -->|Product Engineer| STORY
76
75
  STORY --> STORY_ARTIFACT["Story-XXX.md"]
77
- FEATURE_ARTIFACT -->|Software Engineer| FUNctest
78
- FUNctest --> FUNCTEST_ARTIFACT["Functional-Testing-Spec-FeatureXXX.md"]
79
76
  end
80
77
 
81
78
  subgraph Phase3["Phase 3: Implementation"]
@@ -90,9 +87,10 @@ graph TD
90
87
  E2E_MOBILE["/tas-e2e-mobile"]
91
88
  BUG["/tas-bug"]
92
89
  REVIEW["/tas-review"]
90
+ FUNctest["/tas-functest"]
93
91
  STORY_ARTIFACT -->|Software Engineer| PLAN
94
- PLAN --> PLAN_ARTIFACT["Plan.md"]
95
- PLAN_ARTIFACT -->|AI Agent| DEV
92
+ PLAN --> STORY_ARTIFACT
93
+ STORY_ARTIFACT -->|AI Agent| DEV
96
94
  DEV --> CODE["Source Code"]
97
95
  CODE -->|Bug found| FIX
98
96
  FIX --> CODE
@@ -112,6 +110,8 @@ graph TD
112
110
  E2E_MOBILE --> E2E_MOBILE_ARTIFACT["E2E Mobile Test Script"]
113
111
  CODE -->|Bug found| BUG
114
112
  BUG --> BUG_ARTIFACT["Bug Report"]
113
+ FEATURE_ARTIFACT -->|Product Engineer| FUNctest
114
+ FUNctest --> FUNCTEST_ARTIFACT["Functional-Testing-Spec-FeatureXXX.md"]
115
115
  end
116
116
 
117
117
  subgraph Phase4["Phase 4: Quality & Deploy"]
@@ -152,29 +152,29 @@ graph TD
152
152
  | **Phase 3: Implementation** | PE, SE, AI | `/tas-plan`, `/tas-dev`, `/tas-fix`, `/tas-apitest`, `/tas-e2e`, `/tas-functest-web`, `/tas-functest-mobile`, `/tas-e2e-web`, `/tas-e2e-mobile`, `/tas-bug`, `/tas-review` | Plan.md, Source Code, API Testing Script, E2E Test Scenarios, Functional Test Scripts, Bug Report, Code Review Report |
153
153
  | **Phase 4: Quality & Deploy** | PE, DSE | `/tas-security`, Pipeline/CLI | Security Report, Test Report, Production |
154
154
 
155
- ### Chi tiết từng Phase
155
+ ### Phase Details
156
156
 
157
157
  #### Phase 1: Discovery
158
- - **PE**: Tạo PRD với `/tas-prd`
159
- - **SE**: Tạo SAD với `/tas-sad`, tạo ADR với `/tas-adr`, tạo design-spec với `/tas-design`
158
+ - **PE**: Create PRD with `/tas-prd`, create design-spec with `/tas-design`
159
+ - **SE**: Create SAD with `/tas-sad`, create ADR with `/tas-adr`
160
160
 
161
161
  #### Phase 2: Planning
162
- - **SE**: Breakdown Epic với `/tas-epic`, Feature với `/tas-feature`, Story với `/tas-story`
163
- - **SE**: Tạo Functional Testing Spec với `/tas-functest`
162
+ - **PE**: Breakdown Epic with `/tas-epic`, Feature with `/tas-feature`, Story with `/tas-story`
164
163
 
165
164
  #### Phase 3: Implementation
166
- - **SE**: Tạo Plan với `/tas-plan`, Implement với `/tas-dev`, Fix bug với `/tas-fix`
167
- - **SE**: Review code với `/tas-review`
168
- - **SE**: Tạo API Testing Script với `/tas-apitest`
169
- - **PE**: Tạo E2E Test Scenarios với `/tas-e2e`
170
- - **SE**: Tạo Functional Test Scripts với `/tas-functest-web`, `/tas-functest-mobile`
171
- - **PE**: Tạo E2E Test Scripts với `/tas-e2e-web`, `/tas-e2e-mobile`
172
- - **PE**: Tạo Bug Report với `/tas-bug`
165
+ - **SE**: Create Plan with `/tas-plan`, Implement with `/tas-dev`, Fix bug with `/tas-fix`
166
+ - **SE**: Review code with `/tas-review`
167
+ - **PE**: Create Functional Testing Spec with `/tas-functest`
168
+ - **SE**: Create API Testing Script with `/tas-apitest`
169
+ - **PE**: Create E2E Test Scenarios with `/tas-e2e`
170
+ - **SE**: Create Functional Test Scripts with `/tas-functest-web`, `/tas-functest-mobile`
171
+ - **PE**: Create E2E Test Scripts with `/tas-e2e-web`, `/tas-e2e-mobile`
172
+ - **PE**: Create Bug Report with `/tas-bug`
173
173
 
174
174
  #### Phase 4: Quality & Deploy
175
- - **DSE**: Security Review với `/tas-security`
176
- - **PE**: Chạy Pipeline/CLI để execute Automation Tests
177
- - **DSE**: Deploy lên Production
175
+ - **DSE**: Security Review with `/tas-security`
176
+ - **PE**: Run Pipeline/CLI to execute Automation Tests
177
+ - **DSE**: Deploy to Production
178
178
 
179
179
  ---
180
180
 
@@ -193,13 +193,13 @@ npx @torus-engineering/tas-kit install --yes # skip confirmation prompts
193
193
 
194
194
  ---
195
195
 
196
- ## Thiết lập quan trọng
196
+ ## Important Setup
197
197
 
198
198
  ### CLAUDE.md
199
199
 
200
- File cấu hình quan trọng nhất — Claude đọc file này đầu tiên trong mọi session.
200
+ Most important configuration file — Claude reads this file first in every session.
201
201
 
202
- **Cấu trúc:**
202
+ **Structure:**
203
203
  ```markdown
204
204
  # Project Name
205
205
 
@@ -217,9 +217,9 @@ File cấu hình quan trọng nhất — Claude đọc file này đầu tiên tr
217
217
 
218
218
  ### tas.yaml
219
219
 
220
- Điều khiển flow của TAS Kit theo từng dự án.
220
+ Controls TAS Kit flow per project.
221
221
 
222
- **Cấu trúc:**
222
+ **Structure:**
223
223
  ```yaml
224
224
  project:
225
225
  name: "My Project"
@@ -238,9 +238,9 @@ flow:
238
238
 
239
239
  ### project-status.yaml
240
240
 
241
- Index tổng hợp trạng thái dự án được cập nhật tự động sau mỗi thay đổi artifact.
241
+ Project status indexautomatically updated after each artifact change.
242
242
 
243
- **Cấu trúc:**
243
+ **Structure:**
244
244
  ```yaml
245
245
  last_updated: 2025-01-15
246
246
 
@@ -262,7 +262,7 @@ epics:
262
262
 
263
263
  ### .env
264
264
 
265
- Environment variables cho Azure DevOps integration.
265
+ Environment variables for Azure DevOps integration.
266
266
 
267
267
  ```bash
268
268
  AZURE_DEVOPS_PAT=your_pat_here
@@ -281,7 +281,7 @@ AZURE_DEVOPS_PROJECT=your_project
281
281
  agents/ 29 specialized subagents
282
282
  .tas/
283
283
  templates/ Markdown templates (PRD, SAD, ADR, Epic, Feature, Story...)
284
- checklists/ Code review, story done, security checklists
284
+ rules/ Coding standards + workflow rules (code-review, story-done, security...)
285
285
  tools/ ADO integration script (tas-ado.py)
286
286
  CLAUDE.md Project context template (edit this for your project)
287
287
  tas.yaml Flow configuration template (edit this for your project)
@@ -292,31 +292,31 @@ tas.yaml Flow configuration template (edit this for your project)
292
292
 
293
293
  ## Commands Reference
294
294
 
295
- | Command | tả | Role |
296
- |---------|-------|------|
297
- | `/tas-init` | Khởi tạo TAS cho dự án mới | All |
298
- | `/tas-status` | Hiển thị trạng thái hiện tại của dự án | All |
299
- | `/tas-prd` | Tạo/cập nhật Product Requirements Document | PE |
300
- | `/tas-sad` | Tạo/cập nhật Solution Architecture Document | SE |
301
- | `/tas-adr` | Tạo Architecture Decision Record | SE |
302
- | `/tas-design` | Tạo Design Specification | SE |
303
- | `/tas-epic` | Tạo/cập nhật Epic | SE |
304
- | `/tas-feature` | Tạo/cập nhật Feature | SE |
305
- | `/tas-story` | Tạo/cập nhật Story | SE |
306
- | `/tas-functest` | Tạo Functional Testing Specification | SE |
295
+ | Command | Description | Role |
296
+ |---------|-------------|------|
297
+ | `/tas-init` | Initialize TAS for new project | All |
298
+ | `/tas-status` | Display current project status | All |
299
+ | `/tas-prd` | Create/update Product Requirements Document | PE |
300
+ | `/tas-sad` | Create/update Solution Architecture Document | SE |
301
+ | `/tas-adr` | Create Architecture Decision Record | SE |
302
+ | `/tas-design` | Create Design Specification | SE |
303
+ | `/tas-epic` | Create/update Epic | SE |
304
+ | `/tas-feature` | Create/update Feature | SE |
305
+ | `/tas-story` | Create/update Story | SE |
306
+ | `/tas-functest` | Create Functional Testing Specification | SE |
307
307
  | `/tas-spec` | Lightweight spec (solo / prototype) | SE |
308
- | `/tas-plan` | Lập kế hoạch kỹ thuật implementation | SE |
308
+ | `/tas-plan` | Create technical implementation plan | SE |
309
309
  | `/tas-dev` | Implement story (agentic) | AI |
310
- | `/tas-fix` | Quick fix không cần full story flow | SE |
311
- | `/tas-apitest` | Tạo API Testing Script tự động | SE |
312
- | `/tas-e2e` | Tạo E2E Test Scenarios | PE |
313
- | `/tas-functest-web` | Tạo Functional Test Script cho Web | SE |
314
- | `/tas-functest-mobile` | Tạo Functional Test Script cho Mobile | SE |
315
- | `/tas-e2e-web` | Tạo E2E Test Script cho Web | PE |
316
- | `/tas-e2e-mobile` | Tạo E2E Test Script cho Mobile | PE |
317
- | `/tas-bug` | Tạo Bug Report | PE |
318
- | `/tas-review` | Code Review với checklist | SE |
319
- | `/tas-brainstorm` | Brainstorm giải pháp | All |
310
+ | `/tas-fix` | Quick fix without full story flow | SE |
311
+ | `/tas-apitest` | Create API Testing Script automatically | SE |
312
+ | `/tas-e2e` | Create E2E Test Scenarios | PE |
313
+ | `/tas-functest-web` | Create Functional Test Script for Web | SE |
314
+ | `/tas-functest-mobile` | Create Functional Test Script for Mobile | SE |
315
+ | `/tas-e2e-web` | Create E2E Test Script for Web | PE |
316
+ | `/tas-e2e-mobile` | Create E2E Test Script for Mobile | PE |
317
+ | `/tas-bug` | Create Bug Report | PE |
318
+ | `/tas-review` | Code Review with checklist | SE |
319
+ | `/tas-brainstorm` | Brainstorm solutions | All |
320
320
  | `/tas-security` | Security Review | DSE |
321
321
  | `/ado-*` | Azure DevOps integration | All |
322
322
 
@@ -331,4 +331,4 @@ tas.yaml Flow configuration template (edit this for your project)
331
331
 
332
332
  ## Documentation
333
333
 
334
- Xem `.tas/README.md` sau khi install để tài liệu chi tiết.
334
+ See `.tas/README.md` after install for detailed documentation.
package/bin/cli.js CHANGED
@@ -1,73 +1,91 @@
1
- #!/usr/bin/env node
2
- import { install, update } from '../lib/install.js';
3
-
4
- const args = process.argv.slice(2);
5
- const command = args[0];
6
-
7
- function printHelp() {
8
- console.log(`
9
- tas-kit — Torus Agentic SDLC Kit installer
10
-
11
- Usage:
12
- npx @torus-engineering/tas-kit <command> [options]
13
-
14
- Commands:
15
- install Copy TAS Kit files into a project (first-time setup)
16
- update Overwrite .claude/ and .tas/ with the latest kit version
17
- (preserves CLAUDE.md, tas.yaml, .env.example)
18
-
19
- Options:
20
- --directory <path> Target directory (default: current working directory)
21
- --yes, -y Skip confirmation prompts (uses native hook by default)
22
- --security-hook <mode> Pre-commit hook mode: husky | native | none
23
- Default: interactive prompt on install,
24
- no-op on update unless specified.
25
- --help, -h Show this help message
26
-
27
- Examples:
28
- npx @torus-engineering/tas-kit install
29
- npx @torus-engineering/tas-kit install --directory /path/to/my-project
30
- npx @torus-engineering/tas-kit install --yes --security-hook=husky
31
- npx @torus-engineering/tas-kit install --security-hook=none
32
- npx @torus-engineering/tas-kit update
33
- npx @torus-engineering/tas-kit update --yes --security-hook=native
34
- `.trim());
35
- }
36
-
37
- if (!command || command === '--help' || command === '-h') {
38
- printHelp();
39
- process.exit(0);
40
- }
41
-
42
- if (command !== 'install' && command !== 'update') {
43
- console.error(`Unknown command: "${command}"\n`);
44
- printHelp();
45
- process.exit(1);
46
- }
47
-
48
- const opts = { directory: process.cwd(), yes: false, securityHook: null };
49
-
50
- for (let i = 1; i < args.length; i++) {
51
- const a = args[i];
52
- if ((a === '--directory' || a === '-d') && args[i + 1]) {
53
- opts.directory = args[++i];
54
- } else if (a === '--yes' || a === '-y') {
55
- opts.yes = true;
56
- } else if (a.startsWith('--security-hook=')) {
57
- opts.securityHook = a.slice('--security-hook='.length).toLowerCase();
58
- } else if (a === '--security-hook' && args[i + 1]) {
59
- opts.securityHook = args[++i].toLowerCase();
60
- }
61
- }
62
-
63
- if (opts.securityHook && !['husky', 'native', 'none'].includes(opts.securityHook)) {
64
- console.error(`Invalid --security-hook value: "${opts.securityHook}"`);
65
- console.error(`Expected one of: husky, native, none`);
66
- process.exit(1);
67
- }
68
-
69
- const runner = command === 'update' ? update : install;
70
- runner(opts).catch((err) => {
71
- console.error(`\n${command === 'update' ? 'Update' : 'Install'} failed:`, err.message);
72
- process.exit(1);
73
- });
1
+ #!/usr/bin/env node
2
+ import { install, update } from '../lib/install.js';
3
+
4
+ const args = process.argv.slice(2);
5
+ const command = args[0];
6
+
7
+ function printHelp() {
8
+ console.log(`
9
+ tas-kit — Torus Agentic SDLC Kit installer
10
+
11
+ Usage:
12
+ npx @torus-engineering/tas-kit <command> [options]
13
+
14
+ Commands:
15
+ install Copy TAS Kit files into a project (first-time setup)
16
+ update Overwrite .tas/ and platform directories with the latest kit version
17
+ (preserves CLAUDE.md, tas.yaml, .env.example)
18
+
19
+ Options:
20
+ --directory <path> Target directory (default: current working directory)
21
+ --yes, -y Skip confirmation prompts
22
+ --platform <id,...> Platform(s) to install: claude-code, cursor, codex, antigravity
23
+ Comma-separated for multiple (default: interactive prompt)
24
+ --security-hook <mode> Pre-commit hook mode: husky | native | none
25
+ --help, -h Show this help message
26
+
27
+ Platforms:
28
+ claude-code Claude Code CLI (default)
29
+ cursor Cursor IDE
30
+ codex OpenAI Codex CLI
31
+ antigravity Google Antigravity IDE
32
+
33
+ Examples:
34
+ npx @torus-engineering/tas-kit install
35
+ npx @torus-engineering/tas-kit install --platform claude-code,cursor
36
+ npx @torus-engineering/tas-kit install --platform codex --yes
37
+ npx @torus-engineering/tas-kit install --yes --security-hook=husky
38
+ npx @torus-engineering/tas-kit update
39
+ npx @torus-engineering/tas-kit update --platform cursor
40
+ `.trim());
41
+ }
42
+
43
+ if (!command || command === '--help' || command === '-h') {
44
+ printHelp();
45
+ process.exit(0);
46
+ }
47
+
48
+ if (command !== 'install' && command !== 'update') {
49
+ console.error(`Unknown command: "${command}"\n`);
50
+ printHelp();
51
+ process.exit(1);
52
+ }
53
+
54
+ const VALID_PLATFORMS = ['claude-code', 'cursor', 'codex', 'antigravity'];
55
+ const opts = { directory: process.cwd(), yes: false, securityHook: null, platforms: [] };
56
+
57
+ for (let i = 1; i < args.length; i++) {
58
+ const a = args[i];
59
+ if ((a === '--directory' || a === '-d') && args[i + 1]) {
60
+ opts.directory = args[++i];
61
+ } else if (a === '--yes' || a === '-y') {
62
+ opts.yes = true;
63
+ } else if (a.startsWith('--security-hook=')) {
64
+ opts.securityHook = a.slice('--security-hook='.length).toLowerCase();
65
+ } else if (a === '--security-hook' && args[i + 1]) {
66
+ opts.securityHook = args[++i].toLowerCase();
67
+ } else if (a.startsWith('--platform=')) {
68
+ opts.platforms = a.slice('--platform='.length).split(',').map(s => s.trim().toLowerCase());
69
+ } else if (a === '--platform' && args[i + 1]) {
70
+ opts.platforms = args[++i].split(',').map(s => s.trim().toLowerCase());
71
+ }
72
+ }
73
+
74
+ if (opts.securityHook && !['husky', 'native', 'none'].includes(opts.securityHook)) {
75
+ console.error(`Invalid --security-hook value: "${opts.securityHook}"`);
76
+ console.error(`Expected one of: husky, native, none`);
77
+ process.exit(1);
78
+ }
79
+
80
+ const invalidPlatforms = opts.platforms.filter(p => !VALID_PLATFORMS.includes(p));
81
+ if (invalidPlatforms.length > 0) {
82
+ console.error(`Invalid platform(s): ${invalidPlatforms.join(', ')}`);
83
+ console.error(`Valid platforms: ${VALID_PLATFORMS.join(', ')}`);
84
+ process.exit(1);
85
+ }
86
+
87
+ const runner = command === 'update' ? update : install;
88
+ runner(opts).catch((err) => {
89
+ console.error(`\n${command === 'update' ? 'Update' : 'Install'} failed:`, err.message);
90
+ process.exit(1);
91
+ });
@@ -0,0 +1,137 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import {
4
+ exists, listFilesRecursive,
5
+ parseFrontmatter, extractDescription, extractCommandName, extractH1, yamlValue,
6
+ } from './utils.js';
7
+
8
+ export const PLATFORM_ID = 'antigravity';
9
+ export const PLATFORM_LABEL = 'Antigravity';
10
+
11
+ export async function install({ tasDir, target }) {
12
+ const agentsDir = path.join(target, '.agents');
13
+ await fs.mkdir(agentsDir, { recursive: true });
14
+ await fs.mkdir(path.join(agentsDir, 'rules'), { recursive: true });
15
+ await fs.mkdir(path.join(agentsDir, 'skills'), { recursive: true });
16
+
17
+ // commands → .agents/<name>.md (Antigravity workflows)
18
+ const commandsDir = path.join(tasDir, 'commands');
19
+ if (await exists(commandsDir)) {
20
+ const files = await listFilesRecursive(commandsDir, '.md');
21
+ for (const file of files) {
22
+ await commandToWorkflow(file, agentsDir);
23
+ }
24
+ console.log(' [ok] .agents/ (workflows from commands)');
25
+ }
26
+
27
+ // agents → .agents/skills/<name>/SKILL.md
28
+ const agentsSrc = path.join(tasDir, 'agents');
29
+ if (await exists(agentsSrc)) {
30
+ const files = await listFilesRecursive(agentsSrc, '.md');
31
+ for (const file of files) {
32
+ await agentToSkill(file, path.join(agentsDir, 'skills'));
33
+ }
34
+ console.log(' [ok] .agents/skills/ (agents)');
35
+ }
36
+
37
+ // kit skills → .agents/skills/ (copy as-is, same open standard)
38
+ const skillsSrc = path.join(tasDir, 'skills');
39
+ if (await exists(skillsSrc)) {
40
+ const skillDirs = await fs.readdir(skillsSrc, { withFileTypes: true });
41
+ for (const d of skillDirs.filter(e => e.isDirectory())) {
42
+ await fs.cp(
43
+ path.join(skillsSrc, d.name),
44
+ path.join(agentsDir, 'skills', d.name),
45
+ { recursive: true }
46
+ );
47
+ }
48
+ console.log(' [ok] .agents/skills/ (skills)');
49
+ }
50
+
51
+ // rules → .agents/rules/<stack>-<topic>.md
52
+ const rulesDir = path.join(tasDir, 'rules');
53
+ if (await exists(rulesDir)) {
54
+ await convertRules(rulesDir, path.join(agentsDir, 'rules'));
55
+ console.log(' [ok] .agents/rules/ (from .tas/rules/)');
56
+ }
57
+
58
+ // lean AGENTS.md
59
+ await generateAgentsMd(agentsDir, target);
60
+ console.log(' [ok] AGENTS.md');
61
+ }
62
+
63
+ async function commandToWorkflow(file, agentsDir) {
64
+ const content = await fs.readFile(file, 'utf8');
65
+ const name = extractCommandName(content) || path.basename(file, '.md');
66
+ // Antigravity workflows: same .md format, stored in .agents/<name>.md
67
+ await fs.writeFile(path.join(agentsDir, `${name}.md`), content);
68
+ }
69
+
70
+ async function agentToSkill(file, skillsDir) {
71
+ const content = await fs.readFile(file, 'utf8');
72
+ const { frontmatter, body } = parseFrontmatter(content);
73
+ const name = frontmatter.name || path.basename(file, '.md');
74
+ const description = frontmatter.description || extractDescription(body, name);
75
+ const skillDir = path.join(skillsDir, name);
76
+ await fs.mkdir(skillDir, { recursive: true });
77
+ // Antigravity SKILL.md: same open standard, drop allowed-tools (platform manages tool access)
78
+ const skillMd = `---\nname: ${yamlValue(name)}\ndescription: ${yamlValue(description)}\n---\n\n${body}`;
79
+ await fs.writeFile(path.join(skillDir, 'SKILL.md'), skillMd);
80
+ }
81
+
82
+ async function convertRules(rulesDir, outDir) {
83
+ const entries = await fs.readdir(rulesDir, { withFileTypes: true });
84
+ for (const entry of entries) {
85
+ if (entry.isDirectory()) {
86
+ const stack = entry.name;
87
+ const files = await listFilesRecursive(path.join(rulesDir, stack), '.md');
88
+ for (const f of files) {
89
+ const topic = path.basename(f, '.md');
90
+ await fs.copyFile(f, path.join(outDir, `${stack}-${topic}.md`));
91
+ }
92
+ } else if (entry.name.endsWith('.md')) {
93
+ await fs.copyFile(path.join(rulesDir, entry.name), path.join(outDir, entry.name));
94
+ }
95
+ }
96
+ }
97
+
98
+ async function generateAgentsMd(agentsDir, target) {
99
+ const workflowFiles = (await fs.readdir(agentsDir, { withFileTypes: true }))
100
+ .filter(e => e.isFile() && e.name.endsWith('.md'))
101
+ .map(e => `- \`/${e.name.replace('.md', '')}\``);
102
+
103
+ const skillDirs = await fs.readdir(path.join(agentsDir, 'skills'), { withFileTypes: true });
104
+ const skillLines = [];
105
+ for (const d of skillDirs.filter(e => e.isDirectory())) {
106
+ const skillFile = path.join(agentsDir, 'skills', d.name, 'SKILL.md');
107
+ if (!(await exists(skillFile))) continue;
108
+ const content = await fs.readFile(skillFile, 'utf8');
109
+ const { frontmatter } = parseFrontmatter(content);
110
+ if (frontmatter.name) {
111
+ skillLines.push(`- **${frontmatter.name}**: ${frontmatter.description || ''}`);
112
+ }
113
+ }
114
+
115
+ const agentsMd = [
116
+ `# Project Instructions`,
117
+ ``,
118
+ `This project uses TAS Kit — Torus Agentic SDLC Kit.`,
119
+ ``,
120
+ `## Workflows`,
121
+ ``,
122
+ `Invoke via \`/workflow-name\` in chat:`,
123
+ ``,
124
+ ...workflowFiles,
125
+ ``,
126
+ `## Skills`,
127
+ ``,
128
+ ...skillLines,
129
+ ``,
130
+ `## Project Configuration`,
131
+ ``,
132
+ `See \`tas.yaml\` for project settings and project instructions file for detailed conventions.`,
133
+ ``,
134
+ ].join('\n');
135
+
136
+ await fs.writeFile(path.join(target, 'AGENTS.md'), agentsMd);
137
+ }
@@ -0,0 +1,35 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { copyDir, exists } from './utils.js';
4
+
5
+ export const PLATFORM_ID = 'claude-code';
6
+ export const PLATFORM_LABEL = 'Claude Code';
7
+
8
+ export async function install({ tasDir, target }) {
9
+ const claudeDir = path.join(target, '.claude');
10
+ await fs.mkdir(claudeDir, { recursive: true });
11
+
12
+ await copyDir(path.join(tasDir, 'commands'), path.join(claudeDir, 'commands'));
13
+ console.log(' [ok] .claude/commands/');
14
+
15
+ await copyDir(path.join(tasDir, 'agents'), path.join(claudeDir, 'agents'));
16
+ console.log(' [ok] .claude/agents/');
17
+
18
+ const skillsSrc = path.join(tasDir, 'skills');
19
+ if (await exists(skillsSrc)) {
20
+ await copyDir(skillsSrc, path.join(claudeDir, 'skills'));
21
+ console.log(' [ok] .claude/skills/');
22
+ }
23
+
24
+ const hooksSrc = path.join(tasDir, '_platform', 'hooks');
25
+ if (await exists(hooksSrc)) {
26
+ await copyDir(hooksSrc, path.join(claudeDir, 'hooks'));
27
+ console.log(' [ok] .claude/hooks/');
28
+ }
29
+
30
+ const settingsSrc = path.join(tasDir, '_platform', 'claude-code', 'settings.json');
31
+ if (await exists(settingsSrc)) {
32
+ await fs.copyFile(settingsSrc, path.join(claudeDir, 'settings.json'));
33
+ console.log(' [ok] .claude/settings.json');
34
+ }
35
+ }