sdtk-ops-kit 0.2.1 → 0.2.3

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 (43) hide show
  1. package/README.md +95 -8
  2. package/assets/manifest/toolkit-bundle.manifest.json +66 -66
  3. package/assets/manifest/toolkit-bundle.sha256.txt +32 -32
  4. package/assets/toolkit/toolkit/AGENTS.md +30 -2
  5. package/assets/toolkit/toolkit/SDTKOPS_TOOLKIT.md +203 -166
  6. package/assets/toolkit/toolkit/install.ps1 +1 -8
  7. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +30 -7
  8. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +31 -2
  9. package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +12 -12
  10. package/assets/toolkit/toolkit/skills/ops-backup/SKILL.md +0 -2
  11. package/assets/toolkit/toolkit/skills/ops-backup/references/backup-script-patterns.md +0 -2
  12. package/assets/toolkit/toolkit/skills/ops-ci-cd/SKILL.md +0 -2
  13. package/assets/toolkit/toolkit/skills/ops-ci-cd/references/pipeline-examples.md +0 -2
  14. package/assets/toolkit/toolkit/skills/ops-container/SKILL.md +0 -2
  15. package/assets/toolkit/toolkit/skills/ops-container/references/k8s-manifest-patterns.md +0 -2
  16. package/assets/toolkit/toolkit/skills/ops-cost/SKILL.md +0 -2
  17. package/assets/toolkit/toolkit/skills/ops-debug/SKILL.md +0 -1
  18. package/assets/toolkit/toolkit/skills/ops-debug/references/root-cause-tracing.md +0 -1
  19. package/assets/toolkit/toolkit/skills/ops-deploy/SKILL.md +0 -2
  20. package/assets/toolkit/toolkit/skills/ops-discover/SKILL.md +21 -0
  21. package/assets/toolkit/toolkit/skills/ops-incident/SKILL.md +0 -2
  22. package/assets/toolkit/toolkit/skills/ops-incident/references/communication-templates.md +0 -2
  23. package/assets/toolkit/toolkit/skills/ops-incident/references/postmortem-template.md +0 -2
  24. package/assets/toolkit/toolkit/skills/ops-incident/references/runbook-template.md +0 -2
  25. package/assets/toolkit/toolkit/skills/ops-infra-plan/SKILL.md +1 -3
  26. package/assets/toolkit/toolkit/skills/ops-infra-plan/references/iac-patterns.md +0 -2
  27. package/assets/toolkit/toolkit/skills/ops-monitor/SKILL.md +0 -2
  28. package/assets/toolkit/toolkit/skills/ops-monitor/references/alert-rules.md +0 -2
  29. package/assets/toolkit/toolkit/skills/ops-monitor/references/slo-templates.md +0 -2
  30. package/assets/toolkit/toolkit/skills/ops-parallel/SKILL.md +22 -5
  31. package/assets/toolkit/toolkit/skills/ops-plan/SKILL.md +33 -1
  32. package/assets/toolkit/toolkit/skills/ops-security-infra/SKILL.md +1 -3
  33. package/assets/toolkit/toolkit/skills/ops-security-infra/references/cicd-security-pipeline.md +0 -2
  34. package/assets/toolkit/toolkit/skills/ops-security-infra/references/security-headers.md +0 -2
  35. package/assets/toolkit/toolkit/skills/ops-verify/SKILL.md +16 -1
  36. package/package.json +1 -1
  37. package/src/commands/help.js +88 -53
  38. package/src/commands/init.js +10 -1
  39. package/src/commands/runtime.js +29 -7
  40. package/src/commands/update.js +11 -0
  41. package/src/index.js +68 -65
  42. package/src/lib/scope.js +19 -2
  43. package/src/lib/update.js +337 -0
