sdtk-spec-kit 0.3.9 → 0.3.10
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 +93 -85
- package/assets/manifest/toolkit-bundle.manifest.json +42 -43
- package/assets/manifest/toolkit-bundle.sha256.txt +20 -20
- package/assets/toolkit/toolkit/AGENTS.md +5 -4
- package/assets/toolkit/toolkit/install.ps1 +2 -2
- package/assets/toolkit/toolkit/scripts/init-feature.ps1 +2 -2
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +32 -12
- package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +33 -6
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +4 -0
- package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +7 -4
- package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +7 -4
- package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +14 -5
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +30 -30
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +25 -25
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +4 -2
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +3 -0
- package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +1 -1
- package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +9 -7
- package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +10 -7
- package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +3 -0
- package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +40 -6
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +4 -0
- package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +5 -0
- package/package.json +6 -6
- package/src/commands/help.js +105 -97
- package/src/commands/init.js +10 -2
- package/src/commands/runtime.js +27 -5
- package/src/lib/scope.js +19 -4
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
param(
|
|
2
2
|
[ValidateSet('project', 'user')]
|
|
3
3
|
[string]$Scope = 'user',
|
|
4
|
+
[string]$ProjectPath,
|
|
4
5
|
[switch]$Force
|
|
5
6
|
)
|
|
6
7
|
|
|
7
|
-
# Gate C0: Codex does not support project-local skills
|
|
8
|
-
if ($Scope -eq 'project') {
|
|
9
|
-
Write-Error "Codex does not support project-local skills. Use --scope user instead."
|
|
10
|
-
exit 1
|
|
11
|
-
}
|
|
12
|
-
|
|
13
8
|
$ErrorActionPreference = 'Stop'
|
|
14
9
|
Set-StrictMode -Version Latest
|
|
15
10
|
|
|
11
|
+
function Resolve-CodexHome {
|
|
12
|
+
param(
|
|
13
|
+
[Parameter(Mandatory = $true)][string]$TargetScope,
|
|
14
|
+
[string]$TargetProjectPath
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
if ($TargetScope -eq 'project') {
|
|
18
|
+
if (-not $TargetProjectPath -or $TargetProjectPath.Trim().Length -eq 0) {
|
|
19
|
+
throw "Project-local Codex install requires -ProjectPath."
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (-not (Test-Path -LiteralPath $TargetProjectPath)) {
|
|
23
|
+
New-Item -ItemType Directory -Force -Path $TargetProjectPath | Out-Null
|
|
24
|
+
}
|
|
25
|
+
$projectRoot = (Resolve-Path -LiteralPath $TargetProjectPath).Path
|
|
26
|
+
return (Join-Path $projectRoot '.codex')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if ($env:CODEX_HOME) {
|
|
30
|
+
return $env:CODEX_HOME
|
|
31
|
+
}
|
|
32
|
+
return (Join-Path $HOME '.codex')
|
|
33
|
+
}
|
|
34
|
+
|
|
16
35
|
function Get-FileSha256 {
|
|
17
36
|
param(
|
|
18
37
|
[Parameter(Mandatory = $true)][string]$Path
|
|
@@ -47,11 +66,7 @@ if (-not (Test-Path -LiteralPath $skillsSrc)) {
|
|
|
47
66
|
throw "Missing skills directory: $skillsSrc"
|
|
48
67
|
}
|
|
49
68
|
|
|
50
|
-
$codexHome = $
|
|
51
|
-
if (-not $codexHome) {
|
|
52
|
-
$codexHome = Join-Path $HOME '.codex'
|
|
53
|
-
}
|
|
54
|
-
|
|
69
|
+
$codexHome = Resolve-CodexHome -TargetScope $Scope -TargetProjectPath $ProjectPath
|
|
55
70
|
$skillsDest = Join-Path $codexHome 'skills'
|
|
56
71
|
New-Item -ItemType Directory -Force -Path $skillsDest | Out-Null
|
|
57
72
|
|
|
@@ -162,6 +177,11 @@ Get-ChildItem -LiteralPath $skillsSrc -Directory | ForEach-Object {
|
|
|
162
177
|
|
|
163
178
|
Write-Host ""
|
|
164
179
|
Write-Host "Skills installed into: $skillsDest"
|
|
180
|
+
Write-Host "Codex scope: $Scope"
|
|
181
|
+
if ($Scope -eq 'project') {
|
|
182
|
+
Write-Host "Project-local Codex installs are valid only when Codex is launched with CODEX_HOME=<project>/.codex."
|
|
183
|
+
Write-Host "This installer does not claim native .codex/skills auto-discovery."
|
|
184
|
+
}
|
|
165
185
|
if ($canonicalRulesHash) {
|
|
166
186
|
Write-Host "Canonical API ruleset: $canonicalRulesPath"
|
|
167
187
|
Write-Host "Canonical API ruleset SHA256: $canonicalRulesHash"
|
|
@@ -182,7 +202,7 @@ if ($canonicalFlowRulesHash) {
|
|
|
182
202
|
}
|
|
183
203
|
if ($canonicalTestCaseRulesHash) {
|
|
184
204
|
Write-Host "Canonical Test Case ruleset: $canonicalTestCaseRulesPath"
|
|
185
|
-
|
|
205
|
+
Write-Host "Canonical Test Case ruleset SHA256: $canonicalTestCaseRulesHash"
|
|
186
206
|
} else {
|
|
187
207
|
Write-Warning "Canonical Test Case ruleset not found: $canonicalTestCaseRulesPath"
|
|
188
208
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
param(
|
|
2
|
+
[ValidateSet('project', 'user')]
|
|
3
|
+
[string]$Scope = 'user',
|
|
4
|
+
[string]$ProjectPath,
|
|
2
5
|
[string]$SkillName,
|
|
3
6
|
[switch]$All,
|
|
4
7
|
[switch]$BackupExisting,
|
|
@@ -8,6 +11,29 @@ param(
|
|
|
8
11
|
$ErrorActionPreference = 'Stop'
|
|
9
12
|
Set-StrictMode -Version Latest
|
|
10
13
|
|
|
14
|
+
function Resolve-CodexHome {
|
|
15
|
+
param(
|
|
16
|
+
[Parameter(Mandatory = $true)][string]$TargetScope,
|
|
17
|
+
[string]$TargetProjectPath
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
if ($TargetScope -eq 'project') {
|
|
21
|
+
if (-not $TargetProjectPath -or $TargetProjectPath.Trim().Length -eq 0) {
|
|
22
|
+
throw "Project-local Codex uninstall requires -ProjectPath."
|
|
23
|
+
}
|
|
24
|
+
if (-not (Test-Path -LiteralPath $TargetProjectPath)) {
|
|
25
|
+
New-Item -ItemType Directory -Force -Path $TargetProjectPath | Out-Null
|
|
26
|
+
}
|
|
27
|
+
$projectRoot = (Resolve-Path -LiteralPath $TargetProjectPath).Path
|
|
28
|
+
return (Join-Path $projectRoot '.codex')
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if ($env:CODEX_HOME) {
|
|
32
|
+
return $env:CODEX_HOME
|
|
33
|
+
}
|
|
34
|
+
return (Join-Path $HOME '.codex')
|
|
35
|
+
}
|
|
36
|
+
|
|
11
37
|
function Backup-Directory {
|
|
12
38
|
param(
|
|
13
39
|
[Parameter(Mandatory = $true)][string]$SourcePath,
|
|
@@ -56,11 +82,7 @@ if ($SkillName) {
|
|
|
56
82
|
$targetNames = @($managedSkillNames)
|
|
57
83
|
}
|
|
58
84
|
|
|
59
|
-
$codexHome = $
|
|
60
|
-
if (-not $codexHome) {
|
|
61
|
-
$codexHome = Join-Path $HOME '.codex'
|
|
62
|
-
}
|
|
63
|
-
|
|
85
|
+
$codexHome = Resolve-CodexHome -TargetScope $Scope -TargetProjectPath $ProjectPath
|
|
64
86
|
$skillsDest = Join-Path $codexHome 'skills'
|
|
65
87
|
if (-not (Test-Path -LiteralPath $skillsDest)) {
|
|
66
88
|
Write-Host "Codex skills directory not found: $skillsDest"
|
|
@@ -103,6 +125,8 @@ foreach ($name in $targetNames) {
|
|
|
103
125
|
|
|
104
126
|
Write-Host ""
|
|
105
127
|
Write-Host "Uninstall summary:"
|
|
128
|
+
Write-Host "- Scope: $Scope"
|
|
129
|
+
Write-Host "- Destination: $skillsDest"
|
|
106
130
|
Write-Host "- Removed: $($removed.Count)"
|
|
107
131
|
if ($removed.Count -gt 0) {
|
|
108
132
|
$removed | ForEach-Object { Write-Host " - $_" }
|
|
@@ -113,4 +137,7 @@ if ($missing.Count -gt 0) {
|
|
|
113
137
|
}
|
|
114
138
|
if ($backupRootResolved) {
|
|
115
139
|
Write-Host "- Backup directory: $backupRootResolved"
|
|
116
|
-
}
|
|
140
|
+
}
|
|
141
|
+
if ($Scope -eq 'project') {
|
|
142
|
+
Write-Host "- Project-local Codex uninstall touched only SDTK-managed assets under <project>/.codex/skills."
|
|
143
|
+
}
|
|
@@ -36,6 +36,9 @@ Use them only when the user explicitly requests a manual legacy review or delega
|
|
|
36
36
|
- `READY_FOR_SDTK_CODE` when the current slice is concrete enough for downstream coding
|
|
37
37
|
- `BLOCKED_FOR_SDTK_CODE` when blockers remain
|
|
38
38
|
6. Generate `CODE_HANDOFF_*` with `toolkit/scripts/generate-code-handoff.ps1`.
|
|
39
|
+
- Canonical writer rule: the machine-readable JSON is generator-owned; do not hand-author or patch the JSON shape manually.
|
|
40
|
+
- If an existing `CODE_HANDOFF_*` file is non-canonical, regenerate it with the script and `-Force` instead of editing keys by hand.
|
|
41
|
+
- Use the script-owned snake_case contract only. Do not emit legacy camelCase keys such as `featureKey`, `requiredRefs`, `optionalRefs`, `openBlockers`, `implementationSlices`, `testObligations`, or `suggestedNextCommand`.
|
|
39
42
|
7. Mirror the same readiness decision in the final `SDTK-CODE Handoff` section of `FEATURE_IMPL_PLAN`.
|
|
40
43
|
8. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 4 to show planning/handoff completion status.
|
|
41
44
|
9. Handoff:
|
|
@@ -81,6 +84,7 @@ Do not:
|
|
|
81
84
|
- cite downstream readiness without fresh verification evidence for the claim
|
|
82
85
|
- use `should`, `probably`, or `seems` in place of executed checks
|
|
83
86
|
- rely on partial output, stale command runs, or unchecked agent reports
|
|
87
|
+
- manually compose `CODE_HANDOFF` JSON when the canonical generator script is available
|
|
84
88
|
|
|
85
89
|
If validation fails or cannot be run, report the handoff as blocked and explain the blocker.
|
|
86
90
|
|
|
@@ -6,16 +6,19 @@ description: Generate/modify Python Django REST Framework backend code following
|
|
|
6
6
|
# SDTK-SPEC Backend (Toolkit conventions)
|
|
7
7
|
|
|
8
8
|
## Critical Constraints
|
|
9
|
+
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
9
10
|
- I do not generate backend code without approved API and data-contract sources.
|
|
10
11
|
- I do not ignore established repository patterns when adding backend modules.
|
|
12
|
+
- I do not replace the default `sdtk-dev -> CODE_HANDOFF -> SDTK-CODE` path unless the user explicitly asks for a bounded specialist intervention inside current DEV scope.
|
|
11
13
|
|
|
12
14
|
## Process
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
15
|
+
1. Confirm this backend slice is a bounded specialist intervention under current DEV scope, not a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
16
|
+
2. Check whether this repository already has a backend reference module and follow its patterns.
|
|
17
|
+
3. Follow module structure: `src/backend/<module>/{models,view,service,serializers,validation,enum,urls.py}`.
|
|
18
|
+
4. Apply conventions:
|
|
16
19
|
- Soft delete via `del_flg`
|
|
17
20
|
- Audit fields (creator/updater/del timestamps)
|
|
18
21
|
- Permission checks before operations
|
|
19
22
|
- `transaction.atomic()` for writes
|
|
20
23
|
- Logging decorator on public endpoints
|
|
21
|
-
|
|
24
|
+
5. Add tests for critical business rules and state transitions.
|
|
@@ -6,14 +6,17 @@ description: Generate/modify React frontend code following the toolkit conventio
|
|
|
6
6
|
# SDTK-SPEC Frontend (Toolkit conventions)
|
|
7
7
|
|
|
8
8
|
## Critical Constraints
|
|
9
|
+
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
9
10
|
- I do not implement screens without current layout and flow-action sources.
|
|
10
11
|
- I do not bypass existing frontend patterns for loading, permissions, or labels.
|
|
12
|
+
- I do not replace the default `sdtk-dev -> CODE_HANDOFF -> SDTK-CODE` path unless the user explicitly asks for a bounded specialist intervention inside current DEV scope.
|
|
11
13
|
|
|
12
14
|
## Process
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
+
1. Confirm this frontend slice is a bounded specialist intervention under current DEV scope, not a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
16
|
+
2. Check whether this repository already has a frontend reference module and follow its patterns.
|
|
17
|
+
3. Follow structure:
|
|
15
18
|
- `src/frontend/features/{feature}/...`
|
|
16
19
|
- `src/frontend/services/{feature}/{feature}Service.js`
|
|
17
20
|
- `src/frontend/services/apiHook/{feature}.js`
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
4. Implement screens based on `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`.
|
|
22
|
+
5. Preserve patterns: React Query hooks, loading states, permission checks, consistent labels.
|
|
@@ -8,6 +8,9 @@ description: QA workflow for SDTK-SPEC. Use when you need to validate downstream
|
|
|
8
8
|
## Critical Constraints
|
|
9
9
|
- I do not start QA handoff or release decision work until downstream implementation evidence exists, normally from SDTK-CODE.
|
|
10
10
|
- I do not approve without exact specification quotes and fresh verification evidence.
|
|
11
|
+
- `OPS_HANDOFF_[FEATURE_KEY].json` alone is not sufficient final release evidence.
|
|
12
|
+
- When operationalization is in scope, I require both CODE evidence and OPS evidence before I can issue `APPROVED`.
|
|
13
|
+
- I remain the final release authority for the QA verdict and do not hand final release-status ownership back to PM after QA approval.
|
|
11
14
|
|
|
12
15
|
## Output
|
|
13
16
|
- `docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md`
|
|
@@ -15,8 +18,8 @@ description: QA workflow for SDTK-SPEC. Use when you need to validate downstream
|
|
|
15
18
|
- `docs/qa/[FEATURE_KEY]_TEST_CASE.md` via `sdtk-test-case-spec`
|
|
16
19
|
|
|
17
20
|
## Process
|
|
18
|
-
1. Validate prerequisites: `FEATURE_IMPL_PLAN`, `CODE_HANDOFF`,
|
|
19
|
-
2. Treat SDTK-CODE workflow evidence as the normal bridge into QA,
|
|
21
|
+
1. Validate prerequisites: `FEATURE_IMPL_PLAN`, `CODE_HANDOFF`, `OPS_HANDOFF`, downstream implementation evidence, and downstream operational evidence are available and reference the same feature scope.
|
|
22
|
+
2. Treat SDTK-CODE workflow evidence as the normal bridge into QA. In the current formal suite flow, `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json` plus downstream operational evidence are also required before final release approval.
|
|
20
23
|
3. Create test strategy mapped to UC/AC.
|
|
21
24
|
4. If test-case specification artifact is required, invoke `sdtk-test-case-spec` and align counts/coverage with release testing scope. Keep the structured TEST_CASE total consistent with the release-report baseline; track E2E separately if needed.
|
|
22
25
|
5. Apply `governance/ai/core/SDTK_BENCHMARK_QA_MODE_POLICY.md` for benchmark-mode verdict rules when no executable build exists.
|
|
@@ -24,9 +27,10 @@ description: QA workflow for SDTK-SPEC. Use when you need to validate downstream
|
|
|
24
27
|
7. Execute the required checks, record the commands used, and capture the actual results (unit/integration/e2e or document review evidence as applicable).
|
|
25
28
|
8. When validating requirement behavior, quote the exact specification text before recording a match or mismatch.
|
|
26
29
|
9. Record defects with severity and status.
|
|
27
|
-
10.
|
|
28
|
-
11.
|
|
29
|
-
12.
|
|
30
|
+
10. Record `CODE_HANDOFF`, `OPS_HANDOFF`, CODE evidence, and OPS evidence in the QA release artifact.
|
|
31
|
+
11. Decide: APPROVED vs REJECTED only after fresh verification evidence supports the verdict. Missing required OPS evidence blocks APPROVED in the current formal suite flow.
|
|
32
|
+
12. Update shared state + Phase 5 checklist.
|
|
33
|
+
13. Handoff: notify `@pm` and other stakeholders of the recorded QA release decision and any required follow-up, without reassigning final QA release authority.
|
|
30
34
|
|
|
31
35
|
## Verification Before Completion
|
|
32
36
|
Apply `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md` and require fresh verification evidence before any QA verdict or handoff.
|
|
@@ -50,3 +54,8 @@ Apply it to BA, PRD or BACKLOG, ARCH, API, DB, and flow-action sources whenever
|
|
|
50
54
|
Do not start QA handoff, release testing, or release decision work until downstream implementation evidence is documented for the current feature, normally from SDTK-CODE `verify`/`ship` outputs or equivalent coding-review evidence.
|
|
51
55
|
|
|
52
56
|
If downstream implementation evidence is missing or stale, keep the work blocked and request a refreshed downstream handoff before QA starts.
|
|
57
|
+
|
|
58
|
+
Block final QA approval until:
|
|
59
|
+
- `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json` exists and matches the current feature scope
|
|
60
|
+
- downstream OPS evidence is present and current
|
|
61
|
+
- QA release notes show both CODE evidence and OPS evidence as separate first-class inputs
|
package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# Export
|
|
1
|
+
# Export images from Excel sheets with pictures or shapes
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## When to use this
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
5
|
+
- The source sheet contains pictures or shapes instead of plain cell text.
|
|
6
|
+
- You need a real image export for markdown embedding or numbered overlays.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Known issues and root causes
|
|
9
9
|
|
|
10
|
-
1) `Chart.Export()`
|
|
11
|
-
-
|
|
10
|
+
1) `Chart.Export()` produces a blank PNG (~1.3KB)
|
|
11
|
+
- Root cause: Excel COM chart/picture export is unreliable for complex grouped objects or pictures.
|
|
12
12
|
|
|
13
|
-
2)
|
|
14
|
-
- Excel
|
|
15
|
-
-
|
|
13
|
+
2) Wrong image folder path when using Save As HTML
|
|
14
|
+
- Excel writes image assets to a folder named `<basename>.files`
|
|
15
|
+
- Example: `export.html` -> folder `export.files` (not `export.html.files`).
|
|
16
16
|
|
|
17
17
|
3) Excel COM crash / OLE error `0x800a01a8`
|
|
18
|
-
-
|
|
18
|
+
- Common root cause: calling `Quit()` on the wrong Excel instance, especially when using `Dispatch`.
|
|
19
19
|
|
|
20
|
-
4)
|
|
21
|
-
-
|
|
20
|
+
4) Two-digit markers lose one digit (`10` displays like `1`)
|
|
21
|
+
- Root cause: the oval is too small and the wrap/alignment settings are not appropriate.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Recommended automated approach
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Use the repo script, for example:
|
|
26
26
|
`Requirements/_generate_numbered_screen_images.py`
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
- Flatten
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
28
|
+
The script should ensure:
|
|
29
|
+
- Flatten grouped content and use Save As HTML to get a real PNG export and avoid blank PNG output.
|
|
30
|
+
- Use `DispatchEx` when opening a dedicated Excel instance for overlay work to avoid quitting the wrong instance.
|
|
31
|
+
- Increase oval size and disable `WordWrap` so 2-3 digit markers remain visible.
|
|
32
|
+
- Use the correct `.files` folder convention when exporting HTML.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Run it from the project root, for example:
|
|
35
35
|
```powershell
|
|
36
36
|
python Requirements\_generate_numbered_screen_images.py
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Manual fallback approach
|
|
40
40
|
|
|
41
|
-
1)
|
|
42
|
-
2) Paste
|
|
41
|
+
1) Open Excel -> select the UI area to export (picture/group) -> Copy as Picture.
|
|
42
|
+
2) Paste it into a blank sheet or a new workbook.
|
|
43
43
|
3) Save As -> "Web Page (*.htm; *.html)".
|
|
44
|
-
4)
|
|
45
|
-
5) Copy
|
|
44
|
+
4) Open the `<basename>.files` folder -> choose the `imageXXX.png` file with the most appropriate size.
|
|
45
|
+
5) Copy it into `docs/specs/assets/[feature_snake]/screens/` and rename it according to the naming convention.
|
|
46
46
|
|
|
47
|
-
##
|
|
47
|
+
## If the script fails because Excel renamed a picture
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
49
|
+
If the script references a `picture_name` such as `Picture 4` or `Picture 7`, and Excel renamed it:
|
|
50
|
+
- Open Excel -> select the picture -> inspect or rename it in the Selection Pane, or
|
|
51
|
+
- Update the `picture_name` in the script.
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
# Figma MCP:
|
|
1
|
+
# Figma MCP: extract layout, styling, tokens, and screen images
|
|
2
2
|
|
|
3
|
-
## Parse
|
|
3
|
+
## Parse the Figma URL
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Example URL:
|
|
6
6
|
`https://www.figma.com/design/<fileKey>/<fileName>?node-id=<nodeId>&m=dev&t=...`
|
|
7
7
|
|
|
8
|
-
- `fileKey` = segment
|
|
8
|
+
- `fileKey` = the segment after `/design/`.
|
|
9
9
|
- `nodeId`:
|
|
10
10
|
- query param `node-id=1-2695`
|
|
11
|
-
-
|
|
11
|
+
- convert to API format: `1:2695` (replace `-` with `:`).
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Fetch layout and styling data first
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Use MCP:
|
|
16
16
|
- `mcp__figma__get_figma_data`
|
|
17
17
|
- Input: `fileKey`, `nodeId`
|
|
18
|
-
-
|
|
18
|
+
- Recommendation: try `depth=2` or `depth=3` first, then increase only if data is missing.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
When summarizing into `docs/specs/[FEATURE_KEY]_FIGMA_LAYOUT.md`, keep this structure:
|
|
21
21
|
- Design Structure: frame dimensions, components/instances, key layers, variants/properties.
|
|
22
22
|
- Styling Data: color (Hex/RGB), typography (font/size/weight/line-height), shadow/opacity/border.
|
|
23
23
|
- Layout Information: padding/gap/alignment, width/height, border radius.
|
|
24
|
-
- Design Tokens: color/typography/spacing tokens
|
|
24
|
+
- Design Tokens: color/typography/spacing tokens when named styles exist (for example `style_...`).
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Handle `429` and partial data
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
1)
|
|
30
|
-
2)
|
|
31
|
-
3)
|
|
28
|
+
If you hit `429 Too Many Requests`:
|
|
29
|
+
1) Reduce `depth` and try again.
|
|
30
|
+
2) Wait and retry with backoff (20s -> 40s -> 80s).
|
|
31
|
+
3) If it still fails, leave the unavailable sections blank and record a clear note that the omission is due to `429`.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Do not invent colors, typography, or tokens when the source data is unavailable.
|
|
34
34
|
|
|
35
|
-
## Export
|
|
35
|
+
## Export screen images
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Use MCP:
|
|
38
38
|
- `mcp__figma__download_figma_images`
|
|
39
|
-
- Input: `fileKey`,
|
|
39
|
+
- Input: `fileKey`, list of `nodes` (`nodeId`), `fileName` (`png`), `pngScale` (usually `2`).
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
41
|
+
Notes for `localPath`:
|
|
42
|
+
- Some environments block absolute paths.
|
|
43
|
+
- Use a repo-relative temp folder first, for example `Requirements/_tmp/figma_downloads`, then copy the images into:
|
|
44
44
|
- `docs/specs/assets/[feature_snake]/screens/`
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## Image naming convention
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Use stable filenames so markdown embeds do not need frequent updates, for example:
|
|
49
49
|
- `screen_3_1_main.png`
|
|
50
50
|
- `screen_3_2_search.png`
|
|
51
51
|
- `screen_3_3_dialog.png`
|
|
52
52
|
- `screen_3_3_dialog_numbered.png`
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
If an image is later replaced by an Excel-derived export, keep the same filename to avoid rewriting multiple markdown links.
|
|
@@ -146,7 +146,7 @@ skills:
|
|
|
146
146
|
- name: sdtk-dev-backend
|
|
147
147
|
phase: dev
|
|
148
148
|
role_tag: /dev-backend
|
|
149
|
-
use_when:
|
|
149
|
+
use_when: Bounded backend specialist aid under `/dev` for a scoped feature slice. It does not create a separate owner root or replace the default `DEV-Plan -> DEV-Code` path.
|
|
150
150
|
primary_inputs:
|
|
151
151
|
- docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md
|
|
152
152
|
- docs/api/[FeaturePascal]_API.yaml
|
|
@@ -157,6 +157,7 @@ skills:
|
|
|
157
157
|
hard_gates:
|
|
158
158
|
- Do not generate backend code without approved API and data-contract sources.
|
|
159
159
|
- Follow existing repository patterns before introducing new module structure.
|
|
160
|
+
- Do not treat `/dev-backend` as a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
160
161
|
references: []
|
|
161
162
|
prompts: []
|
|
162
163
|
scripts: []
|
|
@@ -167,7 +168,7 @@ skills:
|
|
|
167
168
|
- name: sdtk-dev-frontend
|
|
168
169
|
phase: dev
|
|
169
170
|
role_tag: /dev-frontend
|
|
170
|
-
use_when:
|
|
171
|
+
use_when: Bounded frontend specialist aid under `/dev` for a scoped feature slice. It does not create a separate owner root or replace the default `DEV-Plan -> DEV-Code` path.
|
|
171
172
|
primary_inputs:
|
|
172
173
|
- docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md
|
|
173
174
|
- docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md
|
|
@@ -178,6 +179,7 @@ skills:
|
|
|
178
179
|
hard_gates:
|
|
179
180
|
- Do not implement screens without the current design and flow-action source.
|
|
180
181
|
- Preserve existing frontend patterns before introducing new abstractions.
|
|
182
|
+
- Do not treat `/dev-frontend` as a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
181
183
|
references: []
|
|
182
184
|
prompts: []
|
|
183
185
|
scripts: []
|
|
@@ -48,6 +48,9 @@ If no arguments provided, read current feature context from SHARED_PLANNING.md.
|
|
|
48
48
|
- `READY_FOR_SDTK_CODE`, or
|
|
49
49
|
- `BLOCKED_FOR_SDTK_CODE`
|
|
50
50
|
6. Generate `CODE_HANDOFF_*` with `toolkit/scripts/generate-code-handoff.ps1`.
|
|
51
|
+
- Canonical writer rule: the machine-readable JSON is generator-owned; do not hand-author or patch the JSON shape manually.
|
|
52
|
+
- If an existing `CODE_HANDOFF_*` file is non-canonical, regenerate it with the script and `-Force` instead of editing keys by hand.
|
|
53
|
+
- Use the script-owned snake_case contract only. Do not emit legacy camelCase keys such as `featureKey`, `requiredRefs`, `optionalRefs`, `openBlockers`, `implementationSlices`, `testObligations`, or `suggestedNextCommand`.
|
|
51
54
|
7. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 4.
|
|
52
55
|
8. If ready, suggest:
|
|
53
56
|
- `sdtk-code start --feature-key <KEY> --lane <feature|bugfix> --project-path .`
|
|
@@ -27,7 +27,7 @@ If no arguments provided, read current feature context from SHARED_PLANNING.md.
|
|
|
27
27
|
## Initialize
|
|
28
28
|
- Ensure feature key + feature name exist (ask if missing).
|
|
29
29
|
- Read `sdtk-spec.config.json` (project stack + commands) if present.
|
|
30
|
-
- Run `sdtk generate --feature-key <KEY> --feature-name "<NAME>"` to create skeleton artifacts.
|
|
30
|
+
- Run `sdtk-spec generate --feature-key <KEY> --feature-name "<NAME>"` to create skeleton artifacts.
|
|
31
31
|
|
|
32
32
|
## Execute pipeline (one phase per turn)
|
|
33
33
|
- Default role: PM (entry point) if user did not specify.
|
|
@@ -7,14 +7,15 @@ description: QA workflow for SDTK-SPEC. Use when you need to validate downstream
|
|
|
7
7
|
1. Pipeline: PM Initiation -> BA Analysis -> PM Planning -> Architecture Design -> Development Planning + SDTK-CODE Handoff -> QA Validation
|
|
8
8
|
2. After completing phase work: update SHARED_PLANNING.md + QUALITY_CHECKLIST.md
|
|
9
9
|
3. If unclear: log OQ-xx in artifact, escalate to PM
|
|
10
|
-
4. Traceability: REQ -> BR/UC/AC -> design -> backlog -> FEATURE_IMPL_PLAN -> CODE_HANDOFF -> downstream implementation evidence -> QA
|
|
11
|
-
5. QA waits for downstream implementation evidence, normally from SDTK-CODE
|
|
10
|
+
4. Traceability: REQ -> BR/UC/AC -> design -> backlog -> FEATURE_IMPL_PLAN -> CODE_HANDOFF -> downstream implementation evidence -> OPS_HANDOFF + downstream OPS evidence -> QA
|
|
11
|
+
5. QA waits for downstream implementation evidence, normally from SDTK-CODE, plus downstream OPS evidence in the current formal suite flow
|
|
12
12
|
6. Do not skip phases. If inputs are missing, ask focused questions.
|
|
13
13
|
|
|
14
14
|
## Prerequisites (verify before proceeding)
|
|
15
15
|
Read QUALITY_CHECKLIST.md and verify:
|
|
16
16
|
- Phase 4 DEV gate must show planning/handoff completion.
|
|
17
17
|
- Downstream implementation evidence exists for the same feature scope.
|
|
18
|
+
- `OPS_HANDOFF` and downstream OPS evidence exist for the same feature scope.
|
|
18
19
|
|
|
19
20
|
If prerequisites are not met, report which gate or downstream evidence is missing and suggest user complete `/dev` or the SDTK-CODE flow first.
|
|
20
21
|
|
|
@@ -37,14 +38,15 @@ If no arguments are provided, read current feature context from SHARED_PLANNING.
|
|
|
37
38
|
- `docs/qa/[FEATURE_KEY]_TEST_CASE.md` via `/test-case-spec`
|
|
38
39
|
|
|
39
40
|
## Process
|
|
40
|
-
1. Validate prerequisites: `FEATURE_IMPL_PLAN`, `CODE_HANDOFF`,
|
|
41
|
-
2. Treat SDTK-CODE workflow evidence as the normal bridge into QA,
|
|
41
|
+
1. Validate prerequisites: `FEATURE_IMPL_PLAN`, `CODE_HANDOFF`, `OPS_HANDOFF`, downstream implementation evidence, and downstream OPS evidence are available and aligned.
|
|
42
|
+
2. Treat SDTK-CODE workflow evidence as the normal bridge into QA. In the current formal suite flow, `OPS_HANDOFF` plus downstream OPS evidence are also required before final QA approval.
|
|
42
43
|
3. Create test strategy mapped to UC/AC.
|
|
43
44
|
4. If test-case specification artifact is required, invoke `/test-case-spec` and align counts/coverage with release testing scope. Keep the structured TEST_CASE total consistent with the release-report baseline; track E2E separately if needed.
|
|
44
45
|
5. Apply `governance/ai/core/SDTK_BENCHMARK_QA_MODE_POLICY.md` for benchmark-mode verdict rules when no executable build exists.
|
|
45
46
|
6. If acceptance criteria / expected behavior is unclear, record OQ-xx in QA report and preserve benchmark-expected ambiguity per `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md`; escalate to PM.
|
|
46
47
|
7. Execute/record results (unit/integration/e2e as applicable).
|
|
47
48
|
8. Record defects with severity and status.
|
|
48
|
-
9.
|
|
49
|
-
10.
|
|
50
|
-
11.
|
|
49
|
+
9. Record `CODE_HANDOFF`, `OPS_HANDOFF`, CODE evidence, and OPS evidence in the QA release artifact.
|
|
50
|
+
10. Decide: APPROVED vs REJECTED (with reasons). `OPS_HANDOFF` alone is not sufficient final release evidence, and missing required OPS evidence blocks approval.
|
|
51
|
+
11. Update shared state + Phase 5 checklist.
|
|
52
|
+
12. Handoff: suggest user run `/pm` to finalize release status if approved.
|
|
@@ -84,13 +84,16 @@
|
|
|
84
84
|
|---|----------|--------|-------------|--------------|------|
|
|
85
85
|
| 1 | Test Strategy covers all critical paths + unclear ACs escalated (OQ-xx) | [ ] Pending | QA Agent | | |
|
|
86
86
|
| 2 | Test case specification updated (`[FEATURE_KEY]_TEST_CASE.md`) when detailed test design scope exists | [ ] Pending | QA Agent | | |
|
|
87
|
-
| 3 |
|
|
88
|
-
| 4 |
|
|
89
|
-
| 5 |
|
|
90
|
-
| 6 |
|
|
91
|
-
| 7 |
|
|
92
|
-
| 8 |
|
|
93
|
-
|
|
|
87
|
+
| 3 | CODE evidence reviewed and aligned to `CODE_HANDOFF_[FEATURE_KEY].json` | [ ] Pending | QA Agent | | |
|
|
88
|
+
| 4 | `OPS_HANDOFF_[FEATURE_KEY].json` reviewed and aligned to tested scope | [ ] Pending | QA Agent | | |
|
|
89
|
+
| 5 | OPS evidence reviewed and sufficient | [ ] Pending | QA Agent | Missing required OPS evidence blocks approval | |
|
|
90
|
+
| 6 | **E2E Tests:** P1 flows PASS (if applicable) | [ ] Pending | QA Agent | | |
|
|
91
|
+
| 7 | **Defects:** 0 HIGH severity open | [ ] Pending | QA Agent | | |
|
|
92
|
+
| 8 | **Coverage:** meets targets | [ ] Pending | QA Agent | | |
|
|
93
|
+
| 9 | No flaky tests | [ ] Pending | QA Agent | | |
|
|
94
|
+
| 10 | Performance meets NFRs | [ ] Pending | QA Agent | | |
|
|
95
|
+
| 11 | Release Report complete | [ ] Pending | QA Agent | | |
|
|
96
|
+
| **12** | **QA APPROVED** | [ ] Pending | **QA Gate** | **Record QA final decision; notify @pm for stakeholder communication and PM closure follow-up** | |
|
|
94
97
|
|
|
95
98
|
---
|
|
96
99
|
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
## 5. SDTK-CODE HANDOFF
|
|
63
63
|
|
|
64
64
|
**Canonical machine artifact:** `docs/dev/CODE_HANDOFF_{{FEATURE_KEY}}.json`
|
|
65
|
+
- Generator-owned artifact: write or refresh it with `toolkit/scripts/generate-code-handoff.ps1`
|
|
66
|
+
- Do not hand-author the JSON shape or copy planning tables directly into the JSON
|
|
67
|
+
- Use canonical snake_case keys only; do not use legacy camelCase keys such as `featureKey`, `requiredRefs`, or `suggestedNextCommand`
|
|
65
68
|
|
|
66
69
|
### 5.1 Handoff Status
|
|
67
70
|
- `READY_FOR_SDTK_CODE` or `BLOCKED_FOR_SDTK_CODE`
|