sdtk-kit 0.3.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -177
  3. package/package.json +52 -46
  4. package/scripts/postinstall.js +40 -0
  5. package/assets/manifest/toolkit-bundle.manifest.json +0 -473
  6. package/assets/manifest/toolkit-bundle.sha256.txt +0 -93
  7. package/assets/toolkit/toolkit/AGENTS.md +0 -131
  8. package/assets/toolkit/toolkit/install.ps1 +0 -270
  9. package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +0 -54
  10. package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +0 -32
  11. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +0 -261
  12. package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +0 -129
  13. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +0 -189
  14. package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +0 -139
  15. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +0 -116
  16. package/assets/toolkit/toolkit/sdtk.config.json +0 -28
  17. package/assets/toolkit/toolkit/sdtk.config.profiles.example.json +0 -50
  18. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +0 -84
  19. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md +0 -22
  20. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
  21. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/FLOWCHART_CREATION_RULES.md +0 -20
  22. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +0 -656
  23. package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +0 -43
  24. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
  25. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/FLOWCHART_CREATION_RULES.md +0 -20
  26. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md +0 -128
  27. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +0 -83
  28. package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_CREATION_RULES.md +0 -22
  29. package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
  30. package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOWCHART_CREATION_RULES.md +0 -20
  31. package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -200
  32. package/assets/toolkit/toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md +0 -128
  33. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +0 -29
  34. package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +0 -41
  35. package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +0 -213
  36. package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +0 -90
  37. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +0 -35
  38. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +0 -61
  39. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +0 -42
  40. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +0 -21
  41. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +0 -19
  42. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +0 -80
  43. package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +0 -30
  44. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +0 -53
  45. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +0 -73
  46. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -200
  47. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +0 -51
  48. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +0 -54
  49. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +0 -76
  50. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +0 -136
  51. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +0 -249
  52. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +0 -74
  53. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/references/TEST_CASE_CREATION_RULES.md +0 -129
  54. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +0 -97
  55. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +0 -302
  56. package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +0 -76
  57. package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +0 -47
  58. package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +0 -72
  59. package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +0 -50
  60. package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +0 -25
  61. package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +0 -45
  62. package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +0 -20
  63. package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +0 -18
  64. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +0 -63
  65. package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +0 -52
  66. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +0 -48
  67. package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +0 -68
  68. package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +0 -61
  69. package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +0 -124
  70. package/assets/toolkit/toolkit/templates/README.md +0 -63
  71. package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +0 -80
  72. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +0 -22
  73. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +0 -67
  74. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
  75. package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +0 -229
  76. package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +0 -20
  77. package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +0 -20
  78. package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +0 -128
  79. package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +0 -12
  80. package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +0 -109
  81. package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +0 -175
  82. package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +0 -49
  83. package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +0 -73
  84. package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +0 -50
  85. package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +0 -66
  86. package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +0 -98
  87. package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +0 -61
  88. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +0 -129
  89. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +0 -104
  90. package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +0 -139
  91. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -200
  92. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +0 -172
  93. package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +0 -31
  94. package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +0 -28
  95. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +0 -26
  96. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +0 -20
  97. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +0 -23
  98. package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +0 -26
  99. package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +0 -21
  100. package/bin/sdtk.js +0 -15
  101. package/src/commands/auth.js +0 -85
  102. package/src/commands/generate.js +0 -177
  103. package/src/commands/help.js +0 -101
  104. package/src/commands/init.js +0 -97
  105. package/src/commands/runtime.js +0 -217
  106. package/src/index.js +0 -59
  107. package/src/lib/args.js +0 -116
  108. package/src/lib/errors.js +0 -41
  109. package/src/lib/github-access.js +0 -68
  110. package/src/lib/powershell.js +0 -85
  111. package/src/lib/scope.js +0 -68
  112. package/src/lib/state.js +0 -83
  113. 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,270 +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-RuntimeAdapter {
62
- param(
63
- [Parameter(Mandatory = $true)][string]$ToolkitRoot,
64
- [Parameter(Mandatory = $true)][string]$ProjectRoot,
65
- [Parameter(Mandatory = $true)][string]$RuntimeName,
66
- [Parameter(Mandatory = $true)][bool]$Overwrite
67
- )
68
-
69
- if ($RuntimeName -eq 'codex') {
70
- $source = Join-Path $ToolkitRoot 'runtimes/codex/CODEX_TEMPLATE.md'
71
- $dest = Join-Path $ProjectRoot 'CODEX.md'
72
- Copy-File -SourcePath $source -DestinationPath $dest -Overwrite $Overwrite
73
- return
74
- }
75
-
76
- if ($RuntimeName -eq 'claude') {
77
- $source = Join-Path $ToolkitRoot 'runtimes/claude/CLAUDE_TEMPLATE.md'
78
- $dest = Join-Path $ProjectRoot 'CLAUDE.md'
79
- Copy-File -SourcePath $source -DestinationPath $dest -Overwrite $Overwrite
80
- return
81
- }
82
-
83
- throw "Unsupported runtime: $RuntimeName"
84
- }
85
-
86
- function Install-ClaudeSkills {
87
- param(
88
- [Parameter(Mandatory = $true)][string]$ToolkitRoot,
89
- [Parameter(Mandatory = $true)][string]$ProjectRoot,
90
- [Parameter(Mandatory = $true)][bool]$Overwrite
91
- )
92
-
93
- $skillsSource = Join-Path $ToolkitRoot 'skills-claude'
94
- $skillsDest = Join-Path $ProjectRoot '.claude/skills'
95
-
96
- if (-not (Test-Path -LiteralPath $skillsSource)) {
97
- throw "Claude skills source not found: $skillsSource"
98
- }
99
-
100
- $skillCount = 0
101
- foreach ($skillDir in (Get-ChildItem -Path $skillsSource -Directory)) {
102
- $srcFile = Join-Path $skillDir.FullName 'SKILL.md'
103
- if (-not (Test-Path -LiteralPath $srcFile)) { continue }
104
-
105
- $destFile = Join-Path $skillsDest "$($skillDir.Name)/SKILL.md"
106
- Copy-File -SourcePath $srcFile -DestinationPath $destFile -Overwrite $Overwrite
107
- $skillCount++
108
- }
109
-
110
- # Install reference files
111
- $refDest = Join-Path $skillsDest 'references'
112
- if (-not (Test-Path -LiteralPath $refDest)) {
113
- New-Item -ItemType Directory -Force -Path $refDest | Out-Null
114
- }
115
-
116
- $refCount = 0
117
- $missingRefs = @()
118
-
119
- # 6 files from toolkit/templates/docs/
120
- $templateRefs = @(
121
- @{ Src = 'templates/docs/api/YAML_CREATION_RULES.md' },
122
- @{ Src = 'templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md' },
123
- @{ Src = 'templates/docs/api/FLOWCHART_CREATION_RULES.md' },
124
- @{ Src = 'templates/docs/api/API_DESIGN_CREATION_RULES.md' },
125
- @{ Src = 'templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md' },
126
- @{ Src = 'templates/docs/qa/TEST_CASE_CREATION_RULES.md' }
127
- )
128
-
129
- foreach ($ref in $templateRefs) {
130
- $srcPath = Join-Path $ToolkitRoot $ref.Src
131
- $fileName = Split-Path -Leaf $srcPath
132
- $destPath = Join-Path $refDest $fileName
133
- if (Test-Path -LiteralPath $srcPath) {
134
- Copy-File -SourcePath $srcPath -DestinationPath $destPath -Overwrite $Overwrite
135
- $refCount++
136
- } else {
137
- $missingRefs += $srcPath
138
- }
139
- }
140
-
141
- # 3 files from toolkit/skills/sdtk-screen-design-spec/references/
142
- $screenRefs = @('numbering-rules.md', 'figma-mcp.md', 'excel-image-export.md')
143
- foreach ($fileName in $screenRefs) {
144
- $srcPath = Join-Path $ToolkitRoot "skills/sdtk-screen-design-spec/references/$fileName"
145
- $destPath = Join-Path $refDest $fileName
146
- if (Test-Path -LiteralPath $srcPath) {
147
- Copy-File -SourcePath $srcPath -DestinationPath $destPath -Overwrite $Overwrite
148
- $refCount++
149
- } else {
150
- $missingRefs += $srcPath
151
- }
152
- }
153
-
154
- # Fail-fast: abort if any reference files are missing
155
- if ($missingRefs.Count -gt 0) {
156
- $list = ($missingRefs | ForEach-Object { " - $_" }) -join "`n"
157
- throw "Claude install failed. Missing reference files:`n$list"
158
- }
159
-
160
- # Strict count assertions
161
- $expectedSkills = 13
162
- $expectedRefs = 9
163
- if ($skillCount -ne $expectedSkills) {
164
- throw "Claude install failed. Expected $expectedSkills skills but installed $skillCount."
165
- }
166
- if ($refCount -ne $expectedRefs) {
167
- throw "Claude install failed. Expected $expectedRefs reference files but installed $refCount."
168
- }
169
-
170
- Write-Host " Skills installed: $skillCount"
171
- Write-Host " Reference files : $refCount"
172
- }
173
-
174
- $toolkitRoot = Resolve-Path $PSScriptRoot
175
- $canonicalRulesPath = Join-Path $toolkitRoot 'templates/docs/api/FLOWCHART_CREATION_RULES.md'
176
- $canonicalRulesHash = Get-FileSha256 -Path $canonicalRulesPath
177
- $apiDesignRulesPath = Join-Path $toolkitRoot 'templates/docs/api/API_DESIGN_CREATION_RULES.md'
178
- $apiDesignRulesHash = Get-FileSha256 -Path $apiDesignRulesPath
179
- $flowActionRulesPath = Join-Path $toolkitRoot 'templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md'
180
- $flowActionRulesHash = Get-FileSha256 -Path $flowActionRulesPath
181
-
182
- if (-not $ProjectPath) {
183
- $ProjectPath = (Resolve-Path (Join-Path $toolkitRoot '..')).Path
184
- }
185
- $projectRoot = Resolve-Path -LiteralPath $ProjectPath
186
-
187
- # Merge SkipRuntimeAssets and legacy SkipSkills
188
- if ($SkipRuntimeAssets) { $SkipSkills = $true }
189
-
190
- # Default scope: project for Claude, user for Codex
191
- if (-not $Scope -or $Scope -eq '') {
192
- if ($Runtime -eq 'claude') { $Scope = 'project' }
193
- else { $Scope = 'user' }
194
- }
195
-
196
- if (-not $Quiet) {
197
- Write-Host "SDTK toolkit : $toolkitRoot"
198
- Write-Host "Project root : $projectRoot"
199
- Write-Host "Runtime : $Runtime"
200
- if ($canonicalRulesHash) {
201
- Write-Host "API ruleset : $canonicalRulesPath"
202
- Write-Host "Ruleset hash : $canonicalRulesHash"
203
- } else {
204
- Write-Warning "API ruleset not found: $canonicalRulesPath"
205
- }
206
- if ($apiDesignRulesHash) {
207
- Write-Host "API design ruleset: $apiDesignRulesPath"
208
- Write-Host "Ruleset hash : $apiDesignRulesHash"
209
- } else {
210
- Write-Warning "API design ruleset not found: $apiDesignRulesPath"
211
- }
212
- if ($flowActionRulesHash) {
213
- Write-Host "Flow ruleset : $flowActionRulesPath"
214
- Write-Host "Ruleset hash : $flowActionRulesHash"
215
- } else {
216
- Write-Warning "Flow ruleset not found: $flowActionRulesPath"
217
- }
218
- }
219
-
220
- Copy-File -SourcePath (Join-Path $toolkitRoot 'AGENTS.md') -DestinationPath (Join-Path $projectRoot 'AGENTS.md') -Overwrite ([bool]$Force)
221
- Copy-File -SourcePath (Join-Path $toolkitRoot 'sdtk.config.json') -DestinationPath (Join-Path $projectRoot 'sdtk.config.json') -Overwrite ([bool]$Force)
222
- Copy-File -SourcePath (Join-Path $toolkitRoot 'sdtk.config.profiles.example.json') -DestinationPath (Join-Path $projectRoot 'sdtk.config.profiles.example.json') -Overwrite ([bool]$Force)
223
- Install-RuntimeAdapter -ToolkitRoot $toolkitRoot -ProjectRoot $projectRoot -RuntimeName $Runtime -Overwrite ([bool]$Force)
224
-
225
- if (($Runtime -eq 'codex') -and (-not $SkipSkills)) {
226
- $skillInstaller = Join-Path $toolkitRoot 'scripts/install-codex-skills.ps1'
227
- if (-not (Test-Path -LiteralPath $skillInstaller)) {
228
- throw "Missing skill installer script: $skillInstaller"
229
- }
230
-
231
- Write-Host ""
232
- Write-Host "Installing Codex skills (scope: $Scope)..."
233
- if ($Force) {
234
- & $skillInstaller -Scope $Scope -Force | Out-Host
235
- } else {
236
- & $skillInstaller -Scope $Scope | Out-Host
237
- }
238
- }
239
- elseif (($Runtime -eq 'claude') -and (-not $SkipSkills)) {
240
- $skillInstaller = Join-Path $toolkitRoot 'scripts/install-claude-skills.ps1'
241
- if (-not (Test-Path -LiteralPath $skillInstaller)) {
242
- # Fallback to inline Install-ClaudeSkills for backward compatibility
243
- Write-Host ""
244
- Write-Host "Installing Claude Code skills..."
245
- Install-ClaudeSkills -ToolkitRoot $toolkitRoot -ProjectRoot $projectRoot -Overwrite ([bool]$Force)
246
- } else {
247
- Write-Host ""
248
- Write-Host "Installing Claude Code skills (scope: $Scope)..."
249
- if ($Force) {
250
- & $skillInstaller -Scope $Scope -ProjectPath $projectRoot.ToString() -Force | Out-Host
251
- } else {
252
- & $skillInstaller -Scope $Scope -ProjectPath $projectRoot.ToString() | Out-Host
253
- }
254
- }
255
- }
256
-
257
- if (-not $Quiet) {
258
- Write-Host ""
259
- Write-Host "Install complete."
260
- Write-Host "Next:"
261
- Write-Host "1) Edit project config: $((Join-Path $projectRoot 'sdtk.config.json'))"
262
- if ($Runtime -eq 'codex') {
263
- Write-Host "2) Restart Codex (to load runtime adapter and skills)"
264
- } else {
265
- Write-Host "2) Restart Claude Code (to load CLAUDE.md + skills)"
266
- Write-Host " Commands: /orchestrator /pm /ba /arch /dev /qa"
267
- }
268
- Write-Host '3) Generate feature docs:'
269
- Write-Host ' sdtk generate --feature-key YOUR_FEATURE --feature-name "Your Feature"'
270
- }
@@ -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`