sdtk-kit 0.3.7 → 0.3.9

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.
Files changed (49) hide show
  1. package/README.md +4 -2
  2. package/assets/manifest/toolkit-bundle.manifest.json +118 -78
  3. package/assets/manifest/toolkit-bundle.sha256.txt +45 -37
  4. package/assets/toolkit/toolkit/AGENTS.md +10 -2
  5. package/assets/toolkit/toolkit/install.ps1 +44 -4
  6. package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +43 -3
  7. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +5 -1
  8. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md +7 -1
  9. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +17 -0
  10. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +87 -11
  11. package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +4 -0
  12. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +17 -0
  13. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +4 -0
  14. package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_CREATION_RULES.md +7 -1
  15. package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +17 -0
  16. package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +69 -13
  17. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +4 -0
  18. package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +20 -5
  19. package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +34 -1
  20. package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +4 -0
  21. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +4 -0
  22. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +4 -0
  23. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +4 -0
  24. package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +4 -0
  25. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +17 -4
  26. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +21 -4
  27. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +69 -13
  28. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +20 -68
  29. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +168 -3
  30. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +11 -0
  31. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +302 -0
  32. package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +22 -8
  33. package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +26 -39
  34. package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +38 -6
  35. package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +47 -25
  36. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +7 -1
  37. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +6 -0
  38. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +17 -0
  39. package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +12 -1
  40. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +69 -13
  41. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +40 -9
  42. package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +31 -0
  43. package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +28 -0
  44. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +26 -0
  45. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +20 -0
  46. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +23 -0
  47. package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +26 -0
  48. package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +21 -0
  49. package/package.json +1 -1
@@ -10,6 +10,7 @@ from pathlib import Path
10
10
  TABLE_ROW_RE = re.compile(r"^\|.*\|\s*$")
11
11
  TABLE_SEP_RE = re.compile(r"^\|\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|\s*$")
12
12
  HEADING_RE = re.compile(r"^(#{1,6})\s+(.*\S)\s*$")
13
+ SCREEN_SECTION_HEADING_RE = re.compile(r"^###\s+(.*\S)\s*$", re.MULTILINE)
13
14
  VI_DIACRITIC_RE = re.compile(r"[À-ỹ]")
