@torus-engineering/tas-kit 1.11.1 → 1.13.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 (123) hide show
  1. package/.tas/README.md +334 -334
  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/{.claude → .tas}/commands/ado-create.md +5 -4
  6. package/{.claude → .tas}/commands/ado-delete.md +5 -4
  7. package/{.claude → .tas}/commands/ado-update.md +5 -4
  8. package/{.claude → .tas}/commands/tas-adr.md +3 -3
  9. package/{.claude → .tas}/commands/tas-apitest-plan.md +2 -2
  10. package/{.claude → .tas}/commands/tas-apitest.md +4 -4
  11. package/{.claude → .tas}/commands/tas-bug.md +6 -6
  12. package/{.claude → .tas}/commands/tas-design.md +3 -3
  13. package/{.claude → .tas}/commands/tas-dev.md +11 -14
  14. package/{.claude → .tas}/commands/tas-epic.md +3 -3
  15. package/{.claude → .tas}/commands/tas-feature.md +4 -4
  16. package/{.claude → .tas}/commands/tas-fix.md +5 -5
  17. package/{.claude → .tas}/commands/tas-init.md +1 -1
  18. package/{.claude → .tas}/commands/tas-plan.md +198 -198
  19. package/{.claude → .tas}/commands/tas-prd.md +3 -3
  20. package/{.claude → .tas}/commands/tas-review.md +17 -15
  21. package/{.claude → .tas}/commands/tas-sad.md +3 -3
  22. package/{.claude → .tas}/commands/tas-security.md +4 -4
  23. package/{.claude → .tas}/commands/tas-story.md +3 -3
  24. package/.tas/platforms.json +5 -0
  25. package/.tas/project-status-example.yaml +17 -17
  26. package/{.claude/skills/ado-integration/SKILL.md → .tas/rules/ado-integration.md} +5 -15
  27. package/{.claude/skills/api-design/SKILL.md → .tas/rules/common/api-design.md} +517 -530
  28. package/{.claude → .tas}/rules/common/code-review.md +30 -6
  29. package/{.claude/rules/common/post-review-agent.md → .tas/rules/common/post-implementation-review.md} +51 -49
  30. package/{.claude → .tas}/rules/common/project-status.md +80 -80
  31. package/{.claude → .tas}/rules/common/stack-detection.md +29 -29
  32. package/.tas/{checklists → rules/common}/story-done.md +12 -5
  33. package/{.claude/skills/tas-tdd/SKILL.md → .tas/rules/common/tdd.md} +4 -38
  34. package/{.claude → .tas}/rules/common/testing.md +3 -8
  35. package/{.claude → .tas}/rules/common/token-logging.md +36 -27
  36. package/{.claude → .tas}/rules/csharp/api-testing.md +171 -171
  37. package/{.claude → .tas}/rules/csharp/coding-style.md +0 -2
  38. package/{.claude → .tas}/rules/csharp/security.md +10 -0
  39. package/{.claude → .tas}/rules/python/coding-style.md +0 -2
  40. package/{.claude → .tas}/rules/typescript/coding-style.md +0 -2
  41. package/.tas/rules/typescript/patterns.md +142 -0
  42. package/.tas/rules/typescript/security.md +88 -0
  43. package/{.claude → .tas}/rules/typescript/testing.md +0 -4
  44. package/{.claude → .tas}/rules/web/coding-style.md +0 -2
  45. package/.tas/tas-example.yaml +125 -126
  46. package/.tas/templates/ADR.md +47 -47
  47. package/.tas/templates/Bug.md +67 -67
  48. package/.tas/templates/Design-Spec.md +36 -36
  49. package/.tas/templates/Epic.md +46 -46
  50. package/.tas/templates/Feature.md +1 -1
  51. package/.tas/templates/Security-Report.md +27 -27
  52. package/.tas/tools/tas-ado-readme.md +169 -169
  53. package/.tas/tools/tas-ado.py +621 -621
  54. package/README.md +334 -334
  55. package/bin/cli.js +91 -73
  56. package/lib/adapters/antigravity.js +131 -0
  57. package/lib/adapters/claude-code.js +35 -0
  58. package/lib/adapters/codex.js +157 -0
  59. package/lib/adapters/cursor.js +80 -0
  60. package/lib/adapters/index.js +20 -0
  61. package/lib/adapters/utils.js +81 -0
  62. package/lib/deleted-files.json +99 -0
  63. package/lib/install.js +543 -327
  64. package/package.json +5 -4
  65. package/.claude/agents/code-reviewer.md +0 -41
  66. package/.claude/agents/e2e-runner.md +0 -61
  67. package/.claude/agents/planner.md +0 -82
  68. package/.claude/agents/tdd-guide.md +0 -84
  69. package/.claude/commands/tas-verify.md +0 -51
  70. package/.claude/rules/typescript/patterns.md +0 -62
  71. package/.claude/rules/typescript/security.md +0 -28
  72. package/.claude/settings.local.json +0 -38
  73. package/.claude/skills/ai-regression-testing/SKILL.md +0 -364
  74. package/.claude/skills/architecture-decision-records/SKILL.md +0 -184
  75. package/.claude/skills/benchmark/SKILL.md +0 -98
  76. package/.claude/skills/browser-qa/SKILL.md +0 -92
  77. package/.claude/skills/canary-watch/SKILL.md +0 -104
  78. package/.claude/skills/js-backend-patterns/SKILL.md +0 -603
  79. package/.claude/skills/tas-conventions/SKILL.md +0 -65
  80. package/.claude/skills/tas-implementation-complete/SKILL.md +0 -100
  81. package/.claude/skills/token-logger/SKILL.md +0 -19
  82. package/.tas/checklists/code-review.md +0 -29
  83. package/.tas/checklists/security.md +0 -21
  84. /package/{.claude → .tas}/agents/architect.md +0 -0
  85. /package/{.claude → .tas}/agents/aws-reviewer.md +0 -0
  86. /package/{.claude → .tas}/agents/build-resolver.md +0 -0
  87. /package/{.claude → .tas}/agents/code-explorer.md +0 -0
  88. /package/{.claude → .tas}/agents/csharp-reviewer.md +0 -0
  89. /package/{.claude → .tas}/agents/database-reviewer.md +0 -0
  90. /package/{.claude → .tas}/agents/doc-updater.md +0 -0
  91. /package/{.claude → .tas}/agents/python-reviewer.md +0 -0
  92. /package/{.claude → .tas}/agents/security-reviewer.md +0 -0
  93. /package/{.claude → .tas}/agents/typescript-reviewer.md +0 -0
  94. /package/{.claude → .tas}/commands/ado-get.md +0 -0
  95. /package/{.claude → .tas}/commands/ado-status.md +0 -0
  96. /package/{.claude → .tas}/commands/tas-brainstorm.md +0 -0
  97. /package/{.claude → .tas}/commands/tas-e2e-mobile.md +0 -0
  98. /package/{.claude → .tas}/commands/tas-e2e-web.md +0 -0
  99. /package/{.claude → .tas}/commands/tas-e2e.md +0 -0
  100. /package/{.claude → .tas}/commands/tas-functest-mobile.md +0 -0
  101. /package/{.claude → .tas}/commands/tas-functest-web.md +0 -0
  102. /package/{.claude → .tas}/commands/tas-functest.md +0 -0
  103. /package/{.claude → .tas}/commands/tas-spec.md +0 -0
  104. /package/{.claude → .tas}/commands/tas-status.md +0 -0
  105. /package/{.claude → .tas}/rules/.gitkeep +0 -0
  106. /package/{.claude → .tas}/rules/common/hooks.md +0 -0
  107. /package/{.claude → .tas}/rules/common/patterns.md +0 -0
  108. /package/{.claude → .tas}/rules/common/security.md +0 -0
  109. /package/{.claude → .tas}/rules/csharp/hooks.md +0 -0
  110. /package/{.claude → .tas}/rules/csharp/patterns.md +0 -0
  111. /package/{.claude → .tas}/rules/csharp/testing.md +0 -0
  112. /package/{.claude → .tas}/rules/python/hooks.md +0 -0
  113. /package/{.claude → .tas}/rules/python/patterns.md +0 -0
  114. /package/{.claude → .tas}/rules/python/security.md +0 -0
  115. /package/{.claude → .tas}/rules/python/testing.md +0 -0
  116. /package/{.claude → .tas}/rules/typescript/hooks.md +0 -0
  117. /package/{.claude → .tas}/rules/web/design-quality.md +0 -0
  118. /package/{.claude → .tas}/rules/web/hooks.md +0 -0
  119. /package/{.claude → .tas}/rules/web/patterns.md +0 -0
  120. /package/{.claude → .tas}/rules/web/performance.md +0 -0
  121. /package/{.claude → .tas}/rules/web/security.md +0 -0
  122. /package/{.claude → .tas}/rules/web/testing.md +0 -0
  123. /package/{CLAUDE-Example.md → .tas/templates/AGENTS.md} +0 -0
