@torus-engineering/tas-kit 1.13.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/.tas/_platform/claude-code/settings.json +58 -46
  2. package/.tas/_platform/hooks/code-quality.js +127 -127
  3. package/.tas/_platform/hooks/session-end.js +111 -111
  4. package/.tas/agents/architect.md +53 -53
  5. package/.tas/agents/aws-reviewer.md +71 -71
  6. package/.tas/agents/build-resolver.md +89 -59
  7. package/.tas/agents/code-explorer.md +63 -63
  8. package/.tas/agents/csharp-reviewer.md +62 -62
  9. package/.tas/agents/database-reviewer.md +73 -73
  10. package/.tas/agents/doc-updater.md +68 -66
  11. package/.tas/agents/python-reviewer.md +67 -67
  12. package/.tas/agents/security-reviewer.md +79 -79
  13. package/.tas/agents/software-engineer.md +53 -0
  14. package/.tas/agents/typescript-reviewer.md +65 -65
  15. package/.tas/commands/ado-create.md +33 -28
  16. package/.tas/commands/ado-delete.md +26 -22
  17. package/.tas/commands/ado-get.md +24 -20
  18. package/.tas/commands/ado-status.md +22 -18
  19. package/.tas/commands/ado-update.md +31 -27
  20. package/.tas/commands/tas-adr.md +37 -33
  21. package/.tas/commands/tas-apitest-plan.md +177 -173
  22. package/.tas/commands/tas-apitest.md +147 -143
  23. package/.tas/commands/tas-brainstorm.md +23 -19
  24. package/.tas/commands/tas-brd.md +50 -0
  25. package/.tas/commands/tas-bug.md +127 -113
  26. package/.tas/commands/tas-checklist.md +180 -0
  27. package/.tas/commands/tas-debug.md +103 -0
  28. package/.tas/commands/tas-design.md +41 -37
  29. package/.tas/commands/tas-dev.md +225 -125
  30. package/.tas/commands/tas-e2e-mobile.md +146 -155
  31. package/.tas/commands/tas-e2e-web.md +150 -163
  32. package/.tas/commands/tas-e2e.md +289 -102
  33. package/.tas/commands/tas-feature.md +181 -47
  34. package/.tas/commands/tas-fix.md +72 -51
  35. package/.tas/commands/tas-functest-mobile.md +138 -144
  36. package/.tas/commands/tas-functest-web.md +176 -192
  37. package/.tas/commands/tas-functest.md +225 -76
  38. package/.tas/commands/tas-init.md +22 -17
  39. package/.tas/commands/tas-master-plan.md +300 -0
  40. package/.tas/commands/tas-orchestrate.md +159 -0
  41. package/.tas/commands/tas-plan.md +152 -117
  42. package/.tas/commands/tas-prd.md +57 -37
  43. package/.tas/commands/tas-review-pr.md +174 -0
  44. package/.tas/commands/tas-review.md +115 -113
  45. package/.tas/commands/tas-sad.md +47 -43
  46. package/.tas/commands/tas-security.md +91 -87
  47. package/.tas/commands/tas-spec.md +54 -50
  48. package/.tas/commands/tas-status.md +25 -16
  49. package/.tas/project-status-example.yaml +3 -1
  50. package/.tas/rules/ado-integration.md +67 -65
  51. package/.tas/rules/common/api-design.md +517 -517
  52. package/.tas/rules/common/build-debug-loop.md +233 -0
  53. package/.tas/rules/common/code-review.md +4 -0
  54. package/.tas/rules/common/feature-done.md +42 -0
  55. package/.tas/rules/common/post-implementation-review.md +4 -0
  56. package/.tas/rules/common/project-status.md +33 -16
  57. package/.tas/rules/common/sad-impact.md +81 -0
  58. package/.tas/rules/common/tdd.md +104 -89
  59. package/.tas/rules/csharp/api-testing.md +2 -2
  60. package/.tas/rules/csharp/torus-core-framework.md +128 -0
  61. package/.tas/tas-example.yaml +9 -32
  62. package/.tas/templates/AGENTS.md +13 -0
  63. package/.tas/templates/API-Test-Spec.md +5 -4
  64. package/.tas/templates/BRD.md +133 -0
  65. package/.tas/templates/Bug.md +15 -0
  66. package/.tas/templates/E2E-Execution-Report.md +8 -8
  67. package/.tas/templates/E2E-Mobile-Spec.md +6 -8
  68. package/.tas/templates/E2E-Report.md +2 -2
  69. package/.tas/templates/E2E-Scenario.md +22 -22
  70. package/.tas/templates/E2E-Test-Spec.md +274 -0
  71. package/.tas/templates/E2E-Web-Spec.md +4 -4
  72. package/.tas/templates/Feature-Technical-Part.md +69 -0
  73. package/.tas/templates/Feature-Technical-Stack.md +74 -0
  74. package/.tas/templates/Feature-Technical.md +329 -0
  75. package/.tas/templates/Feature.md +50 -26
  76. package/.tas/templates/Func-Test-Script.md +29 -56
  77. package/.tas/templates/Func-Test-Spec.md +144 -142
  78. package/.tas/templates/PRD.md +173 -142
  79. package/.tas/templates/TestChecklist.md +96 -0
  80. package/.tas/templates/torus-dotnet-bootstrap.md +223 -0
  81. package/.tas/tools/tas-ado-readme.md +24 -27
  82. package/.tas/tools/tas-ado.py +328 -25
  83. package/.tas/tools/tas-github.py +339 -0
  84. package/README.md +142 -57
  85. package/bin/cli.js +90 -90
  86. package/lib/adapters/antigravity.js +131 -131
  87. package/lib/adapters/claude-code.js +71 -35
  88. package/lib/adapters/codex.js +157 -157
  89. package/lib/adapters/cursor.js +80 -80
  90. package/lib/adapters/index.js +20 -20
  91. package/lib/adapters/utils.js +81 -81
  92. package/lib/deleted-files.json +7 -0
  93. package/lib/install.js +546 -543
  94. package/package.json +2 -2
  95. package/.tas/README.md +0 -334
  96. package/.tas/commands/tas-epic.md +0 -35
  97. package/.tas/commands/tas-story.md +0 -91
  98. package/.tas/rules/common/story-done.md +0 -30
  99. package/.tas/templates/Epic.md +0 -46
  100. package/.tas/templates/Story.md +0 -90
