sdtk-spec-kit 0.3.9 → 0.3.11
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 +136 -106
- package/assets/manifest/toolkit-bundle.manifest.json +94 -80
- package/assets/manifest/toolkit-bundle.sha256.txt +41 -38
- package/assets/toolkit/toolkit/AGENTS.md +5 -4
- package/assets/toolkit/toolkit/README.md +50 -0
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +185 -0
- package/assets/toolkit/toolkit/install.ps1 +2 -2
- package/assets/toolkit/toolkit/scripts/init-feature.ps1 +4 -3
- 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-api-design-spec/SKILL.md +84 -84
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md +127 -127
- package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -83
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md +127 -127
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +108 -98
- 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-orchestrator/SKILL.md +97 -81
- package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +37 -30
- package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +75 -52
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
- 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/api-design-spec/SKILL.md +90 -90
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +3 -0
- package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +25 -53
- package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +16 -8
- package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +124 -121
- package/assets/toolkit/toolkit/templates/README.md +1 -0
- package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +81 -81
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
- package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +127 -127
- package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +174 -174
- package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +106 -93
- package/assets/toolkit/toolkit/templates/docs/qa/CONTROLLER_ACCEPTANCE_TEMPLATE.md +90 -0
- package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +162 -61
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
- 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 +16 -16
- package/src/commands/help.js +123 -101
- package/src/commands/init.js +10 -2
- package/src/commands/runtime.js +27 -5
- package/src/commands/update.js +11 -0
- package/src/index.js +62 -59
- package/src/lib/scope.js +19 -4
- package/src/lib/update.js +326 -0
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
# YAML CREATION RULES FINAL
|
|
2
|
-
|
|
3
|
-
This file is the canonical rule set for designing and maintaining feature-level OpenAPI YAML.
|
|
4
|
-
|
|
5
|
-
Use this file for:
|
|
6
|
-
- OpenAPI YAML contract design
|
|
7
|
-
- endpoint path/method decisions
|
|
8
|
-
- request/response schema design
|
|
9
|
-
- endpoint summary and contract consistency checks
|
|
10
|
-
|
|
11
|
-
Do not use this file as the primary rule source for:
|
|
12
|
-
- flowchart writing details
|
|
13
|
-
- API design detail markdown layout
|
|
14
|
-
|
|
15
|
-
Use `API_DESIGN_FLOWCHART_CREATION_RULES_FINAL.md` for those.
|
|
16
|
-
|
|
17
|
-
## 1. Rule Precedence
|
|
18
|
-
- Priority 1: follow the existing system's real route, method, payload, and response conventions.
|
|
19
|
-
- Priority 2: match the current source code and runtime behavior.
|
|
20
|
-
- Priority 3: apply the reusable standards in this document.
|
|
21
|
-
- If a reusable rule conflicts with the target system, keep the system rule and document the exception explicitly.
|
|
22
|
-
|
|
23
|
-
## 2. API Scope Classification
|
|
24
|
-
- Every endpoint must be classified as one of:
|
|
25
|
-
- `New`
|
|
26
|
-
- `Deferred`
|
|
27
|
-
- `Existing (reuse)`
|
|
28
|
-
- Do not silently create a new feature-local API if an existing system API already provides the same behavior with a compatible contract.
|
|
29
|
-
- If the existing API is close in purpose but payload or response is incompatible with the feature need, create a bounded new API.
|
|
30
|
-
|
|
31
|
-
## 3. Endpoint Path Design
|
|
32
|
-
- Use singular resource names in endpoint paths.
|
|
33
|
-
- Use explicit action segments only when needed by system convention:
|
|
34
|
-
- `list`
|
|
35
|
-
- `search`
|
|
36
|
-
- `edit`
|
|
37
|
-
- `delete`
|
|
38
|
-
- `multi-create`
|
|
39
|
-
- Prefer stable system-style patterns such as:
|
|
40
|
-
- list: `GET /{resource}/list/{
|
|
41
|
-
- search: `POST /{resource}/search/{
|
|
42
|
-
- view-specific search: `POST /{resource}/
|
|
43
|
-
- create: `POST /{resource}/{
|
|
44
|
-
- detail: `GET /{resource}/{
|
|
45
|
-
- edit: `POST /{resource}/edit/{
|
|
46
|
-
- delete: `POST /{resource}/delete/{
|
|
47
|
-
- Separate namespaces by bounded context.
|
|
48
|
-
- Do not repeat namespace meaning in child path segments.
|
|
49
|
-
|
|
50
|
-
## 4. Request Contract Rules
|
|
51
|
-
- For feature-owned POST search and write APIs, prefer a stable wrapper:
|
|
52
|
-
- `data: { ... }`
|
|
53
|
-
- For complex filters, place fields under:
|
|
54
|
-
- `data.info`
|
|
55
|
-
- If reusing an existing system API, keep the owning module's contract shape exactly as-is.
|
|
56
|
-
- Do not force reused APIs into the feature wrapper pattern.
|
|
57
|
-
- If a payload field changes behavior, the field must be explicit in the schema and must not remain only in examples.
|
|
58
|
-
|
|
59
|
-
## 5. Response Contract Rules
|
|
60
|
-
- Success responses must include `status` at minimum.
|
|
61
|
-
- Create APIs should return the minimum new identifier required by the caller.
|
|
62
|
-
- Example: `status +
|
|
63
|
-
- Edit and delete APIs should return status-only unless the target system has a stronger standard.
|
|
64
|
-
- Pre-check or validation helper APIs should return only the minimum boolean or status needed by the UI.
|
|
65
|
-
- Do not return detail payloads the UI does not consume.
|
|
66
|
-
- Do not add FE-only visual helper payloads when the client can derive them safely.
|
|
67
|
-
- Example: remove `timeline_backgrounds` if the frontend renders timeline lines from existing data.
|
|
68
|
-
|
|
69
|
-
## 6. Naming and Field Mapping Rules
|
|
70
|
-
- Use canonical business-domain terminology from the system glossary and database.
|
|
71
|
-
- Prefer actual system terms such as:
|
|
72
|
-
- `
|
|
73
|
-
- `
|
|
74
|
-
- `
|
|
75
|
-
- `certification`
|
|
76
|
-
- Avoid legacy aliases when an official term already exists.
|
|
77
|
-
- Field names should align with database semantics when they represent the same concept.
|
|
78
|
-
- If the DB uses a string state code, the API field must not be modeled as an integer.
|
|
79
|
-
- If a field is date-only (`format: date`), include the display format in the description.
|
|
80
|
-
- Example: `Start date (YYYYMMDD)`
|
|
81
|
-
|
|
82
|
-
## 7. Search and List API Rules
|
|
83
|
-
- One search API may serve multiple UI actions when the logic is the same:
|
|
84
|
-
- initial load
|
|
85
|
-
- search button
|
|
86
|
-
- refresh after mode/date change
|
|
87
|
-
- If one endpoint serves multiple UI actions, document that explicitly in YAML description and endpoint docs.
|
|
88
|
-
- Search APIs must define filter combination semantics clearly:
|
|
89
|
-
- AND across different fields
|
|
90
|
-
- OR within each `*_uuids` array
|
|
91
|
-
- If UI rendering depends on stable order, the YAML description must state the confirmed ORDER BY logic.
|
|
92
|
-
|
|
93
|
-
## 8. Split vs Reuse Rules
|
|
94
|
-
- Split read/search endpoints when the FE needs materially different grouped or view-shaped datasets.
|
|
95
|
-
- Merge or remove helper payloads when they add maintenance cost without business value.
|
|
96
|
-
- Reuse existing platform APIs when behavior already exists and only a feature-level mapping layer is needed.
|
|
97
|
-
- Example: reuse shared environment setting APIs instead of creating feature-local setting APIs.
|
|
98
|
-
|
|
99
|
-
## 9. Sample Data Rules
|
|
100
|
-
- For fields declared as `format: uuid`, use canonical UUID samples.
|
|
101
|
-
- Example: `123e4567-e89b-12d3-a456-426614174000`
|
|
102
|
-
- Do not use placeholder UUID-like labels such as:
|
|
103
|
-
- `customer-uuid-001`
|
|
104
|
-
- `assign-uuid-001`
|
|
105
|
-
- Keep sample data deterministic and internally consistent across request and response examples.
|
|
106
|
-
|
|
107
|
-
## 10. Cross-Artifact Consistency Rules
|
|
108
|
-
- The YAML contract is the source of truth for:
|
|
109
|
-
- endpoint path
|
|
110
|
-
- method
|
|
111
|
-
- request wrapper
|
|
112
|
-
- response shape
|
|
113
|
-
- After any YAML contract change, sync these artifacts:
|
|
114
|
-
- endpoint markdown
|
|
115
|
-
- flow list
|
|
116
|
-
- PlantUML flow assets
|
|
117
|
-
- API design detail markdown
|
|
118
|
-
- If any artifact cannot yet be synced, note the mismatch explicitly rather than leaving stale content.
|
|
119
|
-
|
|
120
|
-
## 11. Minimum YAML Quality Gate
|
|
121
|
-
- Path/method follow the target system convention.
|
|
122
|
-
- API type is classified (`New`, `Deferred`, `Existing (reuse)`).
|
|
123
|
-
- Request/response wrappers are stable and explicit.
|
|
124
|
-
- FE-only helper payloads are removed.
|
|
125
|
-
- Field names and types match DB semantics.
|
|
126
|
-
- UUID examples are valid UUIDs.
|
|
127
|
-
- Date descriptions include display format where needed.
|
|
1
|
+
# YAML CREATION RULES FINAL
|
|
2
|
+
|
|
3
|
+
This file is the canonical rule set for designing and maintaining feature-level OpenAPI YAML.
|
|
4
|
+
|
|
5
|
+
Use this file for:
|
|
6
|
+
- OpenAPI YAML contract design
|
|
7
|
+
- endpoint path/method decisions
|
|
8
|
+
- request/response schema design
|
|
9
|
+
- endpoint summary and contract consistency checks
|
|
10
|
+
|
|
11
|
+
Do not use this file as the primary rule source for:
|
|
12
|
+
- flowchart writing details
|
|
13
|
+
- API design detail markdown layout
|
|
14
|
+
|
|
15
|
+
Use `API_DESIGN_FLOWCHART_CREATION_RULES_FINAL.md` for those.
|
|
16
|
+
|
|
17
|
+
## 1. Rule Precedence
|
|
18
|
+
- Priority 1: follow the existing system's real route, method, payload, and response conventions.
|
|
19
|
+
- Priority 2: match the current source code and runtime behavior.
|
|
20
|
+
- Priority 3: apply the reusable standards in this document.
|
|
21
|
+
- If a reusable rule conflicts with the target system, keep the system rule and document the exception explicitly.
|
|
22
|
+
|
|
23
|
+
## 2. API Scope Classification
|
|
24
|
+
- Every endpoint must be classified as one of:
|
|
25
|
+
- `New`
|
|
26
|
+
- `Deferred`
|
|
27
|
+
- `Existing (reuse)`
|
|
28
|
+
- Do not silently create a new feature-local API if an existing system API already provides the same behavior with a compatible contract.
|
|
29
|
+
- If the existing API is close in purpose but payload or response is incompatible with the feature need, create a bounded new API.
|
|
30
|
+
|
|
31
|
+
## 3. Endpoint Path Design
|
|
32
|
+
- Use singular resource names in endpoint paths.
|
|
33
|
+
- Use explicit action segments only when needed by system convention:
|
|
34
|
+
- `list`
|
|
35
|
+
- `search`
|
|
36
|
+
- `edit`
|
|
37
|
+
- `delete`
|
|
38
|
+
- `multi-create`
|
|
39
|
+
- Prefer stable system-style patterns such as:
|
|
40
|
+
- list: `GET /{resource}/list/{organization_uuid}/{parent_uuid}`
|
|
41
|
+
- search: `POST /{resource}/search/{organization_uuid}`
|
|
42
|
+
- view-specific search: `POST /{resource}/resource-view/search/{organization_uuid}`
|
|
43
|
+
- create: `POST /{resource}/{organization_uuid}`
|
|
44
|
+
- detail: `GET /{resource}/{organization_uuid}/{resource_uuid}`
|
|
45
|
+
- edit: `POST /{resource}/edit/{organization_uuid}/{resource_uuid}`
|
|
46
|
+
- delete: `POST /{resource}/delete/{organization_uuid}/{resource_uuid}`
|
|
47
|
+
- Separate namespaces by bounded context.
|
|
48
|
+
- Do not repeat namespace meaning in child path segments.
|
|
49
|
+
|
|
50
|
+
## 4. Request Contract Rules
|
|
51
|
+
- For feature-owned POST search and write APIs, prefer a stable wrapper:
|
|
52
|
+
- `data: { ... }`
|
|
53
|
+
- For complex filters, place fields under:
|
|
54
|
+
- `data.info`
|
|
55
|
+
- If reusing an existing system API, keep the owning module's contract shape exactly as-is.
|
|
56
|
+
- Do not force reused APIs into the feature wrapper pattern.
|
|
57
|
+
- If a payload field changes behavior, the field must be explicit in the schema and must not remain only in examples.
|
|
58
|
+
|
|
59
|
+
## 5. Response Contract Rules
|
|
60
|
+
- Success responses must include `status` at minimum.
|
|
61
|
+
- Create APIs should return the minimum new identifier required by the caller.
|
|
62
|
+
- Example: `status + task_assignment_uuid`
|
|
63
|
+
- Edit and delete APIs should return status-only unless the target system has a stronger standard.
|
|
64
|
+
- Pre-check or validation helper APIs should return only the minimum boolean or status needed by the UI.
|
|
65
|
+
- Do not return detail payloads the UI does not consume.
|
|
66
|
+
- Do not add FE-only visual helper payloads when the client can derive them safely.
|
|
67
|
+
- Example: remove `timeline_backgrounds` if the frontend renders timeline lines from existing data.
|
|
68
|
+
|
|
69
|
+
## 6. Naming and Field Mapping Rules
|
|
70
|
+
- Use canonical business-domain terminology from the system glossary and database.
|
|
71
|
+
- Prefer actual system terms such as:
|
|
72
|
+
- `resource`
|
|
73
|
+
- `task`
|
|
74
|
+
- `assignee`
|
|
75
|
+
- `certification`
|
|
76
|
+
- Avoid legacy aliases when an official term already exists.
|
|
77
|
+
- Field names should align with database semantics when they represent the same concept.
|
|
78
|
+
- If the DB uses a string state code, the API field must not be modeled as an integer.
|
|
79
|
+
- If a field is date-only (`format: date`), include the display format in the description.
|
|
80
|
+
- Example: `Start date (YYYYMMDD)`
|
|
81
|
+
|
|
82
|
+
## 7. Search and List API Rules
|
|
83
|
+
- One search API may serve multiple UI actions when the logic is the same:
|
|
84
|
+
- initial load
|
|
85
|
+
- search button
|
|
86
|
+
- refresh after mode/date change
|
|
87
|
+
- If one endpoint serves multiple UI actions, document that explicitly in YAML description and endpoint docs.
|
|
88
|
+
- Search APIs must define filter combination semantics clearly:
|
|
89
|
+
- AND across different fields
|
|
90
|
+
- OR within each `*_uuids` array
|
|
91
|
+
- If UI rendering depends on stable order, the YAML description must state the confirmed ORDER BY logic.
|
|
92
|
+
|
|
93
|
+
## 8. Split vs Reuse Rules
|
|
94
|
+
- Split read/search endpoints when the FE needs materially different grouped or view-shaped datasets.
|
|
95
|
+
- Merge or remove helper payloads when they add maintenance cost without business value.
|
|
96
|
+
- Reuse existing platform APIs when behavior already exists and only a feature-level mapping layer is needed.
|
|
97
|
+
- Example: reuse shared environment setting APIs instead of creating feature-local setting APIs.
|
|
98
|
+
|
|
99
|
+
## 9. Sample Data Rules
|
|
100
|
+
- For fields declared as `format: uuid`, use canonical UUID samples.
|
|
101
|
+
- Example: `123e4567-e89b-12d3-a456-426614174000`
|
|
102
|
+
- Do not use placeholder UUID-like labels such as:
|
|
103
|
+
- `customer-uuid-001`
|
|
104
|
+
- `assign-uuid-001`
|
|
105
|
+
- Keep sample data deterministic and internally consistent across request and response examples.
|
|
106
|
+
|
|
107
|
+
## 10. Cross-Artifact Consistency Rules
|
|
108
|
+
- The YAML contract is the source of truth for:
|
|
109
|
+
- endpoint path
|
|
110
|
+
- method
|
|
111
|
+
- request wrapper
|
|
112
|
+
- response shape
|
|
113
|
+
- After any YAML contract change, sync these artifacts:
|
|
114
|
+
- endpoint markdown
|
|
115
|
+
- flow list
|
|
116
|
+
- PlantUML flow assets
|
|
117
|
+
- API design detail markdown
|
|
118
|
+
- If any artifact cannot yet be synced, note the mismatch explicitly rather than leaving stale content.
|
|
119
|
+
|
|
120
|
+
## 11. Minimum YAML Quality Gate
|
|
121
|
+
- Path/method follow the target system convention.
|
|
122
|
+
- API type is classified (`New`, `Deferred`, `Existing (reuse)`).
|
|
123
|
+
- Request/response wrappers are stable and explicit.
|
|
124
|
+
- FE-only helper payloads are removed.
|
|
125
|
+
- Field names and types match DB semantics.
|
|
126
|
+
- UUID examples are valid UUIDs.
|
|
127
|
+
- Date descriptions include display format where needed.
|
|
128
128
|
- Search/list APIs document filter semantics and ordering when relevant.
|
|
@@ -1,98 +1,108 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdtk-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 DEV (Planning + SDTK-CODE Handoff)
|
|
7
|
-
|
|
8
|
-
## Critical Constraints
|
|
9
|
-
- I do not emit `READY_FOR_SDTK_CODE` until the current `FEATURE_IMPL_PLAN` scope is approved and all required upstream refs are explicit.
|
|
10
|
-
- I do not claim downstream implementation is complete from within `/dev`.
|
|
11
|
-
|
|
12
|
-
## Outputs
|
|
13
|
-
- `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
|
|
14
|
-
- `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
|
|
15
|
-
|
|
16
|
-
## Legacy Prompt Templates
|
|
17
|
-
- `./prompts/implementer.md`
|
|
18
|
-
- `./prompts/spec-reviewer.md`
|
|
19
|
-
- `./prompts/code-quality-reviewer.md`
|
|
20
|
-
|
|
21
|
-
These prompt templates remain in the repo as transition-only manual helper assets.
|
|
22
|
-
They are not the default `/dev` workflow in this wave.
|
|
23
|
-
Use them only when the user explicitly requests a manual legacy review or delegated implementation experiment outside the normal `/dev -> SDTK-CODE` path.
|
|
24
|
-
|
|
25
|
-
## Process
|
|
26
|
-
1. Read `ARCH_DESIGN_*` + backlog.
|
|
27
|
-
2. Read `sdtk-spec.config.json` for project stack + test/lint commands.
|
|
28
|
-
3. Write or refine `FEATURE_IMPL_PLAN_*`:
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
- `
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
---
|
|
2
|
+
name: sdtk-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 DEV (Planning + SDTK-CODE Handoff)
|
|
7
|
+
|
|
8
|
+
## Critical Constraints
|
|
9
|
+
- I do not emit `READY_FOR_SDTK_CODE` until the current `FEATURE_IMPL_PLAN` scope is approved and all required upstream refs are explicit.
|
|
10
|
+
- I do not claim downstream implementation is complete from within `/dev`.
|
|
11
|
+
|
|
12
|
+
## Outputs
|
|
13
|
+
- `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
|
|
14
|
+
- `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
|
|
15
|
+
|
|
16
|
+
## Legacy Prompt Templates
|
|
17
|
+
- `./prompts/implementer.md`
|
|
18
|
+
- `./prompts/spec-reviewer.md`
|
|
19
|
+
- `./prompts/code-quality-reviewer.md`
|
|
20
|
+
|
|
21
|
+
These prompt templates remain in the repo as transition-only manual helper assets.
|
|
22
|
+
They are not the default `/dev` workflow in this wave.
|
|
23
|
+
Use them only when the user explicitly requests a manual legacy review or delegated implementation experiment outside the normal `/dev -> SDTK-CODE` path.
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
1. Read `ARCH_DESIGN_*` + backlog.
|
|
27
|
+
2. Read `sdtk-spec.config.json` for project stack + test/lint commands.
|
|
28
|
+
3. Write or refine `FEATURE_IMPL_PLAN_*`:
|
|
29
|
+
- issue summary and scope
|
|
30
|
+
- explicit non-goals
|
|
31
|
+
- implementation slices
|
|
32
|
+
- required refs
|
|
33
|
+
- optional refs
|
|
34
|
+
- issue-specific test obligations using real executable commands
|
|
35
|
+
- blockers and open questions
|
|
36
|
+
4. If anything is unclear: record OQ-xx in `FEATURE_IMPL_PLAN` and escalate to `@pm` for a decision.
|
|
37
|
+
5. Decide readiness:
|
|
38
|
+
- `READY_FOR_SDTK_CODE` when the current slice is concrete enough for downstream coding
|
|
39
|
+
- `BLOCKED_FOR_SDTK_CODE` when blockers remain
|
|
40
|
+
6. Generate `CODE_HANDOFF_*` with `toolkit/scripts/generate-code-handoff.ps1`.
|
|
41
|
+
- Canonical writer rule: the machine-readable JSON is generator-owned; do not hand-author or patch the JSON shape manually.
|
|
42
|
+
- If an existing `CODE_HANDOFF_*` file is non-canonical, regenerate it with the script and `-Force` instead of editing keys by hand.
|
|
43
|
+
- Use the script-owned snake_case contract only. Do not emit legacy camelCase keys such as `featureKey`, `requiredRefs`, `optionalRefs`, `openBlockers`, `implementationSlices`, `testObligations`, or `suggestedNextCommand`.
|
|
44
|
+
7. Mirror the same readiness decision in the final `SDTK-CODE Handoff` section of `FEATURE_IMPL_PLAN`.
|
|
45
|
+
- Do not copy placeholder `UPDATE_ME` commands from `sdtk-spec.config.json` into the handoff plan as if they were executable proof.
|
|
46
|
+
8. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 4 to show planning/handoff completion status.
|
|
47
|
+
9. Handoff:
|
|
48
|
+
- if ready: suggest the exact `sdtk-code start --feature-key <KEY> --lane <feature|bugfix> --project-path .` command
|
|
49
|
+
- if blocked: list blockers and keep the work in `/dev`
|
|
50
|
+
|
|
51
|
+
## Delegated Execution Contract
|
|
52
|
+
- The implementer subagent receives the full task text directly in the prompt when the user explicitly requests manual legacy execution.
|
|
53
|
+
- Required implementer status values:
|
|
54
|
+
- `DONE`
|
|
55
|
+
- `DONE_WITH_CONCERNS`
|
|
56
|
+
- `NEEDS_CONTEXT`
|
|
57
|
+
- `BLOCKED`
|
|
58
|
+
- `DONE_WITH_CONCERNS` means the task is complete but the controller must read the concerns before review.
|
|
59
|
+
- `NEEDS_CONTEXT` means the controller must supply missing information and re-dispatch.
|
|
60
|
+
- `BLOCKED` means do not retry the same task unchanged; resolve the blocker first.
|
|
61
|
+
- The spec reviewer must verify real artifacts, not trust implementer claims.
|
|
62
|
+
- The code-quality reviewer is a second-stage review and must not run before spec compliance passes.
|
|
63
|
+
- This legacy review loop is optional and manual in this wave; it is not the default `/dev` contract.
|
|
64
|
+
|
|
65
|
+
## Model Selection Guidance
|
|
66
|
+
Choose the cheapest model that can safely complete the task without creating avoidable rework.
|
|
67
|
+
|
|
68
|
+
| Task type | Recommended model tier | Why |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| Single-file mechanical change with a clear spec | Fast model | Useful for legacy/manual helper tasks, not the default handoff path |
|
|
71
|
+
| Multi-file integration that follows an approved plan | Standard model | Useful when manually validating scope or reviewing downstream constraints |
|
|
72
|
+
| Architecture or design tradeoff for the current implementation slice | Most capable model | Requires judgment and ambiguity handling |
|
|
73
|
+
| Stage 1 artifact/spec review | Standard model | Legacy/manual review aid only |
|
|
74
|
+
| Stage 2 code-quality review | Standard or most capable model | Legacy/manual review aid only |
|
|
75
|
+
| Cross-artifact consistency investigation | Most capable model | Requires broader synthesis across docs and handoff inputs |
|
|
76
|
+
|
|
77
|
+
Blocked-task rule:
|
|
78
|
+
- If an implementer returns `BLOCKED`, do not force the same model to retry the same task unchanged.
|
|
79
|
+
- First resolve missing context or reduce task scope.
|
|
80
|
+
- Escalate to a stronger model only when the blocker is judgment or synthesis bound, not because the prompt was incomplete.
|
|
81
|
+
|
|
82
|
+
## Verification Before Completion
|
|
83
|
+
Apply `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md`.
|
|
84
|
+
|
|
85
|
+
Do not:
|
|
86
|
+
- say the handoff is ready without validating the current refs, blockers, slices, and obligations
|
|
87
|
+
- cite downstream readiness without fresh verification evidence for the claim
|
|
88
|
+
- use `should`, `probably`, or `seems` in place of executed checks
|
|
89
|
+
- rely on partial output, stale command runs, or unchecked agent reports
|
|
90
|
+
- manually compose `CODE_HANDOFF` JSON when the canonical generator script is available
|
|
91
|
+
|
|
92
|
+
If validation fails or cannot be run, report the handoff as blocked and explain the blocker.
|
|
93
|
+
|
|
94
|
+
## Order-Critical Hard Gate
|
|
95
|
+
Do not emit `READY_FOR_SDTK_CODE` until `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md` exists and the current execution scope is explicitly approved in that plan for downstream implementation.
|
|
96
|
+
|
|
97
|
+
If the plan is missing, incomplete, or still awaiting approval for the current task slice, stop and update the plan first. Do not emit the handoff first and backfill the plan later.
|
|
98
|
+
|
|
99
|
+
Do not let placeholder commands, vague slice names, or missing required refs stand in for real downstream readiness.
|
|
100
|
+
|
|
101
|
+
## Common Mistakes
|
|
102
|
+
|
|
103
|
+
| Mistake | Why it is wrong | Do instead |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| Treat `/dev` as the place where final code and QA handoff happen | Collapses the boundary between SDTK-SPEC and SDTK-CODE | Stop `/dev` at `FEATURE_IMPL_PLAN + CODE_HANDOFF` |
|
|
106
|
+
| Emit `READY_FOR_SDTK_CODE` with missing refs or vague slices | Pushes ambiguity downstream and weakens handoff quality | Make refs, slices, obligations, and blockers explicit before the handoff |
|
|
107
|
+
| Retry a `BLOCKED` manual helper prompt with the same context | Repeats the same failure mode | Add missing context, split the task, or keep the handoff blocked |
|
|
108
|
+
| Copy `UPDATE_ME` placeholder commands into the plan as if they were executable verification | Fakes downstream readiness and weakens verification-before-completion | Replace placeholders with issue-specific real commands or state truthfully that a project-level command is unknown |
|
|
@@ -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.
|