@@ -22,6 +22,15 @@ Before requesting review, ensure:
22
22
  - Merge conflicts are resolved
23
23
  - Branch is up to date with target branch
24
24
 
25
+ ## Review Criteria (priority order)
26
+
27
+ 1. **Security** — injection, auth bypass, data exposure, OWASP Top 10
28
+ 2. **Architecture** — violations of SAD, ADR decisions, layer boundaries
29
+ 3. **Correctness** — logic errors, edge cases, null handling
30
+ 4. **Conventions** — naming, structure, commit/branch format per CLAUDE.md
31
+ 5. **Test coverage** — missing tests for new logic
32
+ 6. **Performance** — obvious inefficiencies (N+1, unbounded loops, large allocations)
33
+
25
34
  ## Review Checklist
26
35
 
27
36
  Before marking code complete:
@@ -36,6 +45,23 @@ Before marking code complete:
36
45
  - [ ] Tests exist for new functionality
37
46
  - [ ] Test coverage meets 80% minimum
38
47
 
48
+ ## Output Format
49
+
50
+ Findings grouped by severity, skip empty categories:
51
+
52
+ ```
53
+ ### Critical
54
+ - `file.cs:42` — issue + suggested fix
55
+
56
+ ### High
57
+ - `file.cs:15` — issue + suggested fix
58
+
59
+ ### Medium / Low
60
+ - `file.cs:8` — issue
61
+ ```
62
+
63
+ Every finding MUST reference specific `file:line` + propose fix. No general comments.
64
+
39
65
  ## Security Review Triggers