@@ -1,87 +1,91 @@
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
1
+ ---
2
+ model: opus
3
+ ---
4
+
5
+ # /tas-security $ARGUMENTS
6
+
7
+ Check codebase security, save report to docs/security-report.md.
8
+
9
+ ## Stack Detection
10
+ Read `.tas/rules/common/stack-detection.md`.
11
+
12
+ ## Actions
13
+
14
+ ### Step 1 Determine scope
15
+ `$ARGUMENTS` can be:
16
+ - File path or directory scan specified scope only
17
+ - Empty → scan entire codebase
18
+ - `--staged` only scan staged files (like pre-commit hook), fast + used to self-test before commit
19
+
20
+ 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.
21
+
22
+ Read `.tas/rules/common/security.md` for general checks. If stack identified, also read `.tas/rules/[stack]/security.md` for stack-specific items.
23
+
24
+ ### Step 2 Parallel Security Scan
25
+
26
+ Launch agents SIMULTANEOUSLY based on stack:
27
+
28
+ **Agent 1 `security-reviewer`** (always run):
29
+ > Security audit [scope].
30
+ > Read `.tas/rules/common/security.md`.
31
+ > If stack identified, also read `.tas/rules/[stack]/security.md`.
32
+ > Check OWASP Top 10: injection, broken auth, XSS, IDOR, security misconfiguration,
33
+ > sensitive data exposure, insecure deserialization, vulnerable components, logging/monitoring.
34
+ > Also check: hardcoded secrets, CORS config, anti-forgery tokens, rate limiting.
35
+ > Format: findings by Critical / High / Medium / Low with file:line and specific remediation.
36
+ > Each finding has: status = Open.
37
+
38
+ **Agent 2 `database-reviewer`** (only when `db_agent = database-reviewer`):
39
+ > Database security review [scope].
40
+ > Focus: parameterized queries vs string concatenation, ORM raw query usage,
41
+ > sensitive data stored in plaintext, missing field-level encryption, excessive permissions.
42
+ > Format: findings by Critical / High / Medium / Low with file:line and remediation.
43
+
44
+ **Agent 3 `aws-reviewer`** (only when `infra_agent = aws-reviewer`):
45
+ > AWS infrastructure security review [scope].
46
+ > Focus: IAM overpermission, S3 public access, secrets in env/config/code,
47
+ > Lambda environment variables, API Gateway auth, VPC security groups.
48
+ > Format: findings by Critical / High / Medium / Low with file:line and remediation.
49
+
50
+ Wait for ALL agents to complete.
51
+
52
+ ### Step 3 — Synthesize and save report
53
+
54
+ Combine findings from all agents, deduplicate (same file:line merge), sort by severity.
55
+
56
+ Check `docs/security-report.md`:
57
+ - **Doesn't exist**: create new per template `.tas/templates/Security-Report.md`
58
+ - **Exists**: append new report, update old findings status if fixed
59
+
60
+ Report content includes:
61
+ - Scan date, scope, stack
62
+ - Findings by Critical / High / Medium / Low
63
+ - Each finding: file:line, description, remediation, status (Open / Fixed / Accepted Risk)
64
+ - Summary: total findings per severity, fixed vs open counts
65
+
66
+ ### Step 4 — Update project-status.yaml
67
+
68
+ ```yaml
69
+ artifacts:
70
+ security_report:
71
+ file: docs/security-report.md
72
+ status: [Critical findings present | Clean]
73
+ last_updated: [today's date]
74
+ ```
75
+
76
+ ### Step 5 — Next actions
77
+
78
+ If **Critical findings**:
79
+ → List clearly, require fix immediately before deploying to any environment.
80
+
81
+ If **High findings**:
82
+ → List, recommend fixing before merging to main.
83
+
84
+ If only **Medium/Low**:
85
+ Summarize, suggest fixing in priority order.
86
+
87
+ ## Principles
88
+ - Classification: Critical / High / Medium / Low
89
+ - Each finding must have specific recommended fix
90
+ - Finding has status: Open | In Progress | Fixed | Accepted Risk
91
+ - DO NOT hardcode fix — propose remediation pattern, don't write replacement code
@@ -1,50 +1,54 @@
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
1
+ ---
2
+ model: sonnet
3
+ ---
4
+
5
+ # /tas-spec $ARGUMENTS
6
+
7
+ Create lightweight spec before coding — for solo dev, prototype, spike, internal tool.
8
+ Differs from `/tas-fix`: has spec document, suitable for tasks > 2 hours or needs AC tracking.
9
+
10
+ ## Steps
11
+
12
+ ### 1 Gather information
13
+ `$ARGUMENTS` is task description. If not clear enough, ask max 3 questions:
14
+ - **Goal**: What to build? What problem to solve?
15
+ - **AC**: What does done look like? (2-5 specific, testable criteria)
16
+ - **Constraints**: Tech constraints, out of scope?
17
+
18
+ Don't ask if $ARGUMENTS is already clear enough.
19
+
20
+ ### 2 — Create SPEC.md
21
+ Create file `SPEC.md` at project root:
22
+
23
+ ```markdown
24
+ # {Title}
25
+ > {one-line summary}
26
+
27
+ **Status:** Draft | **Date:** {today}
28
+
29
+ ## Goal
30
+ {Problem to solve — not solution}
31
+
32
+ ## Acceptance Criteria
33
+ - [ ] {Given/When/Then or testable statement}
34
+ - [ ] ...
35
+
36
+ ## Out of Scope
37
+ - {What won't be done}
38
+
39
+ ## Constraints
40
+ {Tech constraints, patterns to follow — omit if none}
41
+
42
+ ## Open Questions
43
+ {Unanswered questions — omit if none}
44
+ ```
45
+
46
+ ### 3 — Next step
47
+ > "SPEC.md created.
48
+ > - Plan in detail: `/tas-plan SPEC.md`
49
+ > - Code immediately: `/tas-dev` (requires `require_plan: false` in tas.yaml)"
50
+
51
+ ## Principles
52
+ - SPEC.md is single source of truth — don't create additional files
53
+ - Keep short: target < 1 page
54
+ - If AC > 8 items or task > 1 day → suggest using `/tas-feature` instead
@@ -1,16 +1,25 @@
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
1
+ ---
2
+ model: haiku
3
+ ---
4
+
5
+ # /tas-status
6
+
7
+ Check current status of TAS project.
8
+
9
+ ## Actions
10
+ 1. Read `root/project-status.yaml` (ONLY this file, DO NOT scan `docs/`)
11
+ 2. Read `root/tas.yaml` for workflow config
12
+ 3. Summarize from `project-status.yaml`:
13
+ - Number of artifacts created and their status (PRD, SAD, Design Spec...)
14
+ - Number of Features by each status (`New`, `In Design`, `In Development`, `Done`, `Removed`)
15
+ - Number of Bugs by status
16
+ - Current phase based on aggregated status
17
+ 4. Display:
18
+ - Phase status table
19
+ - Features grouped by status (with `stack:` shown beside each)
20
+ - Plan readiness: count Features with `plan_status: completed` vs `pending`
21
+
22
+ ## Notes
23
+ - Read-only command, does not change anything
24
+ - If `project-status.yaml` seems out of sync, run `/tas-init` to rescan and sync
25
+ - Schema is flat — `features.{FEATURE_ID}` directly under root (no `epics.*.features.*.stories.*` nesting)
@@ -14,4 +14,6 @@ adrs: {}
14
14
 
