sdtk-spec-kit 0.4.4 → 0.4.5
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 +369 -376
- package/assets/atlas/build_atlas.py +880 -880
- package/assets/atlas/doc_atlas_viewer_template.html +3796 -3782
- package/assets/atlas/vendor/mermaid.min.js +2029 -2029
- package/assets/keys/spec-entitlement-public.pem +11 -11
- package/assets/manifest/toolkit-bundle.manifest.json +178 -178
- package/assets/manifest/toolkit-bundle.sha256.txt +83 -83
- package/assets/toolkit/toolkit/AGENTS.md +247 -245
- package/assets/toolkit/toolkit/README.md +50 -50
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +207 -208
- package/assets/toolkit/toolkit/install.ps1 +21 -21
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +92 -92
- package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +70 -70
- 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 +86 -86
- package/assets/toolkit/toolkit/scripts/init-feature.ps1 +262 -262
- 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 +27 -27
- package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +49 -49
- package/assets/toolkit/toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md +47 -47
- package/assets/toolkit/toolkit/session/SDTK_AGENT_WORKING_RULES.md +49 -49
- 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/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 +2 -2
- package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +17 -17
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +106 -106
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +50 -50
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +53 -53
- 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-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 +2 -2
- package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +40 -40
- 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 +112 -112
- package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +115 -115
- package/assets/toolkit/toolkit/templates/README.md +68 -68
- 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 +228 -228
- 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 +107 -107
- package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +60 -60
- 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/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_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/PM_TO_BA.md +29 -29
- package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +26 -26
- 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 +90 -90
- package/src/commands/analyze.js +11 -0
- package/src/commands/atlas.js +341 -352
- package/src/commands/auth.js +85 -85
- package/src/commands/entitlement.js +163 -163
- package/src/commands/generate.js +209 -147
- package/src/commands/help.js +41 -33
- package/src/commands/init.js +15 -15
- package/src/commands/project.js +51 -51
- package/src/commands/runtime.js +239 -239
- package/src/index.js +9 -6
- 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 -355
- package/src/lib/browser-open.js +39 -39
- package/src/lib/capabilities.js +92 -92
- package/src/lib/entitlements.js +238 -238
- package/src/lib/errors.js +41 -41
- package/src/lib/github-access.js +143 -143
- package/src/lib/legacy-auth-migration.js +55 -55
- package/src/lib/license-activation.js +375 -375
- package/src/lib/powershell.js +85 -85
- package/src/lib/premium-loader.js +126 -126
- package/src/lib/premium-packs.js +331 -331
- 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/requirement-analysis.js +396 -0
- package/src/lib/scope.js +83 -83
- package/src/lib/state.js +73 -73
- package/src/lib/suite-state.js +70 -70
- package/src/lib/toolkit-payload.js +99 -99
- package/src/lib/atlas-ask.js +0 -170
|
@@ -1,116 +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 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)
|
|
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)
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-doc
|
|
3
|
-
description: Generate OpenAPI 3.x YAML and PlantUML flow diagrams for a feature following this toolkit's API conventions. Use when you need to create/update docs/api/* (API spec + flow list) from BA_SPEC/ARCH_DESIGN.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Required Inputs (read before proceeding)
|
|
7
|
-
Read the following artifacts for the current feature:
|
|
8
|
-
1. `docs/specs/BA_SPEC_*.md` - business rules, use cases
|
|
9
|
-
2. `docs/architecture/ARCH_DESIGN_*.md` - system components, data model
|
|
10
|
-
|
|
11
|
-
## Input
|
|
12
|
-
$ARGUMENTS
|
|
13
|
-
|
|
14
|
-
# SDTK-SPEC API Documentation
|
|
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
|
-
|
|
22
|
-
## Outputs
|
|
23
|
-
- `docs/api/[FeaturePascal]_API.yaml`
|
|
24
|
-
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
|
|
25
|
-
- `docs/api/[feature_snake]_api_flow_list.txt`
|
|
26
|
-
- Optional downstream (via `/api-design-spec`):
|
|
27
|
-
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
28
|
-
|
|
29
|
-
## Required Inputs
|
|
30
|
-
- Feature name and key
|
|
31
|
-
- Entities and key fields
|
|
32
|
-
- Use cases (UC-xx) and business rules (BR-xx)
|
|
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.
|
|
41
|
-
|
|
42
|
-
## Core Process
|
|
43
|
-
1. Read `docs/specs/BA_SPEC_[FEATURE_KEY].md` and/or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md`.
|
|
44
|
-
2. Read and apply split API rule sources:
|
|
45
|
-
- `./references/YAML_CREATION_RULES.md` for YAML contract rules
|
|
46
|
-
- `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md` for flow list / flowchart rules
|
|
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.
|
|
48
|
-
4. For each endpoint, document request/response schema and error cases.
|
|
49
|
-
5. Generate/update endpoint markdown (`[FEATURE_KEY]_ENDPOINTS.md`) with summary tables, API type grouping, and screen-logic mapping.
|
|
50
|
-
6. Generate PlantUML flows including auth, permission check, validation, main logic, and error exits.
|
|
51
|
-
7. Ensure traceability notes reference UC/BR where relevant.
|
|
52
|
-
8. For benchmark runs, if the requirement or upstream artifacts mark an OQ as expected OPEN, keep that ambiguity explicit in flow list / endpoint docs instead of silently collapsing it.
|
|
53
|
-
9. Validate English output hygiene when generating English artifacts:
|
|
54
|
-
- no mixed-language leftovers in narrative text
|
|
55
|
-
- no mojibake/encoding corruption markers
|
|
56
|
-
- terminology consistency across endpoint detail, summary tables, and flow labels
|
|
57
|
-
10. If orchestrator mode requires API design detail generation (`apiDesignDetailMode=auto/on`), handoff to `/api-design-spec` after YAML + flow list are updated.
|
|
58
|
-
|
|
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)
|
|
1
|
+
---
|
|
2
|
+
name: api-doc
|
|
3
|
+
description: Generate OpenAPI 3.x YAML and PlantUML flow diagrams for a feature following this toolkit's API conventions. Use when you need to create/update docs/api/* (API spec + flow list) from BA_SPEC/ARCH_DESIGN.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Required Inputs (read before proceeding)
|
|
7
|
+
Read the following artifacts for the current feature:
|
|
8
|
+
1. `docs/specs/BA_SPEC_*.md` - business rules, use cases
|
|
9
|
+
2. `docs/architecture/ARCH_DESIGN_*.md` - system components, data model
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
$ARGUMENTS
|
|
13
|
+
|
|
14
|
+
# SDTK-SPEC API Documentation
|
|
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
|
+
|
|
22
|
+
## Outputs
|
|
23
|
+
- `docs/api/[FeaturePascal]_API.yaml`
|
|
24
|
+
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
|
|
25
|
+
- `docs/api/[feature_snake]_api_flow_list.txt`
|
|
26
|
+
- Optional downstream (via `/api-design-spec`):
|
|
27
|
+
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
28
|
+
|
|
29
|
+
## Required Inputs
|
|
30
|
+
- Feature name and key
|
|
31
|
+
- Entities and key fields
|
|
32
|
+
- Use cases (UC-xx) and business rules (BR-xx)
|
|
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.
|
|
41
|
+
|
|
42
|
+
## Core Process
|
|
43
|
+
1. Read `docs/specs/BA_SPEC_[FEATURE_KEY].md` and/or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md`.
|
|
44
|
+
2. Read and apply split API rule sources:
|
|
45
|
+
- `./references/YAML_CREATION_RULES.md` for YAML contract rules
|
|
46
|
+
- `./references/API_DESIGN_FLOWCHART_CREATION_RULES.md` for flow list / flowchart rules
|
|
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.
|
|
48
|
+
4. For each endpoint, document request/response schema and error cases.
|
|
49
|
+
5. Generate/update endpoint markdown (`[FEATURE_KEY]_ENDPOINTS.md`) with summary tables, API type grouping, and screen-logic mapping.
|
|
50
|
+
6. Generate PlantUML flows including auth, permission check, validation, main logic, and error exits.
|
|
51
|
+
7. Ensure traceability notes reference UC/BR where relevant.
|
|
52
|
+
8. For benchmark runs, if the requirement or upstream artifacts mark an OQ as expected OPEN, keep that ambiguity explicit in flow list / endpoint docs instead of silently collapsing it.
|
|
53
|
+
9. Validate English output hygiene when generating English artifacts:
|
|
54
|
+
- no mixed-language leftovers in narrative text
|
|
55
|
+
- no mojibake/encoding corruption markers
|
|
56
|
+
- terminology consistency across endpoint detail, summary tables, and flow labels
|
|
57
|
+
10. If orchestrator mode requires API design detail generation (`apiDesignDetailMode=auto/on`), handoff to `/api-design-spec` after YAML + flow list are updated.
|
|
58
|
+
|
|
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)
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: arch
|
|
3
|
-
description: Solution Architect workflow for SDTK-SPEC. Use when you need to convert BA_SPEC plus PM backlog into technical architecture, API contracts, and UI design docs; then hand off to DEV.
|
|
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 and QUALITY_CHECKLIST.md
|
|
9
|
-
3. If unclear: log OQ-xx in artifact and 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 2 BA Analysis gate must show all items done
|
|
17
|
-
- Phase 2+ PM Planning gate must show all items done
|
|
18
|
-
|
|
19
|
-
## Input
|
|
20
|
-
$ARGUMENTS
|
|
21
|
-
|
|
22
|
-
# SDTK-SPEC ARCH (Solution Architecture)
|
|
23
|
-
|
|
24
|
-
## Critical Constraints
|
|
25
|
-
- I do not generate `FLOW_ACTION_SPEC` before `DESIGN_LAYOUT` for UI-scope features.
|
|
26
|
-
- I do not silently skip render failures for generated-draft screen images.
|
|
27
|
-
|
|
28
|
-
## Outputs
|
|
29
|
-
- `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md`
|
|
30
|
-
- If applicable:
|
|
31
|
-
- `docs/api/[FeaturePascal]_API.yaml`
|
|
32
|
-
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
|
|
33
|
-
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
34
|
-
- `docs/api/[feature_snake]_api_flow_list.txt`
|
|
35
|
-
- `docs/database/DATABASE_SPEC_[FEATURE_KEY].md`
|
|
36
|
-
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
37
|
-
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
|
|
38
|
-
|
|
39
|
-
## Process
|
|
40
|
-
1. Read BA spec and PRD/backlog.
|
|
41
|
-
2. Read `sdtk-spec.config.json` for project stack assumptions.
|
|
42
|
-
3. If architecture output includes API contracts or flows, 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
|
-
5. For API scope:
|
|
47
|
-
- generate or update YAML, endpoints markdown, and flow list
|
|
48
|
-
- if API detail is required, use `/api-design-spec`
|
|
49
|
-
6. For UI scope:
|
|
50
|
-
- generate or update `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
51
|
-
- run `.claude/skills/design-layout/scripts/render_design_layout_images.py` to attempt screen preview rendering
|
|
52
|
-
- then generate or update `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` using `/screen-design-spec`
|
|
53
|
-
- when no Figma or screenshot exists, use `generated-draft` with `DESIGN_LAYOUT` as the design source
|
|
54
|
-
- if rendering fails, use the render-skipped note instead of a broken image reference
|
|
55
|
-
7. Define system components, data model, API endpoints, flows, screen layouts, and security decisions.
|
|
56
|
-
8. Ensure mapping UC/BR to DB/API/screens and keep EN artifact hygiene.
|
|
57
|
-
9. If anything is unclear, record OQ-xx in `ARCH_DESIGN` and escalate to PM.
|
|
58
|
-
10. Update shared state and Phase 3 checklist.
|
|
59
|
-
11. Handoff: suggest `/dev` to prepare `FEATURE_IMPL_PLAN + CODE_HANDOFF` after the design is complete.
|
|
1
|
+
---
|
|
2
|
+
name: arch
|
|
3
|
+
description: Solution Architect workflow for SDTK-SPEC. Use when you need to convert BA_SPEC plus PM backlog into technical architecture, API contracts, and UI design docs; then hand off to DEV.
|
|
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 and QUALITY_CHECKLIST.md
|
|
9
|
+
3. If unclear: log OQ-xx in artifact and 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 2 BA Analysis gate must show all items done
|
|
17
|
+
- Phase 2+ PM Planning gate must show all items done
|
|
18
|
+
|
|
19
|
+
## Input
|
|
20
|
+
$ARGUMENTS
|
|
21
|
+
|
|
22
|
+
# SDTK-SPEC ARCH (Solution Architecture)
|
|
23
|
+
|
|
24
|
+
## Critical Constraints
|
|
25
|
+
- I do not generate `FLOW_ACTION_SPEC` before `DESIGN_LAYOUT` for UI-scope features.
|
|
26
|
+
- I do not silently skip render failures for generated-draft screen images.
|
|
27
|
+
|
|
28
|
+
## Outputs
|
|
29
|
+
- `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md`
|
|
30
|
+
- If applicable:
|
|
31
|
+
- `docs/api/[FeaturePascal]_API.yaml`
|
|
32
|
+
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
|
|
33
|
+
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
34
|
+
- `docs/api/[feature_snake]_api_flow_list.txt`
|
|
35
|
+
- `docs/database/DATABASE_SPEC_[FEATURE_KEY].md`
|
|
36
|
+
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
37
|
+
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
|
|
38
|
+
|
|
39
|
+
## Process
|
|
40
|
+
1. Read BA spec and PRD/backlog.
|
|
41
|
+
2. Read `sdtk-spec.config.json` for project stack assumptions.
|
|
42
|
+
3. If architecture output includes API contracts or flows, 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
|
+
5. For API scope:
|
|
47
|
+
- generate or update YAML, endpoints markdown, and flow list
|
|
48
|
+
- if API detail is required, use `/api-design-spec`
|
|
49
|
+
6. For UI scope:
|
|
50
|
+
- generate or update `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
51
|
+
- run `.claude/skills/design-layout/scripts/render_design_layout_images.py` to attempt screen preview rendering
|
|
52
|
+
- then generate or update `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` using `/screen-design-spec`
|
|
53
|
+
- when no Figma or screenshot exists, use `generated-draft` with `DESIGN_LAYOUT` as the design source
|
|
54
|
+
- if rendering fails, use the render-skipped note instead of a broken image reference
|
|
55
|
+
7. Define system components, data model, API endpoints, flows, screen layouts, and security decisions.
|
|
56
|
+
8. Ensure mapping UC/BR to DB/API/screens and keep EN artifact hygiene.
|
|
57
|
+
9. If anything is unclear, record OQ-xx in `ARCH_DESIGN` and escalate to PM.
|
|
58
|
+
10. Update shared state and Phase 3 checklist.
|
|
59
|
+
11. Handoff: suggest `/dev` to prepare `FEATURE_IMPL_PLAN + CODE_HANDOFF` after the design is complete.
|