40
66
 
41
67
  **STOP and use security-reviewer agent when:**
@@ -59,16 +85,16 @@ Before marking code complete:
59
85
 
60
86
  ## Agent Usage
61
87
 
62
- Use these agents for code review:
88
+ Use these agents for specialized concerns:
63
89
 
64
90
  | Agent | Purpose |
65
91
  |-------|---------|
66
- | **code-reviewer** | General code quality, patterns, best practices |
67
92
  | **security-reviewer** | Security vulnerabilities, OWASP Top 10 |
68
93
  | **typescript-reviewer** | TypeScript/JavaScript specific issues |
69
94
  | **python-reviewer** | Python specific issues |
70
- | **go-reviewer** | Go specific issues |
71
- | **rust-reviewer** | Rust specific issues |
95
+ | **csharp-reviewer** | C#/.NET specific issues |
96
+
97
+ General code review runs inline in main session reading this rule.
72
98
 
73
99
  ## Review Workflow
74
100
 
@@ -120,5 +146,3 @@ This rule works with:
120
146
 
121
147
  - [testing.md](testing.md) - Test coverage requirements
122
148
  - [security.md](security.md) - Security checklist
123
- - [git-workflow.md](git-workflow.md) - Commit standards
124
- - [agents.md](agents.md) - Agent delegation
@@ -1,49 +1,51 @@
1
- # Post-Implementation Review (Isolated Agent)
2
-
3
- After implementing or fixing, run review through **independent Agent** — don't use current session to avoid reviewer bias from implementation process.
4
-
5
- ## How to use
6
-
7
- Call `Agent` tool with following prompt (replace placeholders `{}`):
8
-
9
- ```
10
- You are code reviewer. No context from previous session — review completely objectively.
11
-
12
- Artifact: {path-to-artifact-file}
13
- Changed files: {list of files just changed}
14
- Stack: {stack from CLAUDE.md}
15
-
16
- Execute:
17
- 1. Hygiene scan: leftover debug code (console.log, debugger, print), hardcoded secrets,
18
- large commented-out blocks (>5 lines).
19
- 1b. Silent failure scan — find following patterns:
20
- - Swallowed exceptions: empty catch {}, catch only logs but continues like no error
21
- - Silent async failures: fire-and-forget (unawaited task/Promise), async void (.NET),
22
- .catch(() => {}) with no handling
23
- - Null blindspots: .FirstOrDefault() used directly without null-check (.NET),
24
- missing optional chaining on deeply nested object access (TS/JS),
25
- dict.get() result used as non-None (Python)
26
- - Error propagation wrong: HTTP calls don't check status before parse,
27
- function returns bool/null when error instead of throwing (caller ignores result)
28
- - Config reads don't check existence
29
- 2. Run tests: detect test runner (package.json → npm test / *.csproj → dotnet test /
30
- pytest.ini → python -m pytest), report results.
31
- 3. Parallel review launch simultaneously:
32
- - code-reviewer: read .tas/checklists/code-review.md + .claude/rules/common/code-review.md.
33
- Focus: naming, architecture, error handling, DRY, function size, nesting depth.
34
- - security-reviewer: read .claude/rules/common/security.md.
35
- Focus: OWASP Top 10, injection, hardcoded secrets, auth/authz.
36
- - {lang_agent}: read .claude/rules/[stack]/coding-style.md + .claude/rules/[stack]/patterns.md.
37
- Focus: async/await, null handling, type safety, stack-specific anti-patterns.
38
- 4. Synthesize findings: Critical / High / Medium / Low with file:line and specific fix.
39
-
40
- Return full Review Summary.
41
- ```
42
-
43
- ## Gate Rule
44
-
45
- | Result | Action |
46
- |---|---|
47
- | Has **Critical** or **High** | List findings, **STOP**, require fix before continuing |
48
- | Only **Medium** / **Low** | List suggestions, ask if user wants to fix, then continue |
49
- | No findings | Continue normally |
1
+ # Post-Implementation Review (Isolated Agent)
2
+
3
+ After implementing or fixing, run review through **independent Agent** — don't use current session to avoid reviewer bias from implementation process.
4
+
5
+ ## How to use
6
+
7
+ Call `Agent` tool with following prompt (replace placeholders `{}`):
8
+
9
+ ```
10
+ You are code reviewer. No context from previous session — review completely objectively.
11
+
12
+ Artifact: {path-to-artifact-file}
13
+ Changed files: {list of files just changed}
14
+ Stack: {stack from CLAUDE.md}
15
+
16
+ Execute:
17
+ 1. Hygiene scan: leftover debug code (console.log, debugger, print), hardcoded secrets,
18
+ large commented-out blocks (>5 lines).
19
+ 1b. Silent failure scan — find following patterns:
20
+ - Swallowed exceptions: empty catch {}, catch only logs but continues like no error
21
+ - Silent async failures: fire-and-forget (unawaited task/Promise), async void (.NET),
22
+ .catch(() => {}) with no handling
23
+ - Null blindspots: .FirstOrDefault() used directly without null-check (.NET),
24
+ missing optional chaining on deeply nested object access (TS/JS),
25
+ dict.get() result used as non-None (Python)
26
+ - Error propagation wrong: HTTP calls don't check status before parse,
27
+ function returns bool/null when error instead of throwing (caller ignores result)
28
+ - Config reads don't check existence
29
+ 2. Run tests: detect test runner (package.json → npm test / *.csproj → dotnet test /
30
+ pytest.ini → python -m pytest), report results.
31
+ 3. Inline general review (this agent, read .tas/rules/common/code-review.md):
32
+ Focus: naming, architecture, error handling, DRY, function size, nesting depth.
33
+ 3b. Parallel specialized agents launch simultaneously:
34
+ - security-reviewer: read .tas/rules/common/security.md.
35
+ Focus: OWASP Top 10, injection, hardcoded secrets, auth/authz.
36
+ - {lang_agent}: read .tas/rules/[stack]/coding-style.md + .tas/rules/[stack]/patterns.md.
37
+ Focus: async/await, null handling, type safety, stack-specific anti-patterns.
38
+ - database-reviewer (only when {db_agent} = database-reviewer AND scope touches schema/migrations/queries):
39
+ Focus: schema correctness, migration safety, missing indexes, N+1 patterns, data integrity.
40
+ 4. Synthesize findings: Critical / High / Medium / Low with file:line and specific fix.
41
+
42
+ Return full Review Summary.
43
+ ```
44
+
45
+ ## Gate Rule
46
+
47
+ | Result | Action |
48
+ |---|---|
49
+ | Has **Critical** or **High** or **Medium** | List findings, **STOP**, require fix before continuing |
50
+ | Only **Low** | List suggestions, ask if user wants to fix, then continue |
51
+ | No findings | Continue normally |
@@ -1,80 +1,80 @@
1
- # project-status.yaml — Update Convention
2
-
3
- File `project-status.yaml` at project root is aggregate index of project status.
4
- Commands update this file after each artifact or status change.
5
-
6
- ## Always update
7
-
8
- ```yaml
9
- last_updated: YYYY-MM-DD # current date, each time there's a change
10
- ```
11
-
12
- ## Artifacts (individual docs)
13
-
14
- Update when creating new or changing version:
15
-
16
- ```yaml
17
- artifacts:
18
- prd:
19
- file: docs/prd.md
20
- status: Draft | Review | Approved
21
- last_updated: YYYY-MM-DD
22
- version: "1.0" # increment minor when updating content, major for large changes
23
- requirements_count: N # only for PRD — count of FR-xxx
24
-
25
- sad:
26
- file: docs/sad.md
27
- status: Draft | Review | Approved
28
- last_updated: YYYY-MM-DD
29
- version: "1.0"
30
-
31
- design_spec:
32
- file: docs/design-spec.md
33
- status: Draft | Review | Approved
34
- last_updated: YYYY-MM-DD
35
- version: "1.0"
36
-
37
- security_report:
38
- file: docs/security-report.md
39
- status: "Critical findings present" | "Clean"
40
- last_updated: YYYY-MM-DD
41
- ```
42
-
43
- ## Epics / Features / Stories
44
-
45
- Update when creating new or changing status:
46
-
47
- ```yaml
48
- epics:
49
- Epic-001:
50
- path: docs/epics/{code}-Epic-001-{slug}/
51
- status: Draft | Active | Done
52
- title: "..."
53
- effort: S | M | L | XL
54
- features:
55
- Feature-001:
56
- status: New | In Progress | Ready To Verify | Verified | Done
57
- title: "..."
58
- stories:
59
- Story-001:
60
- status: New | Committed | In Progress | Deploy Test | Verify Test | Done
61
- title: "..."
62
- plan_status: pending | completed
63
- ```
64
-
65
- ## ADRs
66
-
67
- ```yaml
68
- adrs:
69
- ADR-001:
70
- file: docs/adr/ADR-001-{slug}.md
71
- status: Proposed | Accepted | Deprecated | Superseded
72
- title: "..."
73
- ```
74
-
75
- ## Rules
76
-
77
- - Only update key related to change just occurred — don't rewrite entire file
78
- - If key doesn't exist yet: add new
79
- - If key exists: update value
80
- - Version: minor (+0.1) when updating content; major (+1.0) when large structure change
1
+ # project-status.yaml — Update Convention
2
+
3
+ File `project-status.yaml` at project root is aggregate index of project status.
4
+ Commands update this file after each artifact or status change.
5
+
6
+ ## Always update
7
+
8
+ ```yaml
9
+ last_updated: YYYY-MM-DD # current date, each time there's a change
10
+ ```
11
+
12
+ ## Artifacts (individual docs)
13
+
14
+ Update when creating new or changing version:
15
+
16
+ ```yaml
17
+ artifacts:
18
+ prd:
19
+ file: docs/prd.md
20
+ status: Draft | Review | Approved
21
+ last_updated: YYYY-MM-DD
22
+ version: "1.0" # increment minor when updating content, major for large changes
23
+ requirements_count: N # only for PRD — count of FR-xxx
24
+
25
+ sad:
26
+ file: docs/sad.md
27
+ status: Draft | Review | Approved
28
+ last_updated: YYYY-MM-DD
29
+ version: "1.0"
30
+
31
+ design_spec:
32
+ file: docs/design-spec.md
33
+ status: Draft | Review | Approved
34
+ last_updated: YYYY-MM-DD
35
+ version: "1.0"
36
+
37
+ security_report:
38
+ file: docs/security-report.md
39
+ status: "Critical findings present" | "Clean"
40
+ last_updated: YYYY-MM-DD
41
+ ```
42
+
43
+ ## Epics / Features / Stories
44
+
45
+ Update when creating new or changing status:
46
+
47
+ ```yaml
48
+ epics:
49
+ Epic-001:
50
+ path: docs/epics/{code}-Epic-001-{slug}/
51
+ status: Draft | Active | Done
52
+ title: "..."
53
+ effort: S | M | L | XL
54
+ features:
55
+ Feature-001:
56
+ status: New | In Progress | Ready To Verify | Verified | Done
57
+ title: "..."
58
+ stories:
59
+ Story-001:
60
+ status: New | Committed | In Progress | Deploy Test | Verify Test | Done
61
+ title: "..."
62
+ plan_status: pending | completed
63
+ ```
64
+
65
+ ## ADRs
66
+
67
+ ```yaml
68
+ adrs:
69
+ ADR-001:
70
+ file: docs/adr/ADR-001-{slug}.md
71
+ status: Proposed | Accepted | Deprecated | Superseded
72
+ title: "..."
73
+ ```
74
+
75
+ ## Rules
76
+
77
+ - Only update key related to change just occurred — don't rewrite entire file
78
+ - If key doesn't exist yet: add new
79
+ - If key exists: update value
80
+ - Version: minor (+0.1) when updating content; major (+1.0) when large structure change
@@ -1,29 +1,29 @@
1
- # Stack Detection
2
-
3
- Read `CLAUDE.md` at root, find `## Tech Stack` section, determine following variables for use in agent prompts and rule file lookups.
4
-
5
- ## lang_agent — Backend
6
-
7
- | Tech Stack contains | lang_agent |
8
- |---|---|
9
- | `.NET` / `C#` | `csharp-reviewer` |
10
- | `Node.js` / `TypeScript` / `NestJS` / `Express` | `typescript-reviewer` |
11
- | `Python` / `FastAPI` / `Django` / `Flask` | `python-reviewer` |
12
-
13
- **Frontend addition:** if Tech Stack contains `React` → add `typescript-reviewer` to lang_agent (if not already).
14
-
15
- ## infra_agent and db_agent — Optional
16
-
17
- | Tech Stack contains | Variable | Value |
18
- |---|---|---|
19
- | `AWS` (Infrastructure) | `infra_agent` | `aws-reviewer` |
20
- | `MySQL` / `PostgreSQL` / `MSSQL` / `SQL Server` / `SQLite` | `db_agent` | `database-reviewer` |
21
-
22
- ## Rules directory by stack
23
-
24
- | lang_agent | Rules directory |
25
- |---|---|
26
- | `csharp-reviewer` | `.claude/rules/csharp/` |
27
- | `typescript-reviewer` | `.claude/rules/typescript/` |
28
- | `python-reviewer` | `.claude/rules/python/` |
29
- | Frontend / React | `.claude/rules/web/` |
1
+ # Stack Detection
2
+
3
+ Read `CLAUDE.md` at root, find `## Tech Stack` section, determine following variables for use in agent prompts and rule file lookups.
4
+
5
+ ## lang_agent — Backend
6
+
7
+ | Tech Stack contains | lang_agent |
8
+ |---|---|
9
+ | `.NET` / `C#` | `csharp-reviewer` |
10
+ | `Node.js` / `TypeScript` / `NestJS` / `Express` | `typescript-reviewer` |
11
+ | `Python` / `FastAPI` / `Django` / `Flask` | `python-reviewer` |
12
+
13
+ **Frontend addition:** if Tech Stack contains `React` → add `typescript-reviewer` to lang_agent (if not already).
14
+
15
+ ## infra_agent and db_agent — Optional
16
+
17
+ | Tech Stack contains | Variable | Value |
18
+ |---|---|---|
19
+ | `AWS` (Infrastructure) | `infra_agent` | `aws-reviewer` |
20
+ | `MySQL` / `PostgreSQL` / `MSSQL` / `SQL Server` / `SQLite` | `db_agent` | `database-reviewer` |
21
+
22
+ ## Rules directory by stack
23
+
24
+ | lang_agent | Rules directory |
25
+ |---|---|
26
+ | `csharp-reviewer` | `.tas/rules/csharp/` |
27
+ | `typescript-reviewer` | `.tas/rules/typescript/` |
28
+ | `python-reviewer` | `.tas/rules/python/` |
29
+ | Frontend / React | `.tas/rules/web/` |
@@ -1,23 +1,30 @@
1
- # Definition of Done Checklist
1
+ # Definition of Done
2
+
3
+ Workflow gate used by `/tas-dev` Step 5 — verify each item before marking Story complete.
2
4
 