@@ -1,166 +1,203 @@
1
- # Software Development Toolkit - Operations (SDTK-OPS)
2
-
3
- ## Document Role
4
- This file is the architecture and product-boundary document for `SDTK-OPS`.
5
-
6
- Use this file to understand:
7
- - how `SDTK-OPS` fits inside the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family
8
- - what the current skill-driven entry model owns
9
- - which journeys are canonical in the current wave
10
- - what stays outside `SDTK-OPS` scope
11
-
12
- Do not use this file as the primary install or onboarding guide.
13
-
14
- Canonical end-user guide:
15
- - `products/sdtk-ops/governance/SDTKOPS_TOOLKIT_USAGE_GUIDE.md`
16
-
17
- ## 1. Overview
18
-
19
- `SDTK-OPS` is the operations-process product in the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family.
20
-
21
- It is not a workflow-first CLI like `SDTK-CODE`.
22
-
23
- The truthful current CLI surface is:
24
- - `sdtk-ops help`
25
- - `sdtk-ops init`
26
- - `sdtk-ops runtime install`
27
- - `sdtk-ops runtime status`
28
- - `sdtk-ops runtime uninstall`
29
-
30
- The truthful current operational surface after `init` is skill-driven:
31
- - the 15 `ops-*` skills remain the real operating surface
32
- - `ops-discover` remains a skill, not a CLI command
33
- - `ops-verify` remains the required closing skill for every canonical journey
34
- - `generate` remains unsupported and deferred
35
-
36
- ## 2. Boundary With SDTK-SPEC And SDTK-CODE
37
-
38
- `SDTK-SPEC` is upstream and remains the docs-first specification and handoff system.
39
-
40
- `SDTK-SPEC` owns:
41
- - specification and handoff generation
42
- - PM, BA, ARCH, DEV, and QA orchestration
43
- - upstream workflow contracts and design artifacts
44
-
45
- `SDTK-CODE` owns:
46
- - coding-process execution after handoff
47
- - workflow-first build, verify, and closeout discipline
48
- - implementation evidence for the coded slice
49
-
50
- `SDTK-OPS` owns:
51
- - operational planning and deployment discipline
52
- - environment/runtime validation
53
- - monitoring, incident response, and backup or recovery execution
54
- - infrastructure security, compliance, and cost work when those are the active concern
55
-
56
- `SDTK-OPS` does not own:
57
- - upstream requirements or architecture generation
58
- - coding workflow execution
59
- - provider-specific platform packs in the current wave
60
- - public product launch claims
61
-
62
- ## 3. Entry And Routing Model
63
-
64
- After `sdtk-ops init`, choose a journey directly when the goal is clear.
65
-
66
- If the correct path is unclear:
67
- - start with `ops-discover`
68
-
69
- Always:
70
- - close every canonical journey with `ops-verify`
71
- - keep `generate` out of the documented command path
72
-
73
- | Journey | Start With | Suggested Chain | Close With |
74
- |---------|------------|-----------------|------------|
75
- | Deployment | `ops-plan` | `ops-plan` -> `ops-infra-plan` -> `ops-container` -> `ops-ci-cd` -> `ops-deploy` -> `ops-monitor` | `ops-verify` |
76
- | Incident | `ops-incident` | `ops-incident` -> `ops-debug` -> `ops-deploy` if a change or rollback is required -> `ops-monitor` | `ops-verify` |
77
- | Monitoring | `ops-plan` | `ops-plan` -> `ops-monitor` | `ops-verify` |
78
- | Backup or recovery | `ops-plan` | `ops-plan` -> `ops-backup` | `ops-verify` |
79
-
80
- Other valid but non-primary routed skills in this wave:
81
- - `ops-security-infra`
82
- - `ops-compliance`
83
- - `ops-cost`
84
- - `ops-parallel`
85
-
86
- ## 4. Skill Catalog
87
-
88
- ### 4.1 Core Process
89
-
90
- | Skill | Purpose |
91
- |-------|---------|
92
- | `ops-verify` | verify commands, state, and evidence before declaring work complete |
93
- | `ops-debug` | diagnose operational failures systematically and trace root cause |
94
- | `ops-plan` | write reviewable operational plans with rollback and verification steps |
95
- | `ops-parallel` | split truly independent operations tasks into parallel workstreams |
96
-
97
- ### 4.2 Deployment
98
-
99
- | Skill | Purpose |
100
- |-------|---------|
101
- | `ops-infra-plan` | design infrastructure architecture and provisioning order before apply |
102
- | `ops-deploy` | execute deployments with health gates, rollout strategy, and rollback discipline |
103
- | `ops-container` | define secure image build and container orchestration patterns |
104
- | `ops-ci-cd` | build and manage pipelines, promotion flow, artifact handling, and secret controls |
105
-
106
- ### 4.3 Operations
107
-
108
- | Skill | Purpose |
109
- |-------|---------|
110
- | `ops-monitor` | define SLOs, alerts, dashboards, logs, and traces |
111
- | `ops-incident` | coordinate incident response, stabilization, and post-mortem follow-up |
112
- | `ops-backup` | design backup, restore, and disaster recovery procedures |
113
- | `ops-cost` | review spend, identify waste, and plan safe right-sizing |
114
-
115
- ### 4.4 Security And Compliance
116
-
117
- | Skill | Purpose |
118
- |-------|---------|
119
- | `ops-security-infra` | harden infrastructure, secrets, network policy, and security scanning |
120
- | `ops-compliance` | automate audit readiness, evidence collection, retention, and policy enforcement |
121
-
122
- ### 4.5 Discovery
123
-
124
- | Skill | Purpose |
125
- |-------|---------|
126
- | `ops-discover` | choose the correct SDTK-OPS entry point and sequencing |
127
-
128
- ## 5. Runtime Truth
129
-
130
- ### Claude
131
- - supports project and user scope
132
- - default scope is project
133
- - uses the `ops-*` runtime payload after install
134
-
135
- ### Codex
136
- - supports user scope only
137
- - default scope is user
138
- - uses collision-avoiding `sdtk-ops-*` skill directory names
139
- - project scope remains blocked by Gate C0
140
-
141
- ## 6. Documentation Map
142
-
143
- Use these documents by role:
144
-
145
- - Canonical end-user install and usage guide:
146
- - `products/sdtk-ops/governance/SDTKOPS_TOOLKIT_USAGE_GUIDE.md`
147
- - Install-truth and smoke appendix:
148
- - `products/sdtk-ops/governance/installation-runbook.md`
149
- - Workflow-entry and reference stub:
150
- - `products/sdtk-ops/governance/usage-guide.md`
151
- - Package landing page:
152
- - `products/sdtk-ops/distribution/sdtk-ops-kit/README.md`
153
- - Runtime routing inventory:
154
- - `products/sdtk-ops/toolkit/AGENTS.md`
155
- - Internal release docs:
156
- - `products/sdtk-ops/governance/release-packaging.md`
157
- - `products/sdtk-ops/governance/release-evidence.md`
158
-
159
- ## 7. Scope
160
-
161
- `SDTK-OPS` v1 contains 15 core skills and stays cloud-agnostic.
162
-
163
- Not part of the current supported wave:
164
- - provider-specific packs such as AWS, GCP, or Azure variants
165
- - a workflow-first CLI command suite such as `sdtk-ops deploy`
166
- - public npm installation claims
1
+ # Software Development Toolkit - Operations (SDTK-OPS)
2
+
3
+ ## Document Role
4
+ This file is the architecture and product-boundary document for `SDTK-OPS`.
5
+
6
+ Use this file to understand:
7
+ - how `SDTK-OPS` fits inside the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family
8
+ - what the current skill-driven entry model owns
9
+ - which journeys are canonical in the current wave
10
+ - what stays outside `SDTK-OPS` scope
11
+
12
+ Do not use this file as the primary install or onboarding guide.
13
+
14
+ Canonical end-user guide:
15
+ - `products/sdtk-ops/governance/SDTKOPS_TOOLKIT_USAGE_GUIDE.md`
16
+
17
+ ## 1. Overview
18
+
19
+ `SDTK-OPS` is the operations-process product in the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family.
20
+
21
+ It is not a workflow-first CLI like `SDTK-CODE`.
22
+
23
+ The truthful current CLI surface is:
24
+ - `sdtk-ops help`
25
+ - `sdtk-ops init`
26
+ - `sdtk-ops runtime install`
27
+ - `sdtk-ops runtime status`
28
+ - `sdtk-ops runtime uninstall`
29
+
30
+ The current public package is:
31
+ - `sdtk-ops-kit`
32
+ - CLI command: `sdtk-ops`
33
+ - Latest published version lookup: `npm view sdtk-ops-kit version`
34
+
35
+ The truthful current operational surface after `init` is skill-driven:
36
+ - the 15 `ops-*` skills remain the real operating surface
37
+ - `ops-discover` remains a skill, not a CLI command
38
+ - `ops-verify` remains the required closing skill for every canonical journey
39
+ - `generate` remains unsupported and deferred
40
+
41
+ ## 2. Boundary With SDTK-SPEC And SDTK-CODE
42
+
43
+ `SDTK-SPEC` is upstream and remains the docs-first specification and handoff system.
44
+
45
+ `SDTK-SPEC` owns:
46
+ - specification and handoff generation
47
+ - PM, BA, ARCH, DEV, and QA orchestration
48
+ - upstream workflow contracts and design artifacts
49
+
50
+ `SDTK-CODE` owns:
51
+ - coding-process execution after handoff
52
+ - workflow-first build, verify, and closeout discipline
53
+ - implementation evidence for the coded slice
54
+
55
+ `SDTK-OPS` owns:
56
+ - operational planning and deployment discipline
57
+ - environment/runtime validation
58
+ - monitoring, incident response, and backup or recovery execution
59
+ - infrastructure security, compliance, and cost work when those are the active concern
60
+
61
+ `SDTK-OPS` does not own:
62
+ - upstream requirements or architecture generation
63
+ - coding workflow execution
64
+ - provider-specific platform packs in the current wave
65
+ - broader launch marketing claims beyond the current public package
66
+
67
+ ## 3. DEV-Run Intake Contract
68
+
69
+ `DEV-Run` is executed via `SDTK-OPS`.
70
+
71
+ When `DEV-Run` begins from coded scope, the only canonical `CODE -> OPS` bridge artifact is:
72
+ - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
73
+
74
+ `SDTK-OPS` reads that frozen contract as input.
75
+ It does not redefine the schema, rename fields, move the file, or silently normalize producer output into a different contract.
76
+
77
+ Ready-path intake rules:
78
+ - inspect `handoff_status` first
79
+ - if `handoff_status` is `READY_FOR_SDTK_OPS`, start with `suggested_next_ops_path.start_with` unless fresh evidence requires a bounded reroute
80
+ - treat `suggested_next_ops_path.suggested_chain` as the default first routing sequence
81
+ - close with `suggested_next_ops_path.close_with`, which should normally be `ops-verify`
82
+
83
+ Blocked-path intake rules:
84
+ - if `handoff_status` is `BLOCKED_FOR_SDTK_OPS`, the handoff is still inspectable
85
+ - inspect `open_blockers`, `code_evidence_refs`, and the prerequisite fields before choosing any action
86
+ - do not treat blocked handoff state as normal ready-path execution
87
+ - use `ops-discover` to select bounded triage or clarification only when blocker text supports that path
88
+
89
+ Bounded OPS evidence expectations in this wave:
90
+ - record the consumed handoff path and `handoff_status`
91
+ - record the selected first OPS step and whether it followed or overrode `suggested_next_ops_path`
92
+ - record checked prerequisites, assumptions, dependencies, observability requirements, and rollback or recovery expectations
93
+ - record journey-specific operational evidence for the scoped OPS work
94
+ - record final `ops-verify` closeout evidence
95
+
96
+ This wave does not define a final OPS evidence schema and does not implement QA bridge logic.
97
+
98
+ ## 4. Entry And Routing Model
99
+
100
+ After `sdtk-ops init`, choose a journey directly when the goal is clear.
101
+
102
+ If the correct path is unclear:
103
+ - start with `ops-discover`
104
+
105
+ Always:
106
+ - close every canonical journey with `ops-verify`
107
+ - keep `generate` out of the documented command path
108
+
109
+ | Journey | Start With | Suggested Chain | Close With |
110
+ |---------|------------|-----------------|------------|
111
+ | Deployment | `ops-plan` | `ops-plan` -> `ops-infra-plan` -> `ops-container` -> `ops-ci-cd` -> `ops-deploy` -> `ops-monitor` | `ops-verify` |
112
+ | Incident | `ops-incident` | `ops-incident` -> `ops-debug` -> `ops-deploy` if a change or rollback is required -> `ops-monitor` | `ops-verify` |
113
+ | Monitoring | `ops-plan` | `ops-plan` -> `ops-monitor` | `ops-verify` |
114
+ | Backup or recovery | `ops-plan` | `ops-plan` -> `ops-backup` | `ops-verify` |
115
+
116
+ Other valid but non-primary routed skills in this wave:
117
+ - `ops-security-infra`
118
+ - `ops-compliance`
119
+ - `ops-cost`
120
+ - `ops-parallel`
121
+
122
+ ## 5. Skill Catalog
123
+
124
+ ### 5.1 Core Process
125
+
126
+ | Skill | Purpose |
127
+ |-------|---------|
128
+ | `ops-verify` | verify commands, state, and evidence before declaring work complete |
129
+ | `ops-debug` | diagnose operational failures systematically and trace root cause |
130
+ | `ops-plan` | write reviewable operational plans with rollback and verification steps |
131
+ | `ops-parallel` | split truly independent operations tasks into parallel workstreams |
132
+
133
+ ### 5.2 Deployment
134
+
135
+ | Skill | Purpose |
136
+ |-------|---------|
137
+ | `ops-infra-plan` | design infrastructure architecture and provisioning order before apply |
138
+ | `ops-deploy` | execute deployments with health gates, rollout strategy, and rollback discipline |
139
+ | `ops-container` | define secure image build and container orchestration patterns |
140
+ | `ops-ci-cd` | build and manage pipelines, promotion flow, artifact handling, and secret controls |
141
+
142
+ ### 5.3 Operations
143
+
144
+ | Skill | Purpose |
145
+ |-------|---------|
146
+ | `ops-monitor` | define SLOs, alerts, dashboards, logs, and traces |
147
+ | `ops-incident` | coordinate incident response, stabilization, and post-mortem follow-up |
148
+ | `ops-backup` | design backup, restore, and disaster recovery procedures |
149
+ | `ops-cost` | review spend, identify waste, and plan safe right-sizing |
150
+
151
+ ### 5.4 Security And Compliance
152
+
153
+ | Skill | Purpose |
154
+ |-------|---------|
155
+ | `ops-security-infra` | harden infrastructure, secrets, network policy, and security scanning |
156
+ | `ops-compliance` | automate audit readiness, evidence collection, retention, and policy enforcement |
157
+
158
+ ### 5.5 Discovery
159
+
160
+ | Skill | Purpose |
161
+ |-------|---------|
162
+ | `ops-discover` | choose the correct SDTK-OPS entry point and sequencing |
163
+
164
+ ## 6. Runtime Truth
165
+
166
+ ### Claude
167
+ - supports project and user scope
168
+ - default scope is project
169
+ - uses the `ops-*` runtime payload after install
170
+
171
+ ### Codex
172
+ - defaults to user scope
173
+ - default scope is user
174
+ - uses collision-avoiding `sdtk-ops-*` skill directory names
175
+ - supports project-local installs only through the explicit local `CODEX_HOME=<project>/.codex` contract
176
+ - native `.codex/skills` auto-discovery is not claimed
177
+
178
+ ## 7. Documentation Map
179
+
180
+ Use these documents by role:
181
+
182
+ - Canonical end-user install and usage guide:
183
+ - `products/sdtk-ops/governance/SDTKOPS_TOOLKIT_USAGE_GUIDE.md`
184
+ - Install-truth and smoke appendix:
185
+ - `products/sdtk-ops/governance/installation-runbook.md`
186
+ - Workflow-entry and reference stub:
187
+ - `products/sdtk-ops/governance/usage-guide.md`
188
+ - Package landing page:
189
+ - `products/sdtk-ops/distribution/sdtk-ops-kit/README.md`
190
+ - Runtime routing inventory:
191
+ - `products/sdtk-ops/toolkit/AGENTS.md`
192
+ - Release docs:
193
+ - `products/sdtk-ops/governance/release-packaging.md`
194
+ - `products/sdtk-ops/governance/release-evidence.md`
195
+
196
+ ## 8. Scope
197
+
198
+ `SDTK-OPS` v1 contains 15 core skills and stays cloud-agnostic.
199
+
200
+ Not part of the current supported wave:
201
+ - provider-specific packs such as AWS, GCP, or Azure variants
202
+ - a workflow-first CLI command suite such as `sdtk-ops deploy`
203
+ - cloud, Kubernetes, or production-topology guarantees beyond the current validated local Docker proof
@@ -65,11 +65,6 @@ if (-not $Scope) {
65
65
  $Scope = if ($Runtime -eq 'claude') { 'project' } else { 'user' }
66
66
  }
