@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.
- package/.tas/_platform/claude-code/settings.json +58 -46
- package/.tas/_platform/hooks/code-quality.js +127 -127
- package/.tas/_platform/hooks/session-end.js +111 -111
- package/.tas/agents/architect.md +53 -53
- package/.tas/agents/aws-reviewer.md +71 -71
- package/.tas/agents/build-resolver.md +89 -59
- package/.tas/agents/code-explorer.md +63 -63
- package/.tas/agents/csharp-reviewer.md +62 -62
- package/.tas/agents/database-reviewer.md +73 -73
- package/.tas/agents/doc-updater.md +68 -66
- package/.tas/agents/python-reviewer.md +67 -67
- package/.tas/agents/security-reviewer.md +79 -79
- package/.tas/agents/software-engineer.md +53 -0
- package/.tas/agents/typescript-reviewer.md +65 -65
- package/.tas/commands/ado-create.md +33 -28
- package/.tas/commands/ado-delete.md +26 -22
- package/.tas/commands/ado-get.md +24 -20
- package/.tas/commands/ado-status.md +22 -18
- package/.tas/commands/ado-update.md +31 -27
- package/.tas/commands/tas-adr.md +37 -33
- package/.tas/commands/tas-apitest-plan.md +177 -173
- package/.tas/commands/tas-apitest.md +147 -143
- package/.tas/commands/tas-brainstorm.md +23 -19
- package/.tas/commands/tas-brd.md +50 -0
- package/.tas/commands/tas-bug.md +127 -113
- package/.tas/commands/tas-checklist.md +180 -0
- package/.tas/commands/tas-debug.md +103 -0
- package/.tas/commands/tas-design.md +41 -37
- package/.tas/commands/tas-dev.md +225 -125
- package/.tas/commands/tas-e2e-mobile.md +146 -155
- package/.tas/commands/tas-e2e-web.md +150 -163
- package/.tas/commands/tas-e2e.md +289 -102
- package/.tas/commands/tas-feature.md +181 -47
- package/.tas/commands/tas-fix.md +72 -51
- package/.tas/commands/tas-functest-mobile.md +138 -144
- package/.tas/commands/tas-functest-web.md +176 -192
- package/.tas/commands/tas-functest.md +225 -76
- package/.tas/commands/tas-init.md +22 -17
- package/.tas/commands/tas-master-plan.md +300 -0
- package/.tas/commands/tas-orchestrate.md +159 -0
- package/.tas/commands/tas-plan.md +152 -117
- package/.tas/commands/tas-prd.md +57 -37
- package/.tas/commands/tas-review-pr.md +174 -0
- package/.tas/commands/tas-review.md +115 -113
- package/.tas/commands/tas-sad.md +47 -43
- package/.tas/commands/tas-security.md +91 -87
- package/.tas/commands/tas-spec.md +54 -50
- package/.tas/commands/tas-status.md +25 -16
- package/.tas/project-status-example.yaml +3 -1
- package/.tas/rules/ado-integration.md +67 -65
- package/.tas/rules/common/api-design.md +517 -517
- package/.tas/rules/common/build-debug-loop.md +233 -0
- package/.tas/rules/common/code-review.md +4 -0
- package/.tas/rules/common/feature-done.md +42 -0
- package/.tas/rules/common/post-implementation-review.md +4 -0
- package/.tas/rules/common/project-status.md +33 -16
- package/.tas/rules/common/sad-impact.md +81 -0
- package/.tas/rules/common/tdd.md +104 -89
- package/.tas/rules/csharp/api-testing.md +2 -2
- package/.tas/rules/csharp/torus-core-framework.md +128 -0
- package/.tas/tas-example.yaml +9 -32
- package/.tas/templates/AGENTS.md +13 -0
- package/.tas/templates/API-Test-Spec.md +5 -4
- package/.tas/templates/BRD.md +133 -0
- package/.tas/templates/Bug.md +15 -0
- package/.tas/templates/E2E-Execution-Report.md +8 -8
- package/.tas/templates/E2E-Mobile-Spec.md +6 -8
- package/.tas/templates/E2E-Report.md +2 -2
- package/.tas/templates/E2E-Scenario.md +22 -22
- package/.tas/templates/E2E-Test-Spec.md +274 -0
- package/.tas/templates/E2E-Web-Spec.md +4 -4
- package/.tas/templates/Feature-Technical-Part.md +69 -0
- package/.tas/templates/Feature-Technical-Stack.md +74 -0
- package/.tas/templates/Feature-Technical.md +329 -0
- package/.tas/templates/Feature.md +50 -26
- package/.tas/templates/Func-Test-Script.md +29 -56
- package/.tas/templates/Func-Test-Spec.md +144 -142
- package/.tas/templates/PRD.md +173 -142
- package/.tas/templates/TestChecklist.md +96 -0
- package/.tas/templates/torus-dotnet-bootstrap.md +223 -0
- package/.tas/tools/tas-ado-readme.md +24 -27
- package/.tas/tools/tas-ado.py +328 -25
- package/.tas/tools/tas-github.py +339 -0
- package/README.md +142 -57
- package/bin/cli.js +90 -90
- package/lib/adapters/antigravity.js +131 -131
- package/lib/adapters/claude-code.js +71 -35
- package/lib/adapters/codex.js +157 -157
- package/lib/adapters/cursor.js +80 -80
- package/lib/adapters/index.js +20 -20
- package/lib/adapters/utils.js +81 -81
- package/lib/deleted-files.json +7 -0
- package/lib/install.js +546 -543
- package/package.json +2 -2
- package/.tas/README.md +0 -334
- package/.tas/commands/tas-epic.md +0 -35
- package/.tas/commands/tas-story.md +0 -91
- package/.tas/rules/common/story-done.md +0 -30
- package/.tas/templates/Epic.md +0 -46
- 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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
>
|
|
50
|
-
>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
>
|
|
57
|
-
> Format: findings by Critical / High / Medium / Low with file:line.
|
|
58
|
-
|
|
59
|
-
**Agent
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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).
|
package/.tas/commands/tas-sad.md
CHANGED
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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`.
|