3
5
  ## Code
6
+
4
7
  - [ ] Code implemented per acceptance criteria
5
8
  - [ ] Follows conventions in CLAUDE.md
6
- - [ ] Each public method has XML doc comment
9
+ - [ ] Each public method has doc comment (XML doc / JSDoc / docstring)
7
10
 
8
11
  ## Testing
12
+
9
13
  - [ ] Unit tests pass (happy path + edge cases + negative cases)
10
14
  - [ ] No regression on existing tests
11
15
 
12
16
  ## Review
13
- - [ ] Code review passed (per code-review checklist)
14
- - [ ] If auto_review = true, passed automated review
17
+
18
+ - [ ] Code review passed (per `.tas/rules/common/code-review.md`)
19
+ - [ ] If `auto_review = true`, passed automated review
15
20
 
16
21
  ## Documentation
22
+
17
23
  - [ ] Technical notes in Story updated
18
24
  - [ ] If API changes, corresponding docs updated
19
25
 
20
26
  ## Status
27
+
21
28
  - [ ] Story status updated in Story file
22
- - [ ] project-status.yaml updated
29
+ - [ ] `project-status.yaml` updated
23
30
  - [ ] Commit message follows correct format
@@ -1,18 +1,9 @@
1
- ---
2
- name: tas-tdd
3
- description: |
4
- TDD workflow. Auto-invoke when: user implements new feature, writes tests,
5
- or when use_tdd=true in tas.yaml. Enforce Red-Green-Refactor cycle
6
- with verification gates between each phase.
7
- allowed-tools: Read, Write, Edit, Bash, Grep
8
- ---
9
-
10
- # TAS TDD Workflow
1
+ # TDD Workflow Rules
11
2
 
