sdtk-code-kit 0.1.3 → 0.2.1
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 +17 -0
- package/assets/manifest/toolkit-bundle.manifest.json +147 -147
- package/assets/manifest/toolkit-bundle.sha256.txt +10 -10
- package/assets/toolkit/toolkit/AGENTS.md +219 -219
- package/assets/toolkit/toolkit/install.ps1 +156 -156
- package/assets/toolkit/toolkit/sdtk-spec.config.json +6 -6
- package/assets/toolkit/toolkit/skills/code-debug/SKILL.md +295 -295
- package/assets/toolkit/toolkit/skills/code-discover/SKILL.md +54 -54
- package/assets/toolkit/toolkit/skills/code-tdd/SKILL.md +377 -377
- package/assets/toolkit/toolkit/skills/code-worktree/SKILL.md +215 -215
- package/assets/toolkit/toolkit/templates/CODE_WORKFLOW_TEMPLATE.md +28 -0
- package/package.json +44 -44
- package/src/commands/doctor.js +52 -0
- package/src/commands/guardrails.js +215 -0
- package/src/commands/help.js +244 -220
- package/src/commands/init.js +98 -98
- package/src/commands/readiness.js +77 -0
- package/src/commands/resume.js +62 -0
- package/src/commands/sleep.js +132 -0
- package/src/commands/status.js +78 -0
- package/src/commands/update.js +11 -11
- package/src/commands/verify.js +5 -0
- package/src/index.js +108 -73
- package/src/lib/project-target-guard.js +53 -53
- package/src/lib/ship-readiness.js +281 -0
- package/src/lib/sleep-plan.js +175 -0
- package/src/lib/sleep-report.js +229 -0
- package/src/lib/trust-events.js +166 -0
- package/src/lib/trust-file-scope.js +154 -0
- package/src/lib/trust-policy.js +212 -0
- package/src/lib/trust-redact.js +35 -0
- package/src/lib/trust-trace.js +179 -0
- package/src/lib/update.js +344 -344
- package/src/lib/workflow-artifact.js +9 -2
- package/src/lib/workflow-doctor.js +84 -0
- package/src/lib/workflow-handoff.js +111 -19
- package/src/lib/workflow-review-packet.js +650 -561
- package/src/lib/workflow-state.js +439 -0
- package/src/lib/workflow-verify.js +393 -356
|
@@ -1,156 +1,156 @@
|
|
|
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
|
-
$toolkitRoot = (Resolve-Path -LiteralPath $PSScriptRoot).Path
|
|
75
|
-
if (-not $ProjectPath) {
|
|
76
|
-
$ProjectPath = (Get-Location).Path
|
|
77
|
-
}
|
|
78
|
-
$projectRoot = (Resolve-Path -LiteralPath $ProjectPath).Path
|
|
79
|
-
|
|
80
|
-
$maintainerRootMarkers = @(
|
|
81
|
-
'governance/ai/core/IMPROVEMENT_BACKLOG.md',
|
|
82
|
-
'products/sdtk-code/toolkit/install.ps1'
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
if (Test-IsMaintainerRoot -ProjectRoot $projectRoot -Markers $maintainerRootMarkers) {
|
|
86
|
-
throw (Get-MaintainerRootInstallMessage -ProjectRoot $projectRoot)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (-not $Scope) {
|
|
90
|
-
$Scope = if ($Runtime -eq 'claude') { 'project' } else { 'user' }
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if ($SkipSkills) {
|
|
94
|
-
if (-not $Quiet) {
|
|
95
|
-
Write-Warning "-SkipSkills is deprecated. Use -SkipRuntimeAssets instead."
|
|
96
|
-
}
|
|
97
|
-
$SkipRuntimeAssets = $true
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (-not $Quiet) {
|
|
101
|
-
Write-Host "SDTK-CODE installer"
|
|
102
|
-
Write-Host " Runtime: $Runtime"
|
|
103
|
-
Write-Host " Scope: $Scope"
|
|
104
|
-
Write-Host " Project: $projectRoot"
|
|
105
|
-
Write-Host ""
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
$sharedFiles = @(
|
|
109
|
-
'AGENTS.md',
|
|
110
|
-
'sdtk-spec.config.json',
|
|
111
|
-
'sdtk-spec.config.profiles.example.json'
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
foreach ($fileName in $sharedFiles) {
|
|
115
|
-
Copy-File `
|
|
116
|
-
-SourcePath (Join-Path $toolkitRoot $fileName) `
|
|
117
|
-
-DestinationPath (Join-Path $projectRoot $fileName) `
|
|
118
|
-
-Overwrite ([bool]$Force)
|
|
119
|
-
|
|
120
|
-
if (-not $Quiet) {
|
|
121
|
-
Write-Host " [OK] $fileName"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (-not $SkipRuntimeAssets) {
|
|
126
|
-
$scriptPath = if ($Runtime -eq 'claude') {
|
|
127
|
-
Join-Path $toolkitRoot 'scripts/install-claude-skills.ps1'
|
|
128
|
-
} else {
|
|
129
|
-
Join-Path $toolkitRoot 'scripts/install-codex-skills.ps1'
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (-not (Test-Path -LiteralPath $scriptPath)) {
|
|
133
|
-
throw "Missing runtime installer: $scriptPath"
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (-not $Quiet) {
|
|
137
|
-
Write-Host ""
|
|
138
|
-
Write-Host "Installing $Runtime runtime assets..."
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
$params = @{
|
|
142
|
-
Scope = $Scope
|
|
143
|
-
ProjectPath = $projectRoot
|
|
144
|
-
Quiet = [bool]$Quiet
|
|
145
|
-
}
|
|
146
|
-
if ($Force) {
|
|
147
|
-
$params.Force = $true
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
& $scriptPath @params
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (-not $Quiet) {
|
|
154
|
-
Write-Host ""
|
|
155
|
-
Write-Host "SDTK-CODE installation complete."
|
|
156
|
-
}
|
|
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
|
+
$toolkitRoot = (Resolve-Path -LiteralPath $PSScriptRoot).Path
|
|
75
|
+
if (-not $ProjectPath) {
|
|
76
|
+
$ProjectPath = (Get-Location).Path
|
|
77
|
+
}
|
|
78
|
+
$projectRoot = (Resolve-Path -LiteralPath $ProjectPath).Path
|
|
79
|
+
|
|
80
|
+
$maintainerRootMarkers = @(
|
|
81
|
+
'governance/ai/core/IMPROVEMENT_BACKLOG.md',
|
|
82
|
+
'products/sdtk-code/toolkit/install.ps1'
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
if (Test-IsMaintainerRoot -ProjectRoot $projectRoot -Markers $maintainerRootMarkers) {
|
|
86
|
+
throw (Get-MaintainerRootInstallMessage -ProjectRoot $projectRoot)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (-not $Scope) {
|
|
90
|
+
$Scope = if ($Runtime -eq 'claude') { 'project' } else { 'user' }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if ($SkipSkills) {
|
|
94
|
+
if (-not $Quiet) {
|
|
95
|
+
Write-Warning "-SkipSkills is deprecated. Use -SkipRuntimeAssets instead."
|
|
96
|
+
}
|
|
97
|
+
$SkipRuntimeAssets = $true
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (-not $Quiet) {
|
|
101
|
+
Write-Host "SDTK-CODE installer"
|
|
102
|
+
Write-Host " Runtime: $Runtime"
|
|
103
|
+
Write-Host " Scope: $Scope"
|
|
104
|
+
Write-Host " Project: $projectRoot"
|
|
105
|
+
Write-Host ""
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
$sharedFiles = @(
|
|
109
|
+
'AGENTS.md',
|
|
110
|
+
'sdtk-spec.config.json',
|
|
111
|
+
'sdtk-spec.config.profiles.example.json'
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
foreach ($fileName in $sharedFiles) {
|
|
115
|
+
Copy-File `
|
|
116
|
+
-SourcePath (Join-Path $toolkitRoot $fileName) `
|
|
117
|
+
-DestinationPath (Join-Path $projectRoot $fileName) `
|
|
118
|
+
-Overwrite ([bool]$Force)
|
|
119
|
+
|
|
120
|
+
if (-not $Quiet) {
|
|
121
|
+
Write-Host " [OK] $fileName"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (-not $SkipRuntimeAssets) {
|
|
126
|
+
$scriptPath = if ($Runtime -eq 'claude') {
|
|
127
|
+
Join-Path $toolkitRoot 'scripts/install-claude-skills.ps1'
|
|
128
|
+
} else {
|
|
129
|
+
Join-Path $toolkitRoot 'scripts/install-codex-skills.ps1'
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (-not (Test-Path -LiteralPath $scriptPath)) {
|
|
133
|
+
throw "Missing runtime installer: $scriptPath"
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (-not $Quiet) {
|
|
137
|
+
Write-Host ""
|
|
138
|
+
Write-Host "Installing $Runtime runtime assets..."
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
$params = @{
|
|
142
|
+
Scope = $Scope
|
|
143
|
+
ProjectPath = $projectRoot
|
|
144
|
+
Quiet = [bool]$Quiet
|
|
145
|
+
}
|
|
146
|
+
if ($Force) {
|
|
147
|
+
$params.Force = $true
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
& $scriptPath @params
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (-not $Quiet) {
|
|
154
|
+
Write-Host ""
|
|
155
|
+
Write-Host "SDTK-CODE installation complete."
|
|
156
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"toolkit": "SDTK-CODE",
|
|
3
|
-
"version": "0.1.3",
|
|
4
|
-
"skills_path": "toolkit/skills",
|
|
5
|
-
"skill_prefix": "code-"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"toolkit": "SDTK-CODE",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"skills_path": "toolkit/skills",
|
|
5
|
+
"skill_prefix": "code-"
|
|
6
|
+
}
|