@torus-engineering/tas-kit 1.13.0 → 2.1.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 (100) hide show
  1. package/.tas/_platform/claude-code/settings.json +58 -46
  2. package/.tas/_platform/hooks/code-quality.js +127 -127
  3. package/.tas/_platform/hooks/session-end.js +111 -111
  4. package/.tas/agents/architect.md +53 -53
  5. package/.tas/agents/aws-reviewer.md +71 -71
  6. package/.tas/agents/build-resolver.md +89 -59
  7. package/.tas/agents/code-explorer.md +63 -63
  8. package/.tas/agents/csharp-reviewer.md +62 -62
  9. package/.tas/agents/database-reviewer.md +73 -73
  10. package/.tas/agents/doc-updater.md +68 -66
  11. package/.tas/agents/python-reviewer.md +67 -67
  12. package/.tas/agents/security-reviewer.md +79 -79
  13. package/.tas/agents/software-engineer.md +53 -0
  14. package/.tas/agents/typescript-reviewer.md +65 -65
  15. package/.tas/commands/ado-create.md +33 -28
  16. package/.tas/commands/ado-delete.md +26 -22
  17. package/.tas/commands/ado-get.md +24 -20
  18. package/.tas/commands/ado-status.md +22 -18
  19. package/.tas/commands/ado-update.md +31 -27
  20. package/.tas/commands/tas-adr.md +37 -33
  21. package/.tas/commands/tas-apitest-plan.md +177 -173
  22. package/.tas/commands/tas-apitest.md +147 -143
  23. package/.tas/commands/tas-brainstorm.md +23 -19
  24. package/.tas/commands/tas-brd.md +50 -0
  25. package/.tas/commands/tas-bug.md +127 -113
  26. package/.tas/commands/tas-checklist.md +180 -0
  27. package/.tas/commands/tas-debug.md +103 -0
  28. package/.tas/commands/tas-design.md +41 -37
  29. package/.tas/commands/tas-dev.md +225 -125
  30. package/.tas/commands/tas-e2e-mobile.md +146 -155
  31. package/.tas/commands/tas-e2e-web.md +150 -163
  32. package/.tas/commands/tas-e2e.md +289 -102
  33. package/.tas/commands/tas-feature.md +181 -47
  34. package/.tas/commands/tas-fix.md +72 -51
  35. package/.tas/commands/tas-functest-mobile.md +138 -144
  36. package/.tas/commands/tas-functest-web.md +176 -192
  37. package/.tas/commands/tas-functest.md +225 -76
  38. package/.tas/commands/tas-init.md +22 -17
  39. package/.tas/commands/tas-master-plan.md +300 -0
  40. package/.tas/commands/tas-orchestrate.md +159 -0
  41. package/.tas/commands/tas-plan.md +152 -117
  42. package/.tas/commands/tas-prd.md +57 -37
  43. package/.tas/commands/tas-review-pr.md +174 -0
  44. package/.tas/commands/tas-review.md +115 -113
  45. package/.tas/commands/tas-sad.md +47 -43
  46. package/.tas/commands/tas-security.md +91 -87
  47. package/.tas/commands/tas-spec.md +54 -50
  48. package/.tas/commands/tas-status.md +25 -16
  49. package/.tas/project-status-example.yaml +3 -1
  50. package/.tas/rules/ado-integration.md +67 -65
  51. package/.tas/rules/common/api-design.md +517 -517
  52. package/.tas/rules/common/build-debug-loop.md +233 -0
  53. package/.tas/rules/common/code-review.md +4 -0
  54. package/.tas/rules/common/feature-done.md +42 -0
  55. package/.tas/rules/common/post-implementation-review.md +4 -0
  56. package/.tas/rules/common/project-status.md +33 -16
  57. package/.tas/rules/common/sad-impact.md +81 -0
  58. package/.tas/rules/common/tdd.md +104 -89
  59. package/.tas/rules/csharp/api-testing.md +2 -2
  60. package/.tas/rules/csharp/torus-core-framework.md +128 -0
  61. package/.tas/tas-example.yaml +9 -32
  62. package/.tas/templates/AGENTS.md +13 -0
  63. package/.tas/templates/API-Test-Spec.md +5 -4
  64. package/.tas/templates/BRD.md +133 -0
  65. package/.tas/templates/Bug.md +15 -0
  66. package/.tas/templates/E2E-Execution-Report.md +8 -8
  67. package/.tas/templates/E2E-Mobile-Spec.md +6 -8
  68. package/.tas/templates/E2E-Report.md +2 -2
  69. package/.tas/templates/E2E-Scenario.md +22 -22
  70. package/.tas/templates/E2E-Test-Spec.md +274 -0
  71. package/.tas/templates/E2E-Web-Spec.md +4 -4
  72. package/.tas/templates/Feature-Technical-Part.md +69 -0
  73. package/.tas/templates/Feature-Technical-Stack.md +74 -0
  74. package/.tas/templates/Feature-Technical.md +329 -0
  75. package/.tas/templates/Feature.md +50 -26
  76. package/.tas/templates/Func-Test-Script.md +29 -56
  77. package/.tas/templates/Func-Test-Spec.md +144 -142
  78. package/.tas/templates/PRD.md +173 -142
  79. package/.tas/templates/TestChecklist.md +96 -0
  80. package/.tas/templates/torus-dotnet-bootstrap.md +223 -0
  81. package/.tas/tools/tas-ado-readme.md +24 -27
  82. package/.tas/tools/tas-ado.py +328 -25
  83. package/.tas/tools/tas-github.py +339 -0
  84. package/README.md +142 -57
  85. package/bin/cli.js +90 -90
  86. package/lib/adapters/antigravity.js +131 -131
  87. package/lib/adapters/claude-code.js +71 -35
  88. package/lib/adapters/codex.js +157 -157
  89. package/lib/adapters/cursor.js +80 -80
  90. package/lib/adapters/index.js +20 -20
  91. package/lib/adapters/utils.js +81 -81
  92. package/lib/deleted-files.json +7 -0
  93. package/lib/install.js +546 -543
  94. package/package.json +2 -2
  95. package/.tas/README.md +0 -334
  96. package/.tas/commands/tas-epic.md +0 -35
  97. package/.tas/commands/tas-story.md +0 -91
  98. package/.tas/rules/common/story-done.md +0 -30
  99. package/.tas/templates/Epic.md +0 -46
  100. package/.tas/templates/Story.md +0 -90