12
3
  When `use_tdd=true` in `tas.yaml`, enforce strict Red-Green-Refactor cycle.
13
4
  No exceptions — every feature starts with test.
14
5
 
15
- ## When to Use
6
+ ## When to Apply
16
7
 
17
8
  - Implement new feature per Story with clear acceptance criteria
18
9
  - Bug fix: write regression test before fixing
@@ -37,30 +28,7 @@ No exceptions — every feature starts with test.
37
28
  ### Red Phase — Write Test First
38
29
 
39
30
  1. Read acceptance criteria in Story
40
- 2. Write test cases covering each criteria per platform:
41
-
42
- **Mobile (React Native)**:
43
- - **Unit Tests (REQUIRED)**: Jest + React Testing Library
44
- - Components: `render`, `fireEvent`, `screen` queries
45
- - Hooks: `renderHook` from `@testing-library/react-hooks`
46
- - Services/API: Jest mocks + MSW
47
- - Utils: Pure function testing
48
- - Zustand stores: Test actions + selectors
49
- - **E2E Tests**: Detox
50
-
51
- **Web (React + Node)**:
52
- - **Unit Tests (REQUIRED)**: Vitest/Jest + React Testing Library
53
- - Components: `render`, `fireEvent`, `screen` queries
54
- - Hooks: `renderHook`
55
- - Services: Vitest/Jest mocks + MSW
56
- - Backend services: Jest
57
- - **E2E Tests**: Playwright (Chromium, Firefox, WebKit)
58
-
59
- **Backend (.NET)**:
60
- - **Unit Tests**: xUnit for services, repositories
61
- - **Integration Tests**: xUnit + TestServer
62
- - **API Tests**: xUnit + WebApplicationFactory
63
-
31
+ 2. Write test cases covering each criteria (platform-specific stacks per `/tas-dev`)
64
32
  3. Run tests: `npm test` / `yarn test` / `dotnet test` / `python -m pytest`
