@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/.tas/README.md CHANGED
@@ -1,45 +1,45 @@
1
- # TAS Kit
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
 
@@ -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`, tạo design-spec với `/tas-design`
159
- - **SE**: Tạo SAD với `/tas-sad`, tạo ADR với `/tas-adr`
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
- - **PE**: Breakdown Epic với `/tas-epic`, Feature với `/tas-feature`, Story với `/tas-story`
162
+ - **PE**: Breakdown Epic with `/tas-epic`, Feature with `/tas-feature`, Story with `/tas-story`
163
163
 
164
164
  #### Phase 3: Implementation
165
- - **SE**: Tạo Plan với `/tas-plan`, Implement với `/tas-dev`, Fix bug với `/tas-fix`
166
- - **SE**: Review code với `/tas-review`
167
- - **PE**: Tạo Functional Testing Spec với `/tas-functest`
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.
@@ -19,18 +19,6 @@
19
19
  ]
20
20
  },
21
21
  "hooks": {
22
- "PreToolUse": [
23
- {
24
- "matcher": "Write|Edit|MultiEdit",
25
- "hooks": [
26
- {
27
- "type": "command",
28
- "command": "node -e \"const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); const p=(d.tool_input||{}).file_path||''; const s=['.env','.prod.','.production.','appsettings.Production','secrets/','terraform/','.pem','.key','credentials'].find(x=>p.toLowerCase().includes(x.toLowerCase())); if(s) console.log('[TAS] WARNING: Sensitive file ('+s+'): '+p+' → Confirm this edit is intentional.');\"",
29
- "description": "Warn before editing sensitive files"
30
- }
31
- ]
32
- }
33
- ],
34
22
  "PostToolUse": [
35
23
  {
36
24
  "matcher": "Write|Edit|MultiEdit",
@@ -22,7 +22,7 @@ const { execSync } = require('child_process');
22
22
  // --- Read hook input ---
23
23
  let input;
24
24
  try {
25
- const raw = fs.readFileSync('/dev/stdin', 'utf8');
25
+ const raw = fs.readFileSync(0, 'utf8');
26
26
  input = JSON.parse(raw);
27
27
  } catch {
28
28
  process.exit(0);
@@ -45,7 +45,7 @@ if (fs.existsSync(path.join(cwd, 'package.json'))) {
45
45
  } catch { /* ignore */ }
46
46
 
47
47
  if (hasTestScript) {
48
- const result = run('npm test -- --passWithNoTests 2>&1', cwd);
48
+ const result = run('npm test', cwd);
49
49
  checks.push(result.ok
50
50
  ? '✓ Tests passed (npm test)'
51
51
  : '✗ Tests FAILED (npm test) — fix before committing'
@@ -56,11 +56,25 @@ if (fs.existsSync(path.join(cwd, 'package.json'))) {
56
56
 
57
57
  // .NET
58
58
  if (!testRan) {
59
- const csprojFiles = (() => {
60
- try {
61
- return fs.readdirSync(cwd).filter(f => f.endsWith('.csproj') || f.endsWith('.sln'));
62
- } catch { return []; }
63
- })();
59
+ function findDotnetFiles(startDir, maxDepth = 3) {
60
+ const results = [];
61
+ function walk(dir, depth) {
62
+ if (depth > maxDepth) return;
63
+ try {
64
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
65
+ if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'node_modules') {
66
+ walk(path.join(dir, entry.name), depth + 1);
67
+ } else if (entry.name.endsWith('.csproj') || entry.name.endsWith('.sln')) {
68
+ results.push(entry.name);
69
+ }
70
+ }
71
+ } catch { /* ignore */ }
72
+ }
73
+ walk(startDir, 0);
74
+ return results;
75
+ }
76
+
77
+ const csprojFiles = findDotnetFiles(cwd);
64
78
 
65
79
  if (csprojFiles.length > 0) {
66
80
  const result = run('dotnet test --no-build --logger "console;verbosity=minimal" 2>&1', cwd);
@@ -89,25 +103,6 @@ if (!testRan) {
89
103
  }
90
104
  }
91
105
 
92
- // ─── 2. Check project-status.yaml updated today ──────────────────────────────
93
- const statusFile = path.join(cwd, 'project-status.yaml');
94
- if (fs.existsSync(statusFile)) {
95
- const today = new Date().toISOString().split('T')[0]; // YYYY-MM-DD
96
- try {
97
- const content = fs.readFileSync(statusFile, 'utf8');
98
- if (content.includes(today)) {
99
- checks.push('✓ project-status.yaml updated today');
100
- } else {
101
- checks.push('⚠ project-status.yaml not updated today — run /tas-status to sync');
102
- }
103
- } catch {
104
- checks.push('⚠ Could not read project-status.yaml');
105
- }
106
- }
107
-
108
- // ─── 3. Remind about story status ────────────────────────────────────────────
109
- checks.push('→ Next: /tas-review-code before moving story to Deploy Test');
110
-
111
106
  // ─── Output ──────────────────────────────────────────────────────────────────
112
107
  if (checks.length > 0) {
113
108
  console.log('\n[TAS] Session end checks:');
@@ -0,0 +1,28 @@
1
+ # /ado-create $ARGUMENTS
2
+
3
+ Create new work item on Azure DevOps from local .md file.
4
+
5
+ ## Syntax
6
+ /ado-create <type> <temp-id> [--parent-id <id>]
7
+
8
+ - type: epic | feature | story | bug
9
+ - temp-id: Temporary ID in local filename (will be renamed after creating on ADO)
10
+ - --parent-id: ADO ID of parent work item (optional)
11
+
12
+ ## Examples
13
+ /ado-create story 789 --parent-id 456
14
+ /ado-create epic 001
15
+ /ado-create bug 003 --parent-id 123
16
+
17
+ ## Actions
18
+ 1. Read `.tas/rules/ado-integration.md` for ADO operating rules (Always/Ask/Never, Red Flags).
19
+ 2. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
20
+ 3. Run: python .tas/tools/tas-ado.py create-<type> <temp-id> [--parent-id <id>]
21
+ 4. Script will:
22
+ - Find file by pattern {type}-{temp-id}-*.md
23
+ - Extract title and description
24
+ - Create work item on ADO
25
+ - Rename file to {type}-{ado_id}-*.md
26
+ - Add parent relation if --parent-id provided
27
+ - Update frontmatter: ado_id, last_ado_sync
28
+ 5. Update root/project-status.yaml
@@ -0,0 +1,22 @@
1
+ # /ado-delete $ARGUMENTS
2
+
3
+ Delete work item on Azure DevOps. Does NOT delete local file.
4
+
5
+ ## Syntax
6
+ /ado-delete <type> <ado-id>
7
+
8
+ - type: epic | feature | story | bug
9
+
10
+ ## Examples
11
+ /ado-delete story 1234
12
+ /ado-delete bug 5678
13
+
14
+ ## Actions
15
+ 1. Read `.tas/rules/ado-integration.md` for ADO operating rules (Always/Ask/Never, Red Flags).
16
+ 2. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
17
+ 3. MUST ask user confirmation before deleting: "Are you sure you want to delete <type> #<ado-id> on ADO?"
18
+ 4. After user confirms, run: python .tas/tools/tas-ado.py delete-<type> <ado-id>
19
+ 5. Script will:
20
+ - Delete work item on ADO
21
+ - NOT delete local file (keep for reference)
22
+ - Update frontmatter: ado_state = Removed, last_ado_sync
@@ -0,0 +1,20 @@
1
+ # /ado-get $ARGUMENTS
2
+
3
+ Pull work item from Azure DevOps to local .md file.
4
+
5
+ ## Syntax
6
+ /ado-get <ado-id>
7
+
8
+ ## Examples
9
+ /ado-get 5345
10
+ /ado-get 1234
11
+
12
+ ## Actions
13
+ 1. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
14
+ 2. Run: python .tas/tools/tas-ado.py get <ado-id>
15
+ 3. Script will:
16
+ - Fetch work item from ADO
17
+ - Convert description HTML to Markdown
18
+ - Create file {type}-{ado_id}-{slug}.md with frontmatter + content
19
+ - Update last_ado_sync
20
+ 4. If file already exists, ask user if they want to overwrite
@@ -0,0 +1,18 @@
1
+ # /ado-status $ARGUMENTS
2
+
3
+ Update only work item status on Azure DevOps (fast, no content push).
4
+
5
+ ## Syntax
6
+ /ado-status <ado-id> --status <state> [--assign <name/email>]
7
+
8
+ ## Examples
9
+ /ado-status 1234 --status "In Progress"
10
+ /ado-status 5678 --status "Resolved" --assign "user@example.com"
11
+
12
+ ## Actions
13
+ 1. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
14
+ 2. Run: python .tas/tools/tas-ado.py update-status <ado-id> --status <state> [--assign ...]
15
+ 3. Script will:
16
+ - Only update state and/or assigned-to on ADO
17
+ - Find local file, update frontmatter: ado_state, last_ado_sync
18
+ - Update root/project-status.yaml
@@ -0,0 +1,27 @@
1
+ # /ado-update $ARGUMENTS
2
+
3
+ Update work item on Azure DevOps from local .md file.
4
+
5
+ ## Syntax
6
+ /ado-update <type> <ado-id> [--assign <name/email>] [--status <state>]
7
+
8
+ - type: epic | feature | story | bug
9
+ - ado-id: ADO work item ID
10
+ - --assign: assign to person (optional)
11
+ - --status: update status (optional)
12
+
13
+ ## Examples
14
+ /ado-update story 1234 --status "In Progress"
15
+ /ado-update bug 5678 --assign "user@example.com" --status "Committed"
16
+ /ado-update feature 456
17
+
18
+ ## Actions
19
+ 1. Read `.tas/rules/ado-integration.md` for ADO operating rules (Always/Ask/Never, Red Flags).
20
+ 2. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
21
+ 3. Run: python .tas/tools/tas-ado.py update-<type> <ado-id> [--assign ...] [--status ...]
22
+ 4. Script will:
23
+ - Find local file by pattern *-<ado-id>-*.md
24
+ - Read title and description from file
25
+ - Update work item on ADO
26
+ - Update frontmatter: ado_state, ado_assigned_to, last_ado_sync
27
+ 5. If no --assign and --status provided, push entire file content to ADO
@@ -0,0 +1,33 @@
1
+ # /tas-adr $ARGUMENTS
2
+
3
+ Role: SE - Software Engineer
4
+ Create or update Architecture Decision Record.
5
+
6
+ ## Actions
7
+ 1. Need context from .tas/templates/ADR.md
8
+ 2. Scan docs/adr/ to identify existing ADRs
9
+ 3. Determine mode based on $ARGUMENTS:
10
+
11
+ ### CREATE mode ($ARGUMENTS is new title, e.g., "Use CQRS for Order Service"):
12
+ 4. Determine next sequence number (ADR-001, ADR-002...)
13
+ 5. If docs/sad.md exists, need context from SAD to ensure ADR consistency
14
+ 6. Create file docs/adr/ADR-{NNN}-{slug}.md
15
+ 7. Update `project-status.yaml` per `.tas/rules/common/project-status.md` — add entry to `adrs`.
16
+
17
+ ### UPDATE mode ($ARGUMENTS is ADR ID, e.g., "ADR-001"):
18
+ 4. Need context from current ADR file
19
+ 5. Ask user what needs changing (update status, add consequences, supersede...)
20
+ 6. Update file, add changelog
21
+ 7. If supersede: update old ADR status to "Superseded by ADR-{NNN}"
22
+ 8. Update `project-status.yaml` per `.tas/rules/common/project-status.md` — update `adrs.{ADR_ID}.status`.
23
+
24
+ ## Principles
25
+ - ADR must have: Context, Decision, Rationale, Consequences, Alternatives Considered
26
+ - Status: Proposed | Accepted | Deprecated | Superseded
27
+ - Each ADR is independent, self-contained with enough context to understand
28
+ - Link to related ADRs if any (Supersedes, Related to)
29
+ - Mermaid diagram rules: :::mermaid wrapper, no () in node labels
30
+
31
+ ## Final Step — Token Log
32
+
33
+ Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to working ADR file.
@@ -0,0 +1,173 @@
1
+ # /tas-apitest-plan $ARGUMENTS
2
+
3
+ Role: SE - Software Engineer
4
+ Generate API Test Specification (Markdown) from API Spec (OpenAPI 3.0, Markdown, YAML) or analyze API code.
5
+
6
+ ## Always / Ask / Never
7
+
8
+ | | Action |
9
+ |---|---|
10
+ | **Always** | Read entire spec or analyze code before creating test spec |
11
+ | **Always** | Organize test cases by API version — each version separate section |
12
+ | **Always** | Append-only: don't modify sections in existing old version |
13
+ | **Always** | Coverage matrix: each endpoint needs ≥1 happy path + ≥1 error path |
14
+ | **Always** | Read `.tas/rules/csharp/api-testing.md` for conventions |
15
+ | **Ask** | When spec unclear about expected response schema or business rule |
16
+ | **Never** | Use version folder/syntax in test spec file (use section headers instead) |
17
+ | **Never** | Skip error path — each endpoint needs cover validation errors |
18
+
19
+ ## Actions
20
+
21
+ ### Step 1 — Locate Inputs
22
+
23
+ `$ARGUMENTS` is path to:
24
+ - API Spec file (OpenAPI 3.0 JSON/YAML, Markdown)
25
+ - Or Story ID — glob find `docs/epics/**/Story-{ID}*.md`
26
+ - Or path to API code project to analyze
27
+
28
+ If not provided → ask user:
29
+ ```
30
+ Enter input for /tas-apitest-plan:
31
+ 1. Path to API Spec file (OpenAPI/Markdown/YAML)
32
+ 2. Story ID (to find spec link in Story)
33
+ 3. Path to API code to auto-analyze
34
+ ```
35
+
36
+ ### Step 2 — Detect Existing Test Spec
37
+
38
+ Glob find `docs/tests/API-Test-Spec-*.md`.
39
+
40
+ - **Found**: Read file, detect existing versions (find section headers `## v{N}`)
41
+ - **Not found**: Create new with version v1
42
+
43
+ ### Step 3 — Parse Input
44
+
45
+ **If API Spec file:**
46
+ - Read and parse OpenAPI/Markdown/YAML
47
+ - Collect for each endpoint:
48
+ - HTTP method + path, path/query params, request body schema
49
+ - Response schemas per status code
50
+ - Auth requirement, description/summary
51
+ - Tags to group endpoints
52
+
53
+ **If Story:**
54
+ - Read Story to find spec link in `## Technical Plan` or `## Acceptance Criteria`
55
+ - Parse spec as above
56
+ - Add AC mapping to test spec
57
+
58
+ **If code path:**
59
+ - Glob find controller/handler files (`.cs`, `.ts`, `.py` per stack)
60
+ - Analyze attributes/routes to detect endpoints
61
+ - Extract DTO classes to know request/response schema
62
+ - Ask user confirm if detection unclear
63
+
64
+ ### Step 4 — Detect API Version
65
+
66
+ Prioritize in order:
67
+ 1. `info.version` in OpenAPI
68
+ 2. Prefix in URL path (v1/, v2/)
69
+ 3. Ask user
70
+
71
+ Version format: `v1`, `v2` (no dot).
72
+
73
+ ### Step 5 — Determine Output Path
74
+
75
+ Output: `docs/tests/API-Test-Spec-{slug}.md`
76
+
77
+ **Slug generation:**
78
+ - From `api_name` in spec → lowercase, replace spaces with dashes
79
+ - Or ask user for short slug (e.g., `users`, `orders`, `products`)
80
+
81
+ ### Step 6 — Determine Update Mode
82
+
83
+ If spec file exists and version already exists:
84
+ - **Append mode** (default): add new test cases to end of current version section
85
+ - Ask user if want new version (v2, v3...):
86
+
87
+ ```
88
+ Spec file already exists with version {current}. You want:
89
+ 1. Append test cases to version {current} (default)
90
+ 2. Create new version (v{next}) for test cases
91
+ ```
92
+
93
+ ### Step 7 — Generate Test Spec
94
+
95
+ Read template `.tas/templates/API-Test-Spec.md` for structure.
96
+
97
+ **Analyze endpoints to create coverage matrix:**
98
+
99
+ For each endpoint, generate test cases for:
100
+ 1. **Happy path** (2xx) — always have
101
+ 2. **Unauthorized** (401) — if endpoint requires auth
102
+ 3. **Forbidden** (403) — if has RBAC/ownership check
103
+ 4. **Not found** (404) — if has path param
104
+ 5. **Validation error** (400/422) — if has required fields or business rules
105
+ 6. **Business rules** — from Story ACs or spec descriptions
106
+
107
+ **Coverage matrix format:**
108
+ ```
109
+ | Endpoint | Happy Path | 401 Unauthorized | 403 Forbidden | 404 Not Found | 400/422 Validation | Business Rule |
110
+ |----------|:---------:|:----------------:|:-------------:|:-------------:|:------------------:|:-------------:|
111
+ | GET /api/users | ✓ | ✓ | | | | |
112
+ | POST /api/users | ✓ | ✓ | | | ✓ | |
113
+ ```
114
+
115
+ **Test case detail format:**
116
+ ```
117
+ #### TC-XXX: {Title} — {Modifier}
118
+ - **Endpoint**: `{METHOD} {path}`
119
+ - **Auth**: Required/Not Required
120
+ - **Preconditions**:
121
+ - {List preconditions}
122
+ - **Request Query/Path/Body**:
123
+ - {Request details}
124
+ - **Expected Response**:
125
+ - Status: {code}
126
+ - Body: {schema}
127
+ - **Assertions**:
128
+ - {List assertions}
129
+ - **AC Reference**: AC-{N} (if any)
130
+ - **Test Method Name**: `{Method}_{Resource}_Returns{Status}_When{Condition}`
131
+ ```
132
+
133
+ ### Step 8 — Write Test Spec File
134
+
135
+ **File doesn't exist:** Create new from template.
136
+
137
+ **File exists (append mode):**
138
+ - Read current file
139
+ - Find section `## v{N}` being worked on
140
+ - Append new test cases to end of section before `## Version History` or `## Changelog`
141
+ - Preserve all old content
142
+
143
+ ### Step 9 — Summary
144
+
145
+ Display:
146
+ 1. Output file path
147
+ 2. Number of endpoints detected
148
+ 3. Number of test cases generated
149
+ 4. Coverage matrix
150
+ 5. Next steps:
151
+ - Review test spec file
152
+ - Run `/tas-apitest docs/tests/API-Test-Spec-{slug}.md` to generate code
153
+
154
+ ```
155
+ ## API Test Spec Generated
156
+
157
+ **Output**: `docs/tests/API-Test-Spec-{slug}.md`
158
+ **Version**: v{N}
159
+ **Endpoints**: {N}
160
+ **Test Cases**: {N}
161
+
162
+ ### Coverage Matrix
163
+ [Print coverage matrix]
164
+
165
+ ### Next Steps
166
+ 1. Review test spec: `docs/tests/API-Test-Spec-{slug}.md`
167
+ 2. Generate test code: `/tas-apitest docs/tests/API-Test-Spec-{slug}.md`
168
+ 3. Run tests: `dotnet test tests/ApiTests/`
169
+ ```
170
+
171
+ ## Final Step — Token Log
172
+
173
+ Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to test spec file.