sdtk-spec-kit 0.10.0 → 0.12.0

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 (65) hide show
  1. package/README.md +1 -1
  2. package/assets/manifest/toolkit-bundle.manifest.json +207 -47
  3. package/assets/manifest/toolkit-bundle.sha256.txt +54 -22
  4. package/assets/toolkit/toolkit/AGENTS.md +2 -1
  5. package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +5 -1
  6. package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +4 -0
  7. package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +18 -0
  8. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +1 -0
  9. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +2 -2
  10. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +2 -2
  11. package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/SKILL.md +117 -0
  12. package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/references/PROFILE_TEMPLATE.md +60 -0
  13. package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/scripts/oq_sync.py +349 -0
  14. package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/scripts/test_oq_sync.py +175 -0
  15. package/assets/toolkit/toolkit/skills/sdtk-db-design/SKILL.md +130 -0
  16. package/assets/toolkit/toolkit/skills/sdtk-db-design/references/REVIEW_PROCESS.md +82 -0
  17. package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +1 -1
  18. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/SKILL.md +104 -0
  19. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/REVIEW_AND_MISTAKES.md +63 -0
  20. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SCR01.json +46 -0
  21. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SCR01.png +0 -0
  22. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SPEC_SCHEMA.md +208 -0
  23. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/example_spec.yaml +115 -0
  24. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/build_design_xlsx.py +550 -0
  25. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/design_spec.py +305 -0
  26. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/export_preview.py +111 -0
  27. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/export_spec_md.py +181 -0
  28. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/make_template.py +113 -0
  29. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/test_screen_design.py +198 -0
  30. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/uia_dump.py +64 -0
  31. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/validate_spec.py +260 -0
  32. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/SKILL.md +76 -0
  33. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/references/HANDOFF_TEMPLATE.md +63 -0
  34. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/references/MOVING_A_PROJECT.md +18 -0
  35. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/scripts/dirty_files.py +133 -0
  36. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/scripts/test_dirty_files.py +94 -0
  37. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/SKILL.md +4 -1
  38. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/test_metadata.py +76 -0
  39. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/xlsx_xml_edit.py +65 -1
  40. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +96 -0
  41. package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +15 -2
  42. package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +8 -4
  43. package/assets/toolkit/toolkit/skills-claude/customer-qa-sheet/SKILL.md +115 -0
  44. package/assets/toolkit/toolkit/skills-claude/db-design/SKILL.md +128 -0
  45. package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +33 -2
  46. package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +10 -0
  47. package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +10 -0
  48. package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +14 -3
  49. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +40 -2
  50. package/assets/toolkit/toolkit/skills-claude/screen-design-xlsx/SKILL.md +101 -0
  51. package/assets/toolkit/toolkit/skills-claude/session-handoff/SKILL.md +74 -0
  52. package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +6 -0
  53. package/assets/toolkit/toolkit/skills-claude/xlsx-safe-edit/SKILL.md +4 -1
  54. package/assets/toolkit/toolkit/templates/README.md +3 -0
  55. package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +14 -0
  56. package/assets/toolkit/toolkit/templates/screen-design-xlsx/ja-default/TEMPLATE.md +247 -0
  57. package/assets/toolkit/toolkit/templates/screen-design-xlsx/ja-default/template.xlsx +0 -0
  58. package/package.json +1 -1
  59. package/src/commands/help.js +7 -2
  60. package/src/lib/args.js +5 -2
  61. package/src/lib/design-handoff-provenance.js +30 -5
  62. package/src/lib/office-ingest.js +376 -0
  63. package/src/lib/requirement-analysis.js +77 -41
  64. package/src/lib/requirement-sources.js +259 -0
  65. package/src/lib/scope.js +4 -4
