sdtk-kit 0.3.9 → 1.0.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/LICENSE +21 -0
- package/README.md +135 -177
- package/bin/sdtk-code.js +6 -0
- package/bin/sdtk-design.js +6 -0
- package/bin/sdtk-ops.js +6 -0
- package/bin/sdtk-spec.js +12 -0
- package/bin/sdtk-wiki.js +6 -0
- package/package.json +60 -46
- package/scripts/postinstall.js +40 -0
- package/assets/manifest/toolkit-bundle.manifest.json +0 -473
- package/assets/manifest/toolkit-bundle.sha256.txt +0 -93
- package/assets/toolkit/toolkit/AGENTS.md +0 -131
- package/assets/toolkit/toolkit/install.ps1 +0 -310
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +0 -54
- package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +0 -32
- package/assets/toolkit/toolkit/scripts/init-feature.ps1 +0 -261
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +0 -169
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +0 -189
- package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +0 -139
- package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +0 -116
- package/assets/toolkit/toolkit/sdtk.config.json +0 -28
- package/assets/toolkit/toolkit/sdtk.config.profiles.example.json +0 -50
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +0 -84
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +0 -732
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +0 -43
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +0 -83
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -220
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +0 -29
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +0 -52
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +0 -246
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +0 -90
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +0 -35
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +0 -61
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +0 -42
- package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +0 -21
- package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +0 -19
- package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +0 -80
- package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +0 -30
- package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +0 -53
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +0 -86
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -220
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +0 -51
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +0 -54
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +0 -28
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +0 -136
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +0 -414
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +0 -74
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/references/TEST_CASE_CREATION_RULES.md +0 -129
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +0 -97
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +0 -302
- package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +0 -90
- package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +0 -47
- package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +0 -59
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +0 -50
- package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +0 -57
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +0 -45
- package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +0 -20
- package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +0 -18
- package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +0 -63
- package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +0 -52
- package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +0 -48
- package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +0 -90
- package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +0 -61
- package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +0 -124
- package/assets/toolkit/toolkit/templates/README.md +0 -63
- package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +0 -80
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +0 -67
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +0 -229
- package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +0 -20
- package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +0 -12
- package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +0 -109
- package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +0 -175
- package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +0 -60
- package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +0 -73
- package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +0 -50
- package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +0 -66
- package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +0 -98
- package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +0 -61
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +0 -129
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +0 -104
- package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +0 -139
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -220
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +0 -197
- package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +0 -31
- package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +0 -28
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +0 -26
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +0 -20
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +0 -23
- package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +0 -26
- package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +0 -21
- package/bin/sdtk.js +0 -15
- package/src/commands/auth.js +0 -85
- package/src/commands/generate.js +0 -177
- package/src/commands/help.js +0 -101
- package/src/commands/init.js +0 -97
- package/src/commands/runtime.js +0 -217
- package/src/index.js +0 -59
- package/src/lib/args.js +0 -116
- package/src/lib/errors.js +0 -41
- package/src/lib/github-access.js +0 -68
- package/src/lib/powershell.js +0 -85
- package/src/lib/scope.js +0 -68
- package/src/lib/state.js +0 -83
- package/src/lib/toolkit-payload.js +0 -99
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
param(
|
|
2
|
-
[string]$ProjectPath,
|
|
3
|
-
[ValidateSet('project', 'user')]
|
|
4
|
-
[string]$Scope = 'project',
|
|
5
|
-
[string]$SkillName,
|
|
6
|
-
[switch]$All,
|
|
7
|
-
[switch]$BackupExisting,
|
|
8
|
-
[string]$BackupPath
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
$ErrorActionPreference = 'Stop'
|
|
12
|
-
Set-StrictMode -Version Latest
|
|
13
|
-
|
|
14
|
-
function Backup-Directory {
|
|
15
|
-
param(
|
|
16
|
-
[Parameter(Mandatory = $true)][string]$SourcePath,
|
|
17
|
-
[Parameter(Mandatory = $true)][string]$BackupRoot,
|
|
18
|
-
[Parameter(Mandatory = $true)][string]$Name
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
if (-not (Test-Path -LiteralPath $SourcePath)) {
|
|
22
|
-
return $null
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
New-Item -ItemType Directory -Force -Path $BackupRoot | Out-Null
|
|
26
|
-
$dest = Join-Path $BackupRoot $Name
|
|
27
|
-
if (Test-Path -LiteralPath $dest) {
|
|
28
|
-
Remove-Item -LiteralPath $dest -Recurse -Force
|
|
29
|
-
}
|
|
30
|
-
Copy-Item -LiteralPath $SourcePath -Destination $dest -Recurse -Force
|
|
31
|
-
return $dest
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if ($All -and $SkillName) {
|
|
35
|
-
throw "Use either -All or -SkillName, not both."
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
$toolkitRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
|
39
|
-
$skillsSrc = Join-Path $toolkitRoot 'skills-claude'
|
|
40
|
-
if (-not (Test-Path -LiteralPath $skillsSrc)) {
|
|
41
|
-
throw "Missing toolkit Claude skills source directory: $skillsSrc"
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
$managedSkillNames = Get-ChildItem -LiteralPath $skillsSrc -Directory | Select-Object -ExpandProperty Name
|
|
45
|
-
if (-not $managedSkillNames -or $managedSkillNames.Count -eq 0) {
|
|
46
|
-
throw "No managed Claude skills found in: $skillsSrc"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
$targetNames = @()
|
|
50
|
-
if ($SkillName) {
|
|
51
|
-
if ($managedSkillNames -notcontains $SkillName) {
|
|
52
|
-
throw "Skill '$SkillName' is not in managed Claude skills list. Known skills: $($managedSkillNames -join ', ')"
|
|
53
|
-
}
|
|
54
|
-
$targetNames = @($SkillName)
|
|
55
|
-
} elseif ($All) {
|
|
56
|
-
$targetNames = @($managedSkillNames)
|
|
57
|
-
} else {
|
|
58
|
-
$targetNames = @($managedSkillNames)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
# Resolve destination based on scope
|
|
62
|
-
if ($Scope -eq 'user') {
|
|
63
|
-
$skillsDest = Join-Path $HOME '.claude/skills'
|
|
64
|
-
} else {
|
|
65
|
-
if (-not $ProjectPath) {
|
|
66
|
-
$ProjectPath = (Resolve-Path (Join-Path $toolkitRoot '..')).Path
|
|
67
|
-
}
|
|
68
|
-
$projectRoot = Resolve-Path -LiteralPath $ProjectPath
|
|
69
|
-
$skillsDest = Join-Path $projectRoot '.claude/skills'
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (-not (Test-Path -LiteralPath $skillsDest)) {
|
|
73
|
-
Write-Host "Claude skills directory not found: $skillsDest"
|
|
74
|
-
exit 0
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
$backupRootResolved = $null
|
|
78
|
-
if ($BackupExisting) {
|
|
79
|
-
if (-not $BackupPath -or $BackupPath.Trim().Length -eq 0) {
|
|
80
|
-
$timestamp = Get-Date -Format 'yyyyMMdd-HHmmss'
|
|
81
|
-
$parentDir = if ($Scope -eq 'user') { Join-Path $HOME '.claude' } else { $projectRoot }
|
|
82
|
-
$BackupPath = Join-Path $parentDir (Join-Path 'skills-backups' ("uninstall-" + $timestamp))
|
|
83
|
-
}
|
|
84
|
-
New-Item -ItemType Directory -Force -Path $BackupPath | Out-Null
|
|
85
|
-
$backupRootResolved = (Resolve-Path -LiteralPath $BackupPath).Path
|
|
86
|
-
Write-Host "Backup mode enabled: $backupRootResolved"
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
$removed = New-Object System.Collections.Generic.List[string]
|
|
90
|
-
$missing = New-Object System.Collections.Generic.List[string]
|
|
91
|
-
|
|
92
|
-
foreach ($name in $targetNames) {
|
|
93
|
-
$dest = Join-Path $skillsDest $name
|
|
94
|
-
if (-not (Test-Path -LiteralPath $dest)) {
|
|
95
|
-
$missing.Add($name) | Out-Null
|
|
96
|
-
Write-Warning "Skill not installed, skipping: $name"
|
|
97
|
-
continue
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if ($BackupExisting) {
|
|
101
|
-
$backupDest = Backup-Directory -SourcePath $dest -BackupRoot $backupRootResolved -Name $name
|
|
102
|
-
if ($backupDest) {
|
|
103
|
-
Write-Host "Backed up: $name -> $backupDest"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
Remove-Item -LiteralPath $dest -Recurse -Force
|
|
108
|
-
$removed.Add($name) | Out-Null
|
|
109
|
-
Write-Host "Uninstalled: $name"
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
# Also remove references directory if uninstalling all
|
|
113
|
-
if ($All -or (-not $SkillName)) {
|
|
114
|
-
$refDir = Join-Path $skillsDest 'references'
|
|
115
|
-
if (Test-Path -LiteralPath $refDir) {
|
|
116
|
-
if ($BackupExisting) {
|
|
117
|
-
Backup-Directory -SourcePath $refDir -BackupRoot $backupRootResolved -Name 'references' | Out-Null
|
|
118
|
-
Write-Host "Backed up: references -> $backupRootResolved/references"
|
|
119
|
-
}
|
|
120
|
-
Remove-Item -LiteralPath $refDir -Recurse -Force
|
|
121
|
-
Write-Host "Removed references directory."
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
Write-Host ""
|
|
126
|
-
Write-Host "Uninstall summary:"
|
|
127
|
-
Write-Host "- Scope: $Scope"
|
|
128
|
-
Write-Host "- Destination: $skillsDest"
|
|
129
|
-
Write-Host "- Removed: $($removed.Count)"
|
|
130
|
-
if ($removed.Count -gt 0) {
|
|
131
|
-
$removed | ForEach-Object { Write-Host " - $_" }
|
|
132
|
-
}
|
|
133
|
-
Write-Host "- Missing/Skipped: $($missing.Count)"
|
|
134
|
-
if ($missing.Count -gt 0) {
|
|
135
|
-
$missing | ForEach-Object { Write-Host " - $_" }
|
|
136
|
-
}
|
|
137
|
-
if ($backupRootResolved) {
|
|
138
|
-
Write-Host "- Backup directory: $backupRootResolved"
|
|
139
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
param(
|
|
2
|
-
[string]$SkillName,
|
|
3
|
-
[switch]$All,
|
|
4
|
-
[switch]$BackupExisting,
|
|
5
|
-
[string]$BackupPath
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
$ErrorActionPreference = 'Stop'
|
|
9
|
-
Set-StrictMode -Version Latest
|
|
10
|
-
|
|
11
|
-
function Backup-Directory {
|
|
12
|
-
param(
|
|
13
|
-
[Parameter(Mandatory = $true)][string]$SourcePath,
|
|
14
|
-
[Parameter(Mandatory = $true)][string]$BackupRoot,
|
|
15
|
-
[Parameter(Mandatory = $true)][string]$Name
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
if (-not (Test-Path -LiteralPath $SourcePath)) {
|
|
19
|
-
return $null
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
New-Item -ItemType Directory -Force -Path $BackupRoot | Out-Null
|
|
23
|
-
$dest = Join-Path $BackupRoot $Name
|
|
24
|
-
if (Test-Path -LiteralPath $dest) {
|
|
25
|
-
Remove-Item -LiteralPath $dest -Recurse -Force
|
|
26
|
-
}
|
|
27
|
-
Copy-Item -LiteralPath $SourcePath -Destination $dest -Recurse -Force
|
|
28
|
-
return $dest
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if ($All -and $SkillName) {
|
|
32
|
-
throw "Use either -All or -SkillName, not both."
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
|
36
|
-
$skillsSrc = Join-Path $repoRoot 'skills'
|
|
37
|
-
if (-not (Test-Path -LiteralPath $skillsSrc)) {
|
|
38
|
-
throw "Missing toolkit skills source directory: $skillsSrc"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
$managedSkillNames = Get-ChildItem -LiteralPath $skillsSrc -Directory | Select-Object -ExpandProperty Name
|
|
42
|
-
if (-not $managedSkillNames -or $managedSkillNames.Count -eq 0) {
|
|
43
|
-
throw "No managed skills found in: $skillsSrc"
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
$targetNames = @()
|
|
47
|
-
if ($SkillName) {
|
|
48
|
-
if ($managedSkillNames -notcontains $SkillName) {
|
|
49
|
-
throw "Skill '$SkillName' is not in managed toolkit skills list. Known skills: $($managedSkillNames -join ', ')"
|
|
50
|
-
}
|
|
51
|
-
$targetNames = @($SkillName)
|
|
52
|
-
} elseif ($All) {
|
|
53
|
-
$targetNames = @($managedSkillNames)
|
|
54
|
-
} else {
|
|
55
|
-
# Default behavior: uninstall all toolkit-managed skills.
|
|
56
|
-
$targetNames = @($managedSkillNames)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
$codexHome = $env:CODEX_HOME
|
|
60
|
-
if (-not $codexHome) {
|
|
61
|
-
$codexHome = Join-Path $HOME '.codex'
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
$skillsDest = Join-Path $codexHome 'skills'
|
|
65
|
-
if (-not (Test-Path -LiteralPath $skillsDest)) {
|
|
66
|
-
Write-Host "Codex skills directory not found: $skillsDest"
|
|
67
|
-
exit 0
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
$backupRootResolved = $null
|
|
71
|
-
if ($BackupExisting) {
|
|
72
|
-
if (-not $BackupPath -or $BackupPath.Trim().Length -eq 0) {
|
|
73
|
-
$timestamp = Get-Date -Format 'yyyyMMdd-HHmmss'
|
|
74
|
-
$BackupPath = Join-Path $codexHome (Join-Path 'skills-backups' ("uninstall-" + $timestamp))
|
|
75
|
-
}
|
|
76
|
-
New-Item -ItemType Directory -Force -Path $BackupPath | Out-Null
|
|
77
|
-
$backupRootResolved = (Resolve-Path -LiteralPath $BackupPath).Path
|
|
78
|
-
Write-Host "Backup mode enabled: $backupRootResolved"
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
$removed = New-Object System.Collections.Generic.List[string]
|
|
82
|
-
$missing = New-Object System.Collections.Generic.List[string]
|
|
83
|
-
|
|
84
|
-
foreach ($name in $targetNames) {
|
|
85
|
-
$dest = Join-Path $skillsDest $name
|
|
86
|
-
if (-not (Test-Path -LiteralPath $dest)) {
|
|
87
|
-
$missing.Add($name) | Out-Null
|
|
88
|
-
Write-Warning "Skill not installed, skipping: $name"
|
|
89
|
-
continue
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if ($BackupExisting) {
|
|
93
|
-
$backupDest = Backup-Directory -SourcePath $dest -BackupRoot $backupRootResolved -Name $name
|
|
94
|
-
if ($backupDest) {
|
|
95
|
-
Write-Host "Backed up: $name -> $backupDest"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
Remove-Item -LiteralPath $dest -Recurse -Force
|
|
100
|
-
$removed.Add($name) | Out-Null
|
|
101
|
-
Write-Host "Uninstalled: $name"
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
Write-Host ""
|
|
105
|
-
Write-Host "Uninstall summary:"
|
|
106
|
-
Write-Host "- Removed: $($removed.Count)"
|
|
107
|
-
if ($removed.Count -gt 0) {
|
|
108
|
-
$removed | ForEach-Object { Write-Host " - $_" }
|
|
109
|
-
}
|
|
110
|
-
Write-Host "- Missing/Skipped: $($missing.Count)"
|
|
111
|
-
if ($missing.Count -gt 0) {
|
|
112
|
-
$missing | ForEach-Object { Write-Host " - $_" }
|
|
113
|
-
}
|
|
114
|
-
if ($backupRootResolved) {
|
|
115
|
-
Write-Host "- Backup directory: $backupRootResolved"
|
|
116
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"docs": {
|
|
3
|
-
"artifactsLanguage": "EN",
|
|
4
|
-
"guidanceLanguage": "VI",
|
|
5
|
-
"preserveOriginalInput": true,
|
|
6
|
-
"appendixIncludeEnglishTranslation": true,
|
|
7
|
-
"aiPeerReviewAllowed": true
|
|
8
|
-
},
|
|
9
|
-
"orchestration": {
|
|
10
|
-
"apiDesignDetailMode": "auto",
|
|
11
|
-
"testCaseSpecMode": "auto"
|
|
12
|
-
},
|
|
13
|
-
"stack": {
|
|
14
|
-
"backend": "Set your backend stack (example: Python Django REST Framework)",
|
|
15
|
-
"frontend": "Set your frontend stack (example: React + Vite)",
|
|
16
|
-
"mobile": "N/A",
|
|
17
|
-
"database": "Set your database (example: PostgreSQL 15)",
|
|
18
|
-
"auth": "Set your auth strategy (example: JWT/OAuth2)"
|
|
19
|
-
},
|
|
20
|
-
"commands": {
|
|
21
|
-
"backendTests": "UPDATE_ME: set backend test command",
|
|
22
|
-
"backendTypecheck": "UPDATE_ME: set backend typecheck command",
|
|
23
|
-
"backendLint": "UPDATE_ME: set backend lint command",
|
|
24
|
-
"frontendTests": "UPDATE_ME: set frontend test command",
|
|
25
|
-
"frontendLint": "UPDATE_ME: set frontend lint command",
|
|
26
|
-
"e2eTests": "UPDATE_ME: set e2e test command"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"profiles": {
|
|
3
|
-
"django-react": {
|
|
4
|
-
"orchestration": {
|
|
5
|
-
"apiDesignDetailMode": "auto",
|
|
6
|
-
"testCaseSpecMode": "auto"
|
|
7
|
-
},
|
|
8
|
-
"stack": {
|
|
9
|
-
"backend": "Python 3.11 + Django 4.x + Django REST Framework",
|
|
10
|
-
"frontend": "React 18 + Vite",
|
|
11
|
-
"mobile": "N/A",
|
|
12
|
-
"database": "PostgreSQL 15",
|
|
13
|
-
"auth": "JWT"
|
|
14
|
-
},
|
|
15
|
-
"commands": {
|
|
16
|
-
"backendTests": "python -m pytest",
|
|
17
|
-
"backendTypecheck": "python -m mypy src/backend",
|
|
18
|
-
"backendLint": "python -m ruff check src/backend",
|
|
19
|
-
"frontendTests": "npm run test",
|
|
20
|
-
"frontendLint": "npm run lint",
|
|
21
|
-
"e2eTests": "npm run e2e"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"node-nextjs": {
|
|
25
|
-
"orchestration": {
|
|
26
|
-
"apiDesignDetailMode": "auto",
|
|
27
|
-
"testCaseSpecMode": "auto"
|
|
28
|
-
},
|
|
29
|
-
"stack": {
|
|
30
|
-
"backend": "Node.js 20 + Express/Fastify",
|
|
31
|
-
"frontend": "Next.js 14",
|
|
32
|
-
"mobile": "N/A",
|
|
33
|
-
"database": "PostgreSQL 15",
|
|
34
|
-
"auth": "OAuth2 + JWT"
|
|
35
|
-
},
|
|
36
|
-
"commands": {
|
|
37
|
-
"backendTests": "npm run test:api",
|
|
38
|
-
"backendTypecheck": "npm run typecheck:api",
|
|
39
|
-
"backendLint": "npm run lint:api",
|
|
40
|
-
"frontendTests": "npm run test:web",
|
|
41
|
-
"frontendLint": "npm run lint:web",
|
|
42
|
-
"e2eTests": "npm run test:e2e"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"notes": [
|
|
47
|
-
"Copy one profile into sdtk.config.json and adjust for your project.",
|
|
48
|
-
"Do not keep UPDATE_ME placeholders before running real delivery gates."
|
|
49
|
-
]
|
|
50
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
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 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.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.
|
package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# API DESIGN CREATION RULES (Compatibility Note)
|
|
2
|
-
|
|
3
|
-
This file is kept only for backward compatibility.
|
|
4
|
-
|
|
5
|
-
Do not use this file as the primary source of truth anymore.
|
|
6
|
-
The active rule source for API design detail and API flowchart behavior is now:
|
|
7
|
-
- `API_DESIGN_FLOWCHART_CREATION_RULES_FINAL.md` (root)
|
|
8
|
-
- `templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md` (toolkit)
|
|
9
|
-
|
|
10
|
-
Even in compatibility mode, generated API design detail docs must still include:
|
|
11
|
-
- a top-level `## Assumptions` section
|
|
12
|
-
- this table format: `| # | Assumption | Verified | Risk if wrong |`
|
|
13
|
-
- explicit unresolved assumptions when downstream review depends on them
|
|
14
|
-
|
|
15
|
-
Use the active rule file for:
|
|
16
|
-
- API design detail markdown structure
|
|
17
|
-
- flowchart integration and synchronization rules
|
|
18
|
-
- error section rules
|
|
19
|
-
- flow summary / notes / login rules
|
|
20
|
-
- assumptions-section requirements
|
|
21
|
-
|
|
22
|
-
This compatibility note should remain only until all references are migrated.
|