@torus-engineering/tas-kit 1.10.0 → 1.12.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/README.md +70 -70
- package/{.claude → .tas/_platform/claude-code}/settings.json +0 -12
- package/{.claude → .tas/_platform}/hooks/code-quality.js +1 -1
- package/{.claude → .tas/_platform}/hooks/session-end.js +20 -25
- package/.tas/commands/ado-create.md +28 -0
- package/.tas/commands/ado-delete.md +22 -0
- package/.tas/commands/ado-get.md +20 -0
- package/.tas/commands/ado-status.md +18 -0
- package/.tas/commands/ado-update.md +27 -0
- package/.tas/commands/tas-adr.md +33 -0
- package/.tas/commands/tas-apitest-plan.md +173 -0
- package/.tas/commands/tas-apitest.md +143 -0
- package/.tas/commands/tas-brainstorm.md +19 -0
- package/.tas/commands/tas-bug.md +113 -0
- package/.tas/commands/tas-design.md +37 -0
- package/.tas/commands/tas-dev.md +125 -0
- package/{.claude → .tas}/commands/tas-e2e-mobile.md +155 -155
- package/{.claude → .tas}/commands/tas-e2e-web.md +163 -163
- package/.tas/commands/tas-e2e.md +102 -0
- package/.tas/commands/tas-epic.md +35 -0
- package/.tas/commands/tas-feature.md +47 -0
- package/.tas/commands/tas-fix.md +51 -0
- package/.tas/commands/tas-functest-mobile.md +144 -0
- package/{.claude → .tas}/commands/tas-functest-web.md +192 -192
- package/.tas/commands/tas-functest.md +76 -0
- package/.tas/commands/tas-init.md +17 -0
- package/.tas/commands/tas-plan.md +198 -0
- package/.tas/commands/tas-prd.md +37 -0
- package/.tas/commands/tas-review.md +113 -0
- package/.tas/commands/tas-sad.md +43 -0
- package/.tas/commands/tas-security.md +87 -0
- package/.tas/commands/tas-spec.md +50 -0
- package/.tas/commands/tas-status.md +16 -0
- package/.tas/commands/tas-story.md +91 -0
- package/.tas/platforms.json +5 -0
- package/.tas/project-status-example.yaml +17 -17
- package/.tas/rules/ado-integration.md +65 -0
- package/{.claude/skills/api-design/SKILL.md → .tas/rules/common/api-design.md} +517 -530
- package/{.claude → .tas}/rules/common/code-review.md +30 -6
- package/.tas/rules/common/post-implementation-review.md +51 -0
- package/{.claude → .tas}/rules/common/project-status.md +80 -80
- package/.tas/rules/common/stack-detection.md +29 -0
- package/.tas/rules/common/story-done.md +30 -0
- package/.tas/rules/common/tdd.md +89 -0
- package/{.claude → .tas}/rules/common/testing.md +3 -8
- package/.tas/rules/common/token-logging.md +36 -0
- package/{.claude → .tas}/rules/csharp/api-testing.md +20 -20
- package/{.claude → .tas}/rules/csharp/coding-style.md +0 -2
- package/{.claude → .tas}/rules/csharp/security.md +10 -0
- package/{.claude → .tas}/rules/python/coding-style.md +0 -2
- package/{.claude → .tas}/rules/typescript/coding-style.md +0 -2
- package/.tas/rules/typescript/patterns.md +142 -0
- package/.tas/rules/typescript/security.md +88 -0
- package/{.claude → .tas}/rules/typescript/testing.md +0 -4
- package/{.claude → .tas}/rules/web/coding-style.md +0 -2
- package/.tas/tas-example.yaml +10 -11
- package/.tas/templates/ADR.md +47 -47
- package/.tas/templates/AGENTS.md +37 -0
- package/.tas/templates/API-Test-Spec.md +3 -3
- package/.tas/templates/Bug.md +67 -67
- package/.tas/templates/Design-Spec.md +36 -36
- package/.tas/templates/E2E-Execution-Report.md +1 -1
- package/.tas/templates/Epic.md +46 -46
- 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 +27 -27
- package/.tas/templates/Story.md +9 -9
- package/.tas/tools/tas-ado-readme.md +68 -68
- package/.tas/tools/tas-ado.py +621 -621
- package/README.md +78 -78
- package/bin/cli.js +91 -73
- package/lib/adapters/antigravity.js +137 -0
- package/lib/adapters/claude-code.js +35 -0
- package/lib/adapters/codex.js +163 -0
- package/lib/adapters/cursor.js +80 -0
- package/lib/adapters/index.js +20 -0
- package/lib/adapters/utils.js +81 -0
- package/lib/deleted-files.json +99 -0
- package/lib/install.js +403 -327
- package/package.json +4 -3
- package/.claude/agents/code-reviewer.md +0 -41
- package/.claude/agents/e2e-runner.md +0 -61
- package/.claude/agents/planner.md +0 -82
- package/.claude/agents/tdd-guide.md +0 -84
- package/.claude/commands/ado-create.md +0 -27
- package/.claude/commands/ado-delete.md +0 -21
- package/.claude/commands/ado-get.md +0 -20
- package/.claude/commands/ado-status.md +0 -18
- package/.claude/commands/ado-update.md +0 -26
- package/.claude/commands/tas-adr.md +0 -33
- package/.claude/commands/tas-apitest-plan.md +0 -173
- package/.claude/commands/tas-apitest.md +0 -143
- package/.claude/commands/tas-brainstorm.md +0 -19
- package/.claude/commands/tas-bug.md +0 -113
- package/.claude/commands/tas-design.md +0 -37
- package/.claude/commands/tas-dev.md +0 -128
- package/.claude/commands/tas-e2e.md +0 -102
- package/.claude/commands/tas-epic.md +0 -35
- package/.claude/commands/tas-feature.md +0 -47
- package/.claude/commands/tas-fix.md +0 -51
- package/.claude/commands/tas-functest-mobile.md +0 -144
- package/.claude/commands/tas-functest.md +0 -76
- package/.claude/commands/tas-init.md +0 -17
- package/.claude/commands/tas-plan.md +0 -200
- package/.claude/commands/tas-prd.md +0 -37
- package/.claude/commands/tas-review.md +0 -111
- package/.claude/commands/tas-sad.md +0 -43
- package/.claude/commands/tas-security.md +0 -87
- package/.claude/commands/tas-spec.md +0 -50
- package/.claude/commands/tas-status.md +0 -16
- package/.claude/commands/tas-story.md +0 -91
- package/.claude/commands/tas-verify.md +0 -51
- package/.claude/rules/common/post-review-agent.md +0 -49
- package/.claude/rules/common/stack-detection.md +0 -29
- package/.claude/rules/common/token-logging.md +0 -27
- package/.claude/rules/typescript/patterns.md +0 -62
- package/.claude/rules/typescript/security.md +0 -28
- package/.claude/settings.local.json +0 -38
- package/.claude/skills/ado-integration/SKILL.md +0 -75
- package/.claude/skills/ai-regression-testing/SKILL.md +0 -364
- package/.claude/skills/architecture-decision-records/SKILL.md +0 -184
- package/.claude/skills/benchmark/SKILL.md +0 -98
- package/.claude/skills/browser-qa/SKILL.md +0 -92
- package/.claude/skills/canary-watch/SKILL.md +0 -104
- package/.claude/skills/js-backend-patterns/SKILL.md +0 -603
- package/.claude/skills/tas-conventions/SKILL.md +0 -65
- package/.claude/skills/tas-implementation-complete/SKILL.md +0 -99
- package/.claude/skills/tas-tdd/SKILL.md +0 -123
- package/.claude/skills/token-logger/SKILL.md +0 -19
- package/.tas/checklists/code-review.md +0 -29
- package/.tas/checklists/security.md +0 -21
- package/.tas/checklists/story-done.md +0 -23
- package/CLAUDE-Example.md +0 -61
- /package/{.claude → .tas}/agents/architect.md +0 -0
- /package/{.claude → .tas}/agents/aws-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/build-resolver.md +0 -0
- /package/{.claude → .tas}/agents/code-explorer.md +0 -0
- /package/{.claude → .tas}/agents/csharp-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/database-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/doc-updater.md +0 -0
- /package/{.claude → .tas}/agents/python-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/security-reviewer.md +0 -0
- /package/{.claude → .tas}/agents/typescript-reviewer.md +0 -0
- /package/{.claude → .tas}/rules/.gitkeep +0 -0
- /package/{.claude → .tas}/rules/common/hooks.md +0 -0
- /package/{.claude → .tas}/rules/common/patterns.md +0 -0
- /package/{.claude → .tas}/rules/common/security.md +0 -0
- /package/{.claude → .tas}/rules/csharp/hooks.md +0 -0
- /package/{.claude → .tas}/rules/csharp/patterns.md +0 -0
- /package/{.claude → .tas}/rules/csharp/testing.md +0 -0
- /package/{.claude → .tas}/rules/python/hooks.md +0 -0
- /package/{.claude → .tas}/rules/python/patterns.md +0 -0
- /package/{.claude → .tas}/rules/python/security.md +0 -0
- /package/{.claude → .tas}/rules/python/testing.md +0 -0
- /package/{.claude → .tas}/rules/typescript/hooks.md +0 -0
- /package/{.claude → .tas}/rules/web/design-quality.md +0 -0
- /package/{.claude → .tas}/rules/web/hooks.md +0 -0
- /package/{.claude → .tas}/rules/web/patterns.md +0 -0
- /package/{.claude → .tas}/rules/web/performance.md +0 -0
- /package/{.claude → .tas}/rules/web/security.md +0 -0
- /package/{.claude → .tas}/rules/web/testing.md +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# /tas-prd $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Role: PE - Product Engineer
|
|
4
|
+
Create or update Product Requirements Document.
|
|
5
|
+
|
|
6
|
+
## Actions
|
|
7
|
+
1. Need context from root/tas.yaml for project context
|
|
8
|
+
2. Check if docs/prd.md already exists:
|
|
9
|
+
|
|
10
|
+
### CREATE mode (file doesn't exist):
|
|
11
|
+
3. Need context from .tas/templates/PRD.md
|
|
12
|
+
4. If $ARGUMENTS has content, use as product description input
|
|
13
|
+
5. If no $ARGUMENTS, ask user:
|
|
14
|
+
- What problem does the product solve?
|
|
15
|
+
- Who are the main users?
|
|
16
|
+
- What are core features?
|
|
17
|
+
- Any technical/business constraints?
|
|
18
|
+
6. Create file docs/prd.md per template
|
|
19
|
+
7. Update `project-status.yaml` per `.tas/rules/common/project-status.md` — add `artifacts.prd`.
|
|
20
|
+
|
|
21
|
+
### UPDATE mode (file exists):
|
|
22
|
+
3. Need context from current docs/prd.md
|
|
23
|
+
4. $ARGUMENTS is change description. If not provided, ask user which section to update.
|
|
24
|
+
5. Update file, keep unchanged sections as-is
|
|
25
|
+
6. Add line to Changelog section at end: date, change description
|
|
26
|
+
7. Update `project-status.yaml` per `.tas/rules/common/project-status.md` — update `artifacts.prd`.
|
|
27
|
+
|
|
28
|
+
## Principles
|
|
29
|
+
- Write at sufficient detail for SE to understand and design architecture
|
|
30
|
+
- Classify requirements by MoSCoW: Must/Should/Could/Won't
|
|
31
|
+
- Each requirement has unique ID: FR-001, NFR-001
|
|
32
|
+
- Always include Non-Goals section to limit scope
|
|
33
|
+
- Mermaid diagrams must use :::mermaid wrapper, NO () characters
|
|
34
|
+
|
|
35
|
+
## Final Step — Token Log
|
|
36
|
+
|
|
37
|
+
Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to `docs/prd.md`.
|
|
@@ -0,0 +1,113 @@
|
|
|
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).
|
|
@@ -0,0 +1,43 @@
|
|
|
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`.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# /tas-security $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Check codebase security, save report to docs/security-report.md.
|
|
4
|
+
|
|
5
|
+
## Stack Detection
|
|
6
|
+
Read `.tas/rules/common/stack-detection.md`.
|
|
7
|
+
|
|
8
|
+
## Actions
|
|
9
|
+
|
|
10
|
+
### Step 1 — Determine scope
|
|
11
|
+
`$ARGUMENTS` can be:
|
|
12
|
+
- File path or directory → scan specified scope only
|
|
13
|
+
- Empty → scan entire codebase
|
|
14
|
+
- `--staged` → only scan staged files (like pre-commit hook), fast + used to self-test before commit
|
|
15
|
+
|
|
16
|
+
With `--staged`: get list from `git diff --cached --name-only --diff-filter=ACM` and only review those files. Use same regex patterns as `.tas/hooks/security-scan.js` then supplement with deep review by agents below.
|
|
17
|
+
|
|
18
|
+
Read `.tas/rules/common/security.md` for general checks. If stack identified, also read `.tas/rules/[stack]/security.md` for stack-specific items.
|
|
19
|
+
|
|
20
|
+
### Step 2 — Parallel Security Scan
|
|
21
|
+
|
|
22
|
+
Launch agents SIMULTANEOUSLY based on stack:
|
|
23
|
+
|
|
24
|
+
**Agent 1 — `security-reviewer`** (always run):
|
|
25
|
+
> Security audit [scope].
|
|
26
|
+
> Read `.tas/rules/common/security.md`.
|
|
27
|
+
> If stack identified, also read `.tas/rules/[stack]/security.md`.
|
|
28
|
+
> Check OWASP Top 10: injection, broken auth, XSS, IDOR, security misconfiguration,
|
|
29
|
+
> sensitive data exposure, insecure deserialization, vulnerable components, logging/monitoring.
|
|
30
|
+
> Also check: hardcoded secrets, CORS config, anti-forgery tokens, rate limiting.
|
|
31
|
+
> Format: findings by Critical / High / Medium / Low with file:line and specific remediation.
|
|
32
|
+
> Each finding has: status = Open.
|
|
33
|
+
|
|
34
|
+
**Agent 2 — `database-reviewer`** (only when `db_agent = database-reviewer`):
|
|
35
|
+
> Database security review [scope].
|
|
36
|
+
> Focus: parameterized queries vs string concatenation, ORM raw query usage,
|
|
37
|
+
> sensitive data stored in plaintext, missing field-level encryption, excessive permissions.
|
|
38
|
+
> Format: findings by Critical / High / Medium / Low with file:line and remediation.
|
|
39
|
+
|
|
40
|
+
**Agent 3 — `aws-reviewer`** (only when `infra_agent = aws-reviewer`):
|
|
41
|
+
> AWS infrastructure security review [scope].
|
|
42
|
+
> Focus: IAM overpermission, S3 public access, secrets in env/config/code,
|
|
43
|
+
> Lambda environment variables, API Gateway auth, VPC security groups.
|
|
44
|
+
> Format: findings by Critical / High / Medium / Low with file:line and remediation.
|
|
45
|
+
|
|
46
|
+
Wait for ALL agents to complete.
|
|
47
|
+
|
|
48
|
+
### Step 3 — Synthesize and save report
|
|
49
|
+
|
|
50
|
+
Combine findings from all agents, deduplicate (same file:line → merge), sort by severity.
|
|
51
|
+
|
|
52
|
+
Check `docs/security-report.md`:
|
|
53
|
+
- **Doesn't exist**: create new per template `.tas/templates/Security-Report.md`
|
|
54
|
+
- **Exists**: append new report, update old findings status if fixed
|
|
55
|
+
|
|
56
|
+
Report content includes:
|
|
57
|
+
- Scan date, scope, stack
|
|
58
|
+
- Findings by Critical / High / Medium / Low
|
|
59
|
+
- Each finding: file:line, description, remediation, status (Open / Fixed / Accepted Risk)
|
|
60
|
+
- Summary: total findings per severity, fixed vs open counts
|
|
61
|
+
|
|
62
|
+
### Step 4 — Update project-status.yaml
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
artifacts:
|
|
66
|
+
security_report:
|
|
67
|
+
file: docs/security-report.md
|
|
68
|
+
status: [Critical findings present | Clean]
|
|
69
|
+
last_updated: [today's date]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Step 5 — Next actions
|
|
73
|
+
|
|
74
|
+
If **Critical findings**:
|
|
75
|
+
→ List clearly, require fix immediately before deploying to any environment.
|
|
76
|
+
|
|
77
|
+
If **High findings**:
|
|
78
|
+
→ List, recommend fixing before merging to main.
|
|
79
|
+
|
|
80
|
+
If only **Medium/Low**:
|
|
81
|
+
→ Summarize, suggest fixing in priority order.
|
|
82
|
+
|
|
83
|
+
## Principles
|
|
84
|
+
- Classification: Critical / High / Medium / Low
|
|
85
|
+
- Each finding must have specific recommended fix
|
|
86
|
+
- Finding has status: Open | In Progress | Fixed | Accepted Risk
|
|
87
|
+
- DO NOT hardcode fix — propose remediation pattern, don't write replacement code
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# /tas-spec $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Create lightweight spec before coding — for solo dev, prototype, spike, internal tool.
|
|
4
|
+
Differs from `/tas-fix`: has spec document, suitable for tasks > 2 hours or needs AC tracking.
|
|
5
|
+
|
|
6
|
+
## Steps
|
|
7
|
+
|
|
8
|
+
### 1 — Gather information
|
|
9
|
+
`$ARGUMENTS` is task description. If not clear enough, ask max 3 questions:
|
|
10
|
+
- **Goal**: What to build? What problem to solve?
|
|
11
|
+
- **AC**: What does done look like? (2-5 specific, testable criteria)
|
|
12
|
+
- **Constraints**: Tech constraints, out of scope?
|
|
13
|
+
|
|
14
|
+
Don't ask if $ARGUMENTS is already clear enough.
|
|
15
|
+
|
|
16
|
+
### 2 — Create SPEC.md
|
|
17
|
+
Create file `SPEC.md` at project root:
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
# {Title}
|
|
21
|
+
> {one-line summary}
|
|
22
|
+
|
|
23
|
+
**Status:** Draft | **Date:** {today}
|
|
24
|
+
|
|
25
|
+
## Goal
|
|
26
|
+
{Problem to solve — not solution}
|
|
27
|
+
|
|
28
|
+
## Acceptance Criteria
|
|
29
|
+
- [ ] {Given/When/Then or testable statement}
|
|
30
|
+
- [ ] ...
|
|
31
|
+
|
|
32
|
+
## Out of Scope
|
|
33
|
+
- {What won't be done}
|
|
34
|
+
|
|
35
|
+
## Constraints
|
|
36
|
+
{Tech constraints, patterns to follow — omit if none}
|
|
37
|
+
|
|
38
|
+
## Open Questions
|
|
39
|
+
{Unanswered questions — omit if none}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 3 — Next step
|
|
43
|
+
> "SPEC.md created.
|
|
44
|
+
> - Plan in detail: `/tas-plan SPEC.md`
|
|
45
|
+
> - Code immediately: `/tas-dev` (requires `require_plan: false` in tas.yaml)"
|
|
46
|
+
|
|
47
|
+
## Principles
|
|
48
|
+
- SPEC.md is single source of truth — don't create additional files
|
|
49
|
+
- Keep short: target < 1 page
|
|
50
|
+
- If AC > 8 items or task > 1 day → suggest using `/tas-story` instead
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# /tas-status
|
|
2
|
+
|
|
3
|
+
Check current status of TAS project.
|
|
4
|
+
|
|
5
|
+
## Actions
|
|
6
|
+
1. Need context from root/project-status.yaml (ONLY read this file, DO NOT scan docs/ directory)
|
|
7
|
+
2. Need context from root/tas.yaml to know workflow config
|
|
8
|
+
3. Based on project-status.yaml, summarize:
|
|
9
|
+
- Number of artifacts created and their status
|
|
10
|
+
- Number of epics/features/stories by each status
|
|
11
|
+
- Current phase based on aggregated status
|
|
12
|
+
4. Display phase status table and story details by status.
|
|
13
|
+
|
|
14
|
+
## Notes
|
|
15
|
+
- This is read-only command, does not change anything
|
|
16
|
+
- If project-status.yaml seems out of sync, user can run /tas-init to rescan and sync
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# /tas-story $ARGUMENTS
|
|
2
|
+
|
|
3
|
+
Role: PE - Product Engineer
|
|
4
|
+
Create or update User Story document.
|
|
5
|
+
|
|
6
|
+
**Scope:** Business logic, user experience, acceptance criteria, test cases.
|
|
7
|
+
**Out of scope:** Technical implementation, files to modify, database schema — that's `/tas-plan`'s job.
|
|
8
|
+
|
|
9
|
+
## Always / Ask / Never
|
|
10
|
+
|
|
11
|
+
| | Action |
|
|
12
|
+
|---|---|
|
|
13
|
+
| **Always** | Write AC in Given/When/Then format |
|
|
14
|
+
| **Always** | Set `plan_status: pending` for new Story |
|
|
15
|
+
| **Ask** | When Story > 8h — suggest splitting |
|
|
16
|
+
| **Never** | Read SAD, ADR — technical is `/tas-plan`'s job |
|
|
17
|
+
|
|
18
|
+
## Prerequisite
|
|
19
|
+
- At least one Feature must exist
|
|
20
|
+
|
|
21
|
+
## Actions
|
|
22
|
+
|
|
23
|
+
### CREATE mode ($ARGUMENTS is new Story description, or no $ARGUMENTS)
|
|
24
|
+
|
|
25
|
+
**Step 1 — Identify Feature**
|
|
26
|
+
- Read `project.code` from root/`tas.yaml`
|
|
27
|
+
- Prioritize in order:
|
|
28
|
+
1. If `$ARGUMENTS` contains Feature ID → use it
|
|
29
|
+
2. If context has `parent_id` → use it
|
|
30
|
+
3. Ask user: "Which Feature does this Story belong to?" — no directory scan
|
|
31
|
+
|
|
32
|
+
**Step 2 — Gather business context**
|
|
33
|
+
- Read identified Feature file (get business context, scope, existing Stories list)
|
|
34
|
+
- Read PRD (if exists) — only business requirements, user goals
|
|
35
|
+
|
|
36
|
+
**Step 3 — Determine Story ID**
|
|
37
|
+
- Read Stories section in Feature file → determine next index from that list
|
|
38
|
+
- DO NOT scan directory
|
|
39
|
+
|
|
40
|
+
**Step 4 — Draft Story with user**
|
|
41
|
+
|
|
42
|
+
Discuss to fill in:
|
|
43
|
+
|
|
44
|
+
a) **User Story**: "As a [role], I want [goal], so that [benefit]"
|
|
45
|
+
|
|
46
|
+
b) **Business Requirements** (if any): specific business rules, stakeholder constraints
|
|
47
|
+
|
|
48
|
+
c) **Design Notes** (if any): UI/UX specs, mockup links, flow diagrams
|
|
49
|
+
|
|
50
|
+
d) **Prerequisites** (if any): other Stories that must be done first
|
|
51
|
+
|
|
52
|
+
e) **Acceptance Criteria**: each AC is a clear Given/When/Then scenario
|
|
53
|
+
|
|
54
|
+
**Step 5 — Test Case Prompting**
|
|
55
|
+
|
|
56
|
+
After AC confirmed, ask more:
|
|
57
|
+
- "Besides happy path, any edge cases to test?" (empty input, boundary values, concurrent)
|
|
58
|
+
- "Any negative cases to cover?" (unauthorized, invalid data, timeout, not found)
|
|
59
|
+
- "Any external dependencies to mock when testing?" (external APIs, database state)
|
|
60
|
+
|
|
61
|
+
Write all to `## Unit Test Cases` section.
|
|
62
|
+
|
|
63
|
+
**Step 6 — Create file**
|
|
64
|
+
- Read `.tas/templates/Story.md` for format
|
|
65
|
+
- Create `docs/epics/{code}-Epic-{NNN}-{slug}/{code}-Feature-{NNN}-{slug}/{code}-Story-{NNN}-{slug}.md`
|
|
66
|
+
- Frontmatter: `plan_status: pending`, `plan_date:` left empty
|
|
67
|
+
|
|
68
|
+
**Step 7 — Update project-status.yaml**
|
|
69
|
+
Per `.tas/rules/common/project-status.md` — add entry to `epics.{EPIC_ID}.features.{FEATURE_ID}.stories`.
|
|
70
|
+
|
|
71
|
+
**Step 8 — Notify next step**
|
|
72
|
+
> "Story created. Before SE starts coding, run `/tas-plan {Story-ID}` for technical planning."
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### UPDATE mode ($ARGUMENTS is Story ID, e.g., "Story-005")
|
|
77
|
+
|
|
78
|
+
1. Find file via glob `docs/epics/**/{code}-Story-{ID}-*.md`
|
|
79
|
+
2. Read current Story file
|
|
80
|
+
3. Ask user what needs changing (update AC, change status, add test cases, fix business rule...)
|
|
81
|
+
4. Update file, add entry to Changelog
|
|
82
|
+
5. Update `project-status.yaml` per `.tas/rules/common/project-status.md`.
|
|
83
|
+
|
|
84
|
+
## Principles
|
|
85
|
+
- Story must be small enough to complete in **4-8 hours**; if larger → split into multiple Stories
|
|
86
|
+
- Story file = **product artifact**: describes *what* and *why*, not *how*
|
|
87
|
+
- Story status: New → Committed → In Progress → Deploy Test → Verify Test → Deploy Stag → Verify Stag → Deploy Prod → Verify Prod → Done
|
|
88
|
+
|
|
89
|
+
## Final Step — Token Log
|
|
90
|
+
|
|
91
|
+
Follow `.tas/rules/common/token-logging.md`: write AI Usage Log to working Story file.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# .tas/project-status-example.yaml - Reference template
|
|
2
|
-
# /tas-init
|
|
3
|
-
# Human
|
|
4
|
-
last_updated: ""
|
|
5
|
-
|
|
6
|
-
artifacts:
|
|
7
|
-
prd: {}
|
|
8
|
-
design_spec: {}
|
|
9
|
-
sad: {}
|
|
10
|
-
security_report: {}
|
|
11
|
-
performance_report: {}
|
|
12
|
-
|
|
13
|
-
adrs: {}
|
|
14
|
-
|
|
15
|
-
bugs: {}
|
|
16
|
-
|
|
17
|
-
epics: {}
|
|
1
|
+
# .tas/project-status-example.yaml - Reference template for root/project-status.yaml
|
|
2
|
+
# /tas-init will create root/project-status.yaml from this template.
|
|
3
|
+
# Human can edit manually. Run /tas-init to re-sync if drifted.
|
|
4
|
+
last_updated: ""
|
|
5
|
+
|
|
6
|
+
artifacts:
|
|
7
|
+
prd: {}
|
|
8
|
+
design_spec: {}
|
|
9
|
+
sad: {}
|
|
10
|
+
security_report: {}
|
|
11
|
+
performance_report: {}
|
|
12
|
+
|
|
13
|
+
adrs: {}
|
|
14
|
+
|
|
15
|
+
bugs: {}
|
|
16
|
+
|
|
17
|
+
epics: {}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# ADO Integration Rules
|
|
2
|
+
|
|
3
|
+
Bidirectional sync between .md files in repo and work items on Azure DevOps.
|
|
4
|
+
ADO sync is **intentional operation** — not automatic after each file edit.
|
|
5
|
+
|
|
6
|
+
## When to Apply
|
|
7
|
+
|
|
8
|
+
- User runs `/ado-create`, `/ado-update`, `/ado-status`, `/ado-get`, `/ado-delete`
|
|
9
|
+
- DO NOT apply when: user only edits .md file normally without mentioning ADO
|
|
10
|
+
|
|
11
|
+
## Always / Ask / Never
|
|
12
|
+
|
|
13
|
+
| | Action |
|
|
14
|
+
|---|---|
|
|
15
|
+
| **Always** | Read `tas.yaml` and check `ado.enabled` before any operation |
|
|
16
|
+
| **Always** | Display ADO ID and URL after each successful create/update |
|
|
17
|
+
| **Always** | Update frontmatter `ado_id`, `ado_state`, `last_ado_sync` in .md file after sync |
|
|
18
|
+
| **Ask** | When syncing multiple items at once — confirm list before running |
|
|
19
|
+
| **Ask** | When detecting conflict between .md file and ADO item (which is source of truth?) |
|
|
20
|
+
| **Ask** | When deleting work item — this is irreversible operation |
|
|
21
|
+
| **Never** | Auto-sync whenever .md file is edited (too aggressive, creates noise) |
|
|
22
|
+
| **Never** | Delete ADO item without clear user confirmation |
|
|
23
|
+
| **Never** | Create duplicate work item if `ado_id` already exists in frontmatter |
|
|
24
|
+
|
|
25
|
+
## First Step — Check ADO Enabled
|
|
26
|
+
|
|
27
|
+
Before performing any operation, read `tas.yaml` at root and check `ado.enabled`:
|
|
28
|
+
- If `ado.enabled: false` or field doesn't exist: notify "ADO integration is disabled in tas.yaml (`ado.enabled: false`). Enable if project uses ADO." then stop.
|
|
29
|
+
- If `ado.enabled: true`: continue normally.
|
|
30
|
+
|
|
31
|
+
## Prerequisites
|
|
32
|
+
|
|
33
|
+
- Azure CLI + azure-devops extension: `az extension add --name azure-devops --upgrade`
|
|
34
|
+
- Python 3.8+ with pyyaml: `pip install pyyaml`
|
|
35
|
+
- PAT in .env file: `AzureDevops_Personal_AccessToken=your-pat-here`
|
|
36
|
+
|
|
37
|
+
## Commands
|
|
38
|
+
|
|
39
|
+
All ADO commands run via: `python .tas/tools/tas-ado.py <command> [args]`
|
|
40
|
+
|
|
41
|
+
Or use slash commands:
|
|
42
|
+
- `/ado-create <type> <temp-id> [--parent-id <id>]`
|
|
43
|
+
- `/ado-get <ado-id>`
|
|
44
|
+
- `/ado-update <type> <ado-id> [--assign <name>] [--status <state>]`
|
|
45
|
+
- `/ado-status <ado-id> --status <state>`
|
|
46
|
+
- `/ado-delete <type> <ado-id>`
|
|
47
|
+
|
|
48
|
+
## File Convention
|
|
49
|
+
|
|
50
|
+
- Filename: `{type}-{ado_id}-{slug-title}.md`
|
|
51
|
+
- Each file has YAML frontmatter: `ado_id`, `ado_type`, `ado_state`, `last_ado_sync`
|
|
52
|
+
- .md file is single source of truth, sync to ADO when needed
|
|
53
|
+
|
|
54
|
+
## Red Flags
|
|
55
|
+
|
|
56
|
+
- File has `ado_id` but state in file differs from ADO → confirm with user before overwriting
|
|
57
|
+
- PAT expired → guide to rotate, don't log token to stdout
|
|
58
|
+
- `ado.enabled: true` but project hasn't set up Azure CLI → check prerequisites first
|
|
59
|
+
|
|
60
|
+
## Anti-Rationalization
|
|
61
|
+
|
|
62
|
+
| Rationalization | Counter |
|
|
63
|
+
|---|---|
|
|
64
|
+
| "Auto-sync is more convenient, no need to remember" | Hook auto-sync causes unintended pushes when editing draft — sync must be intentional |
|
|
65
|
+
| "Delete is OK, I know what I'm doing" | ADO delete has no undo — always confirm, even if user seems confident |
|