@@ -0,0 +1,208 @@
1
+ # design_spec.yaml schema
2
+
3
+ One YAML file describes the whole workbook. `build_design_xlsx.py` renders it; nothing else in
4
+ the pipeline knows about the Excel format.
5
+
6
+ Every top-level content key is optional — render only what you have, and pass `--sheets` to
7
+ rebuild a subset. Column references are Excel letters (`"AH"`), row references are 1-based.
8
+
9
+ ---
10
+
11
+ ## `workbook` (required)
12
+
13
+ ```yaml
14
+ workbook:
15
+ path: docs/screen_design/受注管理_画面設計書.xlsx
16
+ template_set: ja-default # optional; template set folder name or path (default ja-default). Its TEMPLATE.md
17
+ # names the blank workbook used when `path` does not exist yet.
18
+ template: null # optional; an explicit .xlsx instead of the template set's
19
+ final: false # true once the person finalized the workbook by hand: the renderer refuses,
20
+ # changes go through sdtk-xlsx-safe-edit final mode
21
+ block_rows: 40 # page height in rows; do not change unless the house format does
22
+ meta: # written into rows 1-2 of every block sheet
23
+ title: 画面設計書
24
+ user: ○○○○○○○○○○○○ 様
25
+ business: 受注管理システム
26
+ version: "0.1"
27
+ author: <作成者>
28
+ created: "2026-08-25"
29
+ updater: ""
30
+ updated: ""
31
+ process_sheet: null # optional; the tab `processes:` renders to (default 処理)
32
+ process_sheet_was: null # optional; the tab's former name: it is renamed, not left beside a new one
33
+ ```
34
+
35
+ `process_sheets[].was` does the same for an extra process sheet that was renamed.
36
+
37
+ ## `cover` — sheet 表紙
38
+
39
+ ```yaml
40
+ cover:
41
+ title: |-
42
+ 【受注管理システム】
43
+ 画面設計書
44
+ 設計書
45
+ 第0.03版
46
+ date: "2026-08-25"
47
+ ```
48
+
49
+ ## `history` — sheet 改訂記事
50
+
51
+ Newest last. The renderer lays entries out top-down with a blank row between them.
52
+
53
+ ```yaml
54
+ history:
55
+ - date: 2026年8月25日
56
+ version: "0.01"
57
+ items:
58
+ - ・初期作成
59
+ - date: 2026年9月7日
60
+ version: "0.03"
61
+ items:
62
+ - ・処理シートを作成し、主要処理のフローチャートを追加
63
+ -  (SCR01-1 注文の検索/PRC01-1 夜間の注文データ出力)
64
+ ```
65
+
66
+ ## `overview` — sheet 機能概要
67
+
68
+ ```yaml
69
+ overview:
70
+ - heading: "[機能概要]" # column A
71
+ items: # column B
72
+ - ・注文を検索し、内容を確認・修正する
73
+ - sub: (出荷済みの注文は修正できない) # column C
74
+ - heading: "[実装方針]"
75
+ groups: # a named group renders its name in column B, then its items
76
+ - name: 注文一覧
77
+ items:
78
+ - ・検索条件は注文番号または顧客名の部分一致とする
79
+ ```
80
+
81
+ ## `screens` — sheet 画面流れ
82
+
83
+ One entry per 40-row block.
84
+
85
+ ```yaml
86
+ screens:
87
+ - id: SCR01
88
+ name: 注文一覧画面
89
+ summary: 注文を検索し、一覧から選んだ注文の編集画面を開く。
90
+ source_label: Figma # printed at column A, row S+2
91
+ image: docs/screen_design/_preview/SCR01_注文一覧画面.png
92
+ image_width_pt: 571 # optional; height follows the file's aspect ratio
93
+ markers: # x/y are fractions of the image's bounding box
94
+ - {n: 1, x: 0.115, y: 0.055}
95
+ - {n: 2, x: 0.085, y: 0.230}
96
+ items: # right page table, one row each, in marker order
97
+ - name: ①検索条件
98
+ kind: テキスト # 部品の種類
99
+ attr: "-" # 属性
100
+ db: "" # DBカラム
101
+ len: "" # 桁数
102
+ default: "" # 初期値
103
+ required: "" # 必須
104
+ note: 注文番号または顧客名の一部を入力する。
105
+ note_alt: Enter part of … # optional, goes to column BZ (off-page working notes, e.g. a translation)
106
+ remarks: # <備考> block at the bottom of the left page
107
+ - text: ・アプリ起動後の既定画面。メニューの「注文」からも表示する。
108
+ alt:  Default screen after start-up… # optional second line
109
+ ```
110
+
111
+ `markers` must be consistent with `items`: marker *n* explains `items[n-1]`.
112
+
113
+ Markers can come from a UI Automation dump instead of being measured by eye (`scripts/uia_dump.py` writes the
114
+ screenshot and the dump of one window; see `example_spec.yaml` beside this file). Give `uia` **instead of** `markers`:
115
+
116
+ ```yaml
117
+ image: _uia/SCR01.png
118
+ uia:
119
+ dump: _uia/SCR01.json # window rect + element rects, screen coordinates
120
+ anchor: center # or left (a point just inside the element's left edge)
121
+ markers:
122
+ - {n: 1, id: SearchBox} # by automation id …
123
+ - {n: 2, name: 検索} # … or by element name; each must match exactly one element
124
+ ```
125
+
126
+ The loader turns each element's rectangle into x/y fractions of the captured window, so the markers follow the
127
+ UI when it moves. An element missing from the dump, or found twice, is a validation error.
128
+
129
+ ## `processes` — sheet 処理
130
+
131
+ Two block kinds. Blocks render in list order, one 40-row page each.
132
+
133
+ ### `kind: flow`
134
+
135
+ ```yaml
136
+ processes:
137
+ - kind: flow
138
+ id: SCR01-1 # 処理番号 (key is `id`; `no` is a YAML boolean, do not use it)
139
+ screen: 注文一覧画面 # 画面名 — where it is triggered from
140
+ summary: 検索条件に一致する注文を一覧に表示する
141
+ trigger: [検索ボタンを, 押す] # 1-2 lines beside the start terminator
142
+ ann_col: AH # X for linear flows, AH when there is a side branch
143
+ nodes: # main column, max 6
144
+ - type: box
145
+ n: "①"
146
+ text: "検索条件を取得し、\n前後の空白を除く"
147
+ sub: null # optional sub-process id shown next to the marker
148
+ - type: decision
149
+ n: "②"
150
+ text: "条件が\n空か" # HARD LIMIT: 2 lines x 7 full-width chars
151
+ else_label: 条件あり # label on the fall-through (downward) path
152
+ branch: # the side path, drawn to the right
153
+ n: "③"
154
+ label: 空 # label on the horizontal arrow
155
+ text: "「検索条件を入力して\nください」を表示する"
156
+ terminate: false # true = the branch ends in its own ◎ instead of merging back
157
+ notes: # right-hand explanation list
158
+ - mark: "①"
159
+ lines:
160
+ - 検索条件の前後の空白を取り除き、
161
+ - 空なら検索しない
162
+ - mark: "※"
163
+ lines: [API の失敗時はエラーメッセージを表示して一覧を変えない]
164
+ ```
165
+
166
+ `\n` inside `text` is a hard line break inside the shape.
167
+
168
+ ### `kind: detail`
169
+
170
+ ```yaml
171
+ - kind: detail
172
+ id: SCR01-1 # the parent's 処理番号, repeated in the header
173
+ screen: 注文一覧画面
174
+ summary: 検索条件に一致する注文を一覧に表示する
175
+ sub_no: SCR01-1-1
176
+ sub_name: 注文を検索する
177
+ sections:
178
+ - head: 呼び出しAPI
179
+ columns: # col = first grid column, span = width in grid columns
180
+ - {title: "No", col: E, span: 2}
181
+ - {title: API番号, col: G, span: 4}
182
+ - {title: メソッド・パス, col: K, span: 30}
183
+ - {title: 用途, col: AO, span: 20}
184
+ rows:
185
+ - ["1", API-01, "GET /api/v1/orders?q={条件}", 注文を検索する]
186
+ notes: [] # optional "・" lines under the table
187
+ - head: 補足
188
+ notes: # a section may be notes-only (no table)
189
+ - 閲覧権限のない顧客の注文はサーバー側で除外される。
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Layout budgets enforced by `validate_spec.py`
195
+
196
+ | Item | Limit |
197
+ |---|---|
198
+ | `flow.nodes` (main column) | 6 |
199
+ | `box.text` | 4 lines × 17 full-width chars |
200
+ | `decision.text` | 2 lines × 7 full-width chars |
201
+ | branch `text` | 4 lines × 17 full-width chars |
202
+ | `notes` total height | `sum(len(lines) + 1) ≤ block_rows - 10` |
203
+ | `notes` line width | ≤ 52 fw chars at `ann_col: X`, ≤ 38 at `AH`, ≤ 31 at `AO` |
204
+ | `detail` total height | `≤ block_rows - 6` |
205
+ | `screens.items` | `≤ block_rows - 3` |
206
+ | `screens.remarks` | must fit between the image and the block end |
207
+
208
+ "full-width chars" = East-Asian W/F/A characters count 1, everything else 0.5.
@@ -0,0 +1,115 @@
1
+ # Fictional example for sdtk-screen-design-xlsx: an order-management app of a made-up company (ACME).
2
+ # Validate: python <skill>/scripts/validate_spec.py --spec example_spec.yaml
3
+ workbook:
4
+ path: out/ACME_受注管理_画面設計書.xlsx
5
+ template_set: ja-default
6
+ block_rows: 40
7
+ meta:
8
+ title: 画面設計書
9
+ user: ACME商事 様
10
+ business: 受注管理システム
11
+ version: "0.01"
12
+ author: <作成者>
13
+ created: "2026-11-22"
14
+
15
+ cover:
16
+ title: |-
17
+ 【受注管理システム】
18
+ 画面設計書
19
+ 第0.01版
20
+ date: "2026-11-22"
21
+
22
+ history:
23
+ - date: 2026年11月22日
24
+ version: "0.01"
25
+ items:
26
+ - ・初期作成
27
+
28
+ overview:
29
+ - heading: "[機能概要]"
30
+ items:
31
+ - ・注文を検索し、内容を確認・修正する
32
+ - sub: (出荷済みの注文は修正できない)
33
+ - heading: "[実装方針]"
34
+ groups:
35
+ - name: 注文一覧
36
+ items:
37
+ - ・検索条件は注文番号または顧客名の部分一致とする
38
+
39
+ screens:
40
+ - id: SCR01
41
+ name: 注文一覧画面
42
+ summary: 注文を検索し、一覧から選んだ注文の編集画面を開く。
43
+ source_label: 試作アプリ
44
+ image: SCR01.png
45
+ image_width_pt: 520
46
+ uia: # markers placed from the UI Automation dump (uia_dump.py)
47
+ dump: SCR01.json
48
+ markers:
49
+ - {n: 1, id: SearchBox}
50
+ - {n: 2, id: SearchButton}
51
+ - {n: 3, id: OrderGrid}
52
+ items:
53
+ - {name: ①検索条件, kind: テキスト, attr: 入力, db: "", len: "50", default: "", required: "", note: 注文番号または顧客名の一部を入力する。}
54
+ - {name: ②検索, kind: ボタン, attr: "-", db: "", len: "", default: "", required: "", note: 条件に一致する注文を一覧に表示する。}
55
+ - {name: ③注文一覧, kind: グリッド, attr: 表示, db: orders, len: "", default: "", required: "", note: 行をダブルクリックすると注文編集画面を開く。}
56
+ remarks:
57
+ - text: ・アプリ起動後の既定画面。
58
+
59
+ processes:
60
+ - kind: flow
61
+ id: SCR01-1
62
+ screen: 注文一覧画面
63
+ summary: 検索条件に一致する注文を一覧に表示する
64
+ trigger: [検索ボタンを, 押す]
65
+ ann_col: AH
66
+ nodes:
67
+ - type: box
68
+ n: "①"
69
+ text: "検索条件を取得し、\n前後の空白を除く"
70
+ - type: decision
71
+ n: "②"
72
+ text: "条件が\n空か"
73
+ else_label: 条件あり
74
+ branch:
75
+ n: "③"
76
+ label: 空
77
+ text: "「検索条件を入力して\nください」を表示する"
78
+ terminate: true
79
+ - type: box
80
+ n: "④"
81
+ text: "注文を検索する"
82
+ sub: SCR01-1-1
83
+ - type: box
84
+ n: "⑤"
85
+ text: "結果を一覧に表示する"
86
+ notes:
87
+ - mark: "①"
88
+ lines: [検索条件の前後の空白を取り除く]
89
+ - mark: "②"
90
+ lines: [条件が空のときは検索しない]
91
+ - mark: "③"
92
+ lines: [メッセージを表示して処理を終える]
93
+ - mark: "④"
94
+ lines: [SCR01-1-1 を参照]
95
+ - mark: "⑤"
96
+ lines: [新しい注文から順に最大 200 件を表示する]
97
+
98
+ - kind: detail
99
+ id: SCR01-1
100
+ screen: 注文一覧画面
101
+ summary: 検索条件に一致する注文を一覧に表示する
102
+ sub_no: SCR01-1-1
103
+ sub_name: 注文を検索する
104
+ sections:
105
+ - head: 呼び出しAPI
106
+ columns:
107
+ - {title: "No", col: E, span: 2}
108
+ - {title: API番号, col: G, span: 4}
109
+ - {title: メソッド・パス, col: K, span: 30}
110
+ - {title: 用途, col: AO, span: 20}
111
+ rows:
112
+ - ["1", API-01, "GET /api/v1/orders?q={条件}&limit=200", 注文を検索する]
113
+ - head: 補足
114
+ notes:
115
+ - 顧客名の比較では全角・半角の違いを無視する。