14
15
  VI_PHRASE_RE = re.compile(
15
16
  r"\b("
@@ -19,6 +20,15 @@ VI_PHRASE_RE = re.compile(
19
20
  re.IGNORECASE,
20
21
  )
21
22
  INLINE_HEADING_RE = re.compile(r".+\s#{2,}\s+\S")
23
+ IMAGE_LINK_RE = re.compile(r"!\[[^\]]*\]\(([^)]+)\)")
24
+ PLANTUML_FENCE_START_RE = re.compile(r"^\s*```plantuml\s*$", re.IGNORECASE)
25
+ NEW_STYLE_ACTIVITY_LINE_RE = re.compile(
26
+ r"^\s*(start|stop|partition\s+\"|if\s*\(|fork(?:\s+again)?\b|end\s+fork\b|note\s+(?:right|left|top|bottom)\b|:[^;\n]+;)",
27
+ re.IGNORECASE,
28
+ )
29
+ LEGACY_ACTIVITY_START_RE = re.compile(r"\(\*\)")
30
+ LEGACY_EDGE_LABEL_RE = re.compile(r"-->\s*\[")
31
+ MIXED_ACTIVITY_ARROW_RE = re.compile(r":[^;\n]+;\s*-->")
22
32
 
23
33
 
24
34
  @dataclass(frozen=True)
@@ -82,6 +92,134 @@ def collect_hygiene_issues(md_text: str, *, en_check: bool) -> dict[str, list[tu
82
92
  return issues
83
93
 
84
94
 
95
+ def _is_root_relative_docs_href(href: str) -> bool:
96
+ normalized = href.strip().replace("\\", "/").lower()
97
+ if not normalized:
98
+ return False
99
+ if re.match(r"^[a-z][a-z0-9+.-]*://", normalized):
100
+ return False
101
+ if normalized.startswith(("mailto:", "tel:", "data:", "#")):
102
+ return False
103
+ return normalized.startswith(("docs/", "./docs/", "/docs/"))
104
+
105
+
106
+ def collect_screen_image_path_issues(md_text: str) -> list[tuple[int, str]]:
107
+ issues: list[tuple[int, str]] = []
108
+ lines = md_text.splitlines()
109
+ in_code_block = False
110
+ expecting_image_line = False
111
+
112
+ for idx, line in enumerate(lines, start=1):
113
+ stripped = line.strip()
114
+ if stripped.startswith("```"):
115
+ in_code_block = not in_code_block
116
+ expecting_image_line = False
117
+ continue
118
+ if in_code_block:
119
+ continue
120
+ if not stripped:
121
+ continue
122
+
123
+ if stripped.lower().startswith("screen image:"):
124
+ expecting_image_line = stripped.lower() == "screen image:"
125
+ hrefs = IMAGE_LINK_RE.findall(stripped)
126
+ elif expecting_image_line and stripped.startswith("!["):
127
+ expecting_image_line = False
128
+ hrefs = IMAGE_LINK_RE.findall(stripped)
129
+ else:
130
+ hrefs = []
131
+ if not stripped.startswith("<!--"):
132
+ expecting_image_line = False
133
+
134
+ for href in hrefs:
135
+ if _is_root_relative_docs_href(href):
136
+ issues.append((idx, href))
137
+
138
+ return issues
139
+
140
+
141
+ def collect_plantuml_activity_syntax_issues(md_text: str) -> list[tuple[int, str]]:
142
+ issues: list[tuple[int, str]] = []
143
+ lines = md_text.splitlines()
144
+ in_plantuml_block = False
145
+ block_start_line = 0
146
+ block_lines: list[str] = []
147
+
148
+ def flush_block() -> None:
149
+ nonlocal issues, block_lines, block_start_line
150
+ if not block_lines:
151
+ return
152
+ has_new_style = any(NEW_STYLE_ACTIVITY_LINE_RE.search(line) for line in block_lines)
153
+ if not has_new_style:
154
+ block_lines = []
155
+ block_start_line = 0
156
+ return
157
+
158
+ for offset, line in enumerate(block_lines, start=0):
159
+ line_no = block_start_line + offset
160
+ if LEGACY_ACTIVITY_START_RE.search(line):
161
+ issues.append(
162
+ (line_no, "Legacy activity start marker `(*)` is not allowed in new-style activity diagrams.")
163
+ )
164
+ if MIXED_ACTIVITY_ARROW_RE.search(line):
165
+ issues.append(
166
+ (line_no, "Do not append legacy `-->` transitions after a new-style `:Activity;` action line.")
167
+ )
168
+ elif LEGACY_EDGE_LABEL_RE.search(line):
169
+ issues.append(
170
+ (line_no, "Legacy edge labels like `--> [label]` are not allowed in new-style activity diagrams.")
171
+ )
172
+
173
+ block_lines = []
174
+ block_start_line = 0
175
+
176
+ for idx, line in enumerate(lines, start=1):
177
+ if not in_plantuml_block and PLANTUML_FENCE_START_RE.match(line):
178
+ in_plantuml_block = True
179
+ block_start_line = idx + 1
180
+ block_lines = []
181
+ continue
182
+
183
+ if in_plantuml_block and line.strip().startswith("```"):
184
+ flush_block()
185
+ in_plantuml_block = False
186
+ continue
187
+
188
+ if in_plantuml_block:
189
+ block_lines.append(line)
190
+
191
+ if in_plantuml_block:
192
+ flush_block()
193
+
194
+ return issues
195
+
196
+
197
+ def collect_wireframe_mapping_issues(md_text: str) -> list[tuple[int, str]]:
198
+ issues: list[tuple[int, str]] = []
199
+ sections = list(SCREEN_SECTION_HEADING_RE.finditer(md_text))
200
+ for idx, match in enumerate(sections):
201
+ start = match.start()
202
+ end = sections[idx + 1].start() if idx + 1 < len(sections) else len(md_text)
203
+ section_text = md_text[start:end]
204
+
205
+ if "Design Source Type: generated-draft" not in section_text:
206
+ continue
207
+ if "> Screen image not rendered in this environment." in section_text:
208
+ continue
209
+ if "Screen image:" not in section_text or "![" not in section_text:
210
+ continue
211
+ if "#### Wireframe Marker Mapping" in section_text:
212
+ continue
213
+
214
+ line_no = md_text.count("\n", 0, start) + 1
215
+ section_name = match.group(1).strip()
216
+ issues.append(
217
+ (line_no, f"{section_name}: missing `Wireframe Marker Mapping` table for generated-draft screen.")
218
+ )
219
+
220
+ return issues
221
+
222
+
85
223
  def parse_action_tables(md_text: str) -> list[Occurrence]:
86
224
  occurrences: list[Occurrence] = []
87
225
  current_section = ""
@@ -172,9 +310,6 @@ def main() -> int:
172
310
 
173
311
  text = _read_text(spec_path)
174
312
  occ = parse_action_tables(text)
175
- if not occ:
176
- print("[WARN] No action tables detected (| No | Action | Description | ... |).")
177
- return 0
178
313
 
179
314
  by_number: dict[int, list[Occurrence]] = {}
180
315
  for o in occ:
@@ -191,16 +326,28 @@ def main() -> int:
191
326
 
192
327
  has_issues = bool(duplicates or decreases)
193
328
  hygiene = collect_hygiene_issues(text, en_check=args.en_check)
329
+ image_path_issues = collect_screen_image_path_issues(text)
330
+ plantuml_activity_issues = collect_plantuml_activity_syntax_issues(text)
331
+ wireframe_mapping_issues = collect_wireframe_mapping_issues(text)
194
332
  if hygiene["encoding"] or hygiene["inline_heading"]:
195
333
  has_issues = True
196
334
  if args.en_check and (hygiene["vi_diacritic"] or hygiene["vi_phrase"]):
197
335
  has_issues = True
336
+ if image_path_issues:
337
+ has_issues = True
338
+ if plantuml_activity_issues:
339
+ has_issues = True
340
+ if wireframe_mapping_issues:
341
+ has_issues = True
198
342
 
199
343
  print(f"Checked: {spec_path}")
200
344
  print(f"- Total numbered rows: {len(occ)}")
201
345
  print(f"- Unique numbers: {len(by_number)}")
202
346
  print(f"- EN hygiene check enabled: {args.en_check}")
203
347
 
348
+ if not occ:
349
+ print("[WARN] No action tables detected (| No | Action | Description | ... |).")
350
+
204
351
  if duplicates:
205
352
  print("\n[FAIL] Duplicate numbers found:")
206
353
  for n in sorted(duplicates.keys()):
@@ -233,6 +380,21 @@ def main() -> int:
233
380
  for line_no, line in hygiene["vi_phrase"][:20]:
234
381
  print(f"- line {line_no}: {line.strip()}")
235
382
 
383
+ if image_path_issues:
384
+ print("\n[FAIL] Screen image markdown paths must be file-relative, not docs-root-relative:")
385
+ for line_no, href in image_path_issues[:20]:
386
+ print(f"- line {line_no}: {href}")
387
+
388
+ if plantuml_activity_issues:
389
+ print("\n[FAIL] Mixed or legacy PlantUML activity syntax detected in a new-style screen-flow block:")
390
+ for line_no, message in plantuml_activity_issues[:20]:
391
+ print(f"- line {line_no}: {message}")
392
+
393
+ if wireframe_mapping_issues:
394
+ print("\n[FAIL] Missing wireframe-marker mapping tables for generated-draft screens:")
395
+ for line_no, message in wireframe_mapping_issues[:20]:
396
+ print(f"- line {line_no}: {message}")
397
+
236
398
  if not has_issues:
237
399
  print("\n[OK] Numbering and text hygiene checks passed.")
238
400
  return 0
@@ -240,6 +402,9 @@ def main() -> int:
240
402
  print("\nHint: Use global numbering across the full document.")
241
403
  print("- Do not repeat No values in any action table.")
242
404
  print("- Do not reset numbering per screen/dialog.")
405
+ print("- Use file-relative screen image paths such as assets/<feature>/screens/<screen>.svg.")
406
+ print("- Use new-style PlantUML activity syntax only for screen-flow diagrams.")
407
+ print("- Add a `Wireframe Marker Mapping` table when a generated-draft screen embeds a wireframe image.")
243
408
  print("- Keep EN artifacts free of Vietnamese leftovers and encoding corruption.")
244
409
  print("- Keep headings/sections on separate lines (avoid merged markdown blocks).")
245
410
  return 1
@@ -5,6 +5,10 @@ description: Generate screen-based QA test-case markdown (`[FEATURE_KEY]_TEST_CA
5
5
 
6
6
  # SDTK Test Case Spec
7
7
 
8
+ ## Critical Constraints
9
+ - I do not invent test coverage beyond BA, flow-action, and API sources.
10
+ - I do not let test totals drift away from worksheet rows or the QA baseline.
11
+
8
12
  ## Outputs
9
13
  - `docs/qa/[FEATURE_KEY]_TEST_CASE.md`
10
14
  - Optional project variant:
@@ -28,6 +32,7 @@ description: Generate screen-based QA test-case markdown (`[FEATURE_KEY]_TEST_CA
28
32
  4. Keep one unified 18-column schema for UTC/ITC rows.
29
33
  5. Keep stable case IDs; do not renumber only because of regrouping.
30
34
  6. Track unresolved decisions via `OQ-xx` and keep benchmark-expected OQs explicitly OPEN per `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md`.
35
+ 7. Quote exact BA, API, or flow-action requirement text when a testcase or coverage claim depends on that requirement.
31
36
 
32
37
  ## Procedure
33
38
  1. Resolve output path:
@@ -44,6 +49,12 @@ description: Generate screen-based QA test-case markdown (`[FEATURE_KEY]_TEST_CA
44
49
  - no placeholder tokens like `??`
45
50
  - out-of-scope boundaries are explicit
46
51
 
52
+ ## Specification Quoting
53
+ When a testcase, coverage note, or defect check depends on a requirement, quote the exact source text before stating coverage or mismatch.
54
+
55
+ Use this format:
56
+ - `Spec says: "[exact quote]" -> Evidence: [covered/not covered + file reference]`
57
+
47
58
  ## Role Integration
48
59
  - Primary owner: `/qa`.
49
60
  - `/qa` uses this skill to design/update reusable test-case specs.
@@ -0,0 +1,302 @@
1
+ schema_version: 1
2
+ skills:
3
+ - name: sdtk-pm
4
+ phase: pm
5
+ role_tag: /pm
6
+ use_when: Start feature scope or produce PM planning artifacts before BA or ARCH handoff.
7
+ primary_inputs:
8
+ - source requirements
9
+ - docs/product/PROJECT_INITIATION_[FEATURE_KEY].md
10
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
11
+ primary_outputs:
12
+ - docs/product/PROJECT_INITIATION_[FEATURE_KEY].md
13
+ - docs/product/PRD_[FEATURE_KEY].md
14
+ - docs/product/BACKLOG_[FEATURE_KEY].md
15
+ hard_gates:
16
+ - Do not hand off without updating SHARED_PLANNING.md and QUALITY_CHECKLIST.md.
17
+ - Keep unresolved OQ items explicit instead of silently deciding for other roles.
18
+ references: []
19
+ prompts: []
20
+ scripts: []
21
+ runtime_support: [claude, codex]
22
+ dependencies: []
23
+ pack: core
24
+
25
+ - name: sdtk-ba
26
+ phase: ba
27
+ role_tag: /ba
28
+ use_when: Convert PM initiation into a BA spec with glossary, BR, UC, AC, NFR, and traceability.
29
+ primary_inputs:
30
+ - docs/product/PROJECT_INITIATION_[FEATURE_KEY].md
31
+ - source requirements
32
+ primary_outputs:
33
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
34
+ hard_gates:
35
+ - Do not close BA output without explicit REQ to UC or BR or AC traceability.
36
+ - Keep unresolved OQ items visible for PM resolution.
37
+ references: []
38
+ prompts: []
39
+ scripts: []
40
+ runtime_support: [claude, codex]
41
+ dependencies: [sdtk-pm]
42
+ pack: core
43
+
44
+ - name: sdtk-arch
45
+ phase: arch
46
+ role_tag: /arch
47
+ use_when: Convert BA spec and PM backlog into architecture, API, DB, and UI design artifacts.
48
+ primary_inputs:
49
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
50
+ - docs/product/PRD_[FEATURE_KEY].md
51
+ - docs/product/BACKLOG_[FEATURE_KEY].md
52
+ primary_outputs:
53
+ - docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md
54
+ - docs/api/[FeaturePascal]_API.yaml
55
+ - docs/api/[FEATURE_KEY]_ENDPOINTS.md
56
+ - docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md
57
+ - docs/database/DATABASE_SPEC_[FEATURE_KEY].md
58
+ - docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md
59
+ - docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md
60
+ hard_gates:
61
+ - For UI scope, DESIGN_LAYOUT must exist before FLOW_ACTION_SPEC.
62
+ - Keep API, DB, and screen outputs aligned to the same source requirements.
63
+ references:
64
+ - toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md
65
+ - toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md
66
+ - toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md
67
+ prompts: []
68
+ scripts: []
69
+ runtime_support: [claude, codex]
70
+ dependencies: [sdtk-pm, sdtk-ba]
71
+ pack: core
72
+
73
+ - name: sdtk-dev
74
+ phase: dev
75
+ role_tag: /dev
76
+ use_when: Implement a feature from approved architecture and backlog, then prepare QA handoff.
77
+ primary_inputs:
78
+ - docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md
79
+ - docs/product/BACKLOG_[FEATURE_KEY].md
80
+ - docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md
81
+ primary_outputs:
82
+ - docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md
83
+ - code changes
84
+ - tests
85
+ hard_gates:
86
+ - Do not implement before the current FEATURE_IMPL_PLAN slice is approved.
87
+ - Run Stage 1 spec review before Stage 2 code-quality review.
88
+ references: []
89
+ prompts:
90
+ - toolkit/skills/sdtk-dev/prompts/implementer.md
91
+ - toolkit/skills/sdtk-dev/prompts/spec-reviewer.md
92
+ - toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md
93
+ scripts: []
94
+ runtime_support: [claude, codex]
95
+ dependencies: [sdtk-arch]
96
+ pack: core
97
+
98
+ - name: sdtk-qa
99
+ phase: qa
100
+ role_tag: /qa
101
+ use_when: Validate implementation against specs, run quality gates, and produce a release decision.
102
+ primary_inputs:
103
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
104
+ - docs/product/PRD_[FEATURE_KEY].md
105
+ - docs/product/BACKLOG_[FEATURE_KEY].md
106
+ - docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md
107
+ primary_outputs:
108
+ - docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md
109
+ - docs/qa/[FEATURE_KEY]_TEST_CASE.md
110
+ hard_gates:
111
+ - QA handoff is blocked until DEV Stage 1 and Stage 2 review gates PASS.
112
+ - Do not issue APPROVED without fresh verification evidence.
113
+ references: []
114
+ prompts: []
115
+ scripts: []
116
+ runtime_support: [claude, codex]
117
+ dependencies: [sdtk-dev]
118
+ pack: core
119
+
120
+ - name: sdtk-orchestrator
121
+ phase: orchestration
122
+ role_tag: /orchestrator
123
+ use_when: Coordinate the full six-phase workflow and keep phase handoffs in order.
124
+ primary_inputs:
125
+ - feature key
126
+ - feature name
127
+ - sdtk.config.json
128
+ - SHARED_PLANNING.md
129
+ - QUALITY_CHECKLIST.md
130
+ primary_outputs:
131
+ - phase handoffs
132
+ - updated SHARED_PLANNING.md
133
+ - updated QUALITY_CHECKLIST.md
134
+ hard_gates:
135
+ - Do not skip mandatory PM or BA or ARCH or DEV or QA phases.
136
+ - Do not hand off the next phase without evidence from the current phase.
137
+ references: []
138
+ prompts: []
139
+ scripts:
140
+ - toolkit/scripts/init-feature.ps1
141
+ runtime_support: [claude, codex]
142
+ dependencies: []
143
+ pack: core
144
+
145
+ - name: sdtk-dev-backend
146
+ phase: dev
147
+ role_tag: /dev-backend
148
+ use_when: Implement backend code that follows SDTK backend conventions for a scoped feature slice.
149
+ primary_inputs:
150
+ - docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md
151
+ - docs/api/[FeaturePascal]_API.yaml
152
+ - docs/database/DATABASE_SPEC_[FEATURE_KEY].md
153
+ primary_outputs:
154
+ - backend code
155
+ - backend tests
156
+ hard_gates:
157
+ - Do not generate backend code without approved API and data-contract sources.
158
+ - Follow existing repository patterns before introducing new module structure.
159
+ references: []
160
+ prompts: []
161
+ scripts: []
162
+ runtime_support: [claude, codex]
163
+ dependencies: [sdtk-dev, sdtk-api-doc]
164
+ pack: core
165
+
166
+ - name: sdtk-dev-frontend
167
+ phase: dev
168
+ role_tag: /dev-frontend
169
+ use_when: Implement frontend code that follows SDTK frontend conventions for a scoped feature slice.
170
+ primary_inputs:
171
+ - docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md
172
+ - docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md
173
+ - docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md
174
+ primary_outputs:
175
+ - frontend code
176
+ - frontend tests
177
+ hard_gates:
178
+ - Do not implement screens without the current design and flow-action source.
179
+ - Preserve existing frontend patterns before introducing new abstractions.
180
+ references: []
181
+ prompts: []
182
+ scripts: []
183
+ runtime_support: [claude, codex]
184
+ dependencies: [sdtk-dev, sdtk-design-layout, sdtk-screen-design-spec]
185
+ pack: core
186
+
187
+ - name: sdtk-api-doc
188
+ phase: arch
189
+ role_tag: /api-doc
190
+ use_when: Generate or update OpenAPI YAML, API endpoints markdown, and flow-list files from architecture scope.
191
+ primary_inputs:
192
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
193
+ - docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md
194
+ primary_outputs:
195
+ - docs/api/[FeaturePascal]_API.yaml
196
+ - docs/api/[FEATURE_KEY]_ENDPOINTS.md
197
+ - docs/api/[feature_snake]_api_flow_list.txt
198
+ hard_gates:
199
+ - Do not invent API paths or schemas that contradict BA or ARCH source.
200
+ - Keep YAML, endpoint markdown, and flow list synchronized.
201
+ references:
202
+ - toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md
203
+ - toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md
204
+ prompts: []
205
+ scripts: []
206
+ runtime_support: [claude, codex]
207
+ dependencies: [sdtk-arch, sdtk-ba]
208
+ pack: core
209
+
210
+ - name: sdtk-api-design-spec
211
+ phase: arch
212
+ role_tag: /api-design-spec
213
+ use_when: Generate API design detail markdown from OpenAPI YAML and API flow list.
214
+ primary_inputs:
215
+ - docs/api/[FeaturePascal]_API.yaml
216
+ - docs/api/[feature_snake]_api_flow_list.txt
217
+ primary_outputs:
218
+ - docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md
219
+ - docs/api/flows/*.puml
220
+ - docs/api/images/*.svg
221
+ hard_gates:
222
+ - Do not drift from the source YAML or flow list.
223
+ - Do not leave broken flow image embeds in the generated markdown.
224
+ references:
225
+ - toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md
226
+ - toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md
227
+ prompts: []
228
+ scripts:
229
+ - toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py
230
+ runtime_support: [claude, codex]
231
+ dependencies: [sdtk-api-doc]
232
+ pack: core
233
+
234
+ - name: sdtk-design-layout
235
+ phase: arch
236
+ role_tag: /design-layout
237
+ use_when: Generate design-layout docs with PlantUML salt wireframes and item tables for UI scope.
238
+ primary_inputs:
239
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
240
+ - docs/api/[FEATURE_KEY]_ENDPOINTS.md
241
+ primary_outputs:
242
+ - docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md
243
+ - docs/specs/assets/<feature_snake>/screens/*.svg
244
+ hard_gates:
245
+ - Do not skip screen IDs or item numbering alignment with the wireframe.
246
+ - If rendering is unavailable, record that explicitly instead of pretending render assets exist.
247
+ references: []
248
+ prompts: []
249
+ scripts:
250
+ - toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py
251
+ runtime_support: [claude, codex]
252
+ dependencies: [sdtk-arch, sdtk-ba]
253
+ pack: core
254
+
255
+ - name: sdtk-screen-design-spec
256
+ phase: arch
257
+ role_tag: /screen-design-spec
258
+ use_when: Build flow-action specs from requirement sources, design source references, and API mappings.
259
+ primary_inputs:
260
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
261
+ - docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md
262
+ - docs/api/[FEATURE_KEY]_ENDPOINTS.md
263
+ primary_outputs:
264
+ - docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md
265
+ - docs/specs/assets/<feature_snake>/screens/*
266
+ hard_gates:
267
+ - Do not finalize UI-scope screens without a valid design source type and reference.
268
+ - Do not leave broken image paths or missing API mappings in the spec.
269
+ references:
270
+ - toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md
271
+ - toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md
272
+ - toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md
273
+ - toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md
274
+ prompts: []
275
+ scripts:
276
+ - toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py
277
+ - toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py
278
+ runtime_support: [claude, codex]
279
+ dependencies: [sdtk-arch, sdtk-design-layout]
280
+ pack: core
281
+
282
+ - name: sdtk-test-case-spec
283
+ phase: qa
284
+ role_tag: /test-case-spec
285
+ use_when: Generate reusable screen-based test-case specifications before or during QA execution.
286
+ primary_inputs:
287
+ - docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md
288
+ - docs/specs/BA_SPEC_[FEATURE_KEY].md
289
+ - docs/api/[FEATURE_KEY]_ENDPOINTS.md
290
+ primary_outputs:
291
+ - docs/qa/[FEATURE_KEY]_TEST_CASE.md
292
+ hard_gates:
293
+ - Do not invent test coverage that is not grounded in BA, flow-action, or API sources.
294
+ - Keep totals and structured coverage counts consistent with the QA baseline.
295
+ references:
296
+ - toolkit/skills/sdtk-test-case-spec/references/TEST_CASE_CREATION_RULES.md
297
+ prompts: []
298
+ scripts:
299
+ - toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py
300
+ runtime_support: [claude, codex]
301
+ dependencies: [sdtk-qa, sdtk-screen-design-spec]
302
+ pack: core
@@ -1,18 +1,22 @@
1
1
  ---
2
2
  name: api-design-spec
3
- description: Generate detailed API design markdown from OpenAPI YAML and API flow list using Excel-style structure rules. Use when you need field-level request/response tables + per-endpoint process flow images for implementation/review handoff.
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
4
  ---
5
5
 
6
6
  ## Required Inputs (read before proceeding)
7
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
8
+ 1. `docs/api/[FeaturePascal]_API.yaml` - API contract
9
+ 2. `docs/api/[feature_snake]_api_flow_list.txt` - flow list
10
10
 
11
11
  ## Input
12
12
  $ARGUMENTS
13
13
 
14
14
  # SDTK API Design Detail Spec
15
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 generated markdown.
19
+
16
20
  ## Outputs
17
21
  - `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
18
22
  - Supporting generated assets:
@@ -40,15 +44,15 @@ $ARGUMENTS
40
44
  ## Generation Procedure
41
45
  1. Resolve input files (`yaml`, `flow_list`, `output`).
42
46
  2. Parse YAML endpoints (method, path, request schema, success/error schema).
43
- 3. Parse flow blocks from flow list (`@startuml ... @enduml`) and map by `METHOD + path`.
47
+ 3. Parse flow blocks from flow list and map them by normalized `METHOD + path`.
44
48
  4. Generate detailed markdown sections per API:
45
49
  - Flow summary / notes / login bullets from YAML `description`
46
50
  - Process flow source block (`text` fenced block)
47
51
  - Embedded flowchart image
48
52
  - Path parameter table
49
- - Request table (hierarchy levels + type + format + required)
53
+ - Request table
50
54
  - Success response table
51
- - Error response table (explicit schema if defined, otherwise shared envelope + inferred business statuses from flow)
55
+ - Error response table
52
56
  5. Generate/update `.puml` per API under `docs/api/flows`.
53
57
  6. Render `.svg` images under `docs/api/images`.
54
58
  7. Validate:
@@ -58,17 +62,27 @@ $ARGUMENTS
58
62
  - markdown tables keep `No` sequential numbering
59
63
 
60
64
  ## Script
61
- - `scripts/generate_api_design_detail.py`
65
+ - `.claude/skills/api-design-spec/scripts/generate_api_design_detail.py`
62
66
 
63
67
  ### Typical command
64
68
  ```bash
65
- python scripts/generate_api_design_detail.py \
69
+ python ".claude/skills/api-design-spec/scripts/generate_api_design_detail.py" \
66
70
  --feature-key SCHEDULE_WHITEBOARD \
67
71
  --yaml "docs/api/ScheduleWhiteboard_API.yaml" \
68
72
  --flow-list "docs/api/schedule_whiteboard_api_flow_list.txt" \
69
73
  --output "docs/api/SCHEDULE_WHITEBOARD_API_DESIGN_DETAIL.md"
70
74
  ```
71
75
 
76
+ ### Optional subset generation
77
+ ```bash
78
+ python ".claude/skills/api-design-spec/scripts/generate_api_design_detail.py" \
79
+ --feature-key SCHEDULE_WHITEBOARD \
80
+ --yaml "docs/api/ScheduleWhiteboard_API.yaml" \
81
+ --flow-list "docs/api/schedule_whiteboard_api_flow_list.txt" \
82
+ --output "docs/api/SCHEDULE_WHITEBOARD_API_DESIGN_DETAIL.md" \
83
+ --include "POST /api/whiteboard/assignment/{company_uuid}"
84
+ ```
85
+
72
86
  ## Orchestrator Integration (Hybrid)
73
87
  - `apiDesignDetailMode` in `sdtk.config.json` controls orchestration behavior:
74
88
  - `auto` (default): generate API design detail when ARCH has API scope and YAML/flow sources are available.