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,131 +0,0 @@
|
|
|
1
|
-
# SDTK Multi-Agent Software Development Toolkit
|
|
2
|
-
|
|
3
|
-
Goal: use SDTK as a virtual PM/BA/ARCH/DEV/QA operating model to deliver one feature through a 6-phase SDLC flow with full traceability and quality gates.
|
|
4
|
-
|
|
5
|
-
## 0) Default Rules
|
|
6
|
-
- If role is not specified, default to PM (entry point) and start at Phase 1.
|
|
7
|
-
- Do not skip phases. If inputs are missing, ask focused questions before moving on.
|
|
8
|
-
- At the end of every phase, update:
|
|
9
|
-
- `SHARED_PLANNING.md`
|
|
10
|
-
- `QUALITY_CHECKLIST.md`
|
|
11
|
-
- Artifact language under `docs/**` should default to English.
|
|
12
|
-
- Read stack and command configuration from `sdtk.config.json` in the project root.
|
|
13
|
-
- For VI/JP source requirements, keep original text in an appendix and add literal English translation for traceability.
|
|
14
|
-
- Code review must be complete before QA starts.
|
|
15
|
-
- Verification-before-completion: no phase may declare done, pass, or handoff-ready without fresh command evidence per `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md`.
|
|
16
|
-
- `toolkit/skills/skills.catalog.yaml` is the inventory source of truth for the 13 core SDTK skills.
|
|
17
|
-
|
|
18
|
-
## 0.1) Clarification Protocol
|
|
19
|
-
Apply for all roles (`/pm`, `/ba`, `/arch`, `/dev`, `/qa`):
|
|
20
|
-
1. If there is ambiguity or missing data, log `Open Questions` as `OQ-xx` in the current phase artifact.
|
|
21
|
-
2. Do not guess for behavior, API contracts, UI/UX, data model, security, or release criteria.
|
|
22
|
-
3. Escalate unresolved items to PM with question ID and file reference.
|
|
23
|
-
4. PM resolves by:
|
|
24
|
-
- using available docs and making a clear decision, or
|
|
25
|
-
- asking the user if source information is still missing.
|
|
26
|
-
5. Record decisions in PRD (`Decision Log`) and update the originating `OQ-xx` with resolution.
|
|
27
|
-
|
|
28
|
-
## 1) Role Selection In One Message
|
|
29
|
-
When the user prefixes a message, execute that role:
|
|
30
|
-
- `/pm` (entry point + orchestrator)
|
|
31
|
-
- `/ba`
|
|
32
|
-
- `/arch`
|
|
33
|
-
- `/dev`
|
|
34
|
-
- `/qa`
|
|
35
|
-
- `/engineer` (escalation for technical blockers)
|
|
36
|
-
|
|
37
|
-
Notes:
|
|
38
|
-
- Supported delivery roles are PM/BA/ARCH/DEV/QA.
|
|
39
|
-
- There is no separate `/tester` role. Test-case design belongs to QA with `sdtk-test-case-spec`.
|
|
40
|
-
|
|
41
|
-
## 2) Standard 6-Phase Pipeline
|
|
42
|
-
1. PM Initiation -> `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`
|
|
43
|
-
2. BA Analysis -> `docs/specs/BA_SPEC_[FEATURE_KEY].md`
|
|
44
|
-
3. PM Planning -> `docs/product/PRD_[FEATURE_KEY].md` + `docs/product/BACKLOG_[FEATURE_KEY].md`
|
|
45
|
-
4. ARCH Design -> `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (plus API/layout docs when needed)
|
|
46
|
-
5. DEV Implementation + Code Review -> `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md` + code + tests
|
|
47
|
-
6. QA Testing -> `docs/qa/[FEATURE_KEY]_TEST_CASE.md` + `docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md`
|
|
48
|
-
|
|
49
|
-
## 2.1) DEV Review Gates
|
|
50
|
-
DEV Review Gates (mandatory, in order):
|
|
51
|
-
1. Artifact/spec compliance review -- verify code matches BA spec, API YAML, FLOW_ACTION_SPEC, and DB spec line by line.
|
|
52
|
-
2. Code quality review -- verify structure, naming, test coverage, and maintainability. Runs ONLY after Stage 1 PASS.
|
|
53
|
-
|
|
54
|
-
QA handoff is blocked until both gates PASS.
|
|
55
|
-
|
|
56
|
-
Stage 1 and QA validation must quote exact specification text when recording a match or mismatch.
|
|
57
|
-
Use: `Spec says: "[exact quote]" -> Evidence: [match/mismatch + file reference]`
|
|
58
|
-
|
|
59
|
-
## 3) Shared State And Quality Gates
|
|
60
|
-
- `SHARED_PLANNING.md`: phase status, owners, artifacts, blockers, handoff notes.
|
|
61
|
-
- `QUALITY_CHECKLIST.md`: gate checklist by phase.
|
|
62
|
-
- No handoff to next phase while current gate is not PASS.
|
|
63
|
-
- QA cannot start before code review gate is complete.
|
|
64
|
-
|
|
65
|
-
## 4) Minimum Traceability
|
|
66
|
-
- PM: `REQ-xx` requirements, scope, success metrics.
|
|
67
|
-
- BA: `BR-xx`, `UC-xx`, `AC-xx`, `NFR-xx`, and traceability matrix.
|
|
68
|
-
- ARCH: map UC/BR to API/DB/flows/screens.
|
|
69
|
-
- DEV/QA: map backlog stories and tests to UC/AC.
|
|
70
|
-
|
|
71
|
-
## 5) Feature Bootstrap
|
|
72
|
-
Run from project root:
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
sdtk generate --feature-key YOUR_FEATURE --feature-name "Your Feature"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## 6) ARCH Deliverables (Extended)
|
|
79
|
-
In addition to `ARCH_DESIGN`, ARCH may generate:
|
|
80
|
-
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
|
|
81
|
-
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
82
|
-
- `docs/database/DATABASE_SPEC_[FEATURE_KEY].md`
|
|
83
|
-
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
|
|
84
|
-
|
|
85
|
-
## 6.1) ARCH Orchestration Mapping
|
|
86
|
-
- Use `sdtk-api-doc` when API scope exists.
|
|
87
|
-
- Use `sdtk-api-design-spec` when API design detail is required from YAML + flow list.
|
|
88
|
-
- Use `sdtk-screen-design-spec` when UI flow-action specification is needed.
|
|
89
|
-
- Controlled by `sdtk.config.json`:
|
|
90
|
-
- `orchestration.apiDesignDetailMode = auto|on|off`
|
|
91
|
-
- `auto`: generate when API scope and required sources are available.
|
|
92
|
-
- `on`: always generate for API scope.
|
|
93
|
-
- `off`: skip unless explicitly requested.
|
|
94
|
-
|
|
95
|
-
## 6.2) QA Orchestration Mapping
|
|
96
|
-
- Use `sdtk-test-case-spec` when detailed worksheet-style test-case artifacts are required.
|
|
97
|
-
- Use `sdtk-qa` for execution report and release decision.
|
|
98
|
-
- Controlled by `sdtk.config.json`:
|
|
99
|
-
- `orchestration.testCaseSpecMode = auto|on|off`
|
|
100
|
-
- `auto`: generate when QA requires test-case artifacts.
|
|
101
|
-
- `on`: always generate in QA phase.
|
|
102
|
-
- `off`: skip unless explicitly requested.
|
|
103
|
-
|
|
104
|
-
## 6.3) Maintainer Assets
|
|
105
|
-
- Skill inventory: `toolkit/skills/skills.catalog.yaml`
|
|
106
|
-
- Handoff templates: `toolkit/templates/handoffs/`
|
|
107
|
-
- Example scenarios: `examples/`
|
|
108
|
-
- Readiness audit: `toolkit/scripts/check-runtime-readiness.ps1`
|
|
109
|
-
|
|
110
|
-
## 7) Mandatory Rule References
|
|
111
|
-
Rule files are installed locally by the runtime. Skills resolve these at:
|
|
112
|
-
- Claude Code: `.claude/skills/references/`
|
|
113
|
-
- Codex: `$CODEX_HOME/skills/<skill>/references/`
|
|
114
|
-
|
|
115
|
-
Workflow governance docs:
|
|
116
|
-
- `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md` -- verification-before-completion gate
|
|
117
|
-
- `governance/ai/core/SDTK_SKILL_AUTHORING_AND_TESTING.md` -- maintainer authoring/test guide
|
|
118
|
-
|
|
119
|
-
Available rule files:
|
|
120
|
-
- `YAML_CREATION_RULES.md` -- API YAML docs
|
|
121
|
-
- `API_DESIGN_FLOWCHART_CREATION_RULES.md` -- API design detail + flow docs
|
|
122
|
-
- `FLOWCHART_CREATION_RULES.md` -- Flowchart (legacy compat)
|
|
123
|
-
- `API_DESIGN_CREATION_RULES.md` -- API design (legacy compat)
|
|
124
|
-
- `FLOW_ACTION_SPEC_CREATION_RULES.md` -- Screen flow-action specs
|
|
125
|
-
- `TEST_CASE_CREATION_RULES.md` -- QA test-case specs
|
|
126
|
-
- `numbering-rules.md` -- Flow-action numbering policy
|
|
127
|
-
- `figma-mcp.md` -- Figma MCP integration
|
|
128
|
-
- `excel-image-export.md` -- Excel image export
|
|
129
|
-
|
|
130
|
-
Flow-action numbering policy:
|
|
131
|
-
- Use one global numbering mode for the whole document (no per-screen reset).
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
param(
|
|
2
|
-
[string]$ProjectPath,
|
|
3
|
-
[switch]$Force,
|
|
4
|
-
[switch]$SkipSkills,
|
|
5
|
-
[switch]$SkipRuntimeAssets,
|
|
6
|
-
[switch]$Quiet,
|
|
7
|
-
[ValidateSet('codex', 'claude')]
|
|
8
|
-
[string]$Runtime = 'codex',
|
|
9
|
-
[ValidateSet('project', 'user', '')]
|
|
10
|
-
[string]$Scope = ''
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
$ErrorActionPreference = 'Stop'
|
|
14
|
-
Set-StrictMode -Version Latest
|
|
15
|
-
|
|
16
|
-
function Get-FileSha256 {
|
|
17
|
-
param(
|
|
18
|
-
[Parameter(Mandatory = $true)][string]$Path
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
if (-not (Test-Path -LiteralPath $Path)) {
|
|
22
|
-
return $null
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
$stream = [System.IO.File]::OpenRead($Path)
|
|
26
|
-
try {
|
|
27
|
-
$sha = [System.Security.Cryptography.SHA256]::Create()
|
|
28
|
-
$hashBytes = $sha.ComputeHash($stream)
|
|
29
|
-
return [BitConverter]::ToString($hashBytes).Replace('-', '')
|
|
30
|
-
} finally {
|
|
31
|
-
$stream.Close()
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function Copy-File {
|
|
36
|
-
param(
|
|
37
|
-
[Parameter(Mandatory = $true)][string]$SourcePath,
|
|
38
|
-
[Parameter(Mandatory = $true)][string]$DestinationPath,
|
|
39
|
-
[Parameter(Mandatory = $true)][bool]$Overwrite
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
if (-not (Test-Path -LiteralPath $SourcePath)) {
|
|
43
|
-
throw "Missing source: $SourcePath"
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (Test-Path -LiteralPath $DestinationPath) {
|
|
47
|
-
if (-not $Overwrite) {
|
|
48
|
-
Write-Warning "Already exists (skipping). Use -Force to overwrite: $DestinationPath"
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
$parent = Split-Path -Parent $DestinationPath
|
|
54
|
-
if ($parent -and -not (Test-Path -LiteralPath $parent)) {
|
|
55
|
-
New-Item -ItemType Directory -Force -Path $parent | Out-Null
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
Copy-Item -LiteralPath $SourcePath -Destination $DestinationPath -Force
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function Install-ClaudeSkillDirectory {
|
|
62
|
-
param(
|
|
63
|
-
[Parameter(Mandatory = $true)][System.IO.DirectoryInfo]$SkillDir,
|
|
64
|
-
[Parameter(Mandatory = $true)][string]$SkillsDest,
|
|
65
|
-
[Parameter(Mandatory = $true)][string]$ToolkitRoot,
|
|
66
|
-
[Parameter(Mandatory = $true)][bool]$Overwrite
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
$destDir = Join-Path $SkillsDest $SkillDir.Name
|
|
70
|
-
if (Test-Path -LiteralPath $destDir) {
|
|
71
|
-
if (-not $Overwrite) {
|
|
72
|
-
Write-Warning "Already exists (skipping). Use -Force to overwrite: $destDir"
|
|
73
|
-
return $true
|
|
74
|
-
}
|
|
75
|
-
Remove-Item -LiteralPath $destDir -Recurse -Force
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
$parent = Split-Path -Parent $destDir
|
|
79
|
-
if ($parent -and -not (Test-Path -LiteralPath $parent)) {
|
|
80
|
-
New-Item -ItemType Directory -Force -Path $parent | Out-Null
|
|
81
|
-
}
|
|
82
|
-
Copy-Item -LiteralPath $SkillDir.FullName -Destination $destDir -Recurse -Force
|
|
83
|
-
|
|
84
|
-
$canonicalSkillDir = Join-Path $ToolkitRoot "skills/sdtk-$($SkillDir.Name)"
|
|
85
|
-
foreach ($subDirName in @('scripts', 'prompts')) {
|
|
86
|
-
$srcSubDir = Join-Path $canonicalSkillDir $subDirName
|
|
87
|
-
$destSubDir = Join-Path $destDir $subDirName
|
|
88
|
-
if (-not (Test-Path -LiteralPath $srcSubDir)) {
|
|
89
|
-
continue
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (Test-Path -LiteralPath $destSubDir) {
|
|
93
|
-
Remove-Item -LiteralPath $destSubDir -Recurse -Force
|
|
94
|
-
}
|
|
95
|
-
Copy-Item -LiteralPath $srcSubDir -Destination $destSubDir -Recurse -Force
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return $true
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function Install-RuntimeAdapter {
|
|
102
|
-
param(
|
|
103
|
-
[Parameter(Mandatory = $true)][string]$ToolkitRoot,
|
|
104
|
-
[Parameter(Mandatory = $true)][string]$ProjectRoot,
|
|
105
|
-
[Parameter(Mandatory = $true)][string]$RuntimeName,
|
|
106
|
-
[Parameter(Mandatory = $true)][bool]$Overwrite
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
if ($RuntimeName -eq 'codex') {
|
|
110
|
-
$source = Join-Path $ToolkitRoot 'runtimes/codex/CODEX_TEMPLATE.md'
|
|
111
|
-
$dest = Join-Path $ProjectRoot 'CODEX.md'
|
|
112
|
-
Copy-File -SourcePath $source -DestinationPath $dest -Overwrite $Overwrite
|
|
113
|
-
return
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if ($RuntimeName -eq 'claude') {
|
|
117
|
-
$source = Join-Path $ToolkitRoot 'runtimes/claude/CLAUDE_TEMPLATE.md'
|
|
118
|
-
$dest = Join-Path $ProjectRoot 'CLAUDE.md'
|
|
119
|
-
Copy-File -SourcePath $source -DestinationPath $dest -Overwrite $Overwrite
|
|
120
|
-
return
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
throw "Unsupported runtime: $RuntimeName"
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function Install-ClaudeSkills {
|
|
127
|
-
param(
|
|
128
|
-
[Parameter(Mandatory = $true)][string]$ToolkitRoot,
|
|
129
|
-
[Parameter(Mandatory = $true)][string]$ProjectRoot,
|
|
130
|
-
[Parameter(Mandatory = $true)][bool]$Overwrite
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
$skillsSource = Join-Path $ToolkitRoot 'skills-claude'
|
|
134
|
-
$skillsDest = Join-Path $ProjectRoot '.claude/skills'
|
|
135
|
-
|
|
136
|
-
if (-not (Test-Path -LiteralPath $skillsSource)) {
|
|
137
|
-
throw "Claude skills source not found: $skillsSource"
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
$skillCount = 0
|
|
141
|
-
foreach ($skillDir in (Get-ChildItem -Path $skillsSource -Directory)) {
|
|
142
|
-
$srcFile = Join-Path $skillDir.FullName 'SKILL.md'
|
|
143
|
-
if (-not (Test-Path -LiteralPath $srcFile)) { continue }
|
|
144
|
-
|
|
145
|
-
if (Install-ClaudeSkillDirectory -SkillDir $skillDir -SkillsDest $skillsDest -ToolkitRoot $ToolkitRoot -Overwrite $Overwrite) {
|
|
146
|
-
$skillCount++
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
# Install reference files
|
|
151
|
-
$refDest = Join-Path $skillsDest 'references'
|
|
152
|
-
if (-not (Test-Path -LiteralPath $refDest)) {
|
|
153
|
-
New-Item -ItemType Directory -Force -Path $refDest | Out-Null
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
$refCount = 0
|
|
157
|
-
$missingRefs = @()
|
|
158
|
-
|
|
159
|
-
# 6 files from toolkit/templates/docs/
|
|
160
|
-
$templateRefs = @(
|
|
161
|
-
@{ Src = 'templates/docs/api/YAML_CREATION_RULES.md' },
|
|
162
|
-
@{ Src = 'templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md' },
|
|
163
|
-
@{ Src = 'templates/docs/api/FLOWCHART_CREATION_RULES.md' },
|
|
164
|
-
@{ Src = 'templates/docs/api/API_DESIGN_CREATION_RULES.md' },
|
|
165
|
-
@{ Src = 'templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md' },
|
|
166
|
-
@{ Src = 'templates/docs/qa/TEST_CASE_CREATION_RULES.md' }
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
foreach ($ref in $templateRefs) {
|
|
170
|
-
$srcPath = Join-Path $ToolkitRoot $ref.Src
|
|
171
|
-
$fileName = Split-Path -Leaf $srcPath
|
|
172
|
-
$destPath = Join-Path $refDest $fileName
|
|
173
|
-
if (Test-Path -LiteralPath $srcPath) {
|
|
174
|
-
Copy-File -SourcePath $srcPath -DestinationPath $destPath -Overwrite $Overwrite
|
|
175
|
-
$refCount++
|
|
176
|
-
} else {
|
|
177
|
-
$missingRefs += $srcPath
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
# 3 files from toolkit/skills/sdtk-screen-design-spec/references/
|
|
182
|
-
$screenRefs = @('numbering-rules.md', 'figma-mcp.md', 'excel-image-export.md')
|
|
183
|
-
foreach ($fileName in $screenRefs) {
|
|
184
|
-
$srcPath = Join-Path $ToolkitRoot "skills/sdtk-screen-design-spec/references/$fileName"
|
|
185
|
-
$destPath = Join-Path $refDest $fileName
|
|
186
|
-
if (Test-Path -LiteralPath $srcPath) {
|
|
187
|
-
Copy-File -SourcePath $srcPath -DestinationPath $destPath -Overwrite $Overwrite
|
|
188
|
-
$refCount++
|
|
189
|
-
} else {
|
|
190
|
-
$missingRefs += $srcPath
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
# Fail-fast: abort if any reference files are missing
|
|
195
|
-
if ($missingRefs.Count -gt 0) {
|
|
196
|
-
$list = ($missingRefs | ForEach-Object { " - $_" }) -join "`n"
|
|
197
|
-
throw "Claude install failed. Missing reference files:`n$list"
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
# Strict count assertions
|
|
201
|
-
$expectedSkills = 13
|
|
202
|
-
$expectedRefs = 9
|
|
203
|
-
if ($skillCount -ne $expectedSkills) {
|
|
204
|
-
throw "Claude install failed. Expected $expectedSkills skills but installed $skillCount."
|
|
205
|
-
}
|
|
206
|
-
if ($refCount -ne $expectedRefs) {
|
|
207
|
-
throw "Claude install failed. Expected $expectedRefs reference files but installed $refCount."
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
Write-Host " Skills installed: $skillCount"
|
|
211
|
-
Write-Host " Reference files : $refCount"
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
$toolkitRoot = Resolve-Path $PSScriptRoot
|
|
215
|
-
$canonicalRulesPath = Join-Path $toolkitRoot 'templates/docs/api/FLOWCHART_CREATION_RULES.md'
|
|
216
|
-
$canonicalRulesHash = Get-FileSha256 -Path $canonicalRulesPath
|
|
217
|
-
$apiDesignRulesPath = Join-Path $toolkitRoot 'templates/docs/api/API_DESIGN_CREATION_RULES.md'
|
|
218
|
-
$apiDesignRulesHash = Get-FileSha256 -Path $apiDesignRulesPath
|
|
219
|
-
$flowActionRulesPath = Join-Path $toolkitRoot 'templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md'
|
|
220
|
-
$flowActionRulesHash = Get-FileSha256 -Path $flowActionRulesPath
|
|
221
|
-
|
|
222
|
-
if (-not $ProjectPath) {
|
|
223
|
-
$ProjectPath = (Resolve-Path (Join-Path $toolkitRoot '..')).Path
|
|
224
|
-
}
|
|
225
|
-
$projectRoot = Resolve-Path -LiteralPath $ProjectPath
|
|
226
|
-
|
|
227
|
-
# Merge SkipRuntimeAssets and legacy SkipSkills
|
|
228
|
-
if ($SkipRuntimeAssets) { $SkipSkills = $true }
|
|
229
|
-
|
|
230
|
-
# Default scope: project for Claude, user for Codex
|
|
231
|
-
if (-not $Scope -or $Scope -eq '') {
|
|
232
|
-
if ($Runtime -eq 'claude') { $Scope = 'project' }
|
|
233
|
-
else { $Scope = 'user' }
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
if (-not $Quiet) {
|
|
237
|
-
Write-Host "SDTK toolkit : $toolkitRoot"
|
|
238
|
-
Write-Host "Project root : $projectRoot"
|
|
239
|
-
Write-Host "Runtime : $Runtime"
|
|
240
|
-
if ($canonicalRulesHash) {
|
|
241
|
-
Write-Host "API ruleset : $canonicalRulesPath"
|
|
242
|
-
Write-Host "Ruleset hash : $canonicalRulesHash"
|
|
243
|
-
} else {
|
|
244
|
-
Write-Warning "API ruleset not found: $canonicalRulesPath"
|
|
245
|
-
}
|
|
246
|
-
if ($apiDesignRulesHash) {
|
|
247
|
-
Write-Host "API design ruleset: $apiDesignRulesPath"
|
|
248
|
-
Write-Host "Ruleset hash : $apiDesignRulesHash"
|
|
249
|
-
} else {
|
|
250
|
-
Write-Warning "API design ruleset not found: $apiDesignRulesPath"
|
|
251
|
-
}
|
|
252
|
-
if ($flowActionRulesHash) {
|
|
253
|
-
Write-Host "Flow ruleset : $flowActionRulesPath"
|
|
254
|
-
Write-Host "Ruleset hash : $flowActionRulesHash"
|
|
255
|
-
} else {
|
|
256
|
-
Write-Warning "Flow ruleset not found: $flowActionRulesPath"
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
Copy-File -SourcePath (Join-Path $toolkitRoot 'AGENTS.md') -DestinationPath (Join-Path $projectRoot 'AGENTS.md') -Overwrite ([bool]$Force)
|
|
261
|
-
Copy-File -SourcePath (Join-Path $toolkitRoot 'sdtk.config.json') -DestinationPath (Join-Path $projectRoot 'sdtk.config.json') -Overwrite ([bool]$Force)
|
|
262
|
-
Copy-File -SourcePath (Join-Path $toolkitRoot 'sdtk.config.profiles.example.json') -DestinationPath (Join-Path $projectRoot 'sdtk.config.profiles.example.json') -Overwrite ([bool]$Force)
|
|
263
|
-
Install-RuntimeAdapter -ToolkitRoot $toolkitRoot -ProjectRoot $projectRoot -RuntimeName $Runtime -Overwrite ([bool]$Force)
|
|
264
|
-
|
|
265
|
-
if (($Runtime -eq 'codex') -and (-not $SkipSkills)) {
|
|
266
|
-
$skillInstaller = Join-Path $toolkitRoot 'scripts/install-codex-skills.ps1'
|
|
267
|
-
if (-not (Test-Path -LiteralPath $skillInstaller)) {
|
|
268
|
-
throw "Missing skill installer script: $skillInstaller"
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
Write-Host ""
|
|
272
|
-
Write-Host "Installing Codex skills (scope: $Scope)..."
|
|
273
|
-
if ($Force) {
|
|
274
|
-
& $skillInstaller -Scope $Scope -Force | Out-Host
|
|
275
|
-
} else {
|
|
276
|
-
& $skillInstaller -Scope $Scope | Out-Host
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
elseif (($Runtime -eq 'claude') -and (-not $SkipSkills)) {
|
|
280
|
-
$skillInstaller = Join-Path $toolkitRoot 'scripts/install-claude-skills.ps1'
|
|
281
|
-
if (-not (Test-Path -LiteralPath $skillInstaller)) {
|
|
282
|
-
# Fallback to inline Install-ClaudeSkills for backward compatibility
|
|
283
|
-
Write-Host ""
|
|
284
|
-
Write-Host "Installing Claude Code skills..."
|
|
285
|
-
Install-ClaudeSkills -ToolkitRoot $toolkitRoot -ProjectRoot $projectRoot -Overwrite ([bool]$Force)
|
|
286
|
-
} else {
|
|
287
|
-
Write-Host ""
|
|
288
|
-
Write-Host "Installing Claude Code skills (scope: $Scope)..."
|
|
289
|
-
if ($Force) {
|
|
290
|
-
& $skillInstaller -Scope $Scope -ProjectPath $projectRoot.ToString() -Force | Out-Host
|
|
291
|
-
} else {
|
|
292
|
-
& $skillInstaller -Scope $Scope -ProjectPath $projectRoot.ToString() | Out-Host
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (-not $Quiet) {
|
|
298
|
-
Write-Host ""
|
|
299
|
-
Write-Host "Install complete."
|
|
300
|
-
Write-Host "Next:"
|
|
301
|
-
Write-Host "1) Edit project config: $((Join-Path $projectRoot 'sdtk.config.json'))"
|
|
302
|
-
if ($Runtime -eq 'codex') {
|
|
303
|
-
Write-Host "2) Restart Codex (to load runtime adapter and skills)"
|
|
304
|
-
} else {
|
|
305
|
-
Write-Host "2) Restart Claude Code (to load CLAUDE.md + skills)"
|
|
306
|
-
Write-Host " Commands: /orchestrator /pm /ba /arch /dev /qa"
|
|
307
|
-
}
|
|
308
|
-
Write-Host '3) Generate feature docs:'
|
|
309
|
-
Write-Host ' sdtk generate --feature-key YOUR_FEATURE --feature-name "Your Feature"'
|
|
310
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
Version: 2.0
|
|
4
|
-
Last Updated: 2026-03-05
|
|
5
|
-
Owner: SDTK Core Team
|
|
6
|
-
|
|
7
|
-
This file defines runtime guidance for Claude Code sessions in projects using SDTK.
|
|
8
|
-
|
|
9
|
-
## 1) Rule Priority
|
|
10
|
-
1. Explicit user request
|
|
11
|
-
2. `AGENTS.md` (project root)
|
|
12
|
-
3. Installed skill content (`.claude/skills/*/SKILL.md`)
|
|
13
|
-
4. This file (`CLAUDE.md`)
|
|
14
|
-
5. `sdtk.config.json`
|
|
15
|
-
|
|
16
|
-
## 2) Runtime Model
|
|
17
|
-
- Primary workflow: PM -> BA -> ARCH -> DEV -> QA
|
|
18
|
-
- Entry point: `/orchestrator` (recommended) or `/pm`
|
|
19
|
-
- Role commands: `/pm`, `/ba`, `/arch`, `/dev`, `/qa`
|
|
20
|
-
- Sub-skill commands: `/api-doc`, `/api-design-spec`, `/screen-design-spec`, `/design-layout`, `/test-case-spec`, `/dev-backend`, `/dev-frontend`
|
|
21
|
-
- Shared state files:
|
|
22
|
-
- `SHARED_PLANNING.md`
|
|
23
|
-
- `QUALITY_CHECKLIST.md`
|
|
24
|
-
|
|
25
|
-
## 3) Minimal Session Flow
|
|
26
|
-
1. Start with `/orchestrator` or `/pm` to define feature scope.
|
|
27
|
-
2. Move phase-by-phase without skipping gates.
|
|
28
|
-
3. Keep traceability from requirements to design, implementation, and tests.
|
|
29
|
-
4. Require code review completion before QA release decision.
|
|
30
|
-
|
|
31
|
-
## 4) Installed Skills
|
|
32
|
-
Skills are installed at `.claude/skills/` and provide slash commands:
|
|
33
|
-
|
|
34
|
-
| Command | Purpose |
|
|
35
|
-
|---------|---------|
|
|
36
|
-
| `/orchestrator` | Full 6-phase SDLC orchestration |
|
|
37
|
-
| `/pm` | PM initiation + planning |
|
|
38
|
-
| `/ba` | Business analysis |
|
|
39
|
-
| `/arch` | Solution architecture |
|
|
40
|
-
| `/dev` | Development + code review |
|
|
41
|
-
| `/qa` | QA testing + release decision |
|
|
42
|
-
| `/api-doc` | OpenAPI YAML + flow diagrams |
|
|
43
|
-
| `/api-design-spec` | API design detail spec |
|
|
44
|
-
| `/screen-design-spec` | Screen flow-action spec |
|
|
45
|
-
| `/design-layout` | UI screen layout wireframes |
|
|
46
|
-
| `/test-case-spec` | QA test-case spec |
|
|
47
|
-
| `/dev-backend` | Backend code conventions |
|
|
48
|
-
| `/dev-frontend` | Frontend code conventions |
|
|
49
|
-
|
|
50
|
-
Rule reference files are installed at `.claude/skills/references/`.
|
|
51
|
-
|
|
52
|
-
## 5) References
|
|
53
|
-
- `sdtk.config.json`
|
|
54
|
-
- `.claude/skills/references/` (rule files)
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# CODEX.md
|
|
2
|
-
|
|
3
|
-
Version: 1.0
|
|
4
|
-
Last Updated: 2026-02-25
|
|
5
|
-
Owner: SDTK Core Team
|
|
6
|
-
|
|
7
|
-
This file defines runtime guidance for Codex sessions in projects using SDTK.
|
|
8
|
-
|
|
9
|
-
## 1) Rule Priority
|
|
10
|
-
1. Explicit user request
|
|
11
|
-
2. `AGENTS.md` (project root)
|
|
12
|
-
3. `toolkit/AGENTS.md`
|
|
13
|
-
4. This file (`CODEX.md`)
|
|
14
|
-
5. Other supporting docs
|
|
15
|
-
|
|
16
|
-
## 2) Runtime Model
|
|
17
|
-
- Primary workflow: PM -> BA -> ARCH -> DEV -> QA
|
|
18
|
-
- Role tags: `/pm`, `/ba`, `/arch`, `/dev`, `/qa`
|
|
19
|
-
- Shared state files:
|
|
20
|
-
- `SHARED_PLANNING.md`
|
|
21
|
-
- `QUALITY_CHECKLIST.md`
|
|
22
|
-
|
|
23
|
-
## 3) Minimal Session Flow
|
|
24
|
-
1. Start with `/pm` to define feature scope.
|
|
25
|
-
2. Move phase-by-phase without skipping gates.
|
|
26
|
-
3. Keep traceability from requirements to design, implementation, and tests.
|
|
27
|
-
4. Require code review completion before QA release decision.
|
|
28
|
-
|
|
29
|
-
## 4) References
|
|
30
|
-
- `toolkit/SDTK_TOOLKIT.md`
|
|
31
|
-
- `toolkit/AGENTS.md`
|
|
32
|
-
- `sdtk.config.json`
|