@@ -0,0 +1,174 @@
1
+ ---
2
+ model: opus
3
+ ---
4
+
5
+ # /tas-review-pr $ARGUMENTS
6
+
7
+ Review a Pull Request automatically: detect platform (ADO or GitHub), fetch diff, run parallel review agents, post inline comments per finding, post summary comment, and vote.
8
+
9
+ ## Input
10
+
11
+ `$ARGUMENTS` can be:
12
+ - PR ID / number: `1234`
13
+ - PR URL: extract the numeric ID from the URL
14
+
15
+ ## Step 0 — Detect Platform
16
+
17
+ Run: `git remote get-url origin`
18
+
19
+ Parse the output:
20
+ - Contains `github.com` → `PLATFORM=github`, `SCRIPT=python .tas/tools/tas-github.py`
21
+ - Contains `dev.azure.com` or `visualstudio.com` → `PLATFORM=ado`, `SCRIPT=python .tas/tools/tas-ado.py`
22
+ - Neither → report "Cannot detect platform from git remote. Unsupported remote URL." and stop.
23
+
24
+ For ADO: also read `tas.yaml`, check `ado.enabled`. If false or missing: stop.
25
+
26
+ ## Step 1 — Get PR Info
27
+
28
+ Run: `{SCRIPT} pr-get <pr-id>`
29
+
30
+ Record output fields:
31
+ - `TITLE`, `SOURCE_BRANCH`, `TARGET_BRANCH`, `CREATOR`, `STATUS`
32
+ - `REPO_ID` — ADO: repository GUID | GitHub: `owner/repo`
33
+ - `HEAD_COMMIT` — GitHub only (used for inline comments)
34
+ - `WORK_ITEMS` — ADO only
35
+
36
+ ## Step 2 — Fetch Diff & Changed Files
37
+
38
+ Run: `{SCRIPT} pr-diff <pr-id>`
39
+
40
+ Record:
41
+ - `SOURCE_BRANCH`, `TARGET_BRANCH`, `FETCH_HEAD`
42
+ - `CHANGED_FILES` — list with status prefix (M/A/D + path)
43
+
44
+ ## Step 3 — Stack Detection
45
+
46
+ Read `.tas/rules/common/stack-detection.md`.
47
+ Detect stack from changed file extensions and project structure.
48
+
49
+ ## Step 4 — Review Agents (launch simultaneously)
50
+
51
+ Read each changed file with: `git show FETCH_HEAD:<file-path>`
52
+ Only review M (modified) and A (added) files — skip D (deleted).
53
+
54
+ **Inline general review** (main session, always run):
55
+ Read `.tas/rules/common/code-review.md`. Apply full review criteria to all changed files.
56
+
57
+ **Agent 1 — `security-reviewer`** (always run):
58
+ > Security audit of PR #{pr-id} diff. Changed files: {changed_files_list}.
59
+ > Read each file with `git show FETCH_HEAD:<path>`.
60
+ > Read `.tas/rules/common/security.md`. If stack identified, also read `.tas/rules/[stack]/security.md`.
61
+ > Focus: OWASP Top 10, injection, hardcoded secrets, auth/authz, data exposure.
62
+ > Format: findings by Critical / High / Medium / Low, each with file:line and remediation.
63
+
64
+ **Agent 2 — Language reviewer** (per `lang_agent` from stack detection):
65
+ > Language-specific review of PR #{pr-id} diff. Changed files: {changed_files_list}.
66
+ > Read each file with `git show FETCH_HEAD:<path>`.
67
+ > Read `.tas/rules/[stack]/coding-style.md`, `.tas/rules/[stack]/patterns.md`, `.tas/rules/[stack]/testing.md`.
68
+ > If stack has React: also read `.tas/rules/web/design-quality.md`, `.tas/rules/web/testing.md`, `.tas/rules/web/performance.md`.
69
+ > Focus: async/await patterns, null handling, type safety, stack-specific anti-patterns.
70
+ > Format: findings by Critical / High / Medium / Low with file:line.
71
+
72
+ **Agent 3 — `database-reviewer`** (only when scope touches schema/migrations/queries):
73
+ > Database review of PR #{pr-id} diff. Changed files: {changed_files_list}.
74
+ > Read each file with `git show FETCH_HEAD:<path>`.
75
+ > Focus: schema correctness, migration safety, missing indexes, N+1 patterns, unsafe queries, data integrity.
76
+ > Format: findings by Critical / High / Medium / Low with file:line.
77
+
78
+ Wait for ALL agents to complete, then synthesize.
79
+
80
+ ## Step 5 — Synthesize
81
+
82
+ Combine findings from main session + agents. Deduplicate same file:line. Sort by severity.
83
+
84
+ ```
85
+ ### Critical (must fix before merge)
86
+ - `file:line` — issue — Fix: ...
87
+
88
+ ### High (should fix before merge)
89
+ - `file:line` — issue — Fix: ...
90
+
91
+ ### Medium (consider fixing)
92
+ - `file:line` — issue — Fix: ...
93
+
94
+ ### Low / Info
95
+ - `file:line` — issue — ...
96
+ ```
97
+
98
+ ## Step 6 — Post Inline Comments
99
+
100
+ For each Critical and High finding with a specific file:line:
101
+
102
+ **ADO (`PLATFORM=ado`):**
103
+ ```
104
+ python .tas/tools/tas-ado.py pr-inline <pr-id> --repo-id <REPO_ID> --file "<file-path>" --line <line> --comment "[Severity] issue — Fix: fix"
105
+ ```
106
+
107
+ **GitHub (`PLATFORM=github`):**
108
+ ```
109
+ python .tas/tools/tas-github.py pr-inline <pr-id> --file "<file-path>" --line <line> --comment "[Severity] issue — Fix: fix"
110
+ ```
111
+
112
+ Rules:
113
+ - File path: forward slashes, no leading slash
114
+ - Skip findings without a specific line number
115
+ - Skip findings on deleted (D) files
116
+
117
+ ## Step 7 — Post Summary Comment
118
+
119
+ Format:
120
+
121
+ ```markdown
122
+ ## AI Code Review — TAS Kit
123
+
124
+ **PR:** #{pr-id} — {title}
125
+ **Date:** {today}
126
+ **Model:** claude-sonnet-4-6
127
+ **Platform:** {ADO | GitHub}
128
+
129
+ > ⚠️ Tests not run — diff-only review (no local checkout)
130
+
131
+ ### Critical
132
+ - `file:line` — issue — Fix: ...
133
+
134
+ ### High
135
+ ...
136
+
137
+ ### Medium
138
+ ...
139
+
140
+ ### Low / Info
141
+ ...
142
+
143
+ ---
144
+ **Verdict:** APPROVED ✅ | CHANGES REQUESTED ❌
145
+ ```
146
+
147
+ Post it:
148
+ ```
149
+ {SCRIPT} pr-comment <pr-id> --comment "<summary-markdown>"
150
+ ```
151
+
152
+ ## Step 8 — Vote
153
+
154
+ - Zero Critical AND zero High → `{SCRIPT} pr-vote <pr-id> --vote approve`
155
+ - Any Critical or High found → `{SCRIPT} pr-vote <pr-id> --vote reject`
156
+
157
+ ## Step 9 — Report to User
158
+
159
+ ```
160
+ PR #{pr-id} reviewed: {title}
161
+ Platform: {ADO | GitHub}
162
+ Critical: N | High: N | Medium: N | Low: N
163
+ Inline comments posted: N
164
+ Vote: APPROVED ✅ / CHANGES REQUESTED ❌
165
+ ```
166
+
167
+ ## Principles
168
+
169
+ - Review PR diff only — do not review unrelated files in repo
170
+ - Each inline comment: specific, actionable, fix included
171
+ - Summary always posted even if no issues ("No issues found — clean PR")
172
+ - Auto-approve only when zero Critical AND zero High
173
+ - Note "Tests not run — diff-only mode" in summary
174
+ - Read `.tas/rules/ado-integration.md` for ADO operating rules (ADO platform only)
@@ -1,113 +1,115 @@
1
- # /tas-review $ARGUMENTS
2
-
3
- Review recently changed code or a specific file/PR.
4
- Includes hygiene scan, test run, and parallel multi-agent review.
5
-
6
- ## Stack Detection
7
- Read `.tas/rules/common/stack-detection.md`.
8
-
9
- ## Actions
10
-
11
- ### Step 1 — Determine review scope
12
- `$ARGUMENTS` can be: file path, Story ID, or empty (review git diff).
13
- - If empty: get `git diff HEAD` (staged + unstaged) or last commit
14
- - If Story ID: find corresponding Story file to get changed files list
15
- - If file path: review that file directly
16
-
17
- ### Step 2 Pre-checks (MUST pass before continuing)
18
-
19
- **Hygiene scan** quick scan of files in scope:
20
- - Debug code leftovers: `console.log`, `print(`, `Debug.WriteLine`, `debugger`
21
- - Hardcoded secrets: password/key/token/secret assigned as string literal
22
- - Large commented-out code blocks (>5 lines) without reason comment
23
-
24
- If blockers found: list immediately, require fix before continuing.
25
-
26
- **Run tests** detect from project structure:
27
- - `package.json` → `yarn test --ci` or `npm test`
28
- - `*.csproj` / `*.sln` `dotnet test`
29
- - `pytest.ini` / `pyproject.toml` → `python -m pytest`
30
-
31
- If **FAIL**: add finding **"Unit Test Failure"** severity **Critical**, stop, DO NOT continue review.
32
- If **PASS**: note "Unit Tests: ✓ PASS" in Review Summary.
33
- If cannot detect: note "No test runner detected" and continue.
34
-
35
- ### Step 3 Review
36
-
37
- **Inline general review** (main session, always run):
38
- Read `.tas/rules/common/code-review.md`. Apply review criteria priority order, output format from rule. Story context (CLAUDE.md, SAD, ADRs) already in session — don't re-read.
39
-
40
- **Specialized agents** — launch SIMULTANEOUSLY (don't wait for each other):
41
-
42
- **Agent 1 `security-reviewer`** (always run):
43
- > Security audit [scope]. Read `.tas/rules/common/security.md`.
44
- > If stack identified, also read `.tas/rules/[stack]/security.md`.
45
- > Focus: OWASP Top 10, injection, hardcoded secrets, auth/authz, data exposure.
46
- > Format: findings grouped by Critical / High / Medium / Low, each with file:line and remediation.
47
-
48
- **Agent 2 Language reviewer** (per `lang_agent` from stack detection):
49
- > Language-specific review [scope].
50
- > Read `.tas/rules/[stack]/coding-style.md`, `.tas/rules/[stack]/patterns.md`, `.tas/rules/[stack]/testing.md`.
51
- > If stack has React: also read `.tas/rules/web/design-quality.md`, `.tas/rules/web/testing.md`, `.tas/rules/web/performance.md`.
52
- > Focus: async/await patterns, null handling, type safety, stack-specific anti-patterns.
53
- > Format: findings by Critical / High / Medium / Low with file:line.
54
-
55
- **Agent 3 `database-reviewer`** (only when `db_agent = database-reviewer`, and scope touches schema/migrations/queries):
56
- > Database review [scope]. Focus: schema correctness, migration safety, missing indexes, N+1 patterns, unsafe queries, data integrity.
57
- > Format: findings by Critical / High / Medium / Low with file:line.
58
-
59
- **Agent 4 — `aws-reviewer`** (only when `infra_agent = aws-reviewer`):
60
- > AWS infrastructure review [scope].
61
- > Focus: IAM policies, secrets in env/config, S3 permissions, Lambda security.
62
- > Format: findings by Critical / High / Medium / Low.
63
-
64
- Wait for ALL agents to complete, then synthesize.
65
-
66
- ### Step 4 Synthesize results
67
-
68
- Combine inline review findings + agent findings, deduplicate (same file:line → merge), sort by severity:
69
-
70
- ```
71
- ## Review Summary
72
-
73
- ### Critical (must fix before merge)
74
- - [file:line] Issue — Fix: ...
75
-
76
- ### High (should fix before merge)
77
- - [file:line] Issue Fix: ...
78
-
79
- ### Medium (consider fixing)
80
- - [file:line] Issue Fix: ...
81
-
82
- ### Low / Info (optional)
83
- - [file:line] Issue — Fix: ...
84
- ```
85
-
86
- ## After review
87
-
88
- **If Critical/High present:**
89
- → List clearly, require human fix. DO NOT continue flow.
90
-
91
- **If only Medium/Low:**
92
- List suggestions, ask if human wants to fix, then continue.
93
-
94
- **When human confirms fixed:**
95
- 1. Tick `- [x] Code review passed` in Story's `## Definition of Done` section
96
- 2. Ask: "Have you tested locally again? If OK, want to move ticket to Deploy Test?"
97
- 3. If Yes:
98
- a. Update Story `Status:` → `Deploy Test`
99
- b. Add Changelog line in Story: date, "Code review passed, moved to Deploy Test"
100
- c. Update parent Feature `Status:` `In Progress`, update Stories table
101
- d. Add Changelog in Feature
102
- e. Update `project-status.yaml`
103
- f. Suggest: run `/ado-update story <ado-id> --status "Deploy Test"` if using ADO
104
-
105
- ## Principles
106
- - Objective review — point to specific file:line and reason
107
- - Propose specific fix, don't just say "code is bad"
108
- - Check if code violates any ADR (read from Story's Technical Notes)
109
- - DO NOT auto-change status without human confirmation
110
-
111
- ## Final Step Token Log
112
-
113
- Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to Story file being reviewed (if any).
1
+ ---
2
+ model: opus
3
+ ---
4
+
5
+ # /tas-review $ARGUMENTS
6
+
7
+ Review recently changed code or a specific file/PR.
8
+ Includes hygiene scan, test run, and parallel multi-agent review.
9
+
10
+ ## Stack Detection
11
+ Read `.tas/rules/common/stack-detection.md`.
12
+
13
+ ## Actions
14
+
15
+ ### Step 1 Determine review scope
16
+ `$ARGUMENTS` can be: file path, Feature ID, or empty (review git diff).
17
+ - If empty: get `git diff HEAD` (staged + unstaged) or last commit
18
+ - If Feature ID: find corresponding Feature file (`docs/features/{CODE}-Feature-{ID}-*/`) to get changed files list (cross-ref with Technical file's File Changes table)
19
+ - If file path: review that file directly
20
+
21
+ ### Step 2 Pre-checks (MUST pass before continuing)
22
+
23
+ **Hygiene scan** — quick scan of files in scope:
24
+ - Debug code leftovers: `console.log`, `print(`, `Debug.WriteLine`, `debugger`
25
+ - Hardcoded secrets: password/key/token/secret assigned as string literal
26
+ - Large commented-out code blocks (>5 lines) without reason comment
27
+
28
+ If blockers found: list immediately, require fix before continuing.
29
+
30
+ **Run tests** — detect from project structure:
31
+ - `package.json` `yarn test --ci` or `npm test`
32
+ - `*.csproj` / `*.sln` `dotnet test`
33
+ - `pytest.ini` / `pyproject.toml` `python -m pytest`
34
+
35
+ If **FAIL**: add finding **"Unit Test Failure"** severity **Critical**, stop, DO NOT continue review.
36
+ → If **PASS**: note "Unit Tests: ✓ PASS" in Review Summary.
37
+ If cannot detect: note "No test runner detected" and continue.
38
+
39
+ ### Step 3 — Review
40
+
41
+ **Inline general review** (main session, always run):
42
+ Read `.tas/rules/common/code-review.md`. Apply review criteria priority order, output format from rule. Feature context (CLAUDE.md, SAD, ADRs) already in session — don't re-read.
43
+
44
+ **Specialized agents** launch SIMULTANEOUSLY (don't wait for each other):
45
+
46
+ **Agent 1 `security-reviewer`** (always run):
47
+ > Security audit [scope]. Read `.tas/rules/common/security.md`.
48
+ > If stack identified, also read `.tas/rules/[stack]/security.md`.
49
+ > Focus: OWASP Top 10, injection, hardcoded secrets, auth/authz, data exposure.
50
+ > Format: findings grouped by Critical / High / Medium / Low, each with file:line and remediation.
51
+
52
+ **Agent 2 Language reviewer** (per `lang_agent` from stack detection):
53
+ > Language-specific review [scope].
54
+ > Read `.tas/rules/[stack]/coding-style.md`, `.tas/rules/[stack]/patterns.md`, `.tas/rules/[stack]/testing.md`.
55
+ > If stack has React: also read `.tas/rules/web/design-quality.md`, `.tas/rules/web/testing.md`, `.tas/rules/web/performance.md`.
56
+ > Focus: async/await patterns, null handling, type safety, stack-specific anti-patterns.
57
+ > Format: findings by Critical / High / Medium / Low with file:line.
58
+
59
+ **Agent 3 — `database-reviewer`** (only when `db_agent = database-reviewer`, and scope touches schema/migrations/queries):
60
+ > Database review [scope]. Focus: schema correctness, migration safety, missing indexes, N+1 patterns, unsafe queries, data integrity.
61
+ > Format: findings by Critical / High / Medium / Low with file:line.
62
+
63
+ **Agent 4 — `aws-reviewer`** (only when `infra_agent = aws-reviewer`):
64
+ > AWS infrastructure review [scope].
65
+ > Focus: IAM policies, secrets in env/config, S3 permissions, Lambda security.
66
+ > Format: findings by Critical / High / Medium / Low.
67
+
68
+ Wait for ALL agents to complete, then synthesize.
69
+
70
+ ### Step 4 — Synthesize results
71
+
72
+ Combine inline review findings + agent findings, deduplicate (same file:line → merge), sort by severity:
73
+
74
+ ```
75
+ ## Review Summary
76
+
77
+ ### Critical (must fix before merge)
78
+ - [file:line] Issue — Fix: ...
79
+
80
+ ### High (should fix before merge)
81
+ - [file:line] Issue — Fix: ...
82
+
83
+ ### Medium (consider fixing)
84
+ - [file:line] Issue — Fix: ...
85
+
86
+ ### Low / Info (optional)
87
+ - [file:line] Issue — Fix: ...
88
+ ```
89
+
90
+ ## After review
91
+
92
+ **If Critical/High present:**
93
+ → List clearly, require human fix. DO NOT continue flow.
94
+
95
+ **If only Medium/Low:**
96
+ List suggestions, ask if human wants to fix, then continue.
97
+
98
+ **When human confirms fixed:**
99
+ 1. Tick `- [x] Code review passed` in Feature's `## Definition of Done` section
100
+ 2. Ask: "Tested locally? If OK, mark Feature `Done` and prepare release?"
101
+ 3. If Yes:
102
+ a. Update Feature `Status:` → `Done`, fill `Done Date`
103
+ b. Add Changelog line in Feature: date, "Code review passed, marked Done"
104
+ c. Update `project-status.yaml`: `features.{FEATURE_ID}.status: Done`
105
+ d. Suggest: run `/ado-update feature <ado-id> --status "Done"` if using ADO
106
+
107
+ ## Principles
108
+ - Objective review point to specific file:line and reason
109
+ - Propose specific fix, don't just say "code is bad"
110
+ - Check if code violates any ADR (cross-ref Feature-Technical's "Need new ADR" section)
111
+ - DO NOT auto-change status without human confirmation
112
+
113
+ ## Final Step Token Log
114
+
115
+ Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to Feature file being reviewed (if any).
@@ -1,43 +1,47 @@
1
- # /tas-sad $ARGUMENTS
2
-
3
- Role: SE - Software Engineer
4
- Create or update Solution Architecture Document.
5
-
6
- ## Prerequisite
7
- - docs/prd.md must exist. If not, notify user to run /tas-prd first.
8
-
9
- ## Actions
10
- 1. Need context from root/tas.yaml for project info, workflow config
11
- 2. Need context from docs/prd.md to understand requirements
12
- 3. If brownfield: need context from docs/codebase-overview.md if available
13
- 4. Check if docs/sad.md already exists:
14
-
15
- ### CREATE mode (file doesn't exist):
16
- 5. Need context from .tas/templates/SAD.md
17
- 6. Create file docs/sad.md per Torus SAD template
18
- 7. Update `project-status.yaml` per `.tas/rules/common/project-status.md` — add `artifacts.sad`.
19
-
20
- ### UPDATE mode (file exists):
21
- 5. Need context from current docs/sad.md
22
- 6. $ARGUMENTS is change description. If not provided, ask user which section to update.
23
- 7. Update file, keep unchanged sections as-is
24
- 8. Add line to Changelog section at end
25
- 9. If change is important architectural decision, suggest user run /tas-adr
26
- 10. Update `project-status.yaml` per `.tas/rules/common/project-status.md` update `artifacts.sad`.
27
-
28
- ## Mermaid Rules
29
- - C4 diagrams MUST use Mermaid flow diagram
30
- - Start with :::mermaid, end with :::
31
- - DO NOT use () in node labels, use [] instead
32
- - Example: A["Web App"] --> B["API Gateway"]
33
- - Include views: System Context, Container, Component, Data, Deployment
34
-
35
- ## Principles
36
- - SAD must align with tech stack in CLAUDE.md
37
- - Each important architectural decision should reference ADR
38
- - ERD must use Mermaid erDiagram
39
- - Sequence diagram uses Mermaid sequenceDiagram
40
-
41
- ## Final Step Token Log
42
-
43
- Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to `docs/sad.md`.
1
+ ---
2
+ model: opus
3
+ ---
4
+
5
+ # /tas-sad $ARGUMENTS
6
+
7
+ Role: SE - Software Engineer
8
+ Create or update Solution Architecture Document.
9
+
10
+ ## Prerequisite
11
+ - docs/prd.md must exist. If not, notify user to run /tas-prd first.
12
+
13
+ ## Actions
14
+ 1. Need context from root/tas.yaml for project info, workflow config
15
+ 2. Need context from docs/prd.md to understand requirements
16
+ 3. If brownfield: need context from docs/codebase-overview.md if available
17
+ 4. Check if docs/sad.md already exists:
18
+
19
+ ### CREATE mode (file doesn't exist):
20
+ 5. Need context from .tas/templates/SAD.md
21
+ 6. Create file docs/sad.md per Torus SAD template
22
+ 7. Update `project-status.yaml` per `.tas/rules/common/project-status.md` add `artifacts.sad`.
23
+
24
+ ### UPDATE mode (file exists):
25
+ 5. Need context from current docs/sad.md
26
+ 6. $ARGUMENTS is change description. If not provided, ask user which section to update.
27
+ 7. Update file, keep unchanged sections as-is
28
+ 8. Add line to Changelog section at end
29
+ 9. If change is important architectural decision, suggest user run /tas-adr
30
+ 10. Update `project-status.yaml` per `.tas/rules/common/project-status.md` update `artifacts.sad`.
31
+
32
+ ## Mermaid Rules
33
+ - C4 diagrams MUST use Mermaid flow diagram
34
+ - Start with :::mermaid, end with :::
35
+ - DO NOT use () in node labels, use [] instead
36
+ - Example: A["Web App"] --> B["API Gateway"]
37
+ - Include views: System Context, Container, Component, Data, Deployment
38
+
39
+ ## Principles
40
+ - SAD must align with tech stack in CLAUDE.md
41
+ - Each important architectural decision should reference ADR
42
+ - ERD must use Mermaid erDiagram
43
+ - Sequence diagram uses Mermaid sequenceDiagram
44
+
45
+ ## Final Step — Token Log
46
+
47
+ Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to `docs/sad.md`.