67
67
 
68
- if ($Runtime -eq 'codex' -and $Scope -eq 'project') {
69
- Write-Error "Codex does not support project-local skills. Use -Scope user instead."
70
- exit 1
71
- }
72
-
73
68
  if ($SkipSkills) {
74
69
  if (-not $Quiet) {
75
70
  Write-Warning "-SkipSkills is deprecated. Use -SkipRuntimeAssets instead."
@@ -120,11 +115,9 @@ if (-not $SkipRuntimeAssets) {
120
115
 
121
116
  $params = @{
122
117
  Scope = $Scope
118
+ ProjectPath = $projectRoot
123
119
  Quiet = [bool]$Quiet
124
120
  }
125
- if ($Runtime -eq 'claude') {
126
- $params.ProjectPath = $projectRoot
127
- }
128
121
  if ($Force) {
129
122
  $params.Force = $true
130
123
  }
@@ -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
  [switch]$Quiet
6
7
  )
7
8
 
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
9
  $ErrorActionPreference = 'Stop'
14
10
  Set-StrictMode -Version Latest
15
11
 
12
+ function Resolve-CodexHome {
13
+ param(
14
+ [Parameter(Mandatory = $true)][string]$TargetScope,
15
+ [string]$TargetProjectPath
16
+ )
17
+
18
+ if ($TargetScope -eq 'project') {
19
+ if (-not $TargetProjectPath -or $TargetProjectPath.Trim().Length -eq 0) {
20
+ throw "Project-local Codex install requires -ProjectPath."
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 Write-Utf8NoBomFile {
17
36
  param(
18
37
  [Parameter(Mandatory = $true)][string]$Path,
@@ -66,7 +85,7 @@ if ($managedSkills.Count -ne 15) {
66
85
  throw "Expected 15 managed SDTK-OPS skills but found $($managedSkills.Count)."
67
86
  }
68
87
 
69
- $codexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $HOME '.codex' }
88
+ $codexHome = Resolve-CodexHome -TargetScope $Scope -TargetProjectPath $ProjectPath
70
89
  $skillsDest = Join-Path $codexHome 'skills'
71
90
  New-Item -ItemType Directory -Force -Path $skillsDest | Out-Null
72
91
 
@@ -120,8 +139,12 @@ if ($installedNow.Count -ne 15) {
120
139
  if (-not $Quiet) {
121
140
  Write-Host ""
122
141
  Write-Host "Install summary:"
123
- Write-Host "- Scope: user"
142
+ Write-Host "- Scope: $Scope"
124
143
  Write-Host "- Destination: $skillsDest"
125
144
  Write-Host "- Copied: $copied"
126
145
  Write-Host "- Skipped: $skipped"
146
+ if ($Scope -eq 'project') {
147
+ Write-Host "- Project-local Codex support requires launching Codex with CODEX_HOME=<project>/.codex."
148
+ Write-Host "- Native .codex/skills auto-discovery is not claimed."
149
+ }
127
150
  }
@@ -1,4 +1,7 @@
1
1
  param(
2
+ [ValidateSet('project', 'user')]
3
+ [string]$Scope = 'user',
4
+ [string]$ProjectPath,
2
5
  [switch]$All,
3
6
  [switch]$Quiet
4
7
  )
@@ -6,6 +9,29 @@ param(
6
9
  $ErrorActionPreference = 'Stop'
7
10
  Set-StrictMode -Version Latest
8
11
 
12
+ function Resolve-CodexHome {
13
+ param(
14
+ [Parameter(Mandatory = $true)][string]$TargetScope,
15
+ [string]$TargetProjectPath
16
+ )
17
+
18
+ if ($TargetScope -eq 'project') {
19
+ if (-not $TargetProjectPath -or $TargetProjectPath.Trim().Length -eq 0) {
20
+ throw "Project-local Codex uninstall requires -ProjectPath."
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
+
9
35
  $toolkitRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
10
36
  $skillsSource = Join-Path $toolkitRoot 'skills'
11
37
  if (-not (Test-Path -LiteralPath $skillsSource)) {
@@ -21,7 +47,7 @@ if ($managedSkillNames.Count -ne 15) {
21
47
  throw "Expected 15 managed SDTK-OPS skills but found $($managedSkillNames.Count)."
22
48
  }
23
49
 
24
- $codexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $HOME '.codex' }
50
+ $codexHome = Resolve-CodexHome -TargetScope $Scope -TargetProjectPath $ProjectPath
25
51
  $skillsDest = Join-Path $codexHome 'skills'
26
52
  if (-not (Test-Path -LiteralPath $skillsDest)) {
27
53
  if (-not $Quiet) {
@@ -46,8 +72,11 @@ foreach ($name in $managedSkillNames) {
46
72
  if (-not $Quiet) {
47
73
  Write-Host ""
48
74
  Write-Host "Uninstall summary:"
49
- Write-Host "- Scope: user"
75
+ Write-Host "- Scope: $Scope"
50
76
  Write-Host "- Destination: $skillsDest"
51
77
  Write-Host "- Removed: $($removed.Count)"
52
78
  Write-Host "- Missing/Skipped: $($missing.Count)"
79
+ if ($Scope -eq 'project') {
80
+ Write-Host "- Project-local Codex uninstall touched only SDTK-OPS-managed assets under <project>/.codex/skills."
81
+ }
53
82
  }
@@ -1,12 +1,12 @@
1
- {
2
- "$comment": "Example profiles config for SDTK-OPS. Copy to sdtk-spec.config.profiles.json and customize for your internal runtime targets.",
3
- "profiles": {
4
- "default": {
5
- "stack": {
6
- "backend": "UPDATE_ME",
7
- "frontend": "UPDATE_ME",
8
- "database": "UPDATE_ME"
9
- }
10
- }
11
- }
12
- }
1
+ {
2
+ "$comment": "Example profiles config for SDTK-OPS. Copy to sdtk-spec.config.profiles.json and customize for your runtime targets.",
3
+ "profiles": {
4
+ "default": {
5
+ "stack": {
6
+ "backend": "UPDATE_ME",
7
+ "frontend": "UPDATE_ME",
8
+ "database": "UPDATE_ME"
9
+ }
10
+ }
11
+ }
12
+ }
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
  ---
3
2
  name: ops-backup
4
3
  description: Backup and disaster recovery. Use when designing backup strategies, disaster recovery plans, or restore procedures -- covers RTO/RPO definition, backup verification, and cross-region replication.
@@ -90,4 +89,3 @@ After backup design is approved:
90
89
  - implement storage and retention changes through `ops-infra-plan`
91
90
  - validate restore evidence with `ops-verify`
92
91
  - use `ops-monitor` so backup failures page the right team
93
-
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
 
3
2
  # Backup Script Patterns
4
3
 
@@ -105,4 +104,3 @@ cleanup_old_backups() {
105
104
  - replace `cloud-storage-copy` with the provider-specific upload command used by your platform
106
105
  - verify every backup after encryption and before declaring success
107
106
  - keep restore testing separate from production systems
108
-
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
  ---
3
2
  name: ops-ci-cd
4
3
  description: CI/CD pipeline design and management. Use when setting up or modifying build, test, and deployment pipelines -- covers pipeline stages, branch strategies, artifact management, and secret handling.
@@ -85,4 +84,3 @@ Optimize only after correctness:
85
84
  | Manual deploy steps outside pipeline | Audit trail and repeatability disappear |
86
85
  | Skip security scanning to save time | Vulnerabilities ship by default |
87
86
  | No build cache or job parallelism | Pipeline slows down until teams bypass it |
88
-
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
 
3
2
  # Pipeline Examples
4
3
 
@@ -110,4 +109,3 @@ deploy_prod:
110
109
  - promote the same artifact between environments
111
110
  - prefer platform identity federation over static cloud keys
112
111
  - keep deployment commands explicit enough to review and replay
113
-
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
  ---
3
2
  name: ops-container
4
3
  description: Container operations. Use when building Docker images, writing Dockerfiles, creating Kubernetes manifests, or managing container lifecycle -- covers best practices, security scanning, and orchestration patterns.
@@ -92,4 +91,3 @@ Use a tagging and retention policy:
92
91
  | Bake secrets into Dockerfile or image | Rotation and access control break immediately |
93
92
  | Skip resource limits | Noisy neighbors and eviction behavior become unpredictable |
94
93
  | Omit probes | Broken containers look healthy until users discover them |
95
-
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
 
3
2
  # Kubernetes Manifest Patterns
4
3
 
@@ -113,4 +112,3 @@ spec:
113
112
  - keep resource limits and probes in the first deployable version
114
113
  - route config and secrets through references, not inline literals
115
114
  - match `maxUnavailable` and `minAvailable` so rollout and maintenance rules do not fight each other
116
-
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
  ---
3
2
  name: ops-cost
4
3
  description: Cloud cost analysis and optimization. Use when reviewing infrastructure costs, right-sizing resources, or implementing cost reduction strategies -- covers cost allocation, tagging, reserved capacity, and budget alerts.
@@ -85,4 +84,3 @@ After a cost review:
85
84
  - send architecture changes to `ops-infra-plan`
86
85
  - deploy right-sizing changes with `ops-deploy`
87
86
  - confirm savings and service health with `ops-verify`
88
-
@@ -1,4 +1,3 @@
1
- <!-- Based on superpowers by Jesse Vincent (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
  ---
3
2
  name: ops-debug
4
3
  description: Systematic infrastructure debugging. Use when encountering deployment failure, service outage, network issue, or unexpected infrastructure behavior -- binary search to root cause, evidence-first, no guessing fixes.
@@ -1,4 +1,3 @@
1
- <!-- Based on superpowers by Jesse Vincent (MIT License, 2025). Adapted for SDTK-OPS. -->
2
1
 
3
2
  # Root Cause Tracing
4
3
 
@@ -1,4 +1,3 @@
1
- <!-- Based on agency-agents by AgentLand Contributors (MIT License, 2025) and gstack by Garry Tan (MIT License, 2026). Adapted for SDTK-OPS. -->
2
1
  ---
3
2
  name: ops-deploy
4
3
  description: Deployment execution. Use when deploying infrastructure changes or application releases to any environment -- covers deployment strategies, health check gates, traffic management, and rollback procedures.
@@ -99,4 +98,3 @@ A deployment is complete only after:
99
98
  - rollback remains possible or has been intentionally closed
100
99
  - the exact evidence is recorded
101
100
  - `ops-verify` confirms the post-deploy state
102
-