sdtk-spec-kit 0.4.11 → 0.4.14
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 +353 -353
- package/assets/atlas/build_atlas.py +880 -880
- package/assets/atlas/doc_atlas_viewer_template.html +3796 -3796
- package/assets/atlas/vendor/mermaid.min.js +2029 -2029
- package/assets/keys/spec-entitlement-public.pem +9 -9
- package/assets/manifest/toolkit-bundle.manifest.json +496 -496
- package/assets/manifest/toolkit-bundle.sha256.txt +97 -97
- package/assets/toolkit/toolkit/AGENTS.md +157 -241
- package/assets/toolkit/toolkit/README.md +51 -51
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +206 -206
- package/assets/toolkit/toolkit/install.ps1 +362 -362
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +95 -91
- package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +70 -69
- package/assets/toolkit/toolkit/scripts/agents/run-claude-task.ps1 +332 -332
- package/assets/toolkit/toolkit/scripts/agents/run-codex-task.ps1 +618 -618
- package/assets/toolkit/toolkit/scripts/agents/validate-mailbox-formal-artifact.py +87 -87
- package/assets/toolkit/toolkit/scripts/generate-code-handoff.ps1 +317 -317
- package/assets/toolkit/toolkit/scripts/init-feature.ps1 +262 -262
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +180 -180
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +209 -209
- package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +139 -139
- package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +143 -143
- package/assets/toolkit/toolkit/sdtk-spec.config.json +28 -28
- package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +50 -50
- package/assets/toolkit/toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md +46 -46
- package/assets/toolkit/toolkit/session/SDTK_AGENT_WORKING_RULES.md +48 -48
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +111 -111
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +732 -732
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +79 -79
- package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -85
- package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +46 -46
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +91 -91
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +246 -246
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +133 -133
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +34 -34
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +60 -60
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +41 -41
- package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +80 -80
- package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +80 -80
- package/assets/toolkit/toolkit/skills/sdtk-mailbox-dispatch/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +176 -108
- package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +74 -74
- package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +75 -75
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +108 -107
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +51 -51
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +54 -54
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +28 -28
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +136 -136
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +414 -414
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +110 -110
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +97 -97
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +330 -330
- package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +116 -116
- package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +87 -87
- package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +59 -59
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +67 -67
- package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +91 -91
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +59 -59
- package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills-claude/mailbox-dispatch/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +88 -42
- package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +88 -88
- package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +58 -58
- package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +113 -112
- package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +115 -115
- package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +124 -124
- package/assets/toolkit/toolkit/templates/README.md +68 -68
- package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +81 -81
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +21 -21
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +67 -67
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
- package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +229 -229
- package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +20 -20
- package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +20 -20
- package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +128 -128
- package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +12 -12
- package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +109 -109
- package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +175 -175
- package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +60 -60
- package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +117 -117
- package/assets/toolkit/toolkit/templates/docs/dev/OPS_HANDOFF_CREATION_RULES.md +369 -369
- package/assets/toolkit/toolkit/templates/docs/discovery/REQUIREMENT_TEMPLATE.md +155 -155
- package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +50 -50
- package/assets/toolkit/toolkit/templates/docs/product/CONDENSED_UPSTREAM_INPUT_TEMPLATE.md +276 -276
- package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +66 -66
- package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +98 -98
- package/assets/toolkit/toolkit/templates/docs/qa/CONTROLLER_ACCEPTANCE_TEMPLATE.md +90 -90
- package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +162 -162
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +129 -129
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +104 -104
- package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +139 -139
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +197 -197
- package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +31 -31
- package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +28 -28
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +26 -26
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +20 -20
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +33 -33
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md +60 -60
- package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +30 -30
- package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +26 -26
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md +63 -63
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md +76 -76
- package/bin/sdtk.js +15 -15
- package/package.json +48 -48
- package/src/commands/activate.js +94 -94
- package/src/commands/atlas.js +339 -339
- package/src/commands/auth.js +85 -85
- package/src/commands/entitlement.js +170 -170
- package/src/commands/generate.js +191 -170
- package/src/commands/help.js +248 -246
- package/src/commands/init.js +117 -117
- package/src/commands/project.js +51 -51
- package/src/commands/runtime.js +239 -239
- package/src/commands/update.js +11 -11
- package/src/index.js +68 -68
- package/src/lib/activation-state.js +68 -68
- package/src/lib/args.js +116 -116
- package/src/lib/atlas-config.js +200 -200
- package/src/lib/atlas-runner.js +435 -435
- package/src/lib/browser-open.js +39 -39
- package/src/lib/capabilities.js +89 -89
- package/src/lib/entitlements.js +245 -245
- package/src/lib/errors.js +41 -41
- package/src/lib/github-access.js +143 -143
- package/src/lib/legacy-auth-migration.js +56 -56
- package/src/lib/license-activation.js +386 -386
- package/src/lib/powershell.js +85 -85
- package/src/lib/premium-loader.js +124 -124
- package/src/lib/premium-packs.js +333 -333
- package/src/lib/premium-sync.js +235 -235
- package/src/lib/project-audit.js +332 -332
- package/src/lib/project-config.js +108 -108
- package/src/lib/project-ingest.js +450 -450
- package/src/lib/project-refresh.js +666 -666
- package/src/lib/project-target-guard.js +79 -79
- package/src/lib/requirement-analysis.js +14 -4
- package/src/lib/scope.js +83 -83
- package/src/lib/state.js +74 -74
- package/src/lib/suite-state.js +70 -70
- package/src/lib/toolkit-payload.js +99 -99
- package/src/lib/update.js +333 -333
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ba
|
|
3
|
-
description: Business Analyst workflow for SDTK-SPEC. Use when you need to turn PM initiation into BA_SPEC with glossary, business rules (BR-xx), use cases (UC-xx), acceptance criteria (AC-xx), NFRs, risks, open questions, and a traceability matrix.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## SDTK-SPEC Pipeline Rules (always apply)
|
|
7
|
-
1. Pipeline: PM Initiation -> BA Analysis -> PM Planning -> Architecture Design -> Development + Review -> QA Validation
|
|
8
|
-
2. After completing phase work: update SHARED_PLANNING.md + QUALITY_CHECKLIST.md
|
|
9
|
-
3. If unclear: log OQ-xx in artifact, escalate to PM
|
|
10
|
-
4. Traceability: REQ -> BR/UC/AC -> design -> backlog -> code/tests -> QA
|
|
11
|
-
5. Code review must be COMPLETE before QA phase can start
|
|
12
|
-
6. Do not skip phases. If inputs are missing, ask focused questions.
|
|
13
|
-
|
|
14
|
-
## Prerequisites (verify before proceeding)
|
|
15
|
-
Read QUALITY_CHECKLIST.md and verify:
|
|
16
|
-
- Phase 1 PM Init gate must show all items [x] Done.
|
|
17
|
-
|
|
18
|
-
If prerequisites are not met, report which gate is missing and suggest user run `/pm` first.
|
|
19
|
-
|
|
20
|
-
## Current Context
|
|
21
|
-
- Config: !`node -e "try{process.stdout.write(require('fs').readFileSync('sdtk-spec.config.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
22
|
-
- Pipeline: !`node -e "try{process.stdout.write(require('fs').readFileSync('SHARED_PLANNING.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
23
|
-
- Gates: !`node -e "try{process.stdout.write(require('fs').readFileSync('QUALITY_CHECKLIST.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
24
|
-
- State: !`node -e "try{process.stdout.write(require('fs').readFileSync('.sdtk/orchestration-state.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
25
|
-
|
|
26
|
-
## Input
|
|
27
|
-
$ARGUMENTS
|
|
28
|
-
|
|
29
|
-
If no arguments are provided, read current feature context from SHARED_PLANNING.md.
|
|
30
|
-
|
|
31
|
-
# SDTK-SPEC BA (Business Analysis)
|
|
32
|
-
|
|
33
|
-
## Output
|
|
34
|
-
- `docs/specs/BA_SPEC_[FEATURE_KEY].md`
|
|
35
|
-
|
|
36
|
-
## Optional: Condensed Upstream Input
|
|
37
|
-
|
|
38
|
-
If a condensed upstream input package was produced before PM initiation, read it
|
|
39
|
-
alongside `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`. The package is at:
|
|
40
|
-
`docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md`
|
|
41
|
-
|
|
42
|
-
The condensed package is a DRAFT accelerator only. All derived actors, entities,
|
|
43
|
-
rules, and acceptance criteria require human review before adoption. Do not treat
|
|
44
|
-
draft content as authoritative without explicit PM or maintainer confirmation.
|
|
45
|
-
|
|
46
|
-
For approval/workflow domain packages, the condensed package also includes a
|
|
47
|
-
Role Matrix, State Set, State Transitions, and Policy And Approval Rules
|
|
48
|
-
sections. When producing BR-xx and UC-xx items in BA_SPEC, read these sections
|
|
49
|
-
alongside the Actors and Workflow Entities sections. Any unresolved open
|
|
50
|
-
questions from the Open Questions For Human Review section must be carried
|
|
51
|
-
forward as explicit OQ-xx items in BA_SPEC rather than silently resolved.
|
|
52
|
-
|
|
53
|
-
## Process
|
|
54
|
-
1. Read `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md` and any source requirements.
|
|
55
|
-
2. Produce:
|
|
56
|
-
- Glossary
|
|
57
|
-
- BR-xx (numbered)
|
|
58
|
-
- UC-xx (cover 100% REQ-xx)
|
|
59
|
-
- AC-xx (mapped to UC/BR)
|
|
60
|
-
- NFR-xx
|
|
61
|
-
- Risks + Open Questions
|
|
62
|
-
- Traceability summary table (REQ -> UC/BR/AC)
|
|
63
|
-
3. If source requirements are VI/JP, preserve the original text and add a literal EN translation in appendices.
|
|
64
|
-
4. For benchmark runs, apply `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md`: keep benchmark-expected open questions explicitly OPEN and do not silently resolve them in BA output.
|
|
65
|
-
5. If anything is unclear, record OQ-xx in BA_SPEC "Open Questions" and escalate to PM.
|
|
66
|
-
6. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 2.
|
|
67
|
-
7. Handoff: suggest user run `/pm` to proceed with PRD planning.
|
|
1
|
+
---
|
|
2
|
+
name: ba
|
|
3
|
+
description: Business Analyst workflow for SDTK-SPEC. Use when you need to turn PM initiation into BA_SPEC with glossary, business rules (BR-xx), use cases (UC-xx), acceptance criteria (AC-xx), NFRs, risks, open questions, and a traceability matrix.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## SDTK-SPEC Pipeline Rules (always apply)
|
|
7
|
+
1. Pipeline: PM Initiation -> BA Analysis -> PM Planning -> Architecture Design -> Development + Review -> QA Validation
|
|
8
|
+
2. After completing phase work: update SHARED_PLANNING.md + QUALITY_CHECKLIST.md
|
|
9
|
+
3. If unclear: log OQ-xx in artifact, escalate to PM
|
|
10
|
+
4. Traceability: REQ -> BR/UC/AC -> design -> backlog -> code/tests -> QA
|
|
11
|
+
5. Code review must be COMPLETE before QA phase can start
|
|
12
|
+
6. Do not skip phases. If inputs are missing, ask focused questions.
|
|
13
|
+
|
|
14
|
+
## Prerequisites (verify before proceeding)
|
|
15
|
+
Read QUALITY_CHECKLIST.md and verify:
|
|
16
|
+
- Phase 1 PM Init gate must show all items [x] Done.
|
|
17
|
+
|
|
18
|
+
If prerequisites are not met, report which gate is missing and suggest user run `/pm` first.
|
|
19
|
+
|
|
20
|
+
## Current Context
|
|
21
|
+
- Config: !`node -e "try{process.stdout.write(require('fs').readFileSync('sdtk-spec.config.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
22
|
+
- Pipeline: !`node -e "try{process.stdout.write(require('fs').readFileSync('SHARED_PLANNING.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
23
|
+
- Gates: !`node -e "try{process.stdout.write(require('fs').readFileSync('QUALITY_CHECKLIST.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
24
|
+
- State: !`node -e "try{process.stdout.write(require('fs').readFileSync('.sdtk/orchestration-state.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
25
|
+
|
|
26
|
+
## Input
|
|
27
|
+
$ARGUMENTS
|
|
28
|
+
|
|
29
|
+
If no arguments are provided, read current feature context from SHARED_PLANNING.md.
|
|
30
|
+
|
|
31
|
+
# SDTK-SPEC BA (Business Analysis)
|
|
32
|
+
|
|
33
|
+
## Output
|
|
34
|
+
- `docs/specs/BA_SPEC_[FEATURE_KEY].md`
|
|
35
|
+
|
|
36
|
+
## Optional: Condensed Upstream Input
|
|
37
|
+
|
|
38
|
+
If a condensed upstream input package was produced before PM initiation, read it
|
|
39
|
+
alongside `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`. The package is at:
|
|
40
|
+
`docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md`
|
|
41
|
+
|
|
42
|
+
The condensed package is a DRAFT accelerator only. All derived actors, entities,
|
|
43
|
+
rules, and acceptance criteria require human review before adoption. Do not treat
|
|
44
|
+
draft content as authoritative without explicit PM or maintainer confirmation.
|
|
45
|
+
|
|
46
|
+
For approval/workflow domain packages, the condensed package also includes a
|
|
47
|
+
Role Matrix, State Set, State Transitions, and Policy And Approval Rules
|
|
48
|
+
sections. When producing BR-xx and UC-xx items in BA_SPEC, read these sections
|
|
49
|
+
alongside the Actors and Workflow Entities sections. Any unresolved open
|
|
50
|
+
questions from the Open Questions For Human Review section must be carried
|
|
51
|
+
forward as explicit OQ-xx items in BA_SPEC rather than silently resolved.
|
|
52
|
+
|
|
53
|
+
## Process
|
|
54
|
+
1. Read `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md` and any source requirements.
|
|
55
|
+
2. Produce:
|
|
56
|
+
- Glossary
|
|
57
|
+
- BR-xx (numbered)
|
|
58
|
+
- UC-xx (cover 100% REQ-xx)
|
|
59
|
+
- AC-xx (mapped to UC/BR)
|
|
60
|
+
- NFR-xx
|
|
61
|
+
- Risks + Open Questions
|
|
62
|
+
- Traceability summary table (REQ -> UC/BR/AC)
|
|
63
|
+
3. If source requirements are VI/JP, preserve the original text and add a literal EN translation in appendices.
|
|
64
|
+
4. For benchmark runs, apply `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md`: keep benchmark-expected open questions explicitly OPEN and do not silently resolve them in BA output.
|
|
65
|
+
5. If anything is unclear, record OQ-xx in BA_SPEC "Open Questions" and escalate to PM.
|
|
66
|
+
6. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 2.
|
|
67
|
+
7. Handoff: suggest user run `/pm` to proceed with PRD planning.
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: design-layout
|
|
3
|
-
description: Generate UI screen layout documentation for a feature, including PlantUML SALT wireframes and item tables. Use when a feature includes frontend or admin screens and you need docs/design deliverables.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Required Inputs (read before proceeding)
|
|
7
|
-
Read the following artifacts for the current feature:
|
|
8
|
-
1. `docs/specs/BA_SPEC_*.md` - screens and fields
|
|
9
|
-
2. `docs/api/[FEATURE_KEY]_ENDPOINTS.md` - API list
|
|
10
|
-
|
|
11
|
-
## Input
|
|
12
|
-
$ARGUMENTS
|
|
13
|
-
|
|
14
|
-
# SDTK-SPEC Screen Layout Design
|
|
15
|
-
|
|
16
|
-
## Critical Constraints
|
|
17
|
-
- I do not skip screen IDs or item numbering alignment with the wireframe.
|
|
18
|
-
- I do not hide render limitations; I record when screen preview rendering is unavailable.
|
|
19
|
-
- I do not leave rendered wireframes without visible local item markers that map back to the `Items` table.
|
|
20
|
-
- I do not pretend wireframe markers are the same thing as `FLOW_ACTION_SPEC` global action-table numbers.
|
|
21
|
-
- I do not invent screens or fields not present in BA_SPEC or the feature scope.
|
|
22
|
-
|
|
23
|
-
## Output
|
|
24
|
-
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
25
|
-
|
|
26
|
-
## Required Inputs
|
|
27
|
-
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` (screens, fields, business rules)
|
|
28
|
-
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (API list for each screen, when available)
|
|
29
|
-
- Feature key and feature name
|
|
30
|
-
|
|
31
|
-
## When To Stop Or Escalate
|
|
32
|
-
- Stop if BA_SPEC does not exist or does not contain screen/field definitions for the current feature; surface as a blocker before drafting any wireframe.
|
|
33
|
-
- Stop if a required screen's field list or behavior is ambiguous in the source; record as OQ-xx and escalate to `@ba` or `@pm`.
|
|
34
|
-
- Stop if PlantUML rendering is unavailable and the feature team requires rendered images before proceeding; record rendering as skipped and note the dependency.
|
|
35
|
-
- Escalate to `@arch` if screen scope or API assignment is architecturally uncertain.
|
|
36
|
-
|
|
37
|
-
## Core Process
|
|
38
|
-
1. Read BA spec (screens + fields) and API list.
|
|
39
|
-
2. For each screen, include:
|
|
40
|
-
- PlantUML `@startsalt` wireframe first, with visible screen-local markers embedded directly in the SALT labels
|
|
41
|
-
- API list table
|
|
42
|
-
- Item table whose `No` values exactly match the local marker sequence used in the wireframe for that screen
|
|
43
|
-
3. Use this wireframe-marker convention so the rendered SVG can be cross-referenced visually:
|
|
44
|
-
- markers are screen-local visual references and reset per screen
|
|
45
|
-
- prefer Unicode circled-number markers in generated docs; avoid parenthetical `(N)` markers because they blend into UI text and can conflict with SALT parsing
|
|
46
|
-
- text label or input prompt: prefix the visible label with the local marker
|
|
47
|
-
- button: place the local marker inside the visible button label
|
|
48
|
-
- table header: prefix the header text with the local marker
|
|
49
|
-
- standalone control, pagination, toggle, or status chip: prefix the visible label with the local marker
|
|
50
|
-
- do not rely on prose, comments, or a separate legend; the marker must be visible inside the rendered wireframe itself
|
|
51
|
-
- the local marker does not need to equal the `FLOW_ACTION_SPEC` global `No`; `screen-design-spec` publishes the mapping table
|
|
52
|
-
4. Keep screen IDs consistent (A-*, B-*, C-*).
|
|
53
|
-
5. After writing `DESIGN_LAYOUT`, attempt to render screen preview images by default:
|
|
54
|
-
- Run `.claude/skills/design-layout/scripts/render_design_layout_images.py` to extract `@startsalt` blocks and render `.svg` files.
|
|
55
|
-
- Output path: `docs/specs/assets/<feature_snake>/screens/<screen_id>.svg`
|
|
56
|
-
- The renderer warns if a screen wireframe has no visible local markers or still uses legacy `(N)` markers.
|
|
57
|
-
- If PlantUML is unavailable, rendering is skipped with a warning and the render-skipped note is used in `FLOW_ACTION_SPEC`. The layout doc remains valid.
|
|
58
|
-
|
|
59
|
-
## Validation / Quality Gates
|
|
60
|
-
- Every screen in BA scope has a corresponding wireframe section in the layout doc.
|
|
61
|
-
- Every `@startsalt` block contains visible screen-local markers; no unlabeled items.
|
|
62
|
-
- Item table `No` values match the wireframe local marker sequence for each screen exactly.
|
|
63
|
-
- Screen IDs follow the A-*, B-*, C-* convention without gaps or duplicates.
|
|
64
|
-
- API list table is present for every screen that makes API calls.
|
|
65
|
-
- Render-skipped note is explicit when PlantUML is unavailable; no silent omission.
|
|
66
|
-
- No `(N)` parenthetical markers in generated wireframes.
|
|
67
|
-
|
|
68
|
-
## Order-Critical Hard Gate
|
|
69
|
-
Do not write wireframes before reading BA_SPEC screen definitions. Wireframes generated from memory introduce field drift that must be corrected before the flow-action spec can be authored.
|
|
70
|
-
|
|
71
|
-
## Common Mistakes
|
|
72
|
-
|
|
73
|
-
| Mistake | Why it is wrong | Do instead |
|
|
74
|
-
|---|---|---|
|
|
75
|
-
| Use `(N)` parenthetical markers in wireframes | Conflicts with SALT parsing; indistinguishable from UI text | Use Unicode circled-number markers instead |
|
|
76
|
-
| Let Item table `No` drift from wireframe markers | Breaks the cross-reference between table and visual | Align item table `No` to the local marker sequence exactly |
|
|
77
|
-
| Claim wireframe markers equal FLOW_ACTION_SPEC global numbers | They are different numbering systems | Always note that markers are screen-local; screen-design-spec publishes the global mapping |
|
|
78
|
-
| Skip render attempt without noting the skip | Leaves downstream consumers uncertain about image availability | Always record render-skipped note when PlantUML is unavailable |
|
|
79
|
-
| Invent screens or fields not in BA_SPEC | Creates untracked scope | Only add screens and fields explicitly listed in the BA source |
|
|
80
|
-
|
|
81
|
-
## Screen Image Renderer
|
|
82
|
-
- Script: `.claude/skills/design-layout/scripts/render_design_layout_images.py`
|
|
83
|
-
- Usage:
|
|
84
|
-
```
|
|
85
|
-
python ".claude/skills/design-layout/scripts/render_design_layout_images.py" \
|
|
86
|
-
--design-layout "docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md" \
|
|
87
|
-
--feature-key [FEATURE_KEY]
|
|
88
|
-
```
|
|
89
|
-
- Requires: Java + `plantuml.jar`
|
|
90
|
-
- Output: `.svg` files under `docs/specs/assets/<feature_snake>/screens/`
|
|
91
|
-
- Failure policy: non-blocking. Warns and continues if rendering is unavailable.
|
|
1
|
+
---
|
|
2
|
+
name: design-layout
|
|
3
|
+
description: Generate UI screen layout documentation for a feature, including PlantUML SALT wireframes and item tables. Use when a feature includes frontend or admin screens and you need docs/design deliverables.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Required Inputs (read before proceeding)
|
|
7
|
+
Read the following artifacts for the current feature:
|
|
8
|
+
1. `docs/specs/BA_SPEC_*.md` - screens and fields
|
|
9
|
+
2. `docs/api/[FEATURE_KEY]_ENDPOINTS.md` - API list
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
$ARGUMENTS
|
|
13
|
+
|
|
14
|
+
# SDTK-SPEC Screen Layout Design
|
|
15
|
+
|
|
16
|
+
## Critical Constraints
|
|
17
|
+
- I do not skip screen IDs or item numbering alignment with the wireframe.
|
|
18
|
+
- I do not hide render limitations; I record when screen preview rendering is unavailable.
|
|
19
|
+
- I do not leave rendered wireframes without visible local item markers that map back to the `Items` table.
|
|
20
|
+
- I do not pretend wireframe markers are the same thing as `FLOW_ACTION_SPEC` global action-table numbers.
|
|
21
|
+
- I do not invent screens or fields not present in BA_SPEC or the feature scope.
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
25
|
+
|
|
26
|
+
## Required Inputs
|
|
27
|
+
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` (screens, fields, business rules)
|
|
28
|
+
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (API list for each screen, when available)
|
|
29
|
+
- Feature key and feature name
|
|
30
|
+
|
|
31
|
+
## When To Stop Or Escalate
|
|
32
|
+
- Stop if BA_SPEC does not exist or does not contain screen/field definitions for the current feature; surface as a blocker before drafting any wireframe.
|
|
33
|
+
- Stop if a required screen's field list or behavior is ambiguous in the source; record as OQ-xx and escalate to `@ba` or `@pm`.
|
|
34
|
+
- Stop if PlantUML rendering is unavailable and the feature team requires rendered images before proceeding; record rendering as skipped and note the dependency.
|
|
35
|
+
- Escalate to `@arch` if screen scope or API assignment is architecturally uncertain.
|
|
36
|
+
|
|
37
|
+
## Core Process
|
|
38
|
+
1. Read BA spec (screens + fields) and API list.
|
|
39
|
+
2. For each screen, include:
|
|
40
|
+
- PlantUML `@startsalt` wireframe first, with visible screen-local markers embedded directly in the SALT labels
|
|
41
|
+
- API list table
|
|
42
|
+
- Item table whose `No` values exactly match the local marker sequence used in the wireframe for that screen
|
|
43
|
+
3. Use this wireframe-marker convention so the rendered SVG can be cross-referenced visually:
|
|
44
|
+
- markers are screen-local visual references and reset per screen
|
|
45
|
+
- prefer Unicode circled-number markers in generated docs; avoid parenthetical `(N)` markers because they blend into UI text and can conflict with SALT parsing
|
|
46
|
+
- text label or input prompt: prefix the visible label with the local marker
|
|
47
|
+
- button: place the local marker inside the visible button label
|
|
48
|
+
- table header: prefix the header text with the local marker
|
|
49
|
+
- standalone control, pagination, toggle, or status chip: prefix the visible label with the local marker
|
|
50
|
+
- do not rely on prose, comments, or a separate legend; the marker must be visible inside the rendered wireframe itself
|
|
51
|
+
- the local marker does not need to equal the `FLOW_ACTION_SPEC` global `No`; `screen-design-spec` publishes the mapping table
|
|
52
|
+
4. Keep screen IDs consistent (A-*, B-*, C-*).
|
|
53
|
+
5. After writing `DESIGN_LAYOUT`, attempt to render screen preview images by default:
|
|
54
|
+
- Run `.claude/skills/design-layout/scripts/render_design_layout_images.py` to extract `@startsalt` blocks and render `.svg` files.
|
|
55
|
+
- Output path: `docs/specs/assets/<feature_snake>/screens/<screen_id>.svg`
|
|
56
|
+
- The renderer warns if a screen wireframe has no visible local markers or still uses legacy `(N)` markers.
|
|
57
|
+
- If PlantUML is unavailable, rendering is skipped with a warning and the render-skipped note is used in `FLOW_ACTION_SPEC`. The layout doc remains valid.
|
|
58
|
+
|
|
59
|
+
## Validation / Quality Gates
|
|
60
|
+
- Every screen in BA scope has a corresponding wireframe section in the layout doc.
|
|
61
|
+
- Every `@startsalt` block contains visible screen-local markers; no unlabeled items.
|
|
62
|
+
- Item table `No` values match the wireframe local marker sequence for each screen exactly.
|
|
63
|
+
- Screen IDs follow the A-*, B-*, C-* convention without gaps or duplicates.
|
|
64
|
+
- API list table is present for every screen that makes API calls.
|
|
65
|
+
- Render-skipped note is explicit when PlantUML is unavailable; no silent omission.
|
|
66
|
+
- No `(N)` parenthetical markers in generated wireframes.
|
|
67
|
+
|
|
68
|
+
## Order-Critical Hard Gate
|
|
69
|
+
Do not write wireframes before reading BA_SPEC screen definitions. Wireframes generated from memory introduce field drift that must be corrected before the flow-action spec can be authored.
|
|
70
|
+
|
|
71
|
+
## Common Mistakes
|
|
72
|
+
|
|
73
|
+
| Mistake | Why it is wrong | Do instead |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| Use `(N)` parenthetical markers in wireframes | Conflicts with SALT parsing; indistinguishable from UI text | Use Unicode circled-number markers instead |
|
|
76
|
+
| Let Item table `No` drift from wireframe markers | Breaks the cross-reference between table and visual | Align item table `No` to the local marker sequence exactly |
|
|
77
|
+
| Claim wireframe markers equal FLOW_ACTION_SPEC global numbers | They are different numbering systems | Always note that markers are screen-local; screen-design-spec publishes the global mapping |
|
|
78
|
+
| Skip render attempt without noting the skip | Leaves downstream consumers uncertain about image availability | Always record render-skipped note when PlantUML is unavailable |
|
|
79
|
+
| Invent screens or fields not in BA_SPEC | Creates untracked scope | Only add screens and fields explicitly listed in the BA source |
|
|
80
|
+
|
|
81
|
+
## Screen Image Renderer
|
|
82
|
+
- Script: `.claude/skills/design-layout/scripts/render_design_layout_images.py`
|
|
83
|
+
- Usage:
|
|
84
|
+
```
|
|
85
|
+
python ".claude/skills/design-layout/scripts/render_design_layout_images.py" \
|
|
86
|
+
--design-layout "docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md" \
|
|
87
|
+
--feature-key [FEATURE_KEY]
|
|
88
|
+
```
|
|
89
|
+
- Requires: Java + `plantuml.jar`
|
|
90
|
+
- Output: `.svg` files under `docs/specs/assets/<feature_snake>/screens/`
|
|
91
|
+
- Failure policy: non-blocking. Warns and continues if rendering is unavailable.
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dev
|
|
3
|
-
description: Developer planning workflow for SDTK-SPEC. Use when you need to convert ARCH_DESIGN plus BACKLOG into a scoped implementation plan, readiness decision, and formal SDTK-CODE handoff.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## SDTK-SPEC Pipeline Rules (always apply)
|
|
7
|
-
1. Pipeline: PM Initiation -> BA Analysis -> PM Planning -> Architecture Design -> Development Planning + SDTK-CODE Handoff -> QA Validation
|
|
8
|
-
2. After completing phase work: update SHARED_PLANNING.md + QUALITY_CHECKLIST.md
|
|
9
|
-
3. If unclear: log OQ-xx in artifact, escalate to PM (PM asks user if needed)
|
|
10
|
-
4. Traceability: REQ -> BR/UC/AC -> design -> backlog -> FEATURE_IMPL_PLAN -> CODE_HANDOFF -> downstream implementation evidence -> QA
|
|
11
|
-
5. `/dev` stops at planning plus handoff; downstream code execution belongs to SDTK-CODE by default
|
|
12
|
-
6. Do not skip phases. If inputs missing, ask focused questions.
|
|
13
|
-
|
|
14
|
-
## Prerequisites (verify before proceeding)
|
|
15
|
-
Read QUALITY_CHECKLIST.md and verify:
|
|
16
|
-
- Phase 3 ARCH Design gate must show all items [x] Done.
|
|
17
|
-
|
|
18
|
-
If prerequisites are not met: report which gate is missing, suggest user run `/arch` first.
|
|
19
|
-
|
|
20
|
-
## Current Context
|
|
21
|
-
- Config: !`node -e "try{process.stdout.write(require('fs').readFileSync('sdtk-spec.config.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
22
|
-
- Pipeline: !`node -e "try{process.stdout.write(require('fs').readFileSync('SHARED_PLANNING.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
23
|
-
- Gates: !`node -e "try{process.stdout.write(require('fs').readFileSync('QUALITY_CHECKLIST.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
24
|
-
- State: !`node -e "try{process.stdout.write(require('fs').readFileSync('.sdtk/orchestration-state.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
25
|
-
|
|
26
|
-
## Input
|
|
27
|
-
$ARGUMENTS
|
|
28
|
-
|
|
29
|
-
If no arguments provided, read current feature context from SHARED_PLANNING.md.
|
|
30
|
-
|
|
31
|
-
# SDTK-SPEC DEV (Planning + SDTK-CODE Handoff)
|
|
32
|
-
|
|
33
|
-
## Outputs
|
|
34
|
-
- `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
|
|
35
|
-
- `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
|
|
36
|
-
|
|
37
|
-
## Process
|
|
38
|
-
1. Read `ARCH_DESIGN_*` + backlog.
|
|
39
|
-
2. Read `sdtk-spec.config.json` for project stack + test/lint commands.
|
|
40
|
-
3. Write or refine `FEATURE_IMPL_PLAN_*`:
|
|
41
|
-
- implementation slices in the recommended downstream build order
|
|
42
|
-
- required refs
|
|
43
|
-
- optional refs
|
|
44
|
-
- test obligations written as implementation-ready acceptance mapping statements
|
|
45
|
-
- blockers and OQ items
|
|
46
|
-
4. If anything is unclear: record OQ-xx in `FEATURE_IMPL_PLAN` and escalate to PM (suggest user run `/pm` for a decision if still missing info).
|
|
47
|
-
5. Decide readiness:
|
|
48
|
-
- `READY_FOR_SDTK_CODE`, or
|
|
49
|
-
- `BLOCKED_FOR_SDTK_CODE`
|
|
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`.
|
|
54
|
-
- Current canonical emission is schema `0.2`; the generator auto-derives `impact_map` from the current handoff refs and may include optional `recovery_notes`.
|
|
55
|
-
- For approval/workflow features, follow `toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md` as the authoritative domain note. Keep state-machine-first slice ordering, populate workflow `impact_map` refs explicitly, cover all four workflow test-obligation categories, and carry unresolved workflow `OQ-xx` items as `open_blockers` instead of hiding them.
|
|
56
|
-
7. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 4.
|
|
57
|
-
8. If ready, suggest:
|
|
58
|
-
- `sdtk-code start --feature-key <KEY> --lane <feature|bugfix> --project-path .`
|
|
59
|
-
9. Do not claim that `/dev` executed downstream code, build, verify, ship, or QA handoff.
|
|
1
|
+
---
|
|
2
|
+
name: dev
|
|
3
|
+
description: Developer planning workflow for SDTK-SPEC. Use when you need to convert ARCH_DESIGN plus BACKLOG into a scoped implementation plan, readiness decision, and formal SDTK-CODE handoff.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## SDTK-SPEC Pipeline Rules (always apply)
|
|
7
|
+
1. Pipeline: PM Initiation -> BA Analysis -> PM Planning -> Architecture Design -> Development Planning + SDTK-CODE Handoff -> QA Validation
|
|
8
|
+
2. After completing phase work: update SHARED_PLANNING.md + QUALITY_CHECKLIST.md
|
|
9
|
+
3. If unclear: log OQ-xx in artifact, escalate to PM (PM asks user if needed)
|
|
10
|
+
4. Traceability: REQ -> BR/UC/AC -> design -> backlog -> FEATURE_IMPL_PLAN -> CODE_HANDOFF -> downstream implementation evidence -> QA
|
|
11
|
+
5. `/dev` stops at planning plus handoff; downstream code execution belongs to SDTK-CODE by default
|
|
12
|
+
6. Do not skip phases. If inputs missing, ask focused questions.
|
|
13
|
+
|
|
14
|
+
## Prerequisites (verify before proceeding)
|
|
15
|
+
Read QUALITY_CHECKLIST.md and verify:
|
|
16
|
+
- Phase 3 ARCH Design gate must show all items [x] Done.
|
|
17
|
+
|
|
18
|
+
If prerequisites are not met: report which gate is missing, suggest user run `/arch` first.
|
|
19
|
+
|
|
20
|
+
## Current Context
|
|
21
|
+
- Config: !`node -e "try{process.stdout.write(require('fs').readFileSync('sdtk-spec.config.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
22
|
+
- Pipeline: !`node -e "try{process.stdout.write(require('fs').readFileSync('SHARED_PLANNING.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
23
|
+
- Gates: !`node -e "try{process.stdout.write(require('fs').readFileSync('QUALITY_CHECKLIST.md','utf8'))}catch{process.stdout.write('Not initialized')}"`
|
|
24
|
+
- State: !`node -e "try{process.stdout.write(require('fs').readFileSync('.sdtk/orchestration-state.json','utf8'))}catch{process.stdout.write('{}')}"`
|
|
25
|
+
|
|
26
|
+
## Input
|
|
27
|
+
$ARGUMENTS
|
|
28
|
+
|
|
29
|
+
If no arguments provided, read current feature context from SHARED_PLANNING.md.
|
|
30
|
+
|
|
31
|
+
# SDTK-SPEC DEV (Planning + SDTK-CODE Handoff)
|
|
32
|
+
|
|
33
|
+
## Outputs
|
|
34
|
+
- `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
|
|
35
|
+
- `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
|
|
36
|
+
|
|
37
|
+
## Process
|
|
38
|
+
1. Read `ARCH_DESIGN_*` + backlog.
|
|
39
|
+
2. Read `sdtk-spec.config.json` for project stack + test/lint commands.
|
|
40
|
+
3. Write or refine `FEATURE_IMPL_PLAN_*`:
|
|
41
|
+
- implementation slices in the recommended downstream build order
|
|
42
|
+
- required refs
|
|
43
|
+
- optional refs
|
|
44
|
+
- test obligations written as implementation-ready acceptance mapping statements
|
|
45
|
+
- blockers and OQ items
|
|
46
|
+
4. If anything is unclear: record OQ-xx in `FEATURE_IMPL_PLAN` and escalate to PM (suggest user run `/pm` for a decision if still missing info).
|
|
47
|
+
5. Decide readiness:
|
|
48
|
+
- `READY_FOR_SDTK_CODE`, or
|
|
49
|
+
- `BLOCKED_FOR_SDTK_CODE`
|
|
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`.
|
|
54
|
+
- Current canonical emission is schema `0.2`; the generator auto-derives `impact_map` from the current handoff refs and may include optional `recovery_notes`.
|
|
55
|
+
- For approval/workflow features, follow `toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md` as the authoritative domain note. Keep state-machine-first slice ordering, populate workflow `impact_map` refs explicitly, cover all four workflow test-obligation categories, and carry unresolved workflow `OQ-xx` items as `open_blockers` instead of hiding them.
|
|
56
|
+
7. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 4.
|
|
57
|
+
8. If ready, suggest:
|
|
58
|
+
- `sdtk-code start --feature-key <KEY> --lane <feature|bugfix> --project-path .`
|
|
59
|
+
9. Do not claim that `/dev` executed downstream code, build, verify, ship, or QA handoff.
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dev-backend
|
|
3
|
-
description: Generate/modify Python Django REST Framework backend code following the toolkit conventions (models/views/services/serializers/validation/urls/enums). Use when implementing backend features in that project style.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Input
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
# SDTK-SPEC Backend (Toolkit conventions)
|
|
10
|
-
|
|
11
|
-
## Critical Constraints
|
|
12
|
-
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
13
|
-
- I do not generate backend code without approved API and data-contract sources.
|
|
14
|
-
- I do not ignore established repository patterns when adding backend modules.
|
|
15
|
-
- 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.
|
|
16
|
-
- I do not invent models, fields, or business rules that are not present in the approved upstream artifacts.
|
|
17
|
-
|
|
18
|
-
## Outputs
|
|
19
|
-
- Backend module files under `src/backend/<module>/`:
|
|
20
|
-
- `models.py`, `views.py` or `viewsets.py`, `services.py`, `serializers.py`, `validation.py`, `enums.py`, `urls.py`
|
|
21
|
-
- Unit/integration test files for critical business rules and state transitions
|
|
22
|
-
|
|
23
|
-
## Required Inputs
|
|
24
|
-
- Approved `docs/api/[FeaturePascal]_API.yaml` (endpoint contracts)
|
|
25
|
-
- Approved `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (detail + schema)
|
|
26
|
-
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (business rules, data model)
|
|
27
|
-
- Confirmation that this slice is within approved DEV scope
|
|
28
|
-
|
|
29
|
-
## When To Stop Or Escalate
|
|
30
|
-
- Stop if approved API YAML or ENDPOINTS.md does not exist for the current slice; do not generate code against unreviewed contracts.
|
|
31
|
-
- Stop if the data model in BA/ARCH contradicts the YAML schema; surface the discrepancy as a blocker before writing any model.
|
|
32
|
-
- Escalate to `sdtk-dev` if the implementation slice scope is unclear or if new design decisions are required.
|
|
33
|
-
- Escalate to `@arch` if an existing repository pattern cannot satisfy the new module requirements without architectural change.
|
|
34
|
-
- Stop if a business rule requires a state transition or permission model not defined in the upstream sources; record as OQ-xx.
|
|
35
|
-
|
|
36
|
-
## Core Process
|
|
37
|
-
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.
|
|
38
|
-
2. Read approved API YAML and ENDPOINTS.md for the current slice.
|
|
39
|
-
3. Read BA_SPEC or ARCH_DESIGN for business rules, data model, and permission model.
|
|
40
|
-
4. Check whether this repository already has a backend reference module and follow its patterns exactly.
|
|
41
|
-
5. Follow module structure: `src/backend/<module>/{models,view,service,serializers,validation,enum,urls.py}`.
|
|
42
|
-
6. Apply conventions:
|
|
43
|
-
- Soft delete via `del_flg`
|
|
44
|
-
- Audit fields (creator/updater/del timestamps)
|
|
45
|
-
- Permission checks before operations
|
|
46
|
-
- `transaction.atomic()` for writes
|
|
47
|
-
- Logging decorator on public endpoints
|
|
48
|
-
7. Add tests for critical business rules and state transitions.
|
|
49
|
-
8. Verify the generated code satisfies the endpoint contracts defined in YAML before declaring the slice done.
|
|
50
|
-
|
|
51
|
-
## Validation / Quality Gates
|
|
52
|
-
- Every new endpoint has a matching serializer, view/viewset, and URL route.
|
|
53
|
-
- Permission checks are present for every write operation.
|
|
54
|
-
- `transaction.atomic()` wraps every multi-step write.
|
|
55
|
-
- Soft delete fields (`del_flg`) are consistent with existing model conventions.
|
|
56
|
-
- Tests cover critical business rules and state transitions for the current slice.
|
|
57
|
-
- No model field or business rule has been invented without a corresponding source in BA/ARCH or API YAML.
|
|
58
|
-
|
|
59
|
-
## Order-Critical Hard Gate
|
|
60
|
-
Do not write model definitions before reading the approved data model from BA_SPEC or ARCH_DESIGN. Models authored from memory or inferred from vague requirements produce contract drift that is expensive to fix downstream.
|
|
61
|
-
|
|
62
|
-
Do not declare a slice done without verifying the generated endpoints satisfy the contracts in the approved YAML.
|
|
63
|
-
|
|
64
|
-
## Common Mistakes
|
|
65
|
-
|
|
66
|
-
| Mistake | Why it is wrong | Do instead |
|
|
67
|
-
|---|---|---|
|
|
68
|
-
| Generate code without reading approved YAML | Produces endpoints that contradict the approved contract | Always read YAML and ENDPOINTS.md first |
|
|
69
|
-
| Invent model fields not in BA/ARCH | Creates undocumented contract drift | Only implement fields explicitly defined in the upstream sources |
|
|
70
|
-
| Skip permission checks on write endpoints | Security gap that will fail review | Always add permission guard before business logic |
|
|
71
|
-
| Omit `transaction.atomic()` on multi-step writes | Risk of partial writes and data corruption | Wrap every write sequence in an atomic block |
|
|
72
|
-
| Use a different module pattern than the existing repo reference | Inconsistency that maintainers must correct | Read the reference module and match its structure exactly |
|
|
73
|
-
| Treat this skill as a replacement for `sdtk-dev` | Collapses bounded specialist scope into general DEV ownership | Keep scope explicitly bounded to the current slice |
|
|
1
|
+
---
|
|
2
|
+
name: dev-backend
|
|
3
|
+
description: Generate/modify Python Django REST Framework backend code following the toolkit conventions (models/views/services/serializers/validation/urls/enums). Use when implementing backend features in that project style.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
# SDTK-SPEC Backend (Toolkit conventions)
|
|
10
|
+
|
|
11
|
+
## Critical Constraints
|
|
12
|
+
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
13
|
+
- I do not generate backend code without approved API and data-contract sources.
|
|
14
|
+
- I do not ignore established repository patterns when adding backend modules.
|
|
15
|
+
- 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.
|
|
16
|
+
- I do not invent models, fields, or business rules that are not present in the approved upstream artifacts.
|
|
17
|
+
|
|
18
|
+
## Outputs
|
|
19
|
+
- Backend module files under `src/backend/<module>/`:
|
|
20
|
+
- `models.py`, `views.py` or `viewsets.py`, `services.py`, `serializers.py`, `validation.py`, `enums.py`, `urls.py`
|
|
21
|
+
- Unit/integration test files for critical business rules and state transitions
|
|
22
|
+
|
|
23
|
+
## Required Inputs
|
|
24
|
+
- Approved `docs/api/[FeaturePascal]_API.yaml` (endpoint contracts)
|
|
25
|
+
- Approved `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (detail + schema)
|
|
26
|
+
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (business rules, data model)
|
|
27
|
+
- Confirmation that this slice is within approved DEV scope
|
|
28
|
+
|
|
29
|
+
## When To Stop Or Escalate
|
|
30
|
+
- Stop if approved API YAML or ENDPOINTS.md does not exist for the current slice; do not generate code against unreviewed contracts.
|
|
31
|
+
- Stop if the data model in BA/ARCH contradicts the YAML schema; surface the discrepancy as a blocker before writing any model.
|
|
32
|
+
- Escalate to `sdtk-dev` if the implementation slice scope is unclear or if new design decisions are required.
|
|
33
|
+
- Escalate to `@arch` if an existing repository pattern cannot satisfy the new module requirements without architectural change.
|
|
34
|
+
- Stop if a business rule requires a state transition or permission model not defined in the upstream sources; record as OQ-xx.
|
|
35
|
+
|
|
36
|
+
## Core Process
|
|
37
|
+
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.
|
|
38
|
+
2. Read approved API YAML and ENDPOINTS.md for the current slice.
|
|
39
|
+
3. Read BA_SPEC or ARCH_DESIGN for business rules, data model, and permission model.
|
|
40
|
+
4. Check whether this repository already has a backend reference module and follow its patterns exactly.
|
|
41
|
+
5. Follow module structure: `src/backend/<module>/{models,view,service,serializers,validation,enum,urls.py}`.
|
|
42
|
+
6. Apply conventions:
|
|
43
|
+
- Soft delete via `del_flg`
|
|
44
|
+
- Audit fields (creator/updater/del timestamps)
|
|
45
|
+
- Permission checks before operations
|
|
46
|
+
- `transaction.atomic()` for writes
|
|
47
|
+
- Logging decorator on public endpoints
|
|
48
|
+
7. Add tests for critical business rules and state transitions.
|
|
49
|
+
8. Verify the generated code satisfies the endpoint contracts defined in YAML before declaring the slice done.
|
|
50
|
+
|
|
51
|
+
## Validation / Quality Gates
|
|
52
|
+
- Every new endpoint has a matching serializer, view/viewset, and URL route.
|
|
53
|
+
- Permission checks are present for every write operation.
|
|
54
|
+
- `transaction.atomic()` wraps every multi-step write.
|
|
55
|
+
- Soft delete fields (`del_flg`) are consistent with existing model conventions.
|
|
56
|
+
- Tests cover critical business rules and state transitions for the current slice.
|
|
57
|
+
- No model field or business rule has been invented without a corresponding source in BA/ARCH or API YAML.
|
|
58
|
+
|
|
59
|
+
## Order-Critical Hard Gate
|
|
60
|
+
Do not write model definitions before reading the approved data model from BA_SPEC or ARCH_DESIGN. Models authored from memory or inferred from vague requirements produce contract drift that is expensive to fix downstream.
|
|
61
|
+
|
|
62
|
+
Do not declare a slice done without verifying the generated endpoints satisfy the contracts in the approved YAML.
|
|
63
|
+
|
|
64
|
+
## Common Mistakes
|
|
65
|
+
|
|
66
|
+
| Mistake | Why it is wrong | Do instead |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| Generate code without reading approved YAML | Produces endpoints that contradict the approved contract | Always read YAML and ENDPOINTS.md first |
|
|
69
|
+
| Invent model fields not in BA/ARCH | Creates undocumented contract drift | Only implement fields explicitly defined in the upstream sources |
|
|
70
|
+
| Skip permission checks on write endpoints | Security gap that will fail review | Always add permission guard before business logic |
|
|
71
|
+
| Omit `transaction.atomic()` on multi-step writes | Risk of partial writes and data corruption | Wrap every write sequence in an atomic block |
|
|
72
|
+
| Use a different module pattern than the existing repo reference | Inconsistency that maintainers must correct | Read the reference module and match its structure exactly |
|
|
73
|
+
| Treat this skill as a replacement for `sdtk-dev` | Collapses bounded specialist scope into general DEV ownership | Keep scope explicitly bounded to the current slice |
|