sdtk-spec-kit 0.3.9 → 0.3.11

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 (52) hide show
  1. package/README.md +136 -106
  2. package/assets/manifest/toolkit-bundle.manifest.json +94 -80
  3. package/assets/manifest/toolkit-bundle.sha256.txt +41 -38
  4. package/assets/toolkit/toolkit/AGENTS.md +5 -4
  5. package/assets/toolkit/toolkit/README.md +50 -0
  6. package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +185 -0
  7. package/assets/toolkit/toolkit/install.ps1 +2 -2
  8. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +4 -3
  9. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +32 -12
  10. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +33 -6
  11. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +84 -84
  12. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  13. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  14. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md +127 -127
  15. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -83
  16. package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  17. package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
  18. package/assets/toolkit/toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md +127 -127
  19. package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +108 -98
  20. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +7 -4
  21. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +7 -4
  22. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +97 -81
  23. package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +37 -30
  24. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +75 -52
  25. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
  26. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +30 -30
  27. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +25 -25
  28. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +4 -2
  29. package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +90 -90
  30. package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +3 -0
  31. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +25 -53
  32. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +16 -8
  33. package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +124 -121
  34. package/assets/toolkit/toolkit/templates/README.md +1 -0
  35. package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +81 -81
  36. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  37. package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +127 -127
  38. package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +174 -174
  39. package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +106 -93
  40. package/assets/toolkit/toolkit/templates/docs/qa/CONTROLLER_ACCEPTANCE_TEMPLATE.md +90 -0
  41. package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +162 -61
  42. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
  43. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +4 -0
  44. package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +5 -0
  45. package/package.json +16 -16
  46. package/src/commands/help.js +123 -101
  47. package/src/commands/init.js +10 -2
  48. package/src/commands/runtime.js +27 -5
  49. package/src/commands/update.js +11 -0
  50. package/src/index.js +62 -59
  51. package/src/lib/scope.js +19 -4
  52. package/src/lib/update.js +326 -0
