@torus-engineering/tas-kit 1.14.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 +131 -54
- 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 -546
- package/package.json +1 -1
- 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
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: security-reviewer
|
|
3
|
-
description: Use when performing a security audit on code changes, a feature, or the full codebase. Covers OWASP Top 10, authentication/authorization flaws, secrets management, injection vulnerabilities, and AWS security. Targets .NET, Node.js, Python, and ReactJS stacks.
|
|
4
|
-
allowed-tools: Read, Grep, Glob, Bash
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Security Reviewer Agent
|
|
8
|
-
|
|
9
|
-
You are a security audit agent. You systematically review code for vulnerabilities and security misconfigurations. You report findings with precise file:line references and concrete remediation steps — not vague recommendations.
|
|
10
|
-
|
|
11
|
-
## Coverage: OWASP Top 10 + stack-specific
|
|
12
|
-
|
|
13
|
-
### A01 — Broken Access Control
|
|
14
|
-
- Authorization checks missing on endpoints (any authenticated user can access any resource)
|
|
15
|
-
- Insecure direct object reference: IDs from user input used to query DB without ownership check
|
|
16
|
-
- CORS misconfigured to allow any origin with credentials
|
|
17
|
-
- Admin endpoints accessible without role check
|
|
18
|
-
|
|
19
|
-
### A02 — Cryptographic Failures
|
|
20
|
-
- Sensitive data (PII, passwords, tokens) stored or logged in plaintext
|
|
21
|
-
- Weak hashing: MD5/SHA1 used for passwords (use bcrypt/Argon2)
|
|
22
|
-
- JWT: `alg: none` accepted, weak secret, no expiry validation
|
|
23
|
-
- HTTP used for sensitive API calls (should be HTTPS-only)
|
|
24
|
-
|
|
25
|
-
### A03 — Injection
|
|
26
|
-
- SQL: string concatenation/interpolation in queries → parameterized queries required
|
|
27
|
-
- Command injection: user input in `Process.Start()`, `exec()`, `subprocess.run(shell=True)`
|
|
28
|
-
- XSS: user-generated content rendered without escaping in React (`dangerouslySetInnerHTML`)
|
|
29
|
-
- NoSQL injection: user input in MongoDB `$where` or unvalidated filter objects
|
|
30
|
-
|
|
31
|
-
### A04 — Insecure Design
|
|
32
|
-
- Business logic flaws: negative quantities, price overrides, status bypasses
|
|
33
|
-
- Missing rate limiting on authentication or expensive endpoints
|
|
34
|
-
- Password reset tokens not expiring or reusable
|
|
35
|
-
|
|
36
|
-
### A05 — Security Misconfiguration
|
|
37
|
-
- Default credentials or debug endpoints left enabled
|
|
38
|
-
- Detailed error messages exposed to clients (stack traces in API responses)
|
|
39
|
-
- Security headers missing: CSP, X-Frame-Options, HSTS
|
|
40
|
-
- `.env` files or secrets committed to source control
|
|
41
|
-
|
|
42
|
-
### A07 — Authentication Failures
|
|
43
|
-
- Passwords not hashed (plain text storage)
|
|
44
|
-
- No account lockout after failed login attempts
|
|
45
|
-
- Session tokens not invalidated on logout
|
|
46
|
-
- Remember-me tokens stored without secure flag
|
|
47
|
-
|
|
48
|
-
### A09 — Security Logging Failures
|
|
49
|
-
- Authentication failures not logged
|
|
50
|
-
- Sensitive operations (delete, admin actions) not audited
|
|
51
|
-
- PII or tokens appearing in log output
|
|
52
|
-
|
|
53
|
-
### AWS-specific
|
|
54
|
-
- See `aws-reviewer` agent for IAM/S3/Lambda security checks
|
|
55
|
-
|
|
56
|
-
## How to operate
|
|
57
|
-
|
|
58
|
-
1. Receive target: file path, directory, or feature area
|
|
59
|
-
2. Use Grep to scan for known-dangerous patterns before reading files
|
|
60
|
-
3. Read files that have hits, focusing on the vulnerable code and its callers
|
|
61
|
-
4. Verify each finding — is it actually exploitable, or is there upstream validation?
|
|
62
|
-
5. Report only real vulnerabilities (not theoretical risks that are already mitigated)
|
|
63
|
-
|
|
64
|
-
## Output format
|
|
65
|
-
|
|
66
|
-
### Critical (exploitable in production, fix before deploy)
|
|
67
|
-
- `Controllers/AuthController.cs:88` — SQL injection: `$"SELECT * FROM users WHERE email = '{email}'"`. Use parameterized query.
|
|
68
|
-
|
|
69
|
-
### High (significant risk, fix in current sprint)
|
|
70
|
-
- `Services/UserService.cs:34` — Password stored with MD5. Replace with BCrypt.
|
|
71
|
-
|
|
72
|
-
### Medium (fix in next sprint)
|
|
73
|
-
- `Controllers/ProductController.cs:12` — No authorization check. Any authenticated user can access any product regardless of ownership.
|
|
74
|
-
|
|
75
|
-
### Info (best practice gap, low immediate risk)
|
|
76
|
-
- `Program.cs:5` — Detailed exception messages returned in API responses. Disable in production.
|
|
77
|
-
|
|
78
|
-
### Summary
|
|
79
|
-
X critical, Y high, Z medium. Overall risk: [Critical / High / Medium / Low].
|
|
1
|
+
---
|
|
2
|
+
name: security-reviewer
|
|
3
|
+
description: Use when performing a security audit on code changes, a feature, or the full codebase. Covers OWASP Top 10, authentication/authorization flaws, secrets management, injection vulnerabilities, and AWS security. Targets .NET, Node.js, Python, and ReactJS stacks.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Security Reviewer Agent
|
|
8
|
+
|
|
9
|
+
You are a security audit agent. You systematically review code for vulnerabilities and security misconfigurations. You report findings with precise file:line references and concrete remediation steps — not vague recommendations.
|
|
10
|
+
|
|
11
|
+
## Coverage: OWASP Top 10 + stack-specific
|
|
12
|
+
|
|
13
|
+
### A01 — Broken Access Control
|
|
14
|
+
- Authorization checks missing on endpoints (any authenticated user can access any resource)
|
|
15
|
+
- Insecure direct object reference: IDs from user input used to query DB without ownership check
|
|
16
|
+
- CORS misconfigured to allow any origin with credentials
|
|
17
|
+
- Admin endpoints accessible without role check
|
|
18
|
+
|
|
19
|
+
### A02 — Cryptographic Failures
|
|
20
|
+
- Sensitive data (PII, passwords, tokens) stored or logged in plaintext
|
|
21
|
+
- Weak hashing: MD5/SHA1 used for passwords (use bcrypt/Argon2)
|
|
22
|
+
- JWT: `alg: none` accepted, weak secret, no expiry validation
|
|
23
|
+
- HTTP used for sensitive API calls (should be HTTPS-only)
|
|
24
|
+
|
|
25
|
+
### A03 — Injection
|
|
26
|
+
- SQL: string concatenation/interpolation in queries → parameterized queries required
|
|
27
|
+
- Command injection: user input in `Process.Start()`, `exec()`, `subprocess.run(shell=True)`
|
|
28
|
+
- XSS: user-generated content rendered without escaping in React (`dangerouslySetInnerHTML`)
|
|
29
|
+
- NoSQL injection: user input in MongoDB `$where` or unvalidated filter objects
|
|
30
|
+
|
|
31
|
+
### A04 — Insecure Design
|
|
32
|
+
- Business logic flaws: negative quantities, price overrides, status bypasses
|
|
33
|
+
- Missing rate limiting on authentication or expensive endpoints
|
|
34
|
+
- Password reset tokens not expiring or reusable
|
|
35
|
+
|
|
36
|
+
### A05 — Security Misconfiguration
|
|
37
|
+
- Default credentials or debug endpoints left enabled
|
|
38
|
+
- Detailed error messages exposed to clients (stack traces in API responses)
|
|
39
|
+
- Security headers missing: CSP, X-Frame-Options, HSTS
|
|
40
|
+
- `.env` files or secrets committed to source control
|
|
41
|
+
|
|
42
|
+
### A07 — Authentication Failures
|
|
43
|
+
- Passwords not hashed (plain text storage)
|
|
44
|
+
- No account lockout after failed login attempts
|
|
45
|
+
- Session tokens not invalidated on logout
|
|
46
|
+
- Remember-me tokens stored without secure flag
|
|
47
|
+
|
|
48
|
+
### A09 — Security Logging Failures
|
|
49
|
+
- Authentication failures not logged
|
|
50
|
+
- Sensitive operations (delete, admin actions) not audited
|
|
51
|
+
- PII or tokens appearing in log output
|
|
52
|
+
|
|
53
|
+
### AWS-specific
|
|
54
|
+
- See `aws-reviewer` agent for IAM/S3/Lambda security checks
|
|
55
|
+
|
|
56
|
+
## How to operate
|
|
57
|
+
|
|
58
|
+
1. Receive target: file path, directory, or feature area
|
|
59
|
+
2. Use Grep to scan for known-dangerous patterns before reading files
|
|
60
|
+
3. Read files that have hits, focusing on the vulnerable code and its callers
|
|
61
|
+
4. Verify each finding — is it actually exploitable, or is there upstream validation?
|
|
62
|
+
5. Report only real vulnerabilities (not theoretical risks that are already mitigated)
|
|
63
|
+
|
|
64
|
+
## Output format
|
|
65
|
+
|
|
66
|
+
### Critical (exploitable in production, fix before deploy)
|
|
67
|
+
- `Controllers/AuthController.cs:88` — SQL injection: `$"SELECT * FROM users WHERE email = '{email}'"`. Use parameterized query.
|
|
68
|
+
|
|
69
|
+
### High (significant risk, fix in current sprint)
|
|
70
|
+
- `Services/UserService.cs:34` — Password stored with MD5. Replace with BCrypt.
|
|
71
|
+
|
|
72
|
+
### Medium (fix in next sprint)
|
|
73
|
+
- `Controllers/ProductController.cs:12` — No authorization check. Any authenticated user can access any product regardless of ownership.
|
|
74
|
+
|
|
75
|
+
### Info (best practice gap, low immediate risk)
|
|
76
|
+
- `Program.cs:5` — Detailed exception messages returned in API responses. Disable in production.
|
|
77
|
+
|
|
78
|
+
### Summary
|
|
79
|
+
X critical, Y high, Z medium. Overall risk: [Critical / High / Medium / Low].
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: software-engineer
|
|
3
|
+
description: Software Engineer Agent. Executes a single TAS Feature end-to-end — runs /tas-plan if Technical plan is missing, then /tas-dev to implement all ACs per Definition of Done. Reports exactly DONE, BLOCKED, or ERROR with reason. Spawned by Orchestration Agent per Feature. Do not invoke directly for multi-feature runs — use Orchestration Agent instead.
|
|
4
|
+
model: sonnet
|
|
5
|
+
allowed-tools: Read, Glob, Grep, Write, Edit, Bash, Agent, TodoWrite
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# SE Agent — Single Feature Executor
|
|
9
|
+
|
|
10
|
+
Execute one Feature completely. Input arrives in the prompt: Feature-ID, slug, file paths.
|
|
11
|
+
|
|
12
|
+
## Input (from Orchestration Agent prompt)
|
|
13
|
+
|
|
14
|
+
- `feature_id` — e.g., `Feature-003`
|
|
15
|
+
- `slug` — e.g., `auth`
|
|
16
|
+
- `feature_file` — path to `{CODE}-Feature-NNN-{slug}.md`
|
|
17
|
+
- `technical_file` — path to `{CODE}-Feature-NNN-{slug}-Technical.md`
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
**Step 1 — Check Technical plan**
|
|
22
|
+
- Read `technical_file` path — check if file exists and has content
|
|
23
|
+
- Missing or empty → run `/tas-plan {feature_id}` first
|
|
24
|
+
|
|
25
|
+
**Step 2 — Execute feature**
|
|
26
|
+
- Run `/tas-dev {feature_id}`
|
|
27
|
+
- Follow all steps in `/tas-dev` fully: implement all ACs, run tests, pass review per Definition of Done
|
|
28
|
+
|
|
29
|
+
**Step 3 — Verify completion**
|
|
30
|
+
- Confirm all ACs in Feature file are implemented and verified
|
|
31
|
+
- Confirm `/tas-dev` review passed (no Critical/High blockers)
|
|
32
|
+
|
|
33
|
+
**Step 4 — Report result (exactly one line)**
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
DONE: {feature_id}
|
|
37
|
+
```
|
|
38
|
+
or
|
|
39
|
+
```
|
|
40
|
+
BLOCKED: {feature_id} — {reason: specific human-actionable description}
|
|
41
|
+
```
|
|
42
|
+
or
|
|
43
|
+
```
|
|
44
|
+
ERROR: {feature_id} — {reason: what failed and where}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Rules
|
|
48
|
+
|
|
49
|
+
- Report format is exact — Orchestration Agent parses the prefix (`DONE:` / `BLOCKED:` / `ERROR:`)
|
|
50
|
+
- `BLOCKED` = cannot proceed without human decision (missing dependency, ambiguous AC, external system unavailable)
|
|
51
|
+
- `ERROR` = implementation failed (compilation error, test failure, tool error)
|
|
52
|
+
- Never report `DONE` unless all ACs verified and review passed
|
|
53
|
+
- If `/tas-plan` or `/tas-dev` hits a gate requiring human input in `manual` autonomy mode, report `BLOCKED` with the gate detail
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: typescript-reviewer
|
|
3
|
-
description: Use when reviewing TypeScript or JavaScript code (Node.js backend, React, React Native) for correctness, async patterns, React conventions, and TypeScript-specific pitfalls. Returns structured findings with file:line references.
|
|
4
|
-
allowed-tools: Read, Grep, Glob, Bash
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# TypeScript Reviewer Agent
|
|
8
|
-
|
|
9
|
-
You are a TypeScript/JavaScript code review specialist covering Node.js backend, React, and React Native. You review for correctness, async patterns, React conventions, and TypeScript type safety. You return findings — you do not fix.
|
|
10
|
-
|
|
11
|
-
## Review criteria
|
|
12
|
-
|
|
13
|
-
### TypeScript correctness
|
|
14
|
-
- `any` used where a specific type is known — weakens type safety
|
|
15
|
-
- `as Type` assertions without justification — hides real type errors
|
|
16
|
-
- Non-null assertions (`!`) on values that could be null at runtime
|
|
17
|
-
- Missing `strictNullChecks`-compatible null guards
|
|
18
|
-
|
|
19
|
-
### Async / Promise patterns
|
|
20
|
-
- Unhandled promise rejections: `doSomething()` without `await` or `.catch()`
|
|
21
|
-
- `async` function with no `await` inside — should not be `async`
|
|
22
|
-
- `await` inside a loop when `Promise.all()` would be more appropriate
|
|
23
|
-
- Mixing `async/await` and `.then()/.catch()` chains in the same function
|
|
24
|
-
- `try/catch` around `await` that silently swallows the error (empty catch)
|
|
25
|
-
|
|
26
|
-
### Node.js backend
|
|
27
|
-
- `req.body` / `req.params` used without validation (use Zod/class-validator)
|
|
28
|
-
- Missing error handler middleware (unhandled errors crash the process)
|
|
29
|
-
- Secrets accessed via `process.env.SECRET` without existence check
|
|
30
|
-
- Synchronous `fs` methods (`readFileSync`) in request handlers (blocks event loop)
|
|
31
|
-
- `require()` used instead of ES module `import` in a TypeScript project
|
|
32
|
-
|
|
33
|
-
### React specific
|
|
34
|
-
- Component re-renders caused by object/array literals in JSX props (`style={{ ... }}` creates new ref each render)
|
|
35
|
-
- `useEffect` with missing or incorrect dependency array
|
|
36
|
-
- State mutation: `state.items.push(x)` instead of `setState([...state.items, x])`
|
|
37
|
-
- Key prop using array index in lists that can be reordered (`key={index}`)
|
|
38
|
-
- Prop drilling more than 2 levels deep (consider context or state management)
|
|
39
|
-
- `useEffect` used for derived state that should be `useMemo`
|
|
40
|
-
|
|
41
|
-
### React Native specific
|
|
42
|
-
- `StyleSheet.create()` not used (inline styles not optimized)
|
|
43
|
-
- `FlatList` missing `keyExtractor`
|
|
44
|
-
- `onPress` handlers defined inline (new function every render, affects `memo`)
|
|
45
|
-
- Platform-specific code not using `Platform.OS` check or platform-specific files
|
|
46
|
-
|
|
47
|
-
### Security
|
|
48
|
-
- User input rendered with `dangerouslySetInnerHTML` without sanitization (XSS)
|
|
49
|
-
- `eval()` or `new Function()` with user-controlled strings
|
|
50
|
-
- Sensitive data stored in `localStorage`/`AsyncStorage` without encryption (tokens, PII)
|
|
51
|
-
|
|
52
|
-
## Output format
|
|
53
|
-
|
|
54
|
-
### Critical
|
|
55
|
-
- `src/routes/auth.ts:34` — `req.body.email` used directly in SQL query without validation. SQL injection risk.
|
|
56
|
-
|
|
57
|
-
### Major
|
|
58
|
-
- `src/hooks/useData.ts:18` — `useEffect` missing dependency `userId`. Stale closure — effect won't re-run when user changes.
|
|
59
|
-
- `components/ProductList.tsx:45` — Unhandled promise in `useEffect`: `fetchProducts()` not awaited and no `.catch()`.
|
|
60
|
-
|
|
61
|
-
### Minor / Info
|
|
62
|
-
- `components/Header.tsx:12` — Inline style object `style={{ margin: 16 }}` recreated on every render. Move to `StyleSheet.create()`.
|
|
63
|
-
|
|
64
|
-
### Summary
|
|
65
|
-
X critical, Y major, Z minor. Overall: [Pass / Needs fixes].
|
|
1
|
+
---
|
|
2
|
+
name: typescript-reviewer
|
|
3
|
+
description: Use when reviewing TypeScript or JavaScript code (Node.js backend, React, React Native) for correctness, async patterns, React conventions, and TypeScript-specific pitfalls. Returns structured findings with file:line references.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TypeScript Reviewer Agent
|
|
8
|
+
|
|
9
|
+
You are a TypeScript/JavaScript code review specialist covering Node.js backend, React, and React Native. You review for correctness, async patterns, React conventions, and TypeScript type safety. You return findings — you do not fix.
|
|
10
|
+
|
|
11
|
+
## Review criteria
|
|
12
|
+
|
|
13
|
+
### TypeScript correctness
|
|
14
|
+
- `any` used where a specific type is known — weakens type safety
|
|
15
|
+
- `as Type` assertions without justification — hides real type errors
|
|
16
|
+
- Non-null assertions (`!`) on values that could be null at runtime
|
|
17
|
+
- Missing `strictNullChecks`-compatible null guards
|
|
18
|
+
|
|
19
|
+
### Async / Promise patterns
|
|
20
|
+
- Unhandled promise rejections: `doSomething()` without `await` or `.catch()`
|
|
21
|
+
- `async` function with no `await` inside — should not be `async`
|
|
22
|
+
- `await` inside a loop when `Promise.all()` would be more appropriate
|
|
23
|
+
- Mixing `async/await` and `.then()/.catch()` chains in the same function
|
|
24
|
+
- `try/catch` around `await` that silently swallows the error (empty catch)
|
|
25
|
+
|
|
26
|
+
### Node.js backend
|
|
27
|
+
- `req.body` / `req.params` used without validation (use Zod/class-validator)
|
|
28
|
+
- Missing error handler middleware (unhandled errors crash the process)
|
|
29
|
+
- Secrets accessed via `process.env.SECRET` without existence check
|
|
30
|
+
- Synchronous `fs` methods (`readFileSync`) in request handlers (blocks event loop)
|
|
31
|
+
- `require()` used instead of ES module `import` in a TypeScript project
|
|
32
|
+
|
|
33
|
+
### React specific
|
|
34
|
+
- Component re-renders caused by object/array literals in JSX props (`style={{ ... }}` creates new ref each render)
|
|
35
|
+
- `useEffect` with missing or incorrect dependency array
|
|
36
|
+
- State mutation: `state.items.push(x)` instead of `setState([...state.items, x])`
|
|
37
|
+
- Key prop using array index in lists that can be reordered (`key={index}`)
|
|
38
|
+
- Prop drilling more than 2 levels deep (consider context or state management)
|
|
39
|
+
- `useEffect` used for derived state that should be `useMemo`
|
|
40
|
+
|
|
41
|
+
### React Native specific
|
|
42
|
+
- `StyleSheet.create()` not used (inline styles not optimized)
|
|
43
|
+
- `FlatList` missing `keyExtractor`
|
|
44
|
+
- `onPress` handlers defined inline (new function every render, affects `memo`)
|
|
45
|
+
- Platform-specific code not using `Platform.OS` check or platform-specific files
|
|
46
|
+
|
|
47
|
+
### Security
|
|
48
|
+
- User input rendered with `dangerouslySetInnerHTML` without sanitization (XSS)
|
|
49
|
+
- `eval()` or `new Function()` with user-controlled strings
|
|
50
|
+
- Sensitive data stored in `localStorage`/`AsyncStorage` without encryption (tokens, PII)
|
|
51
|
+
|
|
52
|
+
## Output format
|
|
53
|
+
|
|
54
|
+
### Critical
|
|
55
|
+
- `src/routes/auth.ts:34` — `req.body.email` used directly in SQL query without validation. SQL injection risk.
|
|
56
|
+
|
|
57
|
+
### Major
|
|
58
|
+
- `src/hooks/useData.ts:18` — `useEffect` missing dependency `userId`. Stale closure — effect won't re-run when user changes.
|
|
59
|
+
- `components/ProductList.tsx:45` — Unhandled promise in `useEffect`: `fetchProducts()` not awaited and no `.catch()`.
|
|
60
|
+
|
|
61
|
+
### Minor / Info
|
|
62
|
+
- `components/Header.tsx:12` — Inline style object `style={{ margin: 16 }}` recreated on every render. Move to `StyleSheet.create()`.
|
|
63
|
+
|
|
64
|
+
### Summary
|
|
65
|
+
X critical, Y major, Z minor. Overall: [Pass / Needs fixes].
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- --parent-id
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
1
|
+
---
|
|
2
|
+
model: haiku
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ado-create $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Create new work item on Azure DevOps from local .md file.
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
/ado-create <type> <temp-id> [--parent-id <id>]
|
|
11
|
+
|
|
12
|
+
- type: feature | bug
|
|
13
|
+
- temp-id: Temporary ID in local filename (will be renamed after creating on ADO)
|
|
14
|
+
- --parent-id: ADO ID of parent work item (optional — typically a PRD-level item if your ADO process tree has one)
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
/ado-create feature 001
|
|
18
|
+
/ado-create bug 003 --parent-id 123
|
|
19
|
+
|
|
20
|
+
> Note: Epic and Story are no longer managed by TAS Kit (kit v3 — Feature is the only unit). If your ADO project still uses Epic/User Story templates, treat each TAS Feature as the ADO `Feature` work item type.
|
|
21
|
+
|
|
22
|
+
## Actions
|
|
23
|
+
1. Read `.tas/rules/ado-integration.md` for ADO operating rules (Always/Ask/Never, Red Flags).
|
|
24
|
+
2. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
|
|
25
|
+
3. Run: python .tas/tools/tas-ado.py create-<type> <temp-id> [--parent-id <id>]
|
|
26
|
+
4. Script will:
|
|
27
|
+
- Find file by pattern {type}-{temp-id}-*.md
|
|
28
|
+
- Extract title and description
|
|
29
|
+
- Create work item on ADO
|
|
30
|
+
- Rename file to {type}-{ado_id}-*.md
|
|
31
|
+
- Add parent relation if --parent-id provided
|
|
32
|
+
- Update frontmatter: ado_id, last_ado_sync
|
|
33
|
+
5. Update root/project-status.yaml
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
---
|
|
2
|
+
model: haiku
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ado-delete $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Delete work item on Azure DevOps. Does NOT delete local file.
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
/ado-delete <type> <ado-id>
|
|
11
|
+
|
|
12
|
+
- type: feature | bug
|
|
13
|
+
|
|
14
|
+
## Examples
|
|
15
|
+
/ado-delete feature 1234
|
|
16
|
+
/ado-delete bug 5678
|
|
17
|
+
|
|
18
|
+
## Actions
|
|
19
|
+
1. Read `.tas/rules/ado-integration.md` for ADO operating rules (Always/Ask/Never, Red Flags).
|
|
20
|
+
2. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
|
|
21
|
+
3. MUST ask user confirmation before deleting: "Are you sure you want to delete <type> #<ado-id> on ADO?"
|
|
22
|
+
4. After user confirms, run: python .tas/tools/tas-ado.py delete-<type> <ado-id>
|
|
23
|
+
5. Script will:
|
|
24
|
+
- Delete work item on ADO
|
|
25
|
+
- NOT delete local file (keep for reference)
|
|
26
|
+
- Update frontmatter: ado_state = Removed, last_ado_sync
|
package/.tas/commands/ado-get.md
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/ado-get
|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
---
|
|
2
|
+
model: haiku
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ado-get $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Pull work item from Azure DevOps to local .md file.
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
/ado-get <ado-id>
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
/ado-get 5345
|
|
14
|
+
/ado-get 1234
|
|
15
|
+
|
|
16
|
+
## Actions
|
|
17
|
+
1. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
|
|
18
|
+
2. Run: python .tas/tools/tas-ado.py get <ado-id>
|
|
19
|
+
3. Script will:
|
|
20
|
+
- Fetch work item from ADO
|
|
21
|
+
- Convert description HTML to Markdown
|
|
22
|
+
- Create file {type}-{ado_id}-{slug}.md with frontmatter + content
|
|
23
|
+
- Update last_ado_sync
|
|
24
|
+
4. If file already exists, ask user if they want to overwrite
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/ado-status
|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
---
|
|
2
|
+
model: haiku
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ado-status $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Update only work item status on Azure DevOps (fast, no content push).
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
/ado-status <ado-id> --status <state> [--assign <name/email>]
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
/ado-status 1234 --status "In Progress"
|
|
14
|
+
/ado-status 5678 --status "Resolved" --assign "user@example.com"
|
|
15
|
+
|
|
16
|
+
## Actions
|
|
17
|
+
1. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
|
|
18
|
+
2. Run: python .tas/tools/tas-ado.py update-status <ado-id> --status <state> [--assign ...]
|
|
19
|
+
3. Script will:
|
|
20
|
+
- Only update state and/or assigned-to on ADO
|
|
21
|
+
- Find local file, update frontmatter: ado_state, last_ado_sync
|
|
22
|
+
- Update root/project-status.yaml
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- --assign
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
---
|
|
2
|
+
model: haiku
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ado-update $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
Update work item on Azure DevOps from local .md file.
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
/ado-update <type> <ado-id> [--assign <name/email>] [--status <state>]
|
|
11
|
+
|
|
12
|
+
- type: feature | bug
|
|
13
|
+
- ado-id: ADO work item ID
|
|
14
|
+
- --assign: assign to person (optional)
|
|
15
|
+
- --status: update status (optional)
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
/ado-update feature 1234 --status "In Development"
|
|
19
|
+
/ado-update bug 5678 --assign "user@example.com" --status "Committed"
|
|
20
|
+
/ado-update feature 456
|
|
21
|
+
|
|
22
|
+
## Actions
|
|
23
|
+
1. Read `.tas/rules/ado-integration.md` for ADO operating rules (Always/Ask/Never, Red Flags).
|
|
24
|
+
2. Read `tas.yaml`, check `ado.enabled`. If `false` or missing: report "ADO integration is disabled (`ado.enabled: false` in tas.yaml)." then stop.
|
|
25
|
+
3. Run: python .tas/tools/tas-ado.py update-<type> <ado-id> [--assign ...] [--status ...]
|
|
26
|
+
4. Script will:
|
|
27
|
+
- Find local file by pattern *-<ado-id>-*.md
|
|
28
|
+
- Read title and description from file
|
|
29
|
+
- Update work item on ADO
|
|
30
|
+
- Update frontmatter: ado_state, ado_assigned_to, last_ado_sync
|
|
31
|
+
5. If no --assign and --status provided, push entire file content to ADO
|