65
33
  4. **Verify**: tests MUST FAIL — if pass immediately → test is wrong, rewrite
66
34
 
@@ -87,7 +55,7 @@ No exceptions — every feature starts with test.
87
55
  - Refactor phase makes tests fail → refactor is wrong, roll back step by step
88
56
  - Writing multiple tests at once before fixing each → only fix one test at a time
89
57
 
90
- ## Verification
58
+ ## Verification Checklist
91
59
 
92
60
  - [ ] Red: test file exists and runs with FAIL output
93
61
  - [ ] Green: test output changes from FAIL → PASS after adding implementation
@@ -111,8 +79,6 @@ No exceptions — every feature starts with test.
111
79
 
112
80
  MODIFIER: `H` (Happy), `N` (Negative), `E` (Edge), `S` (Security), `P` (Performance)
113
81
 
114
- ---
115
-
116
82
  ## Anti-Rationalization
117
83
 
118
84
  | Rationalization | Counter |
@@ -19,14 +19,9 @@ MANDATORY workflow:
19
19
 
20
20
  ## Troubleshooting Test Failures
21
21
 
22
- 1. Use **tdd-guide** agent
23
- 2. Check test isolation
24
- 3. Verify mocks are correct
25
- 4. Fix implementation, not tests (unless tests are wrong)
26
-
27
- ## Agent Support
28
-
29
- - **tdd-guide** - Use PROACTIVELY for new features, enforces write-tests-first
22
+ 1. Check test isolation
23
+ 2. Verify mocks are correct
24
+ 3. Fix implementation, not tests (unless tests are wrong)
30
25
 
