@torus-engineering/tas-kit 1.9.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/ado-create.md +17 -17
- package/.claude/commands/ado-delete.md +11 -11
- package/.claude/commands/ado-get.md +12 -12
- package/.claude/commands/ado-status.md +12 -12
- package/.claude/commands/ado-update.md +15 -15
- package/.claude/commands/tas-adr.md +33 -33
- package/.claude/commands/tas-apitest-plan.md +173 -173
- package/.claude/commands/tas-apitest.md +143 -143
- package/.claude/commands/tas-brainstorm.md +14 -14
- package/.claude/commands/tas-bug.md +113 -113
- package/.claude/commands/tas-design.md +37 -37
- package/.claude/commands/tas-dev.md +128 -128
- package/.claude/commands/tas-e2e-mobile.md +155 -155
- package/.claude/commands/tas-e2e-web.md +163 -163
- package/.claude/commands/tas-e2e.md +102 -102
- package/.claude/commands/tas-epic.md +35 -35
- package/.claude/commands/tas-feature.md +47 -47
- package/.claude/commands/tas-fix.md +51 -51
- package/.claude/commands/tas-functest-mobile.md +144 -144
- package/.claude/commands/tas-functest-web.md +192 -192
- package/.claude/commands/tas-functest.md +76 -76
- package/.claude/commands/tas-init.md +14 -14
- package/.claude/commands/tas-plan.md +198 -200
- package/.claude/commands/tas-prd.md +37 -37
- package/.claude/commands/tas-review.md +111 -111
- package/.claude/commands/tas-sad.md +43 -43
- package/.claude/commands/tas-security.md +87 -81
- package/.claude/commands/tas-spec.md +20 -20
- package/.claude/commands/tas-status.md +13 -13
- package/.claude/commands/tas-story.md +91 -91
- package/.claude/commands/tas-verify.md +51 -51
- package/.claude/rules/common/post-review-agent.md +49 -49
- package/.claude/rules/common/project-status.md +14 -14
- package/.claude/rules/common/stack-detection.md +6 -6
- package/.claude/rules/common/token-logging.md +27 -27
- package/.claude/rules/csharp/api-testing.md +171 -171
- package/.claude/skills/ado-integration/SKILL.md +36 -36
- package/.claude/skills/tas-conventions/SKILL.md +32 -32
- package/.claude/skills/tas-implementation-complete/SKILL.md +100 -99
- package/.claude/skills/tas-tdd/SKILL.md +123 -123
- package/.claude/skills/token-logger/SKILL.md +19 -19
- package/.tas/README.md +266 -1520
- package/.tas/checklists/code-review.md +13 -13
- package/.tas/checklists/security.md +3 -3
- package/.tas/checklists/story-done.md +11 -11
- package/.tas/hooks/README.md +138 -0
- package/.tas/hooks/pre-commit +26 -0
- package/.tas/hooks/security-scan.js +599 -0
- package/.tas/project-status-example.yaml +3 -3
- package/.tas/tas-example.yaml +25 -8
- package/.tas/templates/ADR.md +16 -16
- package/.tas/templates/API-Test-Spec.md +3 -3
- package/.tas/templates/Bug.md +12 -12
- package/.tas/templates/Design-Spec.md +8 -8
- package/.tas/templates/E2E-Execution-Report.md +1 -1
- package/.tas/templates/Epic.md +1 -1
- package/.tas/templates/Feature.md +10 -10
- package/.tas/templates/Func-Test-Spec.md +3 -3
- package/.tas/templates/SAD.md +106 -106
- package/.tas/templates/Security-Report.md +3 -3
- package/.tas/templates/Story.md +9 -9
- package/.tas/tools/tas-ado-readme.md +169 -169
- package/.tas/tools/tas-ado.py +1 -1
- package/CLAUDE-Example.md +37 -58
- package/README.md +294 -42
- package/bin/cli.js +24 -7
- package/lib/install.js +161 -47
- package/package.json +1 -1
|
@@ -1,99 +1,100 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tas-implementation-complete
|
|
3
|
-
description: |
|
|
4
|
-
Auto-invoke
|
|
5
|
-
"đã xong", "đã implement xong", "implementation complete", "code xong rồi",
|
|
6
|
-
"viết xong rồi", "đã code xong"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- User
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| **Always** |
|
|
27
|
-
| **Always** |
|
|
28
|
-
| **
|
|
29
|
-
| **Ask** |
|
|
30
|
-
| **
|
|
31
|
-
| **Never** |
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- Backend
|
|
44
|
-
- Backend
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
>
|
|
54
|
-
>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
>
|
|
59
|
-
>
|
|
60
|
-
>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
>
|
|
65
|
-
>
|
|
66
|
-
>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
→
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
→
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- [ ]
|
|
90
|
-
- [ ]
|
|
91
|
-
- [ ]
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
| "
|
|
99
|
-
| "
|
|
1
|
+
---
|
|
2
|
+
name: tas-implementation-complete
|
|
3
|
+
description: |
|
|
4
|
+
Auto-invoke when user signals implementation complete: "done", "xong", "finished",
|
|
5
|
+
"đã xong", "đã implement xong", "implementation complete", "code xong rồi",
|
|
6
|
+
"viết xong rồi", "đã code xong", "completed", "code done", "finished coding".
|
|
7
|
+
Trigger parallel post-implementation review gate.
|
|
8
|
+
allowed-tools: Read, Bash, Grep, Glob, Agent
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# TAS Implementation Complete
|
|
12
|
+
|
|
13
|
+
When user signals implementation complete, automatically trigger post-implementation review gate.
|
|
14
|
+
Don't wait for user to manually run `/tas-review-code`.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- User just finished implementing a Story or feature
|
|
19
|
+
- User says "xong", "done", "finished" after writing code
|
|
20
|
+
- DO NOT invoke when: user is asking about status, asking about plan, or no code changes yet
|
|
21
|
+
|
|
22
|
+
## Always / Ask / Never
|
|
23
|
+
|
|
24
|
+
| | Action |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Always** | Confirm scope with user before launching agents |
|
|
27
|
+
| **Always** | Launch code-reviewer + security-reviewer simultaneously |
|
|
28
|
+
| **Always** | Report gate result clearly: pass or block with reason |
|
|
29
|
+
| **Ask** | When unsure about review scope (file path? git diff? Story?) |
|
|
30
|
+
| **Ask** | When >5 files changed — confirm user wants full review |
|
|
31
|
+
| **Never** | Auto-commit after review passes |
|
|
32
|
+
| **Never** | Skip review and report "looks good" without running agents |
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
### Step 1 — Determine scope
|
|
37
|
+
Ask user or infer from context:
|
|
38
|
+
- Story ID available? → get file list from Story
|
|
39
|
+
- Not available? → use `git diff HEAD --name-only` to get recently changed files
|
|
40
|
+
|
|
41
|
+
### Step 2 — Stack Detection
|
|
42
|
+
Read `CLAUDE.md` at root, find `## Tech Stack` section:
|
|
43
|
+
- Backend contains `.NET` / `C#` → `lang_agent = csharp-reviewer`
|
|
44
|
+
- Backend contains `Node.js` / `TypeScript` → `lang_agent = typescript-reviewer`
|
|
45
|
+
- Backend contains `Python` / `FastAPI` / `Django` → `lang_agent = python-reviewer`
|
|
46
|
+
- Frontend contains `React` → add `typescript-reviewer`
|
|
47
|
+
|
|
48
|
+
### Step 3 — Launch Parallel Review Gate
|
|
49
|
+
|
|
50
|
+
Launch agents SIMULTANEOUSLY:
|
|
51
|
+
|
|
52
|
+
**Agent 1 — `code-reviewer`** (always run):
|
|
53
|
+
> Review [scope]. Read `.tas/checklists/code-review.md`.
|
|
54
|
+
> Focus: acceptance criteria compliance, naming, error handling, test coverage, DRY.
|
|
55
|
+
> Format: Critical / High / Medium / Low with file:line and specific fix.
|
|
56
|
+
|
|
57
|
+
**Agent 2 — `security-reviewer`** (always run):
|
|
58
|
+
> Security audit [scope]. Read `.claude/rules/common/security.md`.
|
|
59
|
+
> If stack identified, also read `.claude/rules/[stack]/security.md`.
|
|
60
|
+
> Focus: user input handling, SQL injection, hardcoded secrets, auth checks.
|
|
61
|
+
> Format: Critical / High / Medium / Low with file:line and remediation.
|
|
62
|
+
|
|
63
|
+
**Agent 3 — Language reviewer** (per stack detection):
|
|
64
|
+
> Language-specific review [scope].
|
|
65
|
+
> Read `.claude/rules/[stack]/coding-style.md`, `.claude/rules/[stack]/patterns.md`, `.claude/rules/[stack]/testing.md`.
|
|
66
|
+
> If stack has React: also read `.claude/rules/web/design-quality.md`, `.claude/rules/web/testing.md`, `.claude/rules/web/performance.md`.
|
|
67
|
+
> Format: Critical / High / Medium / Low with file:line.
|
|
68
|
+
|
|
69
|
+
Wait for ALL agents to complete.
|
|
70
|
+
|
|
71
|
+
### Step 4 — Gate Decision
|
|
72
|
+
|
|
73
|
+
**Has Critical/High findings:**
|
|
74
|
+
→ List each finding clearly, STOP, require fix before continuing.
|
|
75
|
+
→ Don't tick Definition of Done.
|
|
76
|
+
|
|
77
|
+
**Only Medium/Low:**
|
|
78
|
+
→ List suggestions, ask if user wants to fix.
|
|
79
|
+
→ After user confirms: remind to run `/tas-review-code` for full review (hygiene scan + test run).
|
|
80
|
+
|
|
81
|
+
## Red Flags
|
|
82
|
+
|
|
83
|
+
- User says "xong" but no files changed in git diff → ask again
|
|
84
|
+
- Review gate skipped because "code is simple" → no exceptions, always run gate
|
|
85
|
+
- Agent returns "No issues found" on large codebase → verify agent read correct files
|
|
86
|
+
|
|
87
|
+
## Verification
|
|
88
|
+
|
|
89
|
+
- [ ] `git diff HEAD --name-only` has at least 1 changed file
|
|
90
|
+
- [ ] All agents ran and returned results (no timeout)
|
|
91
|
+
- [ ] Gate decision made clearly: pass or block
|
|
92
|
+
- [ ] If pass: user knows next step is `/tas-review-code`
|
|
93
|
+
|
|
94
|
+
## Anti-Rationalization
|
|
95
|
+
|
|
96
|
+
| Rationalization | Counter |
|
|
97
|
+
|---|---|
|
|
98
|
+
| "Code is simple, no need to review" | Review gate always runs — this is safety net, not quality judgment |
|
|
99
|
+
| "Security reviewer will slow down workflow" | Parallel execution — 3 agents run simultaneously, no added time |
|
|
100
|
+
| "User didn't ask about review" | Skill auto-invokes when user says "done" — this is expected behavior |
|
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tas-tdd
|
|
3
|
-
description: |
|
|
4
|
-
TDD workflow. Auto-invoke
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
allowed-tools: Read, Write, Edit, Bash, Grep
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# TAS TDD Workflow
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
|
|
17
|
-
- Implement feature
|
|
18
|
-
- Bug fix:
|
|
19
|
-
- Refactor:
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
## Always / Ask / Never
|
|
23
|
-
|
|
24
|
-
| |
|
|
25
|
-
|---|---|
|
|
26
|
-
| **Always** |
|
|
27
|
-
| **Always** | Commit
|
|
28
|
-
| **Always** |
|
|
29
|
-
| **Ask** |
|
|
30
|
-
| **Ask** |
|
|
31
|
-
| **Never** |
|
|
32
|
-
| **Never** |
|
|
33
|
-
| **Never** |
|
|
34
|
-
|
|
35
|
-
## Process
|
|
36
|
-
|
|
37
|
-
### Red Phase —
|
|
38
|
-
|
|
39
|
-
1.
|
|
40
|
-
2.
|
|
41
|
-
|
|
42
|
-
**Mobile (React Native)**:
|
|
43
|
-
- **Unit Tests (REQUIRED)**: Jest + React Testing Library
|
|
44
|
-
- Components: `render`, `fireEvent`, `screen` queries
|
|
45
|
-
- Hooks: `renderHook`
|
|
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
|
|
61
|
-
- **Integration Tests**: xUnit + TestServer
|
|
62
|
-
- **API Tests**: xUnit + WebApplicationFactory
|
|
63
|
-
|
|
64
|
-
3.
|
|
65
|
-
4. **Verify**: tests
|
|
66
|
-
|
|
67
|
-
### Green Phase — Code
|
|
68
|
-
|
|
69
|
-
1.
|
|
70
|
-
2.
|
|
71
|
-
3.
|
|
72
|
-
4. **Verify**:
|
|
73
|
-
|
|
74
|
-
### Refactor Phase — Clean Up
|
|
75
|
-
|
|
76
|
-
1.
|
|
77
|
-
2.
|
|
78
|
-
3.
|
|
79
|
-
4. **Verify**: coverage >= 80%,
|
|
80
|
-
5. Commit
|
|
81
|
-
|
|
82
|
-
## Red Flags
|
|
83
|
-
|
|
84
|
-
- Test
|
|
85
|
-
- Test
|
|
86
|
-
- Green phase
|
|
87
|
-
- Refactor phase
|
|
88
|
-
-
|
|
89
|
-
|
|
90
|
-
## Verification
|
|
91
|
-
|
|
92
|
-
- [ ] Red: test file
|
|
93
|
-
- [ ] Green: test output
|
|
94
|
-
- [ ] Refactor: `npm test` / `dotnet test` / `pytest`
|
|
95
|
-
- [ ] Coverage report: >= 80%
|
|
96
|
-
- [ ]
|
|
97
|
-
|
|
98
|
-
## Test Naming Convention
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
{PROJECT}_E{EPIC}_F{FEATURE}_S{STORY}_{TYPE}_{NUMBER}_{MODIFIER}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
| TYPE |
|
|
105
|
-
|------|---------|-------|
|
|
106
|
-
| UT | Unit Test | 1 |
|
|
107
|
-
| IT | Integration Test | 1 |
|
|
108
|
-
| API | API Test | 1 |
|
|
109
|
-
| FT | Functional Test | 2 |
|
|
110
|
-
| E2E | End-to-End Test | 3 |
|
|
111
|
-
|
|
112
|
-
MODIFIER: `H` (Happy), `N` (Negative), `E` (Edge), `S` (Security), `P` (Performance)
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Anti-Rationalization
|
|
117
|
-
|
|
118
|
-
| Rationalization | Counter |
|
|
119
|
-
|---|---|
|
|
120
|
-
| "Test
|
|
121
|
-
| "
|
|
122
|
-
| "
|
|
123
|
-
| "Interface
|
|
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
|
|
11
|
+
|
|
12
|
+
When `use_tdd=true` in `tas.yaml`, enforce strict Red-Green-Refactor cycle.
|
|
13
|
+
No exceptions — every feature starts with test.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- Implement new feature per Story with clear acceptance criteria
|
|
18
|
+
- Bug fix: write regression test before fixing
|
|
19
|
+
- Refactor: ensure test coverage before changing code
|
|
20
|
+
- DON'T use TDD for: config changes, documentation, pure data migration scripts
|
|
21
|
+
|
|
22
|
+
## Always / Ask / Never
|
|
23
|
+
|
|
24
|
+
| | Action |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Always** | Write test FIRST, run to confirm FAIL, then write code |
|
|
27
|
+
| **Always** | Commit after each successful Green phase |
|
|
28
|
+
| **Always** | Run full test suite after Refactor phase |
|
|
29
|
+
| **Ask** | When acceptance criteria vague — clarify before writing test |
|
|
30
|
+
| **Ask** | When test too hard to write — interface/design may need improvement |
|
|
31
|
+
| **Never** | Write implementation before test (even "just to try") |
|
|
32
|
+
| **Never** | Skip Red phase because "test will obviously fail" |
|
|
33
|
+
| **Never** | Write more than minimal code needed to pass test in Green phase |
|
|
34
|
+
|
|
35
|
+
## Process
|
|
36
|
+
|
|
37
|
+
### Red Phase — Write Test First
|
|
38
|
+
|
|
39
|
+
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
|
+
|
|
64
|
+
3. Run tests: `npm test` / `yarn test` / `dotnet test` / `python -m pytest`
|
|
65
|
+
4. **Verify**: tests MUST FAIL — if pass immediately → test is wrong, rewrite
|
|
66
|
+
|
|
67
|
+
### Green Phase — Minimal Code
|
|
68
|
+
|
|
69
|
+
1. Write minimal code to pass tests
|
|
70
|
+
2. Don't refactor, don't optimize in this phase
|
|
71
|
+
3. Run tests: confirm PASS
|
|
72
|
+
4. **Verify**: all new tests pass, no regression
|
|
73
|
+
|
|
74
|
+
### Refactor Phase — Clean Up
|
|
75
|
+
|
|
76
|
+
1. Remove duplication, improve naming, reduce complexity
|
|
77
|
+
2. DON'T change behavior — tests are safety net
|
|
78
|
+
3. Run full test suite after each refactor step
|
|
79
|
+
4. **Verify**: coverage >= 80%, all tests still pass
|
|
80
|
+
5. Commit after successful refactor
|
|
81
|
+
|
|
82
|
+
## Red Flags
|
|
83
|
+
|
|
84
|
+
- Test passes on first run before implementation → test doesn't test what it should
|
|
85
|
+
- Test too broad ("everything works") → no value, write more specific test
|
|
86
|
+
- Green phase has too much logic → only write enough to pass, no more
|
|
87
|
+
- Refactor phase makes tests fail → refactor is wrong, roll back step by step
|
|
88
|
+
- Writing multiple tests at once before fixing each → only fix one test at a time
|
|
89
|
+
|
|
90
|
+
## Verification
|
|
91
|
+
|
|
92
|
+
- [ ] Red: test file exists and runs with FAIL output
|
|
93
|
+
- [ ] Green: test output changes from FAIL → PASS after adding implementation
|
|
94
|
+
- [ ] Refactor: `npm test` / `dotnet test` / `pytest` full suite PASS
|
|
95
|
+
- [ ] Coverage report: >= 80% for changed files
|
|
96
|
+
- [ ] No tests skipped or commented out
|
|
97
|
+
|
|
98
|
+
## Test Naming Convention
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
{PROJECT}_E{EPIC}_F{FEATURE}_S{STORY}_{TYPE}_{NUMBER}_{MODIFIER}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
| TYPE | Meaning | Layer |
|
|
105
|
+
|------|---------|-------|
|
|
106
|
+
| UT | Unit Test | 1 |
|
|
107
|
+
| IT | Integration Test | 1 |
|
|
108
|
+
| API | API Test | 1 |
|
|
109
|
+
| FT | Functional Test | 2 |
|
|
110
|
+
| E2E | End-to-End Test | 3 |
|
|
111
|
+
|
|
112
|
+
MODIFIER: `H` (Happy), `N` (Negative), `E` (Edge), `S` (Security), `P` (Performance)
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Anti-Rationalization
|
|
117
|
+
|
|
118
|
+
| Rationalization | Counter |
|
|
119
|
+
|---|---|
|
|
120
|
+
| "Test will obviously fail, no need to run" | Skipping Red phase loses verification point — always run |
|
|
121
|
+
| "Writing test after is faster" | TDD saves more debugging time than time spent writing tests first |
|
|
122
|
+
| "This code is too simple for tests" | Simple today, complex after refactor — tests protect future changes |
|
|
123
|
+
| "Interface not clear, write code first for clarity" | Test hard to write is signal interface needs improvement — Ask, don't skip |
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: token-logger
|
|
3
|
-
description: |
|
|
4
|
-
Invoke
|
|
5
|
-
Auto-invoke
|
|
6
|
-
|
|
7
|
-
allowed-tools: Read, Edit, Write
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Token Logger
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Process
|
|
15
|
-
|
|
16
|
-
1.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
1
|
+
---
|
|
2
|
+
name: token-logger
|
|
3
|
+
description: |
|
|
4
|
+
Invoke when TAS command completes to write AI Usage Log into artifact file.
|
|
5
|
+
Auto-invoke after /tas-* commands when there's Write/Edit to docs/.
|
|
6
|
+
DO NOT invoke when user manually edits file or uses non-TAS commands.
|
|
7
|
+
allowed-tools: Read, Edit, Write
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Token Logger
|
|
11
|
+
|
|
12
|
+
Write `## AI Usage Log` into artifact file after TAS command completes.
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Identify artifact file: from invocation (if specified) or last `docs/` file Write/Edit in session.
|
|
17
|
+
2. Read `.claude/rules/common/token-logging.md` for format and update rules.
|
|
18
|
+
3. Read artifact file — check if `## AI Usage Log` already exists.
|
|
19
|
+
4. Write or update section. Silent on success — no output to conversation.
|