sdtk-spec-kit 0.3.13 → 0.3.15
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/assets/manifest/toolkit-bundle.manifest.json +96 -156
- package/assets/manifest/toolkit-bundle.sha256.txt +45 -57
- package/assets/toolkit/toolkit/AGENTS.md +17 -15
- package/assets/toolkit/toolkit/README.md +3 -2
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +11 -1
- package/assets/toolkit/toolkit/install.ps1 +60 -50
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +2 -2
- package/assets/toolkit/toolkit/scripts/agents/run-claude-task.ps1 +110 -51
- package/assets/toolkit/toolkit/scripts/agents/run-codex-task.ps1 +76 -3
- package/assets/toolkit/toolkit/scripts/agents/validate-mailbox-formal-artifact.py +87 -0
- package/assets/toolkit/toolkit/scripts/generate-code-handoff.ps1 +9 -0
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +179 -169
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +111 -84
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +46 -10
- package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -85
- package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +7 -0
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +42 -3
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +1 -0
- package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +61 -5
- package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +63 -5
- package/assets/toolkit/toolkit/skills/sdtk-mailbox-dispatch/SKILL.md +5 -4
- package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +22 -13
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +53 -33
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +60 -24
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +9 -9
- package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +116 -90
- package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +49 -9
- package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +3 -3
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +9 -1
- package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +36 -2
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +1 -0
- package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +58 -5
- package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +60 -5
- package/assets/toolkit/toolkit/skills-claude/mailbox-dispatch/SKILL.md +5 -4
- package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +9 -0
- package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +49 -27
- package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +74 -20
- package/assets/toolkit/toolkit/templates/README.md +5 -1
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +1 -2
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
- package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +3 -3
- package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +128 -128
- package/assets/toolkit/toolkit/templates/docs/product/CONDENSED_UPSTREAM_INPUT_TEMPLATE.md +140 -0
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md +26 -0
- package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +2 -2
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md +12 -8
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md +8 -2
- package/package.json +48 -48
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -220
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -220
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/references/TEST_CASE_CREATION_RULES.md +0 -129
|
@@ -8,6 +8,8 @@ description: Generate screen-based QA test-case markdown (`[FEATURE_KEY]_TEST_CA
|
|
|
8
8
|
## Critical Constraints
|
|
9
9
|
- I do not invent test coverage beyond BA, flow-action, and API sources.
|
|
10
10
|
- I do not let test totals drift away from worksheet rows or the QA baseline.
|
|
11
|
+
- I do not emit a final TEST_CASE artifact without applying `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md`.
|
|
12
|
+
- I do not renumber stable case IDs only because of regrouping; stable IDs preserve traceability.
|
|
11
13
|
|
|
12
14
|
## Outputs
|
|
13
15
|
- `docs/qa/[FEATURE_KEY]_TEST_CASE.md`
|
|
@@ -25,29 +27,43 @@ description: Generate screen-based QA test-case markdown (`[FEATURE_KEY]_TEST_CA
|
|
|
25
27
|
- Clarification source:
|
|
26
28
|
- `docs/specs/Q&A.md` or `docs/en/specs/Q&A.md` when available
|
|
27
29
|
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
1. Resolve output path:
|
|
30
|
+
## When To Stop Or Escalate
|
|
31
|
+
- Stop if `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` does not exist; do not design test cases without a finalized flow-action spec as the primary source of truth for UI coverage.
|
|
32
|
+
- Stop if the Statistic Summary cannot be completed because test counts cannot be verified against the available flow/action rows; surface the gap rather than estimating.
|
|
33
|
+
- Stop if a coverage claim requires a requirement that is marked OQ-xx and still OPEN; track the gap explicitly in the Open Questions section rather than assuming resolution.
|
|
34
|
+
- Escalate to `@qa` or `sdtk-qa` if the test-case scope intersects a release decision that requires the QA Release Report.
|
|
35
|
+
- Escalate to `@ba` if a BA requirement is ambiguous for a test case that depends on it.
|
|
36
|
+
|
|
37
|
+
## Core Process
|
|
38
|
+
1. Apply `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md` first.
|
|
39
|
+
2. Resolve output path:
|
|
39
40
|
- default `docs/qa/[FEATURE_KEY]_TEST_CASE.md`
|
|
40
41
|
- use `docs/en/qa/...` only if the repo already follows `docs/en/**`.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
3. Build/refresh `Statistic Summary (Excel-aligned)` with UT total, IT total, and grand total.
|
|
43
|
+
4. Build `Feature Coverage Matrix` from flow/action and API docs.
|
|
44
|
+
5. Split UTC/ITC by screen sections (`screen-first`), not by test type only.
|
|
45
|
+
6. Fill conflict/permission/error-path cases from Q&A decisions and API contracts.
|
|
46
|
+
7. Record unresolved items in section `Open Questions`.
|
|
47
|
+
8. Keep section order fixed: Statistic -> Abbreviations -> Scope -> References -> Environment -> Coverage -> Screen-based UTC/ITC -> OQ -> STC/UAT note.
|
|
48
|
+
9. Use screen-first layout to mirror worksheet structure.
|
|
49
|
+
10. Keep one unified 18-column schema for UTC/ITC rows.
|
|
50
|
+
11. Keep stable case IDs; do not renumber only because of regrouping.
|
|
51
|
+
12. Track unresolved decisions via `OQ-xx` and keep benchmark-expected OQs explicitly OPEN per `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md`.
|
|
52
|
+
13. Quote exact BA, API, or flow-action requirement text when a testcase or coverage claim depends on that requirement.
|
|
53
|
+
|
|
54
|
+
## Validation / Quality Gates
|
|
55
|
+
- Statistic Summary totals match the actual row counts in UTC/ITC tables.
|
|
56
|
+
- Structured TEST_CASE total stays aligned with the QA release-report baseline; E2E tracked separately if applicable.
|
|
57
|
+
- No placeholder tokens such as `??` remain in any field.
|
|
58
|
+
- Out-of-scope boundaries are explicitly stated.
|
|
59
|
+
- Every coverage claim has a corresponding source quote.
|
|
60
|
+
- Open OQ-xx items are explicitly listed and not silently collapsed.
|
|
61
|
+
- Run `scripts/validate_test_case_spec.py` before finalizing.
|
|
62
|
+
|
|
63
|
+
## Order-Critical Hard Gate
|
|
64
|
+
Do not build the coverage matrix or test rows before applying `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md`. The rules define mandatory column schema and section order; skipping them produces non-Excel-aligned output that must be reformatted before QA handoff.
|
|
65
|
+
|
|
66
|
+
Do not finalize the artifact before verifying Statistic Summary totals match table row counts. Drifted totals are a hard failure at QA review.
|
|
51
67
|
|
|
52
68
|
## Specification Quoting
|
|
53
69
|
When a testcase, coverage note, or defect check depends on a requirement, quote the exact source text before stating coverage or mismatch.
|
|
@@ -60,9 +76,16 @@ Use this format:
|
|
|
60
76
|
- `/qa` uses this skill to design/update reusable test-case specs.
|
|
61
77
|
- `sdtk-qa` still owns release decision artifact (`QA_RELEASE_REPORT_*`).
|
|
62
78
|
|
|
63
|
-
##
|
|
64
|
-
|
|
65
|
-
|
|
79
|
+
## Common Mistakes
|
|
80
|
+
|
|
81
|
+
| Mistake | Why it is wrong | Do instead |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| Skip `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md` and free-form the layout | Produces non-conformant column schema | Always read and apply the rules before writing any row |
|
|
84
|
+
| Let Statistic Summary totals drift from table row counts | Hard failure at QA review | Verify totals against actual rows before finalizing |
|
|
85
|
+
| Renumber stable case IDs during regrouping | Breaks traceability with existing defect refs | Preserve case IDs; regroup without renumbering |
|
|
86
|
+
| Leave `??` placeholders in any field | Incomplete test cases cannot be executed | Resolve or escalate every ambiguity before finalizing |
|
|
87
|
+
| Invent coverage beyond available sources | Creates untraceable test claims | Only claim coverage for requirements present in BA/flow/API sources |
|
|
88
|
+
| Collapse OPEN OQ-xx items silently | Hides unresolved gaps from QA | Keep OQ-xx explicitly OPEN in the Open Questions section |
|
|
66
89
|
|
|
67
90
|
## Validator Script
|
|
68
91
|
- `scripts/validate_test_case_spec.py`
|
|
@@ -72,3 +95,16 @@ Use this format:
|
|
|
72
95
|
python "toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py" `
|
|
73
96
|
--file "docs/qa/[FEATURE_KEY]_TEST_CASE.md"
|
|
74
97
|
```
|
|
98
|
+
|
|
99
|
+
## Reference Loading Guidance
|
|
100
|
+
Read at skill start:
|
|
101
|
+
- `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md` (required before any row generation)
|
|
102
|
+
|
|
103
|
+
Read at slice start:
|
|
104
|
+
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` (required)
|
|
105
|
+
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` (required)
|
|
106
|
+
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (required)
|
|
107
|
+
|
|
108
|
+
Read on demand:
|
|
109
|
+
- `docs/specs/Q&A.md` or `docs/en/specs/Q&A.md` (when clarification is needed)
|
|
110
|
+
- `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md` (when OQ-xx items need policy guidance)
|
|
@@ -61,9 +61,9 @@ skills:
|
|
|
61
61
|
- For UI scope, DESIGN_LAYOUT must exist before FLOW_ACTION_SPEC.
|
|
62
62
|
- Keep API, DB, and screen outputs aligned to the same source requirements.
|
|
63
63
|
references:
|
|
64
|
-
- toolkit/
|
|
65
|
-
- toolkit/
|
|
66
|
-
- toolkit/
|
|
64
|
+
- toolkit/templates/docs/api/YAML_CREATION_RULES.md
|
|
65
|
+
- toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md
|
|
66
|
+
- toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md
|
|
67
67
|
prompts: []
|
|
68
68
|
scripts: []
|
|
69
69
|
runtime_support: [claude, codex]
|
|
@@ -227,8 +227,8 @@ skills:
|
|
|
227
227
|
- Do not invent API paths or schemas that contradict BA or ARCH source.
|
|
228
228
|
- Keep YAML, endpoint markdown, and flow list synchronized.
|
|
229
229
|
references:
|
|
230
|
-
- toolkit/
|
|
231
|
-
- toolkit/
|
|
230
|
+
- toolkit/templates/docs/api/YAML_CREATION_RULES.md
|
|
231
|
+
- toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md
|
|
232
232
|
prompts: []
|
|
233
233
|
scripts: []
|
|
234
234
|
runtime_support: [claude, codex]
|
|
@@ -250,8 +250,8 @@ skills:
|
|
|
250
250
|
- Do not drift from the source YAML or flow list.
|
|
251
251
|
- Do not leave broken flow image embeds in the generated markdown.
|
|
252
252
|
references:
|
|
253
|
-
- toolkit/
|
|
254
|
-
- toolkit/
|
|
253
|
+
- toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md
|
|
254
|
+
- toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md
|
|
255
255
|
prompts: []
|
|
256
256
|
scripts:
|
|
257
257
|
- toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py
|
|
@@ -295,7 +295,7 @@ skills:
|
|
|
295
295
|
- Do not finalize UI-scope screens without a valid design source type and reference.
|
|
296
296
|
- Do not leave broken image paths or missing API mappings in the spec.
|
|
297
297
|
references:
|
|
298
|
-
- toolkit/
|
|
298
|
+
- toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md
|
|
299
299
|
- toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md
|
|
300
300
|
- toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md
|
|
301
301
|
- toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md
|
|
@@ -321,7 +321,7 @@ skills:
|
|
|
321
321
|
- Do not invent test coverage that is not grounded in BA, flow-action, or API sources.
|
|
322
322
|
- Keep totals and structured coverage counts consistent with the QA baseline.
|
|
323
323
|
references:
|
|
324
|
-
- toolkit/
|
|
324
|
+
- toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md
|
|
325
325
|
prompts: []
|
|
326
326
|
scripts:
|
|
327
327
|
- toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py
|
|
@@ -1,90 +1,116 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-design-spec
|
|
3
|
-
description: Generate detailed API design markdown from OpenAPI YAML and API flow list. Use when you need field-level request/response tables plus one visible process-flow diagram per API.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Required Inputs (read before proceeding)
|
|
7
|
-
Read the following artifacts for the current feature:
|
|
8
|
-
1. `docs/api/[FeaturePascal]_API.yaml` - API contract
|
|
9
|
-
2. `docs/api/[feature_snake]_api_flow_list.txt` - flow list
|
|
10
|
-
|
|
11
|
-
## Input
|
|
12
|
-
$ARGUMENTS
|
|
13
|
-
|
|
14
|
-
# SDTK-SPEC API Design Detail Spec
|
|
15
|
-
|
|
16
|
-
## Critical Constraints
|
|
17
|
-
- I do not drift from the source YAML or flow list.
|
|
18
|
-
- I do not leave broken flow image embeds in the
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- Flow summary / notes / login bullets from YAML `description`
|
|
50
|
-
- Process flow source block (`text` fenced block)
|
|
51
|
-
- Embedded flowchart image
|
|
52
|
-
- Path parameter table
|
|
53
|
-
- Request table
|
|
54
|
-
- Success response table
|
|
55
|
-
- Error response table
|
|
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
|
-
-
|
|
1
|
+
---
|
|
2
|
+
name: api-design-spec
|
|
3
|
+
description: Generate detailed API design markdown from OpenAPI YAML and API flow list. Use when you need field-level request/response tables plus one visible process-flow diagram per API.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Required Inputs (read before proceeding)
|
|
7
|
+
Read the following artifacts for the current feature:
|
|
8
|
+
1. `docs/api/[FeaturePascal]_API.yaml` - API contract
|
|
9
|
+
2. `docs/api/[feature_snake]_api_flow_list.txt` - flow list
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
$ARGUMENTS
|
|
13
|
+
|
|
14
|
+
# SDTK-SPEC API Design Detail Spec
|
|
15
|
+
|
|
16
|
+
## Critical Constraints
|
|
17
|
+
- I do not drift from the source YAML or flow list.
|
|
18
|
+
- I do not leave broken flow image embeds or missing assumptions in the API design detail.
|
|
19
|
+
- I do not generate API design detail without a valid YAML source and matching flow list.
|
|
20
|
+
- I do not skip the flowchart creation rules; freehand flow sections that bypass `API_DESIGN_FLOWCHART_CREATION_RULES.md` are non-conformant.
|
|
21
|
+
|
|
22
|
+
## Outputs
|
|
23
|
+
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
24
|
+
- Supporting generated assets:
|
|
25
|
+
- `docs/api/flows/*.puml`
|
|
26
|
+
- `docs/api/images/*.svg`
|
|
27
|
+
|
|
28
|
+
## Required Inputs
|
|
29
|
+
- Feature key (`FEATURE_KEY`)
|
|
30
|
+
- API contract YAML:
|
|
31
|
+
- Preferred: `docs/api/[FeaturePascal]_API.yaml`
|
|
32
|
+
- Fallback: a specified YAML file path
|
|
33
|
+
- API flow list:
|
|
34
|
+
- Preferred: `docs/api/[feature_snake]_api_flow_list.txt`
|
|
35
|
+
- Fallback: a specified flow list path
|
|
36
|
+
|
|
37
|
+
## When To Stop Or Escalate
|
|
38
|
+
- Stop if the required YAML file does not exist or cannot be resolved; do not fabricate an endpoint table.
|
|
39
|
+
- Stop if the flow list is missing or contains no parseable `@startuml ... @enduml` blocks; record the gap and escalate to `/api-doc` for regeneration.
|
|
40
|
+
- Stop if YAML and flow list describe fundamentally different endpoint sets; surface the discrepancy as a blocker before generating any section.
|
|
41
|
+
- Escalate to `@arch` if a flow block is ambiguous about business logic that would change how a table row is authored.
|
|
42
|
+
|
|
43
|
+
## Core Process
|
|
44
|
+
1. Resolve input files (`yaml`, `flow_list`, `output`).
|
|
45
|
+
2. Load and apply `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md` before generating any section.
|
|
46
|
+
3. Parse YAML endpoints (method, path, request schema, success/error schema).
|
|
47
|
+
4. Parse flow blocks from flow list and map them by normalized `METHOD + path`.
|
|
48
|
+
5. Generate detailed markdown sections per API:
|
|
49
|
+
- Flow summary / notes / login bullets from YAML `description`
|
|
50
|
+
- Process flow source block (`text` fenced block)
|
|
51
|
+
- Embedded flowchart image
|
|
52
|
+
- Path parameter table
|
|
53
|
+
- Request table (hierarchy levels + type + format + required)
|
|
54
|
+
- Success response table
|
|
55
|
+
- Error response table (explicit schema if defined, otherwise shared envelope + inferred business statuses from flow)
|
|
56
|
+
6. Generate/update `.puml` per API under `docs/api/flows`.
|
|
57
|
+
7. Render `.svg` images under `docs/api/images`.
|
|
58
|
+
|
|
59
|
+
## Validation / Quality Gates
|
|
60
|
+
- Every API section has exactly one embedded image; no section is left without a flow visual.
|
|
61
|
+
- Every embed path exists on disk; broken image links are a hard failure.
|
|
62
|
+
- No render error image output is accepted.
|
|
63
|
+
- Markdown tables keep `No` sequential numbering.
|
|
64
|
+
- YAML-derived field tables match the YAML source exactly; no invented fields.
|
|
65
|
+
- Error response table aligns with actual flow exits, not placeholder `None` values.
|
|
66
|
+
|
|
67
|
+
## Order-Critical Hard Gate
|
|
68
|
+
Do not generate any API section before reading and applying `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md`. Sections generated without that reference produce structurally incorrect output that will fail implementation review.
|
|
69
|
+
|
|
70
|
+
Do not emit `API_DESIGN_DETAIL.md` if the input YAML and flow list describe incompatible endpoint sets. Fix the upstream sources before proceeding.
|
|
71
|
+
|
|
72
|
+
## Common Mistakes
|
|
73
|
+
|
|
74
|
+
| Mistake | Why it is wrong | Do instead |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| Generate sections without reading flowchart rules | Produces non-conformant flow blocks | Always read `API_DESIGN_FLOWCHART_CREATION_RULES.md` first |
|
|
77
|
+
| Leave error table as `None` or empty | Hides actual error paths from implementers | Derive error rows from the flow list and YAML error schemas |
|
|
78
|
+
| Embed image paths that do not exist on disk | Breaks document rendering for reviewers | Verify `.svg` exists before embedding; fail loudly if missing |
|
|
79
|
+
| Invent request fields not present in YAML | Introduces contract drift | Only table fields that exist in the parsed YAML schema |
|
|
80
|
+
| Run on an outdated YAML source | Generates stale API design detail | Always confirm the YAML was produced from the current BA/ARCH pass |
|
|
81
|
+
|
|
82
|
+
## Script
|
|
83
|
+
- `.claude/skills/api-design-spec/scripts/generate_api_design_detail.py`
|
|
84
|
+
|
|
85
|
+
### Typical command
|
|
86
|
+
```bash
|
|
87
|
+
python ".claude/skills/api-design-spec/scripts/generate_api_design_detail.py" \
|
|
88
|
+
--feature-key WORK_PLANNING_BOARD \
|
|
89
|
+
--yaml "docs/api/WorkPlanningBoard_API.yaml" \
|
|
90
|
+
--flow-list "docs/api/work_planning_board_api_flow_list.txt" \
|
|
91
|
+
--output "docs/api/WORK_PLANNING_BOARD_API_DESIGN_DETAIL.md"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Optional subset generation
|
|
95
|
+
```bash
|
|
96
|
+
python ".claude/skills/api-design-spec/scripts/generate_api_design_detail.py" \
|
|
97
|
+
--feature-key WORK_PLANNING_BOARD \
|
|
98
|
+
--yaml "docs/api/WorkPlanningBoard_API.yaml" \
|
|
99
|
+
--flow-list "docs/api/work_planning_board_api_flow_list.txt" \
|
|
100
|
+
--output "docs/api/WORK_PLANNING_BOARD_API_DESIGN_DETAIL.md" \
|
|
101
|
+
--include "POST /api/work-assignment/{organization_uuid}"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Orchestrator Integration (Hybrid)
|
|
105
|
+
- `apiDesignDetailMode` in `sdtk-spec.config.json` controls orchestration behavior:
|
|
106
|
+
- `auto` (default): generate API design detail when ARCH has API scope and YAML/flow sources are available.
|
|
107
|
+
- `on`: always generate API design detail for API scope (fail if required sources are missing).
|
|
108
|
+
- `off`: skip unless user explicitly requests.
|
|
109
|
+
|
|
110
|
+
## Reference Loading Guidance
|
|
111
|
+
Read at skill start:
|
|
112
|
+
- `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md` (required before any section generation)
|
|
113
|
+
|
|
114
|
+
Read on demand:
|
|
115
|
+
- `docs/api/[FeaturePascal]_API.yaml` (required input)
|
|
116
|
+
- `docs/api/[feature_snake]_api_flow_list.txt` (required input)
|
|
@@ -13,6 +13,12 @@ $ARGUMENTS
|
|
|
13
13
|
|
|
14
14
|
# SDTK-SPEC API Documentation
|
|
15
15
|
|
|
16
|
+
## Critical Constraints
|
|
17
|
+
- I do not invent API paths or payload contracts that contradict BA or ARCH artifacts.
|
|
18
|
+
- I do not leave YAML, endpoint markdown, and flow-list outputs out of sync.
|
|
19
|
+
- I do not emit a final API doc without applying canonical YAML and flowchart rules.
|
|
20
|
+
- I do not proceed if BA_SPEC or ARCH_DESIGN is absent or clearly incomplete for the current feature scope.
|
|
21
|
+
|
|
16
22
|
## Outputs
|
|
17
23
|
- `docs/api/[FeaturePascal]_API.yaml`
|
|
18
24
|
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
|
|
@@ -20,17 +26,24 @@ $ARGUMENTS
|
|
|
20
26
|
- Optional downstream (via `/api-design-spec`):
|
|
21
27
|
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
22
28
|
|
|
23
|
-
## Inputs
|
|
24
|
-
- Feature name
|
|
25
|
-
- Entities
|
|
26
|
-
- Use cases (UC-xx)
|
|
29
|
+
## Required Inputs
|
|
30
|
+
- Feature name and key
|
|
31
|
+
- Entities and key fields
|
|
32
|
+
- Use cases (UC-xx) and business rules (BR-xx)
|
|
27
33
|
- Auth/permission model
|
|
34
|
+
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md`
|
|
35
|
+
|
|
36
|
+
## When To Stop Or Escalate
|
|
37
|
+
- Stop if no BA_SPEC or ARCH_DESIGN exists for the current feature; surface as a blocker before generating any artifact.
|
|
38
|
+
- Stop if path naming policy cannot be resolved without a product decision; record as OQ-xx and escalate to `@pm`.
|
|
39
|
+
- Stop if required UC/BR coverage cannot be confirmed from available sources; do not invent coverage.
|
|
40
|
+
- Escalate to `@arch` if the data model or endpoint scope is structurally ambiguous.
|
|
28
41
|
|
|
29
|
-
## Process
|
|
42
|
+
## Core Process
|
|
30
43
|
1. Read `docs/specs/BA_SPEC_[FEATURE_KEY].md` and/or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md`.
|
|
31
44
|
2. Read and apply split API rule sources:
|
|
32
|
-
-
|
|
33
|
-
-
|
|
45
|
+
- `./references/YAML_CREATION_RULES.md` for YAML contract rules
|
|
46
|
+
- `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md` for flow list / flowchart rules
|
|
34
47
|
3. Define endpoints mapped to UC-xx; keep path naming consistent across CRUD/search/list/mst patterns and apply `governance/ai/core/SDTK_API_PATH_STYLE_POLICY.md` for canonical resource naming.
|
|
35
48
|
4. For each endpoint, document request/response schema and error cases.
|
|
36
49
|
5. Generate/update endpoint markdown (`[FEATURE_KEY]_ENDPOINTS.md`) with summary tables, API type grouping, and screen-logic mapping.
|
|
@@ -43,5 +56,32 @@ $ARGUMENTS
|
|
|
43
56
|
- terminology consistency across endpoint detail, summary tables, and flow labels
|
|
44
57
|
10. If orchestrator mode requires API design detail generation (`apiDesignDetailMode=auto/on`), handoff to `/api-design-spec` after YAML + flow list are updated.
|
|
45
58
|
|
|
46
|
-
##
|
|
47
|
-
-
|
|
59
|
+
## Validation / Quality Gates
|
|
60
|
+
- YAML, ENDPOINTS.md, and flow list are consistent: the same resource uses the same path segment across all three.
|
|
61
|
+
- Every UC-xx in scope has at least one endpoint mapped.
|
|
62
|
+
- Every endpoint has a defined success response and at least one error case.
|
|
63
|
+
- All path segments match the canonical naming policy.
|
|
64
|
+
- No OQ-xx is silently collapsed; unresolved items remain explicit.
|
|
65
|
+
- English artifact hygiene passes (no language leftovers, no mojibake).
|
|
66
|
+
|
|
67
|
+
## Order-Critical Hard Gate
|
|
68
|
+
Do not finalize YAML or ENDPOINTS.md before reading and applying both reference rule files. Generating endpoints without `YAML_CREATION_RULES.md` and `API_DESIGN_FLOWCHART_CREATION_RULES.md` produces non-conformant output that will fail downstream review.
|
|
69
|
+
|
|
70
|
+
## Common Mistakes
|
|
71
|
+
|
|
72
|
+
| Mistake | Why it is wrong | Do instead |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| Invent endpoint paths not in BA/ARCH | Creates untracked contract drift | Map every endpoint to an explicit UC-xx or BR-xx |
|
|
75
|
+
| Apply path naming from memory without reading policy | Policy details evolve; memory is stale | Always read `SDTK_API_PATH_STYLE_POLICY.md` first |
|
|
76
|
+
| Leave YAML and ENDPOINTS.md out of sync | Downstream tools depend on consistency | Cross-check path/method/schema for each endpoint across all three outputs |
|
|
77
|
+
| Silently collapse an OQ-xx marked as OPEN | Hides unresolved decisions | Keep OQ-xx explicit; escalate to `@pm` if resolution is needed |
|
|
78
|
+
| Skip flowchart rules and free-style PlantUML | Produces flows that deviate from SDTK conventions | Apply `API_DESIGN_FLOWCHART_CREATION_RULES.md` before generating any flow |
|
|
79
|
+
|
|
80
|
+
## Reference Loading Guidance
|
|
81
|
+
Read at skill start:
|
|
82
|
+
- `./references/YAML_CREATION_RULES.md`
|
|
83
|
+
- `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md`
|
|
84
|
+
|
|
85
|
+
Read on demand:
|
|
86
|
+
- `governance/ai/core/SDTK_API_PATH_STYLE_POLICY.md` (always required for path naming)
|
|
87
|
+
- `docs/specs/API_DOC_SKILL_ANALYSIS.md` (if present; deeper domain analysis only)
|
|
@@ -40,9 +40,9 @@ $ARGUMENTS
|
|
|
40
40
|
1. Read BA spec and PRD/backlog.
|
|
41
41
|
2. Read `sdtk-spec.config.json` for project stack assumptions.
|
|
42
42
|
3. If architecture output includes API contracts or flows, read and apply:
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
4. If architecture output includes screen flow-action specs, read and apply
|
|
43
|
+
- `./references/YAML_CREATION_RULES.md`
|
|
44
|
+
- `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md`
|
|
45
|
+
4. If architecture output includes screen flow-action specs, read and apply `./references/FLOW_ACTION_SPEC_CREATION_RULES.md`.
|
|
46
46
|
5. For API scope:
|
|
47
47
|
- generate or update YAML, endpoints markdown, and flow list
|
|
48
48
|
- if API detail is required, use `/api-design-spec`
|
|
@@ -40,7 +40,15 @@ alongside `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`. The package is at:
|
|
|
40
40
|
`docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md`
|
|
41
41
|
|
|
42
42
|
The condensed package is a DRAFT accelerator only. All derived actors, entities,
|
|
43
|
-
rules, and acceptance criteria require human review before adoption.
|
|
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.
|
|
44
52
|
|
|
45
53
|
## Process
|
|
46
54
|
1. Read `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md` and any source requirements.
|
|
@@ -18,11 +18,23 @@ $ARGUMENTS
|
|
|
18
18
|
- I do not hide render limitations; I record when screen preview rendering is unavailable.
|
|
19
19
|
- I do not leave rendered wireframes without visible local item markers that map back to the `Items` table.
|
|
20
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.
|
|
21
22
|
|
|
22
23
|
## Output
|
|
23
24
|
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
24
25
|
|
|
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
|
|
26
38
|
1. Read BA spec (screens + fields) and API list.
|
|
27
39
|
2. For each screen, include:
|
|
28
40
|
- PlantUML `@startsalt` wireframe first, with visible screen-local markers embedded directly in the SALT labels
|
|
@@ -42,7 +54,29 @@ $ARGUMENTS
|
|
|
42
54
|
- Run `.claude/skills/design-layout/scripts/render_design_layout_images.py` to extract `@startsalt` blocks and render `.svg` files.
|
|
43
55
|
- Output path: `docs/specs/assets/<feature_snake>/screens/<screen_id>.svg`
|
|
44
56
|
- The renderer warns if a screen wireframe has no visible local markers or still uses legacy `(N)` markers.
|
|
45
|
-
- If PlantUML is unavailable, rendering is skipped with a warning and the render-skipped note is used in `FLOW_ACTION_SPEC`.
|
|
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 |
|
|
46
80
|
|
|
47
81
|
## Screen Image Renderer
|
|
48
82
|
- Script: `.claude/skills/design-layout/scripts/render_design_layout_images.py`
|
|
@@ -52,6 +52,7 @@ If no arguments provided, read current feature context from SHARED_PLANNING.md.
|
|
|
52
52
|
- If an existing `CODE_HANDOFF_*` file is non-canonical, regenerate it with the script and `-Force` instead of editing keys by hand.
|
|
53
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
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.
|
|
55
56
|
7. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 4.
|
|
56
57
|
8. If ready, suggest:
|
|
57
58
|
- `sdtk-code start --feature-key <KEY> --lane <feature|bugfix> --project-path .`
|
|
@@ -8,13 +8,66 @@ $ARGUMENTS
|
|
|
8
8
|
|
|
9
9
|
# SDTK-SPEC Backend (Toolkit conventions)
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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:
|
|
15
43
|
- Soft delete via `del_flg`
|
|
16
44
|
- Audit fields (creator/updater/del timestamps)
|
|
17
45
|
- Permission checks before operations
|
|
18
46
|
- `transaction.atomic()` for writes
|
|
19
47
|
- Logging decorator on public endpoints
|
|
20
|
-
|
|
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 |
|