31
26
  ## PR Test Gap Analysis
32
27
 
@@ -1,27 +1,36 @@
1
- # Token Usage Logging
2
-
3
- Write `## AI Usage Log` at end of artifact file when TAS command completes.
4
-
5
- ## Token Estimation
6
-
7
- Estimate from session awareness: character count of each file `Read` ÷ 4 ≈ tokens (English/code), ÷ 2 (Vietnamese).
8
- Character count of artifact output ÷ 4. Always append `(est.)`. User verifies with `/cost` (CLI) or `/context` (Desktop app).
9
-
10
- ## Format
11
-
12
- ```markdown
13
- ---
14
-
15
- ## AI Usage Log
16
-
17
- | # | Date | Command | Input (est.) | Output (est.) |
18
- |---|------|---------|-------------|---------------|
19
- | 1 | YYYY-MM-DD | /tas-{name} | ~{N}k | ~{N}k |
20
- | 2 | YYYY-MM-DD | /tas-{name} (revision) | ~{N}k | ~{N}k |
21
- | **Total** | | | **~{N}k** | **~{N}k** |
22
- ```
23
-
24
- ## Update Rules
25
-
26
- - **First time**: section doesn't exist append entire section with first row and Total row
27
- - **Subsequent**: append new row before Total row, update Total (cumulative)
1
+ # Token Usage Logging
2
+
3
+ Write `## AI Usage Log` at end of artifact file when TAS command completes.
4
+
5
+ ## Process
6
+
7
+ 1. Identify artifact file: from invocation (if specified) or last `docs/` file Write/Edit in session.
8
+ 2. Read this file for format and update rules.
9
+ 3. Read artifact file — check if `## AI Usage Log` already exists.
10
+ 4. Write or update section. Silent on success — no output to conversation.
11
+
12
+ DO NOT apply when: user manually edits file or uses non-TAS commands.
13
+
14
+ ## Token Estimation
15
+
16
+ Estimate from session awareness: character count of each file `Read` ÷ 4 ≈ tokens (English/code), ÷ 2 (Vietnamese).
17
+ Character count of artifact output ÷ 4. Always append `(est.)`. User verifies with `/cost` (CLI) or `/context` (Desktop app).
18
+
19
+ ## Format
20
+
21
+ ```markdown
22
+ ---
23
+
24
+ ## AI Usage Log
25
+
26
+ | # | Date | Command | Input (est.) | Output (est.) |
27
+ |---|------|---------|-------------|---------------|
28
+ | 1 | YYYY-MM-DD | /tas-{name} | ~{N}k | ~{N}k |
29
+ | 2 | YYYY-MM-DD | /tas-{name} (revision) | ~{N}k | ~{N}k |
30
+ | **Total** | | | **~{N}k** | **~{N}k** |
31
+ ```
32
+
33
+ ## Update Rules
34
+
35
+ - **First time**: section doesn't exist → append entire section with first row and Total row
36
+ - **Subsequent**: append new row before Total row, update Total (cumulative)