15
15
  bugs: {}
16
16
 
17
- epics: {}
17
+ # Flat features map (Epic + Story removed in kit v3)
18
+ # Each Feature is a self-contained business flow per stack (app/web/service/integration).
19
+ features: {}
@@ -1,65 +1,67 @@
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 itemthis 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 CLIcheck 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 |
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
+ > **Kit v3:** Only `feature` and `bug` types are supported by `/ado-*` commands. Epic and User Story were removed because TAS uses Feature as the single business unit. Legacy ADO Epic / User Story items pulled via `/ado-get` are saved as local `feature-*.md` files (see `tools/tas-ado.py` `TYPE_REVERSE`).
7
+
8
+ ## When to Apply
9
+
10
+ - User runs `/ado-create`, `/ado-update`, `/ado-status`, `/ado-get`, `/ado-delete`
11
+ - DO NOT apply when: user only edits .md file normally without mentioning ADO
12
+
13
+ ## Always / Ask / Never
14
+
15
+ | | Action |
16
+ |---|---|
17
+ | **Always** | Read `tas.yaml` and check `ado.enabled` before any operation |
18
+ | **Always** | Display ADO ID and URL after each successful create/update |
19
+ | **Always** | Update frontmatter `ado_id`, `ado_state`, `last_ado_sync` in .md file after sync |
20
+ | **Ask** | When syncing multiple items at once confirm list before running |
21
+ | **Ask** | When detecting conflict between .md file and ADO item (which is source of truth?) |
22
+ | **Ask** | When deleting work item this is irreversible operation |
23
+ | **Never** | Auto-sync whenever .md file is edited (too aggressive, creates noise) |
24
+ | **Never** | Delete ADO item without clear user confirmation |
25
+ | **Never** | Create duplicate work item if `ado_id` already exists in frontmatter |
26
+
27
+ ## First Step Check ADO Enabled
28
+
29
+ Before performing any operation, read `tas.yaml` at root and check `ado.enabled`:
30
+ - 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.
31
+ - If `ado.enabled: true`: continue normally.
32
+
33
+ ## Prerequisites
34
+
35
+ - Azure CLI + azure-devops extension: `az extension add --name azure-devops --upgrade`
36
+ - Python 3.8+ with pyyaml: `pip install pyyaml`
37
+ - PAT in .env file: `AzureDevops_Personal_AccessToken=your-pat-here`
38
+
39
+ ## Commands
40
+
41
+ All ADO commands run via: `python .tas/tools/tas-ado.py <command> [args]`
42
+
43
+ Or use slash commands:
44
+ - `/ado-create <type> <temp-id> [--parent-id <id>]`
45
+ - `/ado-get <ado-id>`
46
+ - `/ado-update <type> <ado-id> [--assign <name>] [--status <state>]`
47
+ - `/ado-status <ado-id> --status <state>`
48
+ - `/ado-delete <type> <ado-id>`
49
+
50
+ ## File Convention
51
+
52
+ - Filename: `{type}-{ado_id}-{slug-title}.md`
53
+ - Each file has YAML frontmatter: `ado_id`, `ado_type`, `ado_state`, `last_ado_sync`
54
+ - .md file is single source of truth, sync to ADO when needed
55
+
56
+ ## Red Flags
57
+
58
+ - File has `ado_id` but state in file differs from ADOconfirm with user before overwriting
59
+ - PAT expired → guide to rotate, don't log token to stdout
60
+ - `ado.enabled: true` but project hasn't set up Azure CLI → check prerequisites first
61
+
62
+ ## Anti-Rationalization
63
+
64
+ | Rationalization | Counter |
65
+ |---|---|
66
+ | "Auto-sync is more convenient, no need to remember" | Hook auto-sync causes unintended pushes when editing draft — sync must be intentional |
67
+ | "Delete is OK, I know what I'm doing" | ADO delete has no undo — always confirm, even if user seems confident |