@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.
Files changed (99) 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 +131 -54
  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 -546
  94. package/package.json +1 -1
  95. package/.tas/commands/tas-epic.md +0 -35
  96. package/.tas/commands/tas-story.md +0 -91
  97. package/.tas/rules/common/story-done.md +0 -30
  98. package/.tas/templates/Epic.md +0 -46
  99. package/.tas/templates/Story.md +0 -90
@@ -0,0 +1,339 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ TAS GitHub Integration Script
4
+ GitHub PR operations for tas-review-pr command.
5
+
6
+ Usage: python tools/tas-github.py <command> [arguments]
7
+
8
+ Commands:
9
+ pr-get <pr-id>
10
+ pr-diff <pr-id>
11
+ pr-comment <pr-id> --comment <text>
12
+ pr-inline <pr-id> --file <path> --line <n> --comment <text>
13
+ pr-vote <pr-id> --vote <approve|reject|wait-for-author|reset>
14
+
15
+ Prerequisites:
16
+ - GitHub CLI (gh) installed and authenticated: gh auth login
17
+ - Python 3.8+
18
+ """
19
+
20
+ import argparse
21
+ import json
22
+ import os
23
+ import re
24
+ import subprocess
25
+ import sys
26
+ import tempfile
27
+ import urllib.error
28
+ import urllib.request
29
+ from pathlib import Path
30
+
31
+
32
+ # --- Helpers ---
33
+
34
+ def find_repo_root():
35
+ path = Path.cwd()
36
+ while path != path.parent:
37
+ if (path / ".git").exists():
38
+ return path
39
+ path = path.parent
40
+ print("ERROR: Not inside a git repository.")
41
+ sys.exit(1)
42
+
43
+
44
+ def get_remote_url(root):
45
+ result = subprocess.run(
46
+ ["git", "remote", "get-url", "origin"],
47
+ capture_output=True,
48
+ cwd=str(root),
49
+ )
50
+ if result.returncode != 0:
51
+ print("ERROR: Cannot get git remote URL. Run inside a git repo with 'origin' remote.")
52
+ sys.exit(1)
53
+ return result.stdout.decode("utf-8").strip()
54
+
55
+
56
+ def parse_owner_repo(remote_url):
57
+ """Extract owner/repo from GitHub remote URL (https or ssh)."""
58
+ # ssh: git@github.com:owner/repo.git
59
+ m = re.search(r"github\.com[:/](.+?)(?:\.git)?$", remote_url)
60
+ if m:
61
+ return m.group(1).rstrip("/")
62
+ print(f"ERROR: Cannot parse owner/repo from remote URL: {remote_url}")
63
+ sys.exit(1)
64
+
65
+
66
+ def get_github_token():
67
+ result = subprocess.run(
68
+ ["gh", "auth", "token"],
69
+ capture_output=True,
70
+ )
71
+ if result.returncode != 0:
72
+ print("ERROR: gh CLI not authenticated. Run: gh auth login")
73
+ sys.exit(1)
74
+ return result.stdout.decode("utf-8").strip()
75
+
76
+
77
+ def gh_cmd(args):
78
+ """Run gh CLI command and return parsed JSON output."""
79
+ cmd = ["gh"] + args + ["--output", "json"] if "--output" not in args else ["gh"] + args
80
+ result = subprocess.run(cmd, capture_output=True)
81
+
82
+ def _decode(b):
83
+ try:
84
+ return (b or b"").decode("utf-8")
85
+ except UnicodeDecodeError:
86
+ return (b or b"").decode("cp1252", errors="replace")
87
+
88
+ if result.returncode != 0:
89
+ print(f"ERROR: gh command failed:\n{_decode(result.stderr)}")
90
+ sys.exit(1)
91
+ stdout = _decode(result.stdout).strip()
92
+ if not stdout:
93
+ return {}
94
+ json_start = re.search(r"[{\[]", stdout)
95
+ if json_start:
96
+ try:
97
+ return json.loads(stdout[json_start.start():])
98
+ except json.JSONDecodeError:
99
+ return {}
100
+ return {}
101
+
102
+
103
+ def github_rest(method, path, data, token):
104
+ """Call GitHub REST API using token auth."""
105
+ import base64
106
+ url = f"https://api.github.com{path}"
107
+ bearer = f"Bearer {token}"
108
+ body = json.dumps(data).encode("utf-8")
109
+ req = urllib.request.Request(url, data=body, method=method)
110
+ req.add_header("Authorization", bearer)
111
+ req.add_header("Content-Type", "application/json")
112
+ req.add_header("Accept", "application/vnd.github+json")
113
+ req.add_header("X-GitHub-Api-Version", "2022-11-28")
114
+ try:
115
+ with urllib.request.urlopen(req) as resp:
116
+ return json.loads(resp.read().decode("utf-8"))
117
+ except urllib.error.HTTPError as e:
118
+ err_body = e.read().decode("utf-8")
119
+ print(f"ERROR: GitHub REST API {method} {path} failed ({e.code}): {err_body}")
120
+ sys.exit(1)
121
+
122
+
123
+ # --- PR Commands ---
124
+
125
+ def cmd_pr_get(args):
126
+ root = find_repo_root()
127
+ remote_url = get_remote_url(root)
128
+ owner_repo = parse_owner_repo(remote_url)
129
+
130
+ result = gh_cmd([
131
+ "pr", "view", str(args.pr_id),
132
+ "--repo", owner_repo,
133
+ "--json", "number,title,body,headRefName,baseRefName,author,state,headRefOid,url",
134
+ ])
135
+
136
+ print(f"PR_ID: {result.get('number', args.pr_id)}")
137
+ print(f"TITLE: {result.get('title', '')}")
138
+ print(f"DESCRIPTION: {result.get('body', '')}")
139
+ print(f"SOURCE_BRANCH: {result.get('headRefName', '')}")
140
+ print(f"TARGET_BRANCH: {result.get('baseRefName', '')}")
141
+ author = result.get("author", {})
142
+ print(f"CREATOR: {author.get('login', '') if isinstance(author, dict) else str(author)}")
143
+ print(f"STATUS: {result.get('state', '')}")
144
+ print(f"REPO_ID: {owner_repo}")
145
+ print(f"REPO_NAME: {owner_repo.split('/')[-1]}")
146
+ print(f"HEAD_COMMIT: {result.get('headRefOid', '')}")
147
+ print(f"WORK_ITEMS: ") # GitHub has no native work item link (use PR body parsing if needed)
148
+
149
+
150
+ def cmd_pr_diff(args):
151
+ root = find_repo_root()
152
+ remote_url = get_remote_url(root)
153
+ owner_repo = parse_owner_repo(remote_url)
154
+
155
+ result = gh_cmd([
156
+ "pr", "view", str(args.pr_id),
157
+ "--repo", owner_repo,
158
+ "--json", "headRefName,baseRefName,headRefOid",
159
+ ])
160
+
161
+ source_branch = result.get("headRefName", "")
162
+ target_branch = result.get("baseRefName", "")
163
+ fetch_head = result.get("headRefOid", "")
164
+
165
+ print(f"SOURCE_BRANCH: {source_branch}")
166
+ print(f"TARGET_BRANCH: {target_branch}")
167
+
168
+ fetch_result = subprocess.run(
169
+ ["git", "fetch", "origin", source_branch],
170
+ capture_output=True,
171
+ cwd=str(root),
172
+ )
173
+ if fetch_result.returncode != 0:
174
+ warn = (fetch_result.stderr or b"").decode("utf-8", errors="replace")
175
+ print(f"WARNING: git fetch failed: {warn}")
176
+
177
+ if not fetch_head:
178
+ head_result = subprocess.run(
179
+ ["git", "rev-parse", "FETCH_HEAD"],
180
+ capture_output=True,
181
+ cwd=str(root),
182
+ )
183
+ fetch_head = head_result.stdout.decode("utf-8").strip() if head_result.returncode == 0 else ""
184
+
185
+ print(f"FETCH_HEAD: {fetch_head}")
186
+
187
+ diff_result = subprocess.run(
188
+ ["git", "diff", "--name-status", f"origin/{target_branch}...FETCH_HEAD"],
189
+ capture_output=True,
190
+ cwd=str(root),
191
+ )
192
+ if diff_result.returncode == 0:
193
+ print("CHANGED_FILES:")
194
+ print(diff_result.stdout.decode("utf-8", errors="replace").strip())
195
+ else:
196
+ warn = (diff_result.stderr or b"").decode("utf-8", errors="replace")
197
+ print(f"WARNING: git diff failed: {warn}")
198
+
199
+
200
+ def cmd_pr_comment(args):
201
+ root = find_repo_root()
202
+ remote_url = get_remote_url(root)
203
+ owner_repo = parse_owner_repo(remote_url)
204
+
205
+ tmp = tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False, encoding="utf-8")
206
+ tmp.write(args.comment)
207
+ tmp.close()
208
+ try:
209
+ result = subprocess.run(
210
+ ["gh", "pr", "comment", str(args.pr_id),
211
+ "--repo", owner_repo,
212
+ "--body-file", tmp.name],
213
+ capture_output=True,
214
+ )
215
+ if result.returncode != 0:
216
+ err = (result.stderr or b"").decode("utf-8", errors="replace")
217
+ print(f"ERROR: gh pr comment failed: {err}")
218
+ sys.exit(1)
219
+ print(f"Posted comment on PR #{args.pr_id}")
220
+ finally:
221
+ try:
222
+ os.unlink(tmp.name)
223
+ except OSError:
224
+ pass
225
+
226
+
227
+ def cmd_pr_inline(args):
228
+ root = find_repo_root()
229
+ remote_url = get_remote_url(root)
230
+ owner_repo = parse_owner_repo(remote_url)
231
+ token = get_github_token()
232
+
233
+ # Get HEAD commit for the PR (required by GitHub inline comment API)
234
+ result = gh_cmd([
235
+ "pr", "view", str(args.pr_id),
236
+ "--repo", owner_repo,
237
+ "--json", "headRefOid",
238
+ ])
239
+ commit_id = result.get("headRefOid", "")
240
+ if not commit_id:
241
+ print("ERROR: Could not get PR head commit ID")
242
+ sys.exit(1)
243
+
244
+ file_path = args.file_path.replace("\\", "/").lstrip("/")
245
+
246
+ data = {
247
+ "body": args.comment,
248
+ "commit_id": commit_id,
249
+ "path": file_path,
250
+ "line": args.line,
251
+ "side": "RIGHT",
252
+ }
253
+ resp = github_rest("POST", f"/repos/{owner_repo}/pulls/{args.pr_id}/comments", data, token)
254
+ comment_id = resp.get("id", "")
255
+ print(f"Posted inline comment on {file_path}:{args.line} (comment #{comment_id})")
256
+
257
+
258
+ def cmd_pr_vote(args):
259
+ root = find_repo_root()
260
+ remote_url = get_remote_url(root)
261
+ owner_repo = parse_owner_repo(remote_url)
262
+
263
+ vote = args.vote.lower()
264
+ if vote == "approve":
265
+ gh_args = ["pr", "review", str(args.pr_id), "--repo", owner_repo, "--approve"]
266
+ gh_cmd(gh_args)
267
+ print(f"Approved PR #{args.pr_id}")
268
+ elif vote == "reject":
269
+ gh_args = [
270
+ "pr", "review", str(args.pr_id), "--repo", owner_repo,
271
+ "--request-changes",
272
+ "--body", "AI review found Critical or High severity issues. See inline comments for details.",
273
+ ]
274
+ gh_cmd(gh_args)
275
+ print(f"Requested changes on PR #{args.pr_id}")
276
+ elif vote in ("wait-for-author", "wait"):
277
+ gh_args = [
278
+ "pr", "review", str(args.pr_id), "--repo", owner_repo,
279
+ "--comment",
280
+ "--body", "AI review: waiting for author to address review comments.",
281
+ ]
282
+ gh_cmd(gh_args)
283
+ print(f"Posted 'waiting for author' comment on PR #{args.pr_id}")
284
+ elif vote == "reset":
285
+ print(f"INFO: GitHub does not support vote reset. No action taken for PR #{args.pr_id}")
286
+ else:
287
+ print(f"ERROR: Unknown vote '{vote}'. Use: approve|reject|wait-for-author|reset")
288
+ sys.exit(1)
289
+
290
+
291
+ # --- Main ---
292
+
293
+ def main():
294
+ parser = argparse.ArgumentParser(description="TAS GitHub PR Integration")
295
+ subparsers = parser.add_subparsers(dest="command", help="Command to run")
296
+
297
+ p = subparsers.add_parser("pr-get", help="Get PR metadata")
298
+ p.add_argument("pr_id", type=int, help="Pull Request number")
299
+
300
+ p = subparsers.add_parser("pr-diff", help="Fetch PR branch and list changed files")
301
+ p.add_argument("pr_id", type=int, help="Pull Request number")
302
+
303
+ p = subparsers.add_parser("pr-comment", help="Post summary comment on PR")
304
+ p.add_argument("pr_id", type=int, help="Pull Request number")
305
+ p.add_argument("--comment", required=True, help="Comment text (markdown supported)")
306
+
307
+ p = subparsers.add_parser("pr-inline", help="Post inline comment on PR diff")
308
+ p.add_argument("pr_id", type=int, help="Pull Request number")
309
+ p.add_argument("--file", dest="file_path", required=True, help="File path (e.g. src/api/users.ts)")
310
+ p.add_argument("--line", type=int, required=True, help="Line number")
311
+ p.add_argument("--comment", required=True, help="Inline comment text")
312
+
313
+ p = subparsers.add_parser("pr-vote", help="Set vote on PR")
314
+ p.add_argument("pr_id", type=int, help="Pull Request number")
315
+ p.add_argument("--vote", required=True,
316
+ choices=["approve", "reject", "wait-for-author", "reset"],
317
+ help="Vote to cast")
318
+
319
+ args = parser.parse_args()
320
+ if not args.command:
321
+ parser.print_help()
322
+ sys.exit(1)
323
+
324
+ if args.command == "pr-get":
325
+ cmd_pr_get(args)
326
+ elif args.command == "pr-diff":
327
+ cmd_pr_diff(args)
328
+ elif args.command == "pr-comment":
329
+ cmd_pr_comment(args)
330
+ elif args.command == "pr-inline":
331
+ cmd_pr_inline(args)
332
+ elif args.command == "pr-vote":
333
+ cmd_pr_vote(args)
334
+ else:
335
+ parser.print_help()
336
+
337
+
338
+ if __name__ == "__main__":
339
+ main()
package/README.md CHANGED
@@ -7,17 +7,19 @@ TAS Kit - Turbo Agentic SDLC toolkit for modern AI-first software teams.
7
7
  ## Purpose
8
8
 
9
9
  TAS Kit helps software development teams:
10
- - **Standardize SDLC process** with clear artifacts (PRD, SAD, ADR, Epic, Feature, Story)
10
+ - **Standardize SDLC process** with clear artifacts (PRD, SAD, ADR, Feature, Feature-Technical)
11
11
  - **Optimize token usage** through Context Layer — invest in design phase, save in code phase
12
12
  - **Support multiple workflows**: from solo developer to full team with PE/SE/DSE roles
13
13
  - **Automate** with Hybrid and Autonomous agents operating 24/7
14
14
 
15
+ > **Kit v3 — Feature-only flow:** Epic and User Story were removed. Feature is now the single TAS work unit — one complete business flow that may span multiple stacks (`app` | `web` | `service` | `integration`). Per-stack technical breakdown lives in `Feature-{NNN}-Technical.md`. See [Migration](#migration-from-v1v2-epicstory-flow) at the bottom.
16
+
15
17
  ---
16
18
 
17
19
  ## Design Philosophy
18
20
 
19
21
  ### Spec-Driven Development
20
- All code starts from spec. Story.md is "context digest" that has absorbed all information from PRD, SAD, ADR, Feature. Each implementation session only needs to read CLAUDE.md + Story.md — no need to reload all artifacts.
22
+ All code starts from spec. Each Feature owns a paired `Feature-{NNN}.md` (business AC) and `Feature-{NNN}-Technical.md` (global: Context Diagram, Data Flow, API Spec, ERD; per-stack: Logic Flow, File Changes, Config, Unit Tests, Tasks). Each implementation session only needs to read CLAUDE.md + the two Feature files — no need to reload PRD/SAD/ADR.
21
23
 
22
24
  ### Human-Led, AI-Powered
23
25
  - **Human-led**: Architecture decisions, design approval, code review
@@ -34,7 +36,7 @@ All code starts from spec. Story.md is "context digest" that has absorbed all in
34
36
 
35
37
  ### Role-Based & Template-Driven
36
38
  - 3 roles: PE (Product Engineer), SE (Software Engineer), DSE (DevOps Engineer)
37
- - Separate templates for PRD, SAD, ADR, Epic, Feature, Story per team standards
39
+ - Separate templates for PRD, SAD, ADR, Feature, Feature-Technical per team standards
38
40
  - Flow configurable via `tas.yaml` file
39
41
 
40
42
  ### Azure DevOps Compatible
@@ -48,10 +50,13 @@ All code starts from spec. Story.md is "context digest" that has absorbed all in
48
50
  :::mermaid
49
51
  graph TD
50
52
  subgraph Phase1["Phase 1: Discovery"]
53
+ BRD["/tas-brd"]
51
54
  PRD["/tas-prd"]
52
55
  SAD["/tas-sad"]
53
56
  ADR["/tas-adr"]
54
57
  DESIGN["/tas-design"]
58
+ BRD -->|Product Engineer| BRD_ARTIFACT["BRD.md"]
59
+ BRD_ARTIFACT -->|Product Engineer| PRD
55
60
  PRD -->|Product Engineer| PRD_ARTIFACT["PRD.md"]
56
61
  PRD_ARTIFACT -->|Software Engineer| SAD
57
62
  PRD_ARTIFACT -->|Software Engineer| ADR
@@ -62,22 +67,25 @@ graph TD
62
67
  end
63
68
 
64
69
  subgraph Phase2["Phase 2: Planning"]
65
- EPIC["/tas-epic"]
66
70
  FEATURE["/tas-feature"]
67
- STORY["/tas-story"]
68
- PRD_ARTIFACT -->|Product Engineer| EPIC
69
- EPIC --> EPIC_ARTIFACT["Epic-XXX/"]
70
- EPIC_ARTIFACT -->|Product Engineer| FEATURE
71
+ PLAN["/tas-plan"]
72
+ MASTERPLAN["/tas-master-plan"]
73
+ PRD_ARTIFACT -->|Product Engineer| FEATURE
71
74
  FEATURE --> FEATURE_ARTIFACT["Feature-XXX/"]
72
- SAD_ARTIFACT --> FEATURE
75
+ SAD_ARTIFACT --> PLAN
73
76
  DESIGN_ARTIFACT --> FEATURE
74
- FEATURE_ARTIFACT -->|Product Engineer| STORY
75
- STORY --> STORY_ARTIFACT["Story-XXX.md"]
77
+ FEATURE_ARTIFACT -->|Software Engineer| PLAN
78
+ PLAN --> TECH_ARTIFACT["Feature-XXX-Technical.md"]
79
+ PRD_ARTIFACT -->|Tech Lead| MASTERPLAN
80
+ SAD_ARTIFACT --> MASTERPLAN
81
+ FEATURE_ARTIFACT -->|All Features created| MASTERPLAN
82
+ MASTERPLAN --> MP_ARTIFACT["docs/master-plan.md"]
76
83
  end
77
84
 
78
85
  subgraph Phase3["Phase 3: Implementation"]
79
- PLAN["/tas-plan"]
86
+ ORCHESTRATE["/tas-orchestrate"]
80
87
  DEV["/tas-dev"]
88
+ DEBUG["/tas-debug"]
81
89
  FIX["/tas-fix"]
82
90
  APItest["/tas-apitest"]
83
91
  E2E["/tas-e2e"]
@@ -86,18 +94,22 @@ graph TD
86
94
  E2E_WEB["/tas-e2e-web"]
87
95
  E2E_MOBILE["/tas-e2e-mobile"]
88
96
  BUG["/tas-bug"]
89
- REVIEW["/tas-review"]
97
+ REVIEWPR["/tas-review-pr"]
90
98
  FUNctest["/tas-functest"]
91
- STORY_ARTIFACT -->|Software Engineer| PLAN
92
- PLAN --> STORY_ARTIFACT
93
- STORY_ARTIFACT -->|AI Agent| DEV
94
- DEV --> CODE["Source Code"]
99
+ MP_ARTIFACT -->|Autonomous| ORCHESTRATE
100
+ TECH_ARTIFACT -->|Hybrid| DEV
101
+ ORCHESTRATE --> CODE["Source Code"]
102
+ DEV --> CODE
103
+ CODE -->|Build fails| DEBUG
104
+ DEBUG --> CODE
95
105
  CODE -->|Bug found| FIX
96
106
  FIX --> CODE
97
- CODE -->|Software Engineer| REVIEW
98
- REVIEW --> REVIEW_ARTIFACT["Code Review Report"]
99
- STORY_ARTIFACT -->|Software Engineer| APItest
107
+ CODE -->|PR created| REVIEWPR
108
+ REVIEWPR --> REVIEW_ARTIFACT["PR Comments + Vote"]
109
+ TECH_ARTIFACT -->|Software Engineer| APItest
100
110
  APItest --> APITEST_ARTIFACT["API Testing Script"]
111
+ FEATURE_ARTIFACT -->|Product Engineer| FUNctest
112
+ FUNctest --> FUNCTEST_ARTIFACT["Func-Test-Spec.md"]
101
113
  FUNCTEST_ARTIFACT -->|Product Engineer| E2E
102
114
  E2E --> E2E_ARTIFACT["E2E Test Scenarios"]
103
115
  FUNCTEST_ARTIFACT -->|Software Engineer| FUNCTEST_WEB
@@ -110,8 +122,6 @@ graph TD
110
122
  E2E_MOBILE --> E2E_MOBILE_ARTIFACT["E2E Mobile Test Script"]
111
123
  CODE -->|Bug found| BUG
112
124
  BUG --> BUG_ARTIFACT["Bug Report"]
113
- FEATURE_ARTIFACT -->|Product Engineer| FUNctest
114
- FUNctest --> FUNCTEST_ARTIFACT["Functional-Testing-Spec-FeatureXXX.md"]
115
125
  end
116
126
 
117
127
  subgraph Phase4["Phase 4: Quality & Deploy"]
@@ -131,13 +141,17 @@ graph TD
131
141
 
132
142
  STATUS["/tas-status"] -.->|Track| PRD_ARTIFACT
133
143
  STATUS -.->|Track| SAD_ARTIFACT
134
- STATUS -.->|Track| STORY_ARTIFACT
144
+ STATUS -.->|Track| FEATURE_ARTIFACT
145
+ STATUS -.->|Track| TECH_ARTIFACT
135
146
  STATUS -.->|Track| DEPLOY
136
147
 
148
+ style BRD_ARTIFACT fill:#e1f5ff
137
149
  style PRD_ARTIFACT fill:#e1f5ff
138
150
  style SAD_ARTIFACT fill:#fff4e1
139
151
  style DESIGN_ARTIFACT fill:#f3e5f5
140
- style STORY_ARTIFACT fill:#e8f5e9
152
+ style FEATURE_ARTIFACT fill:#e8f5e9
153
+ style TECH_ARTIFACT fill:#e8f5e9
154
+ style MP_ARTIFACT fill:#e8f5e9
141
155
  style CODE fill:#f3e5f5
142
156
  style TEST_REPORT fill:#c8e6c9
143
157
  style DEPLOY fill:#c8e6c9
@@ -147,29 +161,35 @@ graph TD
147
161
 
148
162
  | Phase | Role | Commands | Artifacts |
149
163
  |-------|------|----------|-----------|
150
- | **Phase 1: Discovery** | PE, SE | `/tas-prd`, `/tas-sad`, `/tas-adr`, `/tas-design` | PRD.md, SAD.md, ADR-XXX.md, design-spec.md |
151
- | **Phase 2: Planning** | SE | `/tas-epic`, `/tas-feature`, `/tas-story`, `/tas-functest` | Epic-XXX/, Feature-XXX/, Story-XXX.md, Functional-Testing-Spec-FeatureXXX.md |
152
- | **Phase 3: Implementation** | PE, SE, AI | `/tas-plan`, `/tas-dev`, `/tas-fix`, `/tas-apitest`, `/tas-e2e`, `/tas-functest-web`, `/tas-functest-mobile`, `/tas-e2e-web`, `/tas-e2e-mobile`, `/tas-bug`, `/tas-review` | Plan.md, Source Code, API Testing Script, E2E Test Scenarios, Functional Test Scripts, Bug Report, Code Review Report |
164
+ | **Phase 1: Discovery** | PE, SE | `/tas-brd`, `/tas-prd`, `/tas-sad`, `/tas-adr`, `/tas-design` | BRD.md, PRD.md, SAD.md, ADR-XXX.md, design-spec.md |
165
+ | **Phase 2: Planning** | PE, SE | `/tas-feature`, `/tas-plan`, `/tas-functest`, `/tas-master-plan` | Feature-XXX/, Feature-XXX-Technical.md, Func-Test-Spec.md, docs/master-plan.md |
166
+ | **Phase 3: Implementation** | PE, SE, AI | `/tas-orchestrate`, `/tas-dev`, `/tas-debug`, `/tas-fix`, `/tas-apitest`, `/tas-e2e`, `/tas-functest-web`, `/tas-functest-mobile`, `/tas-e2e-web`, `/tas-e2e-mobile`, `/tas-bug`, `/tas-review-pr` | Source Code, API Testing Script, E2E Test Scenarios, Functional Test Scripts, Bug Report, PR Review Comments |
153
167
  | **Phase 4: Quality & Deploy** | PE, DSE | `/tas-security`, Pipeline/CLI | Security Report, Test Report, Production |
154
168
 
155
169
  ### Phase Details
156
170
 
157
171
  #### Phase 1: Discovery
158
- - **PE**: Create PRD with `/tas-prd`, create design-spec with `/tas-design`
172
+ - **PE**: Create BRD with `/tas-brd` business problem, KPIs, stakeholders, scope first
173
+ - **PE**: Create PRD with `/tas-prd` (consumes BRD.md), create design-spec with `/tas-design`
159
174
  - **SE**: Create SAD with `/tas-sad`, create ADR with `/tas-adr`
160
175
 
161
176
  #### Phase 2: Planning
162
- - **PE**: Breakdown Epic with `/tas-epic`, Feature with `/tas-feature`, Story with `/tas-story`
177
+ - **PE**: Create Feature with `/tas-feature` — one Feature per business requirement (may span multiple stacks), AC in Given/When/Then
178
+ - **SE**: Generate `Feature-XXX-Technical.md` with `/tas-plan` — global sections (Context Diagram, Data Flow, API Spec, ERD) + per-stack sections (Logic Flow, File Changes, Config, Unit Tests, Tasks)
179
+ - **PE/SE**: Create Func-Test-Spec with `/tas-functest`
180
+ - **Tech Lead**: After all Features are created, run `/tas-master-plan` — reads PRD FR list + SAD, scans Feature files to resolve dependencies, generates `docs/master-plan.md` with detailed strategy + machine-readable execution tracks
163
181
 
164
182
  #### Phase 3: Implementation
165
- - **SE**: Create Plan with `/tas-plan`, Implement with `/tas-dev`, Fix bug with `/tas-fix`
166
- - **SE**: Review code with `/tas-review`
167
- - **PE**: Create Functional Testing Spec with `/tas-functest`
183
+ - **AI (Autonomous)**: Run `/tas-orchestrate` — executes master plan by spawning `software-engineer` agents per Feature in track order; supports resume and 24/7 unattended mode
184
+ - **SE (Hybrid)**: Implement with `/tas-dev` (consumes Feature + Feature-Technical), fix with `/tas-fix`
185
+ - **SE (Autonomous)**: `/tas-dev --autonomous=true` or set `autonomy_mode: full` in `tas.yaml` — auto-runs `/tas-plan` if no Technical file exists, implements without interruption, auto-marks Done when review passes; use for Features with clear scope where SE trusts full AI execution
186
+ - **SE**: When build/runtime errors occur, run `/tas-debug` — full build-debug loop until resolved
168
187
  - **SE**: Create API Testing Script with `/tas-apitest`
169
- - **PE**: Create E2E Test Scenarios with `/tas-e2e`
188
+ - **PE**: Create E2E Test Scenarios with `/tas-e2e` (chains multiple Features into a flow)
170
189
  - **SE**: Create Functional Test Scripts with `/tas-functest-web`, `/tas-functest-mobile`
171
190
  - **PE**: Create E2E Test Scripts with `/tas-e2e-web`, `/tas-e2e-mobile`
172
191
  - **PE**: Create Bug Report with `/tas-bug`
192
+ - **SE**: Review PR with `/tas-review-pr` — auto-detects ADO/GitHub, posts inline comments + approve/request-changes vote
173
193
 
174
194
  #### Phase 4: Quality & Deploy
175
195
  - **DSE**: Security Review with `/tas-security`
@@ -250,14 +270,13 @@ artifacts:
250
270
  status: Approved
251
271
  version: "1.0"
252
272
 
253
- epics:
254
- Epic-001:
255
- status: Active
256
- features:
257
- Feature-001:
258
- stories:
259
- Story-001:
260
- status: In Progress
273
+ features:
274
+ Feature-001:
275
+ path: docs/features/PROJ-Feature-001-checkout/
276
+ title: "Checkout flow"
277
+ stack: web
278
+ status: In Development
279
+ plan_status: completed
261
280
  ```
262
281
 
263
282
  ### .env
@@ -276,12 +295,12 @@ AZURE_DEVOPS_PROJECT=your_project
276
295
 
277
296
  ```
278
297
  .claude/
279
- commands/ 22 slash commands (/tas-*, /ado-*)
280
- skills/ 3 auto-invoked skills
281
- agents/ 29 specialized subagents
298
+ commands/ slash commands (/tas-*, /ado-*)
299
+ skills/ auto-invoked skills
300
+ agents/ specialized subagents
282
301
  .tas/
283
- templates/ Markdown templates (PRD, SAD, ADR, Epic, Feature, Story...)
284
- rules/ Coding standards + workflow rules (code-review, story-done, security...)
302
+ templates/ Markdown templates (PRD, SAD, ADR, Feature, Feature-Technical, Bug...)
303
+ rules/ Coding standards + workflow rules (code-review, feature-done, security...)
285
304
  tools/ ADO integration script (tas-ado.py)
286
305
  CLAUDE.md Project context template (edit this for your project)
287
306
  tas.yaml Flow configuration template (edit this for your project)
@@ -296,18 +315,20 @@ tas.yaml Flow configuration template (edit this for your project)
296
315
  |---------|-------------|------|
297
316
  | `/tas-init` | Initialize TAS for new project | All |
298
317
  | `/tas-status` | Display current project status | All |
299
- | `/tas-prd` | Create/update Product Requirements Document | PE |
318
+ | `/tas-brd` | Create/update Business Requirements Document (problem, KPIs, stakeholders, scope) | PE |
319
+ | `/tas-prd` | Create/update Product Requirements Document (consumes BRD.md) | PE |
300
320
  | `/tas-sad` | Create/update Solution Architecture Document | SE |
301
321
  | `/tas-adr` | Create Architecture Decision Record | SE |
302
322
  | `/tas-design` | Create Design Specification | SE |
303
- | `/tas-epic` | Create/update Epic | SE |
304
- | `/tas-feature` | Create/update Feature | SE |
305
- | `/tas-story` | Create/update Story | SE |
306
- | `/tas-functest` | Create Functional Testing Specification | SE |
323
+ | `/tas-feature` | Create/update Feature (single TAS work unit, per stack) | PE |
324
+ | `/tas-plan` | Generate `Feature-XXX-Technical.md` (Context, Logic, Data, ERD, Files, Config) | SE |
325
+ | `/tas-functest` | Create Functional Test Spec (anchored on AC) | SE |
326
+ | `/tas-master-plan` | Read PRD + SAD + Feature files → generate `docs/master-plan.md` (strategy + execution tracks) | Tech Lead |
307
327
  | `/tas-spec` | Lightweight spec (solo / prototype) | SE |
308
- | `/tas-plan` | Create technical implementation plan | SE |
309
- | `/tas-dev` | Implement story (agentic) | AI |
310
- | `/tas-fix` | Quick fix without full story flow | SE |
328
+ | `/tas-orchestrate` | Execute master plan — spawn agents per Feature autonomously, supports resume | AI |
329
+ | `/tas-dev` | Implement Feature per Technical Plan. `--autonomous=true` or `autonomy_mode: full` in `tas.yaml` → auto-plan + implement + review end-to-end | AI |
330
+ | `/tas-debug` | Debug and resolve build/runtime/functional errors — full build-debug loop | SE |
331
+ | `/tas-fix` | Quick fix without full Feature flow | SE |
311
332
  | `/tas-apitest` | Create API Testing Script automatically | SE |
312
333
  | `/tas-e2e` | Create E2E Test Scenarios | PE |
313
334
  | `/tas-functest-web` | Create Functional Test Script for Web | SE |
@@ -316,6 +337,7 @@ tas.yaml Flow configuration template (edit this for your project)
316
337
  | `/tas-e2e-mobile` | Create E2E Test Script for Mobile | PE |
317
338
  | `/tas-bug` | Create Bug Report | PE |
318
339
  | `/tas-review` | Code Review with checklist | SE |
340
+ | `/tas-review-pr` | Review PR — fetch diff, run agents, post inline comments + vote (ADO/GitHub) | SE |
319
341
  | `/tas-brainstorm` | Brainstorm solutions | All |
320
342
  | `/tas-security` | Security Review | DSE |
321
343
  | `/ado-*` | Azure DevOps integration | All |
@@ -329,8 +351,63 @@ tas.yaml Flow configuration template (edit this for your project)
329
351
 
330
352
  ---
331
353
 
354
+ ## Migration from v1/v2 (Epic/Story flow)
355
+
356
+ Kit v3 drops Epic and User Story. The single TAS work unit is Feature.
357
+
358
+ **What was removed:**
359
+ - Slash commands: `/tas-epic`, `/tas-story`
360
+ - Templates: `Epic.md`, `Story.md`
361
+ - Rule: `story-done.md` (replaced by `feature-done.md`)
362
+ - Nested `epics.{ID}.features.{ID}.stories.{ID}` schema in `project-status.yaml` (now flat `features.{ID}` map)
363
+ - ADO `epic` and `story` types in `/ado-*` commands and `tas-ado.py` (legacy work items pulled via `/ado-get` are saved as local `feature-*.md`)
364
+
365
+ **What was added:**
366
+ - New template `Feature-Technical.md` — generated by `/tas-plan` next to Feature file (`Feature-{NNN}-{slug}-Technical.md`). Has global sections (Context Diagram, Data Flow, API Spec, ERD) + per-stack sections (Logic Flow, File Changes, Config, Unit Tests, Tasks — one section per stack the Feature touches).
367
+ - Test ID convention anchored on AC: `{PROJECT}_F{FEATURE}_AC{N}_{TYPE}_{NUMBER}_{MODIFIER}`
368
+ - E2E ID drops Epic segment: `{PROJECT}_E2E_{NNN}_{MODIFIER}` (single-stack) or `{PROJECT}_XSTACK_E2E_{NNN}_{MODIFIER}` (cross-stack)
369
+
370
+ **How to migrate an existing project (manual, ~30 min for ~20 Features):**
371
+ 1. Move directories: `docs/epics/{*}/Feature-{NNN}-{slug}/` → `docs/features/{CODE}-Feature-{NNN}-{slug}/`. Re-number Features globally if you want a flat sequence.
372
+ 2. For each Feature directory:
373
+ - Pick the existing Feature .md as the new business spec; delete the parent Epic .md.
374
+ - Convert AC from checkbox style to Given/When/Then.
375
+ - If Stories had Technical Plan content inline, lift it into a new `Feature-{NNN}-Technical.md` using `.tas/templates/Feature-Technical.md` (fill only the stack sections that apply). Then delete the Story files.
376
+ 3. Rewrite `project-status.yaml`: drop `epics:` block, build a flat `features:` map (see `.tas/project-status-example.yaml`).
377
+ 4. Rename test IDs: `{PROJ}_E{EPIC}_F{FEAT}_S{STORY}_*` → `{PROJ}_F{FEAT}_AC{N}_*` (regex find/replace per file).
378
+ 5. On ADO: there's no API change required — TAS Features map to ADO `Feature` work items directly. Keep existing Epic/Story items as-is or close them; new TAS work uses `/ado-create feature ...` only.
379
+
380
+ > No automated `tas-migrate` command is shipped — the migration is mechanical and per-project. Run `/tas-status` after to verify.
381
+
382
+ ---
383
+
332
384
  ## Changelog
333
385
 
386
+ ### v2.1.0 — BRD, Master Plan, Orchestrate, Debug, Review PR
387
+
388
+ > **⚠️ Breaking change — Feature-first workflow**
389
+ >
390
+ > All work units are **Features**, stored under `docs/features/`. Every SE must start from a Feature file — no ad-hoc coding sessions.
391
+ >
392
+ > **Existing ADO User Stories pulled via `/ado-get`:** you can run `/tas-plan` + `/tas-dev` on those work items as-is — they behave as Features. No migration needed for in-flight work.
393
+ >
394
+ > **New tickets:** always create as Features with `/tas-feature` (or `/tas-master-plan` for full project planning) before running `/tas-plan` and `/tas-dev`. Do not create stories or epics — Feature is the only TAS work unit.
395
+
396
+ - Add `/tas-brd` — PE creates Business Requirements Document (business problem, KPIs, stakeholders, scope/constraints) before PRD; `/tas-prd` consumes BRD.md for tighter business-to-product alignment
397
+ - Add `/tas-master-plan` — Tech Lead command that reads PRD FR list + SAD + Feature files, resolves dependencies, and generates `docs/master-plan.md` with detailed construction strategy and machine-readable execution tracks (YAML embedded)
398
+ - Add `/tas-orchestrate` — executes master plan by spawning `software-engineer` agents per Feature in stage/track order; supports resume and fully autonomous 24/7 mode
399
+ - `/tas-dev` gains autonomous mode: `--autonomous=true` flag or `autonomy_mode: full` in `tas.yaml` — auto-invokes `/tas-plan` when no Technical file exists, implements without interruption, auto-marks Done if review passes with no Critical/High findings; audit trail written to Feature `## Autonomous Decisions Log`
400
+ - Add `/tas-debug` — runs full build-debug loops to resolve build/runtime/functional errors; complements `/tas-fix` for post-implementation failures
401
+ - Add `/tas-review-pr` — auto-detects ADO or GitHub, fetches PR diff, runs parallel review agents, posts inline comments with approve/request-changes vote
402
+
403
+ ### v2.0.0 — Feature-only flow + Feature-Technical template
404
+ - Remove Epic and User Story. Feature is the only TAS work unit — one complete business flow, may span multiple stacks.
405
+ - Add `Feature-Technical.md` template generated by `/tas-plan` — global sections (Context Diagram, Data Flow, API Spec, ERD, Affect to SAD?, Architecture Decisions) + per-stack sections (Logic Flow, File Changes, Config, Unit Test Cases, Tasks) — fill only stacks the Feature touches.
406
+ - `/tas-feature` infers stacks automatically from PRD + SAD — no manual stack annotation required.
407
+ - Test ID convention: `{PROJECT}_F{FEATURE}_AC{N}_{TYPE}_{NUMBER}_{MODIFIER}` to anchor tests on business AC.
408
+ - Updated project-status.yaml tracking to include Feature-Technical plan_status (pending/completed).
409
+ - E2E ID simplified: `{PROJECT}_E2E_{NNN}_{MODIFIER}` (single-stack) or `{PROJECT}_XSTACK_E2E_{NNN}_{MODIFIER}` (cross-stack).
410
+
334
411
  ### v1.14.0
335
412
  - Support 4 Agentic Coding Platforms: Claude Code, Cursor, Codex, Antigravity
336
413
  - Compress kit size — refactor commands, skills, rules to only include what's truly necessary