@@ -0,0 +1,185 @@
1
+ # SDTK-SPEC Multi-Agent Software Development Toolkit
2
+
3
+ This guide explains how to run SDTK-SPEC as a runtime-agnostic toolkit with adapters for Codex and Claude Code.
4
+ It is product-specific to `SDTK-SPEC` within the broader `SDTK Suite` family (`SDTK-SPEC`, `SDTK-CODE`, `SDTK-OPS`).
5
+ Use the root `README.md` for suite-level framing and `products/sdtk-code/toolkit/SDTKCODE_TOOLKIT.md` for the downstream coding product.
6
+
7
+ Canonical install/runtime source of truth:
8
+ - `governance/ai/cli/SDTK_RUNTIME_AND_FEATURE_STATUS.md`
9
+
10
+ ## 1. What SDTK-SPEC Is
11
+ SDTK-SPEC is a practical delivery framework for software teams.
12
+ It provides:
13
+ - a fixed SDLC workflow,
14
+ - reusable documentation templates,
15
+ - specialized skills for each phase,
16
+ - and explicit quality gates.
17
+
18
+ This guide does not document `SDTK-OPS` as a runnable product because that surface is still planned/partial only.
19
+
20
+ ## 2. SDLC Model
21
+ Default flow:
22
+ 1. PM initiation
23
+ 2. BA analysis
24
+ 3. PM planning
25
+ 4. Architecture design
26
+ 5. Development planning + SDTK-CODE handoff
27
+ 6. QA validation and release decision
28
+
29
+ SDTK-SPEC and SDTK-CODE stay separate:
30
+ - SDTK-SPEC owns upstream docs, planning, and handoff generation
31
+ - SDTK-CODE owns downstream coding workflow (`start -> plan -> build -> verify -> ship`)
32
+ - QA remains in SDTK-SPEC and normally consumes downstream evidence from SDTK-CODE
33
+
34
+ ## 3. Runtime-Adaptive Installation
35
+ From project root:
36
+
37
+ ### 3.1 Codex runtime
38
+ `powershell -ExecutionPolicy Bypass -File ".\toolkit\install.ps1" -Runtime codex`
39
+
40
+ ### 3.2 Claude Code runtime
41
+ `powershell -ExecutionPolicy Bypass -File ".\toolkit\install.ps1" -Runtime claude`
42
+
43
+ ### 3.3 Common installer options
44
+ - `-Force`: overwrite existing adapter/config files in project root.
45
+ - `-RuntimeScope`: `project` or `user` -- controls where skill files are installed (default: `project` for Claude, `user` for Codex).
46
+ - `-SkipRuntimeAssets`: skip skill file installation for the selected runtime.
47
+ - `-SkipSkills`: **(deprecated)** use `-SkipRuntimeAssets` instead.
48
+
49
+ ## 4. What Installer Copies
50
+ Always:
51
+ - `toolkit/AGENTS.md` -> `AGENTS.md`
52
+ - `toolkit/sdtk-spec.config.json` -> `sdtk-spec.config.json`
53
+ - `toolkit/sdtk-spec.config.profiles.example.json` -> `sdtk-spec.config.profiles.example.json`
54
+
55
+ By runtime:
56
+ - `codex` -> `toolkit/runtimes/codex/CODEX_TEMPLATE.md` -> `CODEX.md`
57
+ - `claude` -> `toolkit/runtimes/claude/CLAUDE_TEMPLATE.md` -> `CLAUDE.md`
58
+
59
+ Runtime behavior (scope-aware installation):
60
+ - `codex`: installs skills into `$CODEX_HOME/skills/` or `~/.codex/skills/` by default, and into `<project>/.codex/skills/` only through the explicit local `CODEX_HOME=<project>/.codex` contract. Native `.codex/skills` auto-discovery is not claimed.
61
+ - `claude`: installs skills into `.claude/skills/` in the project root (project scope, default) or `~/.claude/skills/` (user scope).
62
+
63
+ ## 5. Feature Bootstrap
64
+ After install:
65
+
66
+ `powershell -ExecutionPolicy Bypass -File ".\toolkit\scripts\init-feature.ps1" -FeatureKey WORKFLOW_ENGINE -FeatureName "Workflow Engine"`
67
+
68
+ Use `-ProjectPath` when toolkit is not directly under project root.
69
+ Use `-ValidateOnly` to verify inputs/templates without writing files.
70
+
71
+ ## 6. Role Tags
72
+ Use the same role tags across runtimes:
73
+ - `/pm`
74
+ - `/ba`
75
+ - `/arch`
76
+ - `/dev`
77
+ - `/qa`
78
+ - `/engineer` (technical escalation)
79
+
80
+ Default role is `/pm` when role is not specified.
81
+
82
+ ## 7. Orchestration Mapping
83
+ Architecture phase:
84
+ - API contract/flow scope -> `sdtk-api-doc`
85
+ - API design detail from YAML + flow list -> `sdtk-api-design-spec`
86
+ - UI flow-action scope -> `sdtk-screen-design-spec`
87
+
88
+ DEV phase:
89
+ - `/dev` creates `FEATURE_IMPL_PLAN` + `CODE_HANDOFF`
90
+ - `toolkit/scripts/generate-code-handoff.ps1` generates the canonical machine-readable handoff JSON
91
+ - legacy prompt templates under `toolkit/skills/sdtk-dev/prompts/` remain available as manual helper assets only
92
+
93
+ QA phase:
94
+ - detailed reusable test-case artifact -> `sdtk-test-case-spec`
95
+ - execution report and release decision -> `sdtk-qa`
96
+ - normal prerequisite is downstream implementation evidence, normally from SDTK-CODE
97
+
98
+ ## 8. Hybrid Controls (`sdtk-spec.config.json`)
99
+ - `orchestration.apiDesignDetailMode = auto|on|off`
100
+ - `orchestration.testCaseSpecMode = auto|on|off`
101
+
102
+ ## 8.1 Skill Catalog and Handoff Assets
103
+ - `toolkit/skills/skills.catalog.yaml` is the canonical inventory for the 13 core SDTK-SPEC skills.
104
+ - `toolkit/templates/handoffs/` provides the standard PM/BA/ARCH/DEV/QA handoff prompts and review gates.
105
+ - Every core `SKILL.md` includes `## Critical Constraints` derived from the active hard gates and verification policy.
106
+ - Use `governance/ai/core/SDTK_SKILL_AUTHORING_AND_TESTING.md` when creating or updating skills.
107
+
108
+ ## 9. Workflow Quality Contracts
109
+
110
+ ### Verification Before Completion
111
+ All phases apply `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md`. No workflow step may report done, pass, or release-ready without fresh command evidence. Red flags include `should pass`, `probably works`, and trusting agent reports without verification.
112
+
113
+ ### Order-Critical Hard Gates
114
+ Three hard gates enforce mandatory sequencing:
115
+ - ARCH: `DESIGN_LAYOUT` must be generated before `FLOW_ACTION_SPEC` for UI-scope features
116
+ - DEV: `FEATURE_IMPL_PLAN` must be approved before `READY_FOR_SDTK_CODE` can be emitted
117
+ - QA: downstream implementation evidence must exist before QA handoff starts
118
+
119
+ ### `/dev` Ownership
120
+ The default `/dev` role does not implement code in this wave.
121
+ It:
122
+ 1. refines `FEATURE_IMPL_PLAN`
123
+ 2. determines readiness
124
+ 3. emits `CODE_HANDOFF`
125
+ 4. suggests the exact `sdtk-code start ...` command when ready
126
+
127
+ ### Specification Quoting
128
+ QA validation and reusable test-case design must quote exact requirement text when judging a match or mismatch.
129
+ Use:
130
+ - `Spec says: "[exact quote]" -> Evidence: [match/mismatch + file reference]`
131
+
132
+ ### Assumptions Discipline
133
+ `FLOW_ACTION_SPEC_TEMPLATE.md` and `API_DESIGN_DETAIL_TEMPLATE.md` require a top-level `## Assumptions` section so inferred or deferred decisions stay explicit during ARCH output review.
134
+
135
+ ### Subagent Model Selection
136
+ When dispatching manual helper tasks via `sdtk-dev`, use:
137
+ - Fast or cheap model for mechanical single-file changes
138
+ - Standard model for multi-file integration tasks
139
+ - Most capable model for architecture and design decisions
140
+
141
+ ## 10. Artifact Structure
142
+ Shared state:
143
+ - `SHARED_PLANNING.md`
144
+ - `QUALITY_CHECKLIST.md`
145
+
146
+ Phase outputs:
147
+ - `docs/product/`
148
+ - `docs/specs/`
149
+ - `docs/architecture/`
150
+ - `docs/api/`
151
+ - `docs/design/`
152
+ - `docs/dev/`
153
+ - `docs/qa/`
154
+ - `docs/database/`
155
+
156
+ ## 11. Rule Sources
157
+ - API YAML rules:
158
+ - `toolkit/templates/docs/api/YAML_CREATION_RULES.md`
159
+ - API design detail + flowchart rules:
160
+ - `toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md`
161
+ - Compatibility notes kept for legacy references:
162
+ - `toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md`
163
+ - `toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md`
164
+ - Screen flow-action rules:
165
+ - `toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md`
166
+ - QA test-case rules:
167
+ - `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md`
168
+
169
+ ## 12. Examples
170
+ Use `examples/` for onboarding-ready scenario packs:
171
+ - `enterprise-crud-ui-api-db`
172
+ - `api-only-service`
173
+ - `admin-console-flow-action`
174
+ - `bugfix-hotfix-flow`
175
+
176
+ ## 13. Runtime Readiness Audit
177
+ Run the audit script before maintainer testing or runtime troubleshooting:
178
+
179
+ `powershell -ExecutionPolicy Bypass -File ".\toolkit\scripts\check-runtime-readiness.ps1" -Runtime <claude|codex>`
180
+
181
+ Use `-Json` for machine-readable output.
182
+
183
+ ## 14. Output Language
184
+ - Feature artifacts under `docs/**`: default English.
185
+ - Toolkit guidance docs: English or Vietnamese.
@@ -271,9 +271,9 @@ if (($Runtime -eq 'codex') -and (-not $SkipSkills)) {
271
271
  Write-Host ""
272
272
  Write-Host "Installing Codex skills (scope: $Scope)..."
273
273
  if ($Force) {
274
- & $skillInstaller -Scope $Scope -Force | Out-Host
274
+ & $skillInstaller -Scope $Scope -ProjectPath $projectRoot.ToString() -Force | Out-Host
275
275
  } else {
276
- & $skillInstaller -Scope $Scope | Out-Host
276
+ & $skillInstaller -Scope $Scope -ProjectPath $projectRoot.ToString() | Out-Host
277
277
  }
278
278
  }
