sdtk-ops-kit 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/assets/manifest/toolkit-bundle.manifest.json +186 -186
- package/assets/manifest/toolkit-bundle.sha256.txt +4 -4
- package/assets/toolkit/toolkit/AGENTS.md +163 -93
- package/assets/toolkit/toolkit/SDTKOPS_TOOLKIT.md +203 -203
- package/assets/toolkit/toolkit/install.ps1 +168 -168
- package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +12 -12
- package/package.json +46 -46
- package/src/commands/help.js +90 -90
- package/src/commands/init.js +98 -98
- package/src/commands/update.js +11 -11
- package/src/index.js +68 -68
- package/src/lib/project-target-guard.js +53 -53
- package/src/lib/update.js +344 -344
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
param(
|
|
2
|
-
[Parameter(Mandatory = $true)]
|
|
3
|
-
[ValidateSet('codex', 'claude')]
|
|
4
|
-
[string]$Runtime,
|
|
5
|
-
|
|
6
|
-
[string]$ProjectPath,
|
|
7
|
-
|
|
8
|
-
[ValidateSet('project', 'user', '')]
|
|
9
|
-
[string]$Scope = '',
|
|
10
|
-
|
|
11
|
-
[switch]$Force,
|
|
12
|
-
[switch]$SkipRuntimeAssets,
|
|
13
|
-
[switch]$SkipSkills,
|
|
14
|
-
[switch]$Quiet
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
$ErrorActionPreference = 'Stop'
|
|
18
|
-
Set-StrictMode -Version Latest
|
|
19
|
-
|
|
20
|
-
function Copy-File {
|
|
21
|
-
param(
|
|
22
|
-
[Parameter(Mandatory = $true)][string]$SourcePath,
|
|
23
|
-
[Parameter(Mandatory = $true)][string]$DestinationPath,
|
|
24
|
-
[Parameter(Mandatory = $true)][bool]$Overwrite
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
if (-not (Test-Path -LiteralPath $SourcePath)) {
|
|
28
|
-
throw "Missing source file: $SourcePath"
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if ((Test-Path -LiteralPath $DestinationPath) -and -not $Overwrite) {
|
|
32
|
-
if (-not $Quiet) {
|
|
33
|
-
Write-Warning "Already exists (skipping). Use -Force to overwrite: $DestinationPath"
|
|
34
|
-
}
|
|
35
|
-
return
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
$parent = Split-Path -Parent $DestinationPath
|
|
39
|
-
if ($parent -and -not (Test-Path -LiteralPath $parent)) {
|
|
40
|
-
New-Item -ItemType Directory -Force -Path $parent | Out-Null
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
Copy-Item -LiteralPath $SourcePath -Destination $DestinationPath -Force
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function Test-IsMaintainerRoot {
|
|
47
|
-
param(
|
|
48
|
-
[Parameter(Mandatory = $true)][string]$ProjectRoot,
|
|
49
|
-
[Parameter(Mandatory = $true)][string[]]$Markers
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
foreach ($marker in $Markers) {
|
|
53
|
-
if (-not (Test-Path -LiteralPath (Join-Path $ProjectRoot $marker))) {
|
|
54
|
-
return $false
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return $true
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function Get-MaintainerRootInstallMessage {
|
|
62
|
-
param(
|
|
63
|
-
[Parameter(Mandatory = $true)][string]$ProjectRoot
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
return @(
|
|
67
|
-
"Refusing to install managed project files into the SDTK maintainer repo root: $ProjectRoot"
|
|
68
|
-
"This install flow would overwrite repo-owned files such as AGENTS.md, CODEX.md, CLAUDE.md, sdtk-spec.config.json, sdtk-spec.config.profiles.example.json."
|
|
69
|
-
"Target a consumer project path instead of the SDTK maintainer monorepo root."
|
|
70
|
-
"If you only need runtime assets, install them into a separate consumer project path rather than the maintainer repo root."
|
|
71
|
-
) -join "`n"
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function Resolve-OrCreateDirectory {
|
|
75
|
-
param(
|
|
76
|
-
[Parameter(Mandatory = $true)][string]$Path
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
if (-not (Test-Path -LiteralPath $Path)) {
|
|
80
|
-
New-Item -ItemType Directory -Force -Path $Path | Out-Null
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return (Resolve-Path -LiteralPath $Path).Path
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
$toolkitRoot = (Resolve-Path -LiteralPath $PSScriptRoot).Path
|
|
87
|
-
if (-not $ProjectPath) {
|
|
88
|
-
$ProjectPath = (Get-Location).Path
|
|
89
|
-
}
|
|
90
|
-
$projectRoot = Resolve-OrCreateDirectory -Path $ProjectPath
|
|
91
|
-
|
|
92
|
-
$maintainerRootMarkers = @(
|
|
93
|
-
'governance/ai/core/IMPROVEMENT_BACKLOG.md',
|
|
94
|
-
'products/sdtk-ops/toolkit/install.ps1'
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
if (Test-IsMaintainerRoot -ProjectRoot $projectRoot -Markers $maintainerRootMarkers) {
|
|
98
|
-
throw (Get-MaintainerRootInstallMessage -ProjectRoot $projectRoot)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (-not $Scope) {
|
|
102
|
-
$Scope = if ($Runtime -eq 'claude') { 'project' } else { 'user' }
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if ($SkipSkills) {
|
|
106
|
-
if (-not $Quiet) {
|
|
107
|
-
Write-Warning "-SkipSkills is deprecated. Use -SkipRuntimeAssets instead."
|
|
108
|
-
}
|
|
109
|
-
$SkipRuntimeAssets = $true
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (-not $Quiet) {
|
|
113
|
-
Write-Host "SDTK-OPS installer"
|
|
114
|
-
Write-Host " Runtime: $Runtime"
|
|
115
|
-
Write-Host " Scope: $Scope"
|
|
116
|
-
Write-Host " Project: $projectRoot"
|
|
117
|
-
Write-Host ""
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
$sharedFiles = @(
|
|
121
|
-
'AGENTS.md',
|
|
122
|
-
'sdtk-spec.config.json',
|
|
123
|
-
'sdtk-spec.config.profiles.example.json'
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
foreach ($fileName in $sharedFiles) {
|
|
127
|
-
Copy-File `
|
|
128
|
-
-SourcePath (Join-Path $toolkitRoot $fileName) `
|
|
129
|
-
-DestinationPath (Join-Path $projectRoot $fileName) `
|
|
130
|
-
-Overwrite ([bool]$Force)
|
|
131
|
-
|
|
132
|
-
if (-not $Quiet) {
|
|
133
|
-
Write-Host " [OK] $fileName"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (-not $SkipRuntimeAssets) {
|
|
138
|
-
$scriptPath = if ($Runtime -eq 'claude') {
|
|
139
|
-
Join-Path $toolkitRoot 'scripts/install-claude-skills.ps1'
|
|
140
|
-
} else {
|
|
141
|
-
Join-Path $toolkitRoot 'scripts/install-codex-skills.ps1'
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (-not (Test-Path -LiteralPath $scriptPath)) {
|
|
145
|
-
throw "Missing runtime installer: $scriptPath"
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (-not $Quiet) {
|
|
149
|
-
Write-Host ""
|
|
150
|
-
Write-Host "Installing $Runtime runtime assets..."
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
$params = @{
|
|
154
|
-
Scope = $Scope
|
|
155
|
-
ProjectPath = $projectRoot
|
|
156
|
-
Quiet = [bool]$Quiet
|
|
157
|
-
}
|
|
158
|
-
if ($Force) {
|
|
159
|
-
$params.Force = $true
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
& $scriptPath @params
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (-not $Quiet) {
|
|
166
|
-
Write-Host ""
|
|
167
|
-
Write-Host "SDTK-OPS installation complete."
|
|
168
|
-
}
|
|
1
|
+
param(
|
|
2
|
+
[Parameter(Mandatory = $true)]
|
|
3
|
+
[ValidateSet('codex', 'claude')]
|
|
4
|
+
[string]$Runtime,
|
|
5
|
+
|
|
6
|
+
[string]$ProjectPath,
|
|
7
|
+
|
|
8
|
+
[ValidateSet('project', 'user', '')]
|
|
9
|
+
[string]$Scope = '',
|
|
10
|
+
|
|
11
|
+
[switch]$Force,
|
|
12
|
+
[switch]$SkipRuntimeAssets,
|
|
13
|
+
[switch]$SkipSkills,
|
|
14
|
+
[switch]$Quiet
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
$ErrorActionPreference = 'Stop'
|
|
18
|
+
Set-StrictMode -Version Latest
|
|
19
|
+
|
|
20
|
+
function Copy-File {
|
|
21
|
+
param(
|
|
22
|
+
[Parameter(Mandatory = $true)][string]$SourcePath,
|
|
23
|
+
[Parameter(Mandatory = $true)][string]$DestinationPath,
|
|
24
|
+
[Parameter(Mandatory = $true)][bool]$Overwrite
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
if (-not (Test-Path -LiteralPath $SourcePath)) {
|
|
28
|
+
throw "Missing source file: $SourcePath"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if ((Test-Path -LiteralPath $DestinationPath) -and -not $Overwrite) {
|
|
32
|
+
if (-not $Quiet) {
|
|
33
|
+
Write-Warning "Already exists (skipping). Use -Force to overwrite: $DestinationPath"
|
|
34
|
+
}
|
|
35
|
+
return
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
$parent = Split-Path -Parent $DestinationPath
|
|
39
|
+
if ($parent -and -not (Test-Path -LiteralPath $parent)) {
|
|
40
|
+
New-Item -ItemType Directory -Force -Path $parent | Out-Null
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
Copy-Item -LiteralPath $SourcePath -Destination $DestinationPath -Force
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function Test-IsMaintainerRoot {
|
|
47
|
+
param(
|
|
48
|
+
[Parameter(Mandatory = $true)][string]$ProjectRoot,
|
|
49
|
+
[Parameter(Mandatory = $true)][string[]]$Markers
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
foreach ($marker in $Markers) {
|
|
53
|
+
if (-not (Test-Path -LiteralPath (Join-Path $ProjectRoot $marker))) {
|
|
54
|
+
return $false
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return $true
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function Get-MaintainerRootInstallMessage {
|
|
62
|
+
param(
|
|
63
|
+
[Parameter(Mandatory = $true)][string]$ProjectRoot
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
return @(
|
|
67
|
+
"Refusing to install managed project files into the SDTK maintainer repo root: $ProjectRoot"
|
|
68
|
+
"This install flow would overwrite repo-owned files such as AGENTS.md, CODEX.md, CLAUDE.md, sdtk-spec.config.json, sdtk-spec.config.profiles.example.json."
|
|
69
|
+
"Target a consumer project path instead of the SDTK maintainer monorepo root."
|
|
70
|
+
"If you only need runtime assets, install them into a separate consumer project path rather than the maintainer repo root."
|
|
71
|
+
) -join "`n"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function Resolve-OrCreateDirectory {
|
|
75
|
+
param(
|
|
76
|
+
[Parameter(Mandatory = $true)][string]$Path
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
if (-not (Test-Path -LiteralPath $Path)) {
|
|
80
|
+
New-Item -ItemType Directory -Force -Path $Path | Out-Null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return (Resolve-Path -LiteralPath $Path).Path
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
$toolkitRoot = (Resolve-Path -LiteralPath $PSScriptRoot).Path
|
|
87
|
+
if (-not $ProjectPath) {
|
|
88
|
+
$ProjectPath = (Get-Location).Path
|
|
89
|
+
}
|
|
90
|
+
$projectRoot = Resolve-OrCreateDirectory -Path $ProjectPath
|
|
91
|
+
|
|
92
|
+
$maintainerRootMarkers = @(
|
|
93
|
+
'governance/ai/core/IMPROVEMENT_BACKLOG.md',
|
|
94
|
+
'products/sdtk-ops/toolkit/install.ps1'
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
if (Test-IsMaintainerRoot -ProjectRoot $projectRoot -Markers $maintainerRootMarkers) {
|
|
98
|
+
throw (Get-MaintainerRootInstallMessage -ProjectRoot $projectRoot)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (-not $Scope) {
|
|
102
|
+
$Scope = if ($Runtime -eq 'claude') { 'project' } else { 'user' }
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if ($SkipSkills) {
|
|
106
|
+
if (-not $Quiet) {
|
|
107
|
+
Write-Warning "-SkipSkills is deprecated. Use -SkipRuntimeAssets instead."
|
|
108
|
+
}
|
|
109
|
+
$SkipRuntimeAssets = $true
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (-not $Quiet) {
|
|
113
|
+
Write-Host "SDTK-OPS installer"
|
|
114
|
+
Write-Host " Runtime: $Runtime"
|
|
115
|
+
Write-Host " Scope: $Scope"
|
|
116
|
+
Write-Host " Project: $projectRoot"
|
|
117
|
+
Write-Host ""
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
$sharedFiles = @(
|
|
121
|
+
'AGENTS.md',
|
|
122
|
+
'sdtk-spec.config.json',
|
|
123
|
+
'sdtk-spec.config.profiles.example.json'
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
foreach ($fileName in $sharedFiles) {
|
|
127
|
+
Copy-File `
|
|
128
|
+
-SourcePath (Join-Path $toolkitRoot $fileName) `
|
|
129
|
+
-DestinationPath (Join-Path $projectRoot $fileName) `
|
|
130
|
+
-Overwrite ([bool]$Force)
|
|
131
|
+
|
|
132
|
+
if (-not $Quiet) {
|
|
133
|
+
Write-Host " [OK] $fileName"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (-not $SkipRuntimeAssets) {
|
|
138
|
+
$scriptPath = if ($Runtime -eq 'claude') {
|
|
139
|
+
Join-Path $toolkitRoot 'scripts/install-claude-skills.ps1'
|
|
140
|
+
} else {
|
|
141
|
+
Join-Path $toolkitRoot 'scripts/install-codex-skills.ps1'
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (-not (Test-Path -LiteralPath $scriptPath)) {
|
|
145
|
+
throw "Missing runtime installer: $scriptPath"
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (-not $Quiet) {
|
|
149
|
+
Write-Host ""
|
|
150
|
+
Write-Host "Installing $Runtime runtime assets..."
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
$params = @{
|
|
154
|
+
Scope = $Scope
|
|
155
|
+
ProjectPath = $projectRoot
|
|
156
|
+
Quiet = [bool]$Quiet
|
|
157
|
+
}
|
|
158
|
+
if ($Force) {
|
|
159
|
+
$params.Force = $true
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
& $scriptPath @params
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (-not $Quiet) {
|
|
166
|
+
Write-Host ""
|
|
167
|
+
Write-Host "SDTK-OPS installation complete."
|
|
168
|
+
}
|
|
@@ -1,12 +1,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
|
+
{
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sdtk-ops-kit",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Skill-driven operations toolkit for deployment, verification, monitoring, incident response, backup, security, compliance, and cost discipline.",
|
|
5
|
-
"bin": {
|
|
6
|
-
"sdtk-ops": "
|
|
7
|
-
},
|
|
8
|
-
"main": "src/index.js",
|
|
9
|
-
"type": "commonjs",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/codexsdtk/sdtk-toolkit.git",
|
|
13
|
-
"directory": "products/sdtk-ops/distribution/sdtk-ops-kit"
|
|
14
|
-
},
|
|
15
|
-
"homepage": "https://github.com/codexsdtk/sdtk-toolkit/tree/main/products/sdtk-ops/distribution/sdtk-ops-kit",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"bin/",
|
|
21
|
-
"src/",
|
|
22
|
-
"assets/"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"test": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; Set-Location '..\\..\\..\\..'; python -m unittest -v tests.test_sdtk_ops_cli\"",
|
|
26
|
-
"build:payload": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; & 'scripts/sync-toolkit-assets.ps1'; & 'scripts/build-toolkit-manifest.ps1'\"",
|
|
27
|
-
"verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
|
|
28
|
-
"pack:smoke": "powershell -ExecutionPolicy Bypass -File scripts/pack-smoke.ps1",
|
|
29
|
-
"prepublishOnly": "npm run build:payload && npm run verify:payload"
|
|
30
|
-
},
|
|
31
|
-
"engines": {
|
|
32
|
-
"node": ">=18.13.0"
|
|
33
|
-
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
"sdtk-ops",
|
|
36
|
-
"cli",
|
|
37
|
-
"toolkit",
|
|
38
|
-
"operations",
|
|
39
|
-
"claude",
|
|
40
|
-
"codex"
|
|
41
|
-
],
|
|
42
|
-
"license": "MIT",
|
|
43
|
-
"publishConfig": {
|
|
44
|
-
"access": "public"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sdtk-ops-kit",
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"description": "Skill-driven operations toolkit for deployment, verification, monitoring, incident response, backup, security, compliance, and cost discipline.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"sdtk-ops": "bin/sdtk-ops.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "src/index.js",
|
|
9
|
+
"type": "commonjs",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
|
|
13
|
+
"directory": "products/sdtk-ops/distribution/sdtk-ops-kit"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/codexsdtk/sdtk-toolkit/tree/main/products/sdtk-ops/distribution/sdtk-ops-kit",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin/",
|
|
21
|
+
"src/",
|
|
22
|
+
"assets/"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; Set-Location '..\\..\\..\\..'; python -m unittest -v tests.test_sdtk_ops_cli\"",
|
|
26
|
+
"build:payload": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; & 'scripts/sync-toolkit-assets.ps1'; & 'scripts/build-toolkit-manifest.ps1'\"",
|
|
27
|
+
"verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
|
|
28
|
+
"pack:smoke": "powershell -ExecutionPolicy Bypass -File scripts/pack-smoke.ps1",
|
|
29
|
+
"prepublishOnly": "npm run build:payload && npm run verify:payload"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18.13.0"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"sdtk-ops",
|
|
36
|
+
"cli",
|
|
37
|
+
"toolkit",
|
|
38
|
+
"operations",
|
|
39
|
+
"claude",
|
|
40
|
+
"codex"
|
|
41
|
+
],
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/src/commands/help.js
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function cmdHelp() {
|
|
4
|
-
const text = [
|
|
5
|
-
"SDTK-OPS CLI -- skill-driven operations discipline toolkit",
|
|
6
|
-
"",
|
|
7
|
-
"Usage:",
|
|
8
|
-
" sdtk-ops <command> [options]",
|
|
9
|
-
"",
|
|
10
|
-
"Commands:",
|
|
11
|
-
" init Initialize SDTK-OPS files in a project",
|
|
12
|
-
" runtime Manage runtime asset installation (install, uninstall, status)",
|
|
13
|
-
" update Refresh the npm package and optionally re-apply managed project/runtime assets",
|
|
14
|
-
" help Show this help message",
|
|
15
|
-
"",
|
|
16
|
-
"Current supported surface:",
|
|
17
|
-
" Supported now: help, init, runtime install|status|uninstall",
|
|
18
|
-
" Not supported: generate",
|
|
19
|
-
" Package scope: public npm package",
|
|
20
|
-
"",
|
|
21
|
-
"DEV-Run intake:",
|
|
22
|
-
" Canonical intake artifact: docs/dev/OPS_HANDOFF_[FEATURE_KEY].json",
|
|
23
|
-
" READY_FOR_SDTK_OPS: start from suggested_next_ops_path or confirm it with ops-discover.",
|
|
24
|
-
" BLOCKED_FOR_SDTK_OPS: inspect blockers and evidence refs, but do not treat it as normal ready-path execution.",
|
|
25
|
-
" SDTK-OPS consumes the frozen handoff contract and does not redefine the schema.",
|
|
26
|
-
"",
|
|
27
|
-
"Workflow entry:",
|
|
28
|
-
" After init, choose a journey directly if the goal is clear.",
|
|
29
|
-
" Canonical journeys: deployment, incident, monitoring, backup/recovery.",
|
|
30
|
-
" If the correct path is unclear, start with the ops-discover skill.",
|
|
31
|
-
" ops-parallel remains valid only for independent slices; if collab/subagent dispatch is unavailable in the active runtime, keep the same split but execute sequentially.",
|
|
32
|
-
" Close every journey with ops-verify before declaring work complete.",
|
|
33
|
-
"",
|
|
34
|
-
"Runtime support:",
|
|
35
|
-
" Claude: project + user scope",
|
|
36
|
-
" Codex: default user scope plus bounded project scope via <project>/.codex",
|
|
37
|
-
" Codex project scope requires the explicit local CODEX_HOME=<project>/.codex contract",
|
|
38
|
-
" Native .codex/skills auto-discovery is not claimed",
|
|
39
|
-
"",
|
|
40
|
-
"Runtime commands:",
|
|
41
|
-
" sdtk-ops runtime install --runtime <codex|claude> [--scope <project|user>] [--project-path <path>]",
|
|
42
|
-
" sdtk-ops runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all] [--project-path <path>]",
|
|
43
|
-
" sdtk-ops runtime status --runtime <codex|claude> [--project-path <path>]",
|
|
44
|
-
"",
|
|
45
|
-
"Update options:",
|
|
46
|
-
" --version <latest|x.y.z> Target published npm package version (default: latest)",
|
|
47
|
-
" --runtime <codex|claude> Optional runtime refresh target after npm update",
|
|
48
|
-
" --scope <project|user> Runtime asset scope when --runtime is provided",
|
|
49
|
-
" --project-path <path> Target project directory for managed file refresh (default: cwd)",
|
|
50
|
-
" --check-only Print the planned npm/init/runtime refresh steps without making changes",
|
|
51
|
-
" --skip-project-files Skip sdtk-ops init --force during update",
|
|
52
|
-
" --skip-runtime-assets Skip sdtk-ops runtime install --force during update",
|
|
53
|
-
" --verbose Show detailed command output",
|
|
54
|
-
" Maintainer-root guard: init/update refuse the SDTK maintainer monorepo root as a managed project target.",
|
|
55
|
-
" Use a consumer project path, or use --skip-project-files when update should avoid project-file refresh.",
|
|
56
|
-
"",
|
|
57
|
-
"Uninstall behavior:",
|
|
58
|
-
" runtime uninstall removes only SDTK-OPS-managed skill folders for the selected runtime/scope.",
|
|
59
|
-
" It does not delete parent runtime roots such as .claude/, .claude/skills/, $CODEX_HOME/, or $CODEX_HOME/skills/.",
|
|
60
|
-
" npm uninstall -g sdtk-ops-kit removes the CLI package only. Runtime assets remain until runtime uninstall or manual cleanup.",
|
|
61
|
-
"",
|
|
62
|
-
"Global options:",
|
|
63
|
-
" -h, --help Show this help",
|
|
64
|
-
" -v, --version Show version",
|
|
65
|
-
"",
|
|
66
|
-
"Examples:",
|
|
67
|
-
" sdtk-ops --help",
|
|
68
|
-
" sdtk-ops --version",
|
|
69
|
-
" sdtk-ops init --runtime claude --project-path ./my-project",
|
|
70
|
-
" sdtk-ops update --check-only",
|
|
71
|
-
" sdtk-ops update --runtime claude --project-path ./my-project",
|
|
72
|
-
" sdtk-ops update --version 1.2.3 --runtime codex --scope user --skip-project-files",
|
|
73
|
-
" sdtk-ops init --runtime codex --runtime-scope project --project-path ./my-project",
|
|
74
|
-
" sdtk-ops runtime install --runtime claude --scope project --project-path ./my-project",
|
|
75
|
-
" sdtk-ops runtime install --runtime codex --scope project --project-path ./my-project",
|
|
76
|
-
" # Journey routing after init:",
|
|
77
|
-
" # deployment -> ops-plan -> ops-infra-plan -> ops-container -> ops-ci-cd -> ops-deploy -> ops-monitor -> ops-verify",
|
|
78
|
-
" # incident -> ops-incident -> ops-debug -> ops-monitor -> ops-verify",
|
|
79
|
-
" # monitoring -> ops-plan -> ops-monitor -> ops-verify",
|
|
80
|
-
" # recovery -> ops-plan -> ops-backup -> ops-verify",
|
|
81
|
-
" sdtk-ops runtime status --runtime codex",
|
|
82
|
-
" sdtk-ops runtime uninstall --runtime codex --scope user",
|
|
83
|
-
" npm uninstall -g sdtk-ops-kit",
|
|
84
|
-
];
|
|
85
|
-
|
|
86
|
-
console.log(text.join("\n"));
|
|
87
|
-
return 0;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
module.exports = { cmdHelp };
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function cmdHelp() {
|
|
4
|
+
const text = [
|
|
5
|
+
"SDTK-OPS CLI -- skill-driven operations discipline toolkit",
|
|
6
|
+
"",
|
|
7
|
+
"Usage:",
|
|
8
|
+
" sdtk-ops <command> [options]",
|
|
9
|
+
"",
|
|
10
|
+
"Commands:",
|
|
11
|
+
" init Initialize SDTK-OPS files in a project",
|
|
12
|
+
" runtime Manage runtime asset installation (install, uninstall, status)",
|
|
13
|
+
" update Refresh the npm package and optionally re-apply managed project/runtime assets",
|
|
14
|
+
" help Show this help message",
|
|
15
|
+
"",
|
|
16
|
+
"Current supported surface:",
|
|
17
|
+
" Supported now: help, init, runtime install|status|uninstall",
|
|
18
|
+
" Not supported: generate",
|
|
19
|
+
" Package scope: public npm package",
|
|
20
|
+
"",
|
|
21
|
+
"DEV-Run intake:",
|
|
22
|
+
" Canonical intake artifact: docs/dev/OPS_HANDOFF_[FEATURE_KEY].json",
|
|
23
|
+
" READY_FOR_SDTK_OPS: start from suggested_next_ops_path or confirm it with ops-discover.",
|
|
24
|
+
" BLOCKED_FOR_SDTK_OPS: inspect blockers and evidence refs, but do not treat it as normal ready-path execution.",
|
|
25
|
+
" SDTK-OPS consumes the frozen handoff contract and does not redefine the schema.",
|
|
26
|
+
"",
|
|
27
|
+
"Workflow entry:",
|
|
28
|
+
" After init, choose a journey directly if the goal is clear.",
|
|
29
|
+
" Canonical journeys: deployment, incident, monitoring, backup/recovery.",
|
|
30
|
+
" If the correct path is unclear, start with the ops-discover skill.",
|
|
31
|
+
" ops-parallel remains valid only for independent slices; if collab/subagent dispatch is unavailable in the active runtime, keep the same split but execute sequentially.",
|
|
32
|
+
" Close every journey with ops-verify before declaring work complete.",
|
|
33
|
+
"",
|
|
34
|
+
"Runtime support:",
|
|
35
|
+
" Claude: project + user scope",
|
|
36
|
+
" Codex: default user scope plus bounded project scope via <project>/.codex",
|
|
37
|
+
" Codex project scope requires the explicit local CODEX_HOME=<project>/.codex contract",
|
|
38
|
+
" Native .codex/skills auto-discovery is not claimed",
|
|
39
|
+
"",
|
|
40
|
+
"Runtime commands:",
|
|
41
|
+
" sdtk-ops runtime install --runtime <codex|claude> [--scope <project|user>] [--project-path <path>]",
|
|
42
|
+
" sdtk-ops runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all] [--project-path <path>]",
|
|
43
|
+
" sdtk-ops runtime status --runtime <codex|claude> [--project-path <path>]",
|
|
44
|
+
"",
|
|
45
|
+
"Update options:",
|
|
46
|
+
" --version <latest|x.y.z> Target published npm package version (default: latest)",
|
|
47
|
+
" --runtime <codex|claude> Optional runtime refresh target after npm update",
|
|
48
|
+
" --scope <project|user> Runtime asset scope when --runtime is provided",
|
|
49
|
+
" --project-path <path> Target project directory for managed file refresh (default: cwd)",
|
|
50
|
+
" --check-only Print the planned npm/init/runtime refresh steps without making changes",
|
|
51
|
+
" --skip-project-files Skip sdtk-ops init --force during update",
|
|
52
|
+
" --skip-runtime-assets Skip sdtk-ops runtime install --force during update",
|
|
53
|
+
" --verbose Show detailed command output",
|
|
54
|
+
" Maintainer-root guard: init/update refuse the SDTK maintainer monorepo root as a managed project target.",
|
|
55
|
+
" Use a consumer project path, or use --skip-project-files when update should avoid project-file refresh.",
|
|
56
|
+
"",
|
|
57
|
+
"Uninstall behavior:",
|
|
58
|
+
" runtime uninstall removes only SDTK-OPS-managed skill folders for the selected runtime/scope.",
|
|
59
|
+
" It does not delete parent runtime roots such as .claude/, .claude/skills/, $CODEX_HOME/, or $CODEX_HOME/skills/.",
|
|
60
|
+
" npm uninstall -g sdtk-ops-kit removes the CLI package only. Runtime assets remain until runtime uninstall or manual cleanup.",
|
|
61
|
+
"",
|
|
62
|
+
"Global options:",
|
|
63
|
+
" -h, --help Show this help",
|
|
64
|
+
" -v, --version Show version",
|
|
65
|
+
"",
|
|
66
|
+
"Examples:",
|
|
67
|
+
" sdtk-ops --help",
|
|
68
|
+
" sdtk-ops --version",
|
|
69
|
+
" sdtk-ops init --runtime claude --project-path ./my-project",
|
|
70
|
+
" sdtk-ops update --check-only",
|
|
71
|
+
" sdtk-ops update --runtime claude --project-path ./my-project",
|
|
72
|
+
" sdtk-ops update --version 1.2.3 --runtime codex --scope user --skip-project-files",
|
|
73
|
+
" sdtk-ops init --runtime codex --runtime-scope project --project-path ./my-project",
|
|
74
|
+
" sdtk-ops runtime install --runtime claude --scope project --project-path ./my-project",
|
|
75
|
+
" sdtk-ops runtime install --runtime codex --scope project --project-path ./my-project",
|
|
76
|
+
" # Journey routing after init:",
|
|
77
|
+
" # deployment -> ops-plan -> ops-infra-plan -> ops-container -> ops-ci-cd -> ops-deploy -> ops-monitor -> ops-verify",
|
|
78
|
+
" # incident -> ops-incident -> ops-debug -> ops-monitor -> ops-verify",
|
|
79
|
+
" # monitoring -> ops-plan -> ops-monitor -> ops-verify",
|
|
80
|
+
" # recovery -> ops-plan -> ops-backup -> ops-verify",
|
|
81
|
+
" sdtk-ops runtime status --runtime codex",
|
|
82
|
+
" sdtk-ops runtime uninstall --runtime codex --scope user",
|
|
83
|
+
" npm uninstall -g sdtk-ops-kit",
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
console.log(text.join("\n"));
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
module.exports = { cmdHelp };
|