279
279
  elseif (($Runtime -eq 'claude') -and (-not $SkipSkills)) {
@@ -18,7 +18,7 @@ Set-StrictMode -Version Latest
18
18
  function ConvertTo-PascalCase {
19
19
  param([Parameter(Mandatory = $true)][string]$Text)
20
20
 
21
- $parts = $Text -split '[^A-Za-z0-9]+' | Where-Object { $_ -and $_.Trim().Length -gt 0 }
21
+ $parts = @($Text -split '[^A-Za-z0-9]+' | Where-Object { $_ -and $_.Trim().Length -gt 0 })
22
22
  if (-not $parts -or $parts.Count -eq 0) {
23
23
  return ''
24
24
  }
@@ -216,7 +216,8 @@ $outputs = @(
216
216
 
217
217
  @{ Dest = (Join-Path $projectRoot "docs/dev/FEATURE_IMPL_PLAN_$FeatureKey.md"); Template = (Join-Path $templateRoot 'docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md') },
218
218
  @{ Dest = (Join-Path $projectRoot "docs/qa/${FeatureKey}_TEST_CASE.md"); Template = (Join-Path $templateRoot 'docs/qa/TEST_CASE_TEMPLATE.md') },
219
- @{ Dest = (Join-Path $projectRoot "docs/qa/QA_RELEASE_REPORT_$FeatureKey.md"); Template = (Join-Path $templateRoot 'docs/qa/QA_RELEASE_REPORT_TEMPLATE.md') }
219
+ @{ Dest = (Join-Path $projectRoot "docs/qa/QA_RELEASE_REPORT_$FeatureKey.md"); Template = (Join-Path $templateRoot 'docs/qa/QA_RELEASE_REPORT_TEMPLATE.md') },
220
+ @{ Dest = (Join-Path $projectRoot "docs/qa/CONTROLLER_ACCEPTANCE_$FeatureKey.md"); Template = (Join-Path $templateRoot 'docs/qa/CONTROLLER_ACCEPTANCE_TEMPLATE.md') }
220
221
  )
221
222
 
222
223
  if ($ValidateOnly) {
@@ -258,4 +259,4 @@ if ($created.Count -gt 0) {
258
259
  } else {
259
260
  Write-Host ""
260
261
  Write-Host "No new files created (all existed); use -Force to overwrite if needed."
261
- }
262
+ }
@@ -1,18 +1,37 @@
1
1
  param(
2
2
  [ValidateSet('project', 'user')]
3
3
  [string]$Scope = 'user',
4
+ [string]$ProjectPath,
4
5
  [switch]$Force
5
6
  )
6
7
 
7
- # Gate C0: Codex does not support project-local skills
8
- if ($Scope -eq 'project') {
9
- Write-Error "Codex does not support project-local skills. Use --scope user instead."
10
- exit 1
11
- }
12
-
13
8
  $ErrorActionPreference = 'Stop'
14
9
  Set-StrictMode -Version Latest
15
10
 
11
+ function Resolve-CodexHome {
12
+ param(
13
+ [Parameter(Mandatory = $true)][string]$TargetScope,
14
+ [string]$TargetProjectPath
15
+ )
16
+
17
+ if ($TargetScope -eq 'project') {
18
+ if (-not $TargetProjectPath -or $TargetProjectPath.Trim().Length -eq 0) {
19
+ throw "Project-local Codex install requires -ProjectPath."
20
+ }
21
+
22
+ if (-not (Test-Path -LiteralPath $TargetProjectPath)) {
23
+ New-Item -ItemType Directory -Force -Path $TargetProjectPath | Out-Null
24
+ }
25
+ $projectRoot = (Resolve-Path -LiteralPath $TargetProjectPath).Path
26
+ return (Join-Path $projectRoot '.codex')
27
+ }
28
+
29
+ if ($env:CODEX_HOME) {
30
+ return $env:CODEX_HOME
31
+ }
32
+ return (Join-Path $HOME '.codex')
33
+ }
34
+
16
35
  function Get-FileSha256 {
17
36
  param(
18
37
  [Parameter(Mandatory = $true)][string]$Path
@@ -47,11 +66,7 @@ if (-not (Test-Path -LiteralPath $skillsSrc)) {
47
66
  throw "Missing skills directory: $skillsSrc"
48
67
  }
49
68
 
50
- $codexHome = $env:CODEX_HOME
51
- if (-not $codexHome) {
52
- $codexHome = Join-Path $HOME '.codex'
53
- }
54
-
69
+ $codexHome = Resolve-CodexHome -TargetScope $Scope -TargetProjectPath $ProjectPath
55
70
  $skillsDest = Join-Path $codexHome 'skills'
56
71
  New-Item -ItemType Directory -Force -Path $skillsDest | Out-Null
57
72
 
@@ -162,6 +177,11 @@ Get-ChildItem -LiteralPath $skillsSrc -Directory | ForEach-Object {
162
177
 
163
178
  Write-Host ""
164
179
  Write-Host "Skills installed into: $skillsDest"
180
+ Write-Host "Codex scope: $Scope"
181
+ if ($Scope -eq 'project') {
182
+ Write-Host "Project-local Codex installs are valid only when Codex is launched with CODEX_HOME=<project>/.codex."
183
+ Write-Host "This installer does not claim native .codex/skills auto-discovery."
184
+ }
165
185
  if ($canonicalRulesHash) {
166
186
  Write-Host "Canonical API ruleset: $canonicalRulesPath"
167
187
  Write-Host "Canonical API ruleset SHA256: $canonicalRulesHash"
@@ -182,7 +202,7 @@ if ($canonicalFlowRulesHash) {
182
202
  }
183
203
  if ($canonicalTestCaseRulesHash) {
184
204
  Write-Host "Canonical Test Case ruleset: $canonicalTestCaseRulesPath"
185
- Write-Host "Canonical Test Case ruleset SHA256: $canonicalTestCaseRulesHash"
205
+ Write-Host "Canonical Test Case ruleset SHA256: $canonicalTestCaseRulesHash"
186
206
  } else {
187
207
  Write-Warning "Canonical Test Case ruleset not found: $canonicalTestCaseRulesPath"
188
208
  }
@@ -1,4 +1,7 @@
1
1
  param(
2
+ [ValidateSet('project', 'user')]
3
+ [string]$Scope = 'user',
4
+ [string]$ProjectPath,
2
5
  [string]$SkillName,
3
6
  [switch]$All,
4
7
  [switch]$BackupExisting,
@@ -8,6 +11,29 @@ param(
8
11
  $ErrorActionPreference = 'Stop'
9
12
  Set-StrictMode -Version Latest
10
13
 
14
+ function Resolve-CodexHome {
15
+ param(
16
+ [Parameter(Mandatory = $true)][string]$TargetScope,
17
+ [string]$TargetProjectPath
18
+ )
19
+
20
+ if ($TargetScope -eq 'project') {
21
+ if (-not $TargetProjectPath -or $TargetProjectPath.Trim().Length -eq 0) {
22
+ throw "Project-local Codex uninstall requires -ProjectPath."
23
+ }
24
+ if (-not (Test-Path -LiteralPath $TargetProjectPath)) {
25
+ New-Item -ItemType Directory -Force -Path $TargetProjectPath | Out-Null
26
+ }
27
+ $projectRoot = (Resolve-Path -LiteralPath $TargetProjectPath).Path
28
+ return (Join-Path $projectRoot '.codex')
29
+ }
30
+
31
+ if ($env:CODEX_HOME) {
32
+ return $env:CODEX_HOME
33
+ }
34
+ return (Join-Path $HOME '.codex')
35
+ }
36
+
11
37
  function Backup-Directory {
12
38
  param(
13
39
  [Parameter(Mandatory = $true)][string]$SourcePath,
@@ -56,11 +82,7 @@ if ($SkillName) {
56
82
  $targetNames = @($managedSkillNames)
57
83
  }
58
84
 
59
- $codexHome = $env:CODEX_HOME
60
- if (-not $codexHome) {
61
- $codexHome = Join-Path $HOME '.codex'
62
- }
63
-
85
+ $codexHome = Resolve-CodexHome -TargetScope $Scope -TargetProjectPath $ProjectPath
64
86
  $skillsDest = Join-Path $codexHome 'skills'
65
87
  if (-not (Test-Path -LiteralPath $skillsDest)) {
66
88
  Write-Host "Codex skills directory not found: $skillsDest"
@@ -103,6 +125,8 @@ foreach ($name in $targetNames) {
103
125
 
104
126
  Write-Host ""
105
127
  Write-Host "Uninstall summary:"
128
+ Write-Host "- Scope: $Scope"
129
+ Write-Host "- Destination: $skillsDest"
106
130
  Write-Host "- Removed: $($removed.Count)"
107
131
  if ($removed.Count -gt 0) {
108
132
  $removed | ForEach-Object { Write-Host " - $_" }
@@ -113,4 +137,7 @@ if ($missing.Count -gt 0) {
113
137
  }
114
138
  if ($backupRootResolved) {
115
139
  Write-Host "- Backup directory: $backupRootResolved"
116
- }
140
+ }
141
+ if ($Scope -eq 'project') {
142
+ Write-Host "- Project-local Codex uninstall touched only SDTK-managed assets under <project>/.codex/skills."
143
+ }
@@ -1,84 +1,84 @@
1
- ---
2
- name: sdtk-api-design-spec
3
- description: Generate detailed API design markdown (`[FEATURE_KEY]_API_DESIGN_DETAIL.md`) from OpenAPI YAML and API flow list using Excel-style structure rules. Use when you need field-level request/response tables + per-endpoint process flow images for implementation/review handoff.
4
- ---
5
-
6
- # SDTK-SPEC API Design Detail Spec
7
-
8
- ## Critical Constraints
9
- - I do not drift from the source YAML or flow list.
10
- - I do not leave broken flow image embeds or missing assumptions in the API design detail.
11
-
12
- ## Outputs
13
- - `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
14
- - Supporting generated assets:
15
- - `docs/api/flows/*.puml`
16
- - `docs/api/images/*.svg`
17
-
18
- ## Required Inputs
19
- - Feature key (`FEATURE_KEY`)
20
- - API contract YAML:
21
- - Preferred: `docs/api/[FeaturePascal]_API.yaml`
22
- - Fallback: a specified YAML file path
23
- - API flow list:
24
- - Preferred: `docs/api/[feature_snake]_api_flow_list.txt`
25
- - Fallback: a specified flow list path
26
-
27
- ## Core Rules
28
- - Apply `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md` first.
29
- - Keep endpoint contracts consistent with source YAML.
30
- - Keep process flow source synchronized with flow list (`*_api_flow_list.txt`).
31
- - Keep one visible flowchart per API section (embed image), avoid duplicate preview rendering.
32
- - Keep `Process Flow` sections implementation-readable:
33
- - include YAML-derived flow summary / notes / login bullets
34
- - keep error sections aligned with actual flow exits, not `None`
35
-
36
- ## Generation Procedure
37
- 1. Resolve input files (`yaml`, `flow_list`, `output`).
38
- 2. Parse YAML endpoints (method, path, request schema, success/error schema).
39
- 3. Parse flow blocks from flow list (`@startuml ... @enduml`) and map by normalized `METHOD + path`.
40
- 4. Generate detailed markdown sections per API:
41
- - Flow summary / notes / login bullets from YAML `description`
42
- - Process flow source block (`text` fenced block)
43
- - Embedded flowchart image
44
- - Path parameter table
45
- - Request table (hierarchy levels + type + format + required)
46
- - Success response table
47
- - Error response table (explicit schema if defined, otherwise shared envelope + inferred business statuses from flow)
48
- 5. Generate/update `.puml` per API under `docs/api/flows`.
49
- 6. Render `.svg` images under `docs/api/images`.
50
- 7. Validate:
51
- - every API section has one embedded image
52
- - every embed path exists
53
- - no render error image output
54
- - markdown tables keep `No` sequential numbering
55
-
56
- ## Script
57
- - `scripts/generate_api_design_detail.py`
58
-
59
- ### Typical command
60
- ```powershell
61
- python "toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py" `
62
- --feature-key SCHEDULE_WHITEBOARD `
63
- --yaml "docs/api/ScheduleWhiteboard_API.yaml" `
64
- --flow-list "docs/api/schedule_whiteboard_api_flow_list.txt" `
65
- --output "docs/api/SCHEDULE_WHITEBOARD_API_DESIGN_DETAIL.md"
66
- ```
67
-
68
- ### Optional subset generation
69
- ```powershell
70
- python "toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py" `
71
- --feature-key SCHEDULE_WHITEBOARD `
72
- --yaml "docs/api/ScheduleWhiteboard_API.yaml" `
73
- --flow-list "docs/api/schedule_whiteboard_api_flow_list.txt" `
74
- --output "docs/api/SCHEDULE_WHITEBOARD_API_DESIGN_DETAIL.md" `
75
- --include "POST /api/whiteboard/assignment/{company_uuid}" `
76
- --include "POST /api/whiteboard/assignment/edit/{company_uuid}/{sagyo_assign_uuid}" `
77
- --include "POST /api/whiteboard/assignment/delete/{company_uuid}/{sagyo_assign_uuid}"
78
- ```
79
-
80
- ## Orchestrator Integration (Hybrid)
81
- - `apiDesignDetailMode` in `sdtk-spec.config.json` controls orchestration behavior:
82
- - `auto` (default): generate API design detail when ARCH has API scope and YAML/flow sources are available.
83
- - `on`: always generate API design detail for API scope (fail if required sources are missing).
84
- - `off`: skip unless user explicitly requests.
1
+ ---
2
+ name: sdtk-api-design-spec
3
+ description: Generate detailed API design markdown (`[FEATURE_KEY]_API_DESIGN_DETAIL.md`) from OpenAPI YAML and API flow list using Excel-style structure rules. Use when you need field-level request/response tables + per-endpoint process flow images for implementation/review handoff.
4
+ ---
5
+
6
+ # SDTK-SPEC API Design Detail Spec
7
+
8
+ ## Critical Constraints
9
+ - I do not drift from the source YAML or flow list.
10
+ - I do not leave broken flow image embeds or missing assumptions in the API design detail.
11
+
12
+ ## Outputs
13
+ - `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
14
+ - Supporting generated assets:
15
+ - `docs/api/flows/*.puml`
16
+ - `docs/api/images/*.svg`
17
+
18
+ ## Required Inputs
19
+ - Feature key (`FEATURE_KEY`)
20
+ - API contract YAML:
21
+ - Preferred: `docs/api/[FeaturePascal]_API.yaml`
22
+ - Fallback: a specified YAML file path
23
+ - API flow list:
24
+ - Preferred: `docs/api/[feature_snake]_api_flow_list.txt`
25
+ - Fallback: a specified flow list path
26
+
27
+ ## Core Rules
28
+ - Apply `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md` first.
29
+ - Keep endpoint contracts consistent with source YAML.
30
+ - Keep process flow source synchronized with flow list (`*_api_flow_list.txt`).
31
+ - Keep one visible flowchart per API section (embed image), avoid duplicate preview rendering.
32
+ - Keep `Process Flow` sections implementation-readable:
33
+ - include YAML-derived flow summary / notes / login bullets
34
+ - keep error sections aligned with actual flow exits, not `None`
35
+
36
+ ## Generation Procedure
37
+ 1. Resolve input files (`yaml`, `flow_list`, `output`).
38
+ 2. Parse YAML endpoints (method, path, request schema, success/error schema).
39
+ 3. Parse flow blocks from flow list (`@startuml ... @enduml`) and map by normalized `METHOD + path`.
40
+ 4. Generate detailed markdown sections per API:
41
+ - Flow summary / notes / login bullets from YAML `description`
42
+ - Process flow source block (`text` fenced block)
43
+ - Embedded flowchart image
44
+ - Path parameter table
45
+ - Request table (hierarchy levels + type + format + required)
46
+ - Success response table
47
+ - Error response table (explicit schema if defined, otherwise shared envelope + inferred business statuses from flow)
48
+ 5. Generate/update `.puml` per API under `docs/api/flows`.
49
+ 6. Render `.svg` images under `docs/api/images`.
50
+ 7. Validate:
51
+ - every API section has one embedded image
52
+ - every embed path exists
53
+ - no render error image output
54
+ - markdown tables keep `No` sequential numbering
55
+
56
+ ## Script
57
+ - `scripts/generate_api_design_detail.py`
58
+
59
+ ### Typical command
60
+ ```powershell
61
+ python "toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py" `
62
+ --feature-key WORK_PLANNING_BOARD `
63
+ --yaml "docs/api/WorkPlanningBoard_API.yaml" `
64
+ --flow-list "docs/api/work_planning_board_api_flow_list.txt" `
65
+ --output "docs/api/WORK_PLANNING_BOARD_API_DESIGN_DETAIL.md"
66
+ ```
67
+
68
+ ### Optional subset generation
69
+ ```powershell
70
+ python "toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py" `
71
+ --feature-key WORK_PLANNING_BOARD `
72
+ --yaml "docs/api/WorkPlanningBoard_API.yaml" `
73
+ --flow-list "docs/api/work_planning_board_api_flow_list.txt" `
74
+ --output "docs/api/WORK_PLANNING_BOARD_API_DESIGN_DETAIL.md" `
75
+ --include "POST /api/work-assignment/{organization_uuid}" `
76
+ --include "POST /api/work-assignment/edit/{organization_uuid}/{task_assignment_uuid}" `
77
+ --include "POST /api/work-assignment/delete/{organization_uuid}/{task_assignment_uuid}"
78
+ ```
79
+
80
+ ## Orchestrator Integration (Hybrid)
81
+ - `apiDesignDetailMode` in `sdtk-spec.config.json` controls orchestration behavior:
82
+ - `auto` (default): generate API design detail when ARCH has API scope and YAML/flow sources are available.
83
+ - `on`: always generate API design detail for API scope (fail if required sources are missing).
84
+ - `off`: skip unless user explicitly requests.