sdtk-spec-kit 0.10.0 → 0.11.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 (52) hide show
  1. package/README.md +1 -1
  2. package/assets/manifest/toolkit-bundle.manifest.json +193 -33
  3. package/assets/manifest/toolkit-bundle.sha256.txt +47 -15
  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 +1 -1
  10. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +1 -1
  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-screen-design-xlsx/SKILL.md +104 -0
  18. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/REVIEW_AND_MISTAKES.md +63 -0
  19. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SCR01.json +46 -0
  20. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SCR01.png +0 -0
  21. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SPEC_SCHEMA.md +208 -0
  22. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/example_spec.yaml +115 -0
  23. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/build_design_xlsx.py +550 -0
  24. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/design_spec.py +305 -0
  25. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/export_preview.py +111 -0
  26. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/export_spec_md.py +181 -0
  27. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/make_template.py +113 -0
  28. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/test_screen_design.py +198 -0
  29. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/uia_dump.py +64 -0
  30. package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/validate_spec.py +260 -0
  31. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/SKILL.md +76 -0
  32. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/references/HANDOFF_TEMPLATE.md +63 -0
  33. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/references/MOVING_A_PROJECT.md +18 -0
  34. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/scripts/dirty_files.py +133 -0
  35. package/assets/toolkit/toolkit/skills/sdtk-session-handoff/scripts/test_dirty_files.py +94 -0
  36. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/SKILL.md +4 -1
  37. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/test_metadata.py +76 -0
  38. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/xlsx_xml_edit.py +65 -1
  39. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +96 -0
  40. package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +1 -1
  41. package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +1 -1
  42. package/assets/toolkit/toolkit/skills-claude/customer-qa-sheet/SKILL.md +115 -0
  43. package/assets/toolkit/toolkit/skills-claude/db-design/SKILL.md +128 -0
  44. package/assets/toolkit/toolkit/skills-claude/screen-design-xlsx/SKILL.md +101 -0
  45. package/assets/toolkit/toolkit/skills-claude/session-handoff/SKILL.md +74 -0
  46. package/assets/toolkit/toolkit/skills-claude/xlsx-safe-edit/SKILL.md +4 -1
  47. package/assets/toolkit/toolkit/templates/README.md +3 -0
  48. package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +14 -0
  49. package/assets/toolkit/toolkit/templates/screen-design-xlsx/ja-default/TEMPLATE.md +247 -0
  50. package/assets/toolkit/toolkit/templates/screen-design-xlsx/ja-default/template.xlsx +0 -0
  51. package/package.json +1 -1
  52. package/src/lib/scope.js +4 -4
@@ -0,0 +1,247 @@
1
+ # Template set `screen-design-xlsx/ja-default` — 画面設計書 workbook format
2
+
3
+ A Japanese 画面設計書 house format (表紙 / 改訂記事 / 機能概要 / 画面流れ / 処理), as reverse-engineered from a
4
+ delivered design document and its process-sheet reference page. `sdtk-screen-design-xlsx` renders into
5
+ `template.xlsx` of this folder when the target workbook does not exist yet; the renderer assumes every rule below.
6
+ A customer's own variant goes to `docs/templates/screen-design-xlsx/<set>/` in the project (same files), with
7
+ `workbook.template_set: <set>` in the spec.
8
+
9
+ ```json config
10
+ {"output_template": "template.xlsx"}
11
+ ```
12
+
13
+ ---
14
+
15
+ ## 1. The grid
16
+
17
+ `画面流れ` and `処理` are drawn on graph-paper columns, not on a normal spreadsheet:
18
+
19
+ | Property | Value |
20
+ |---|---|
21
+ | Column width, A–BI (1–61) | `2.26953125` chars ≈ 12.6 pt ≈ 0.175 in |
22
+ | Column BJ (62) | `0.26953125`, **hidden** — acts as the vertical page split |
23
+ | Column BK+ (63…) | `処理`: same 2.27 grid. `画面流れ`: named widths for the UI item table |
24
+ | Default row height | `13.5` pt, `customHeight="1"` |
25
+ | Page setup | A4 (`paperSize=9`), landscape, `pageOrder="overThenDown"` |
26
+ | Margins | l 0.591 / r 0.394 / t 0.630 / b 0.472 in, header 0, footer 0 |
27
+ | Footer | `&C&P /` (centred page number) |
28
+
29
+ Consequences you must design around:
30
+
31
+ - **One printed page = 40 rows × columns A–BI.** Anything past column BI is cut off.
32
+ - `pageOrder=overThenDown` + the hidden column break at BJ means each 40-row band prints as
33
+ *left page, then right page*. `画面流れ` uses this deliberately: screenshot page, then UI table
34
+ page. `処理` has no content past BI, so it prints one page per band.
35
+ - Row breaks are set manually at 42, 82, 122, … (i.e. **before** each block start).
36
+
37
+ ## 2. Block layout
38
+
39
+ Every block sheet repeats a fixed 40-row block. Block *k* (0-based) starts at row `3 + 40k`.
40
+
41
+ ```
42
+ row 1–2 document header (see §3) — sheet-global, not per block
43
+ row S block header: 処理番号/画面ID | value | 画面名 | value | 機能概要 | value
44
+ row S+1 (header cells are merged over S..S+1)
45
+ row S+2 … S+39 block body
46
+ ```
47
+
48
+ Header cells, with merges:
49
+
50
+ | Cell | Merge | Content |
51
+ |---|---|---|
52
+ | `A{S}` | `A{S}:C{S+1}` | label — `処理番号` (処理) or `画面ID` (画面流れ) |
53
+ | `E{S}` | `E{S}:H{S+1}` | the id, e.g. `PRC01-1` / `SCR01` |
54
+ | `I{S}` | — | label `画面名` |
55
+ | `M{S}` | `M{S}:V{S+1}` | screen / trigger context |
56
+ | `W{S}` | — | label `機能概要` |
57
+ | `AA{S}` | — | one-line summary (overflows right, unmerged) |
58
+
59
+ `A1` holds the document title `画面設計書` merged over `A1:V2`.
60
+
61
+ ## 3. Document header (rows 1–2)
62
+
63
+ | Cell | Merge | Content |
64
+ |---|---|---|
65
+ | `W1` / `W2` | `W1:Y1` / `W2:Y2` | labels `ユーザ` / `業務名` |
66
+ | `Z1` / `Z2` | `Z1:AN1` / `Z2:AN2` | customer name / business name |
67
+ | `AO1` / `AO2` | `AO1:AQ1` / `AO2:AQ2` | label `版数` / the version number |
68
+ | `AR1` / `AR2` | `AR1:AT1` / `AR2:AT2` | labels `作成者` / `作成日` |
69
+ | `AU1` / `AU2` | `AU1:AZ1` / `AU2:AZ2` | author / creation date |
70
+ | `BA1` / `BA2` | `BA1:BC1` / `BA2:BC2` | labels `更新者` / `更新日` |
71
+ | `BD1` / `BD2` | `BD1:BI1` / `BD2:BI2` | updater / update date |
72
+
73
+ `画面流れ` repeats a second copy of this header at `BK1…BW2`, because its right half is a
74
+ separate printed page.
75
+
76
+ ## 4. 処理 — flowchart pages
77
+
78
+ ### 4.1 Shapes
79
+
80
+ All native Excel autoshapes, white fill, black line, `Placement = xlMove (2)`.
81
+
82
+ | Element | Shape | Size (pt) | Column anchor |
83
+ |---|---|---|---|
84
+ | Start | `msoShapeOval` (9) | 24.75 × 28.50 | centred on the main line |
85
+ | Process | `msoShapeRectangle` (1) | **146.25 × 42.75** | left edge at column **D** |
86
+ | Decision | `msoShapeFlowchartDecision` (63) | **104 × 54** | centred on the main line |
87
+ | End | two concentric ovals (◎) | 25.50 × 28.50, inner 58% | centred on the main line |
88
+ | Arrow | `AddConnector(msoConnectorStraight=1)` | line 1.0 pt, `EndArrowheadStyle=2` | — |
89
+ | Merge | `AddConnector(msoConnectorElbow=2)` | same | branch box bottom → main line |
90
+
91
+ Main line x = `Cells(1,'D').Left + 146.25/2`. Box line weight 1.25 pt (terminators 1.5).
92
+
93
+ Text: `MS Pゴシック`, **8 pt** in boxes (left-aligned), **7 pt** in decisions (centred),
94
+ `VerticalAnchor = msoAnchorMiddle`, `WordWrap = True`, `AutoSize = none`.
95
+
96
+ **Capacity — this is the constraint that bites:**
97
+
98
+ - Process box: usable ≈ 140 pt × 42.75 pt → **≤ 4 lines × ≤ 17 full-width chars**.
99
+ - Decision diamond: a diamond paints text only in its **inscribed 50 % × 50 % rectangle**
100
+ (52 × 27 pt here) → **≤ 2 lines × ≤ 7 full-width chars**. A third line is clipped silently.
101
+ Margins are set to 0 on decisions to buy back what little room there is.
102
+
103
+ ### 4.2 Vertical rhythm
104
+
105
+ With `S` = block start row, and node index `i` counting only main-column nodes:
106
+
107
+ ```
108
+ trigger label rows S+3, S+4 (column L)
109
+ start terminator top of row S+5 (drawing row S+4)
110
+ node i marker row M = S + 7 + 5i (columns D / E)
111
+ node i shape top top of row M+1
112
+ end terminator top of row S + 7 + 5·n
113
+ "処理終了" label row S + 7 + 5·n, column L
114
+ ```
115
+
116
+ Pitch is **5 rows per node**. A 40-row block therefore holds **at most 6 main-column nodes**
117
+ (`S+7+5·6 = S+37`, terminator ends at ≈ S+39). Put the 7th step on a side branch or split the
118
+ flow into a sub-process page.
119
+
120
+ ### 4.3 Markers and labels
121
+
122
+ - Step marker `①` goes in column **D** at row `M` (one row above the box) — i.e. above-left of
123
+ the shape, never inside it (a white-filled shape hides the cell).
124
+ - A sub-process reference goes next to it in column **E**: `② PRC01-1-1`.
125
+ - For a decision the marker sits in column **E** instead (the diamond is narrower than a box).
126
+ - A decision therefore consumes **two** markers in the explanation list — the taken branch and
127
+ the fall-through — so the marker count of a block is not its node count. Budget nodes with
128
+ §4.2 (5 rows each, 6 max) and markers with §4.4 separately. Before adding a step to an
129
+ existing block, read its `nodes` list out of the spec: a block already at 5 nodes has room
130
+ for one more and nothing else.
131
+ - Branch label (taken side) → row `M+1`, column **M**, above the horizontal arrow.
132
+ - Fall-through label → row `M+4`, column **E**, left of the vertical line. Keep it short; the
133
+ merge elbow runs through the space to the right.
134
+ - Side branch box: left edge at `main_x + DEC_W/2 + 72` pt, its marker in column **S**.
135
+
136
+ ### 4.4 Right-hand explanation list
137
+
138
+ A numbered list mirroring the flowchart, starting at row `S+6`:
139
+
140
+ ```
141
+ column ac : ① ② ③ … ※
142
+ column ac + 1 : one row per line of explanation
143
+ blank row between entries
144
+ ```
145
+
146
+ Choose `ac` by how far right the flowchart reaches:
147
+
148
+ | Flow shape | `ann_col` | Text budget to column BI |
149
+ |---|---|---|
150
+ | Linear (no side branch) | `X` (24) | ≈ 52 full-width chars |
151
+ | Has a side branch | `AH` (34) | ≈ 38 full-width chars |
152
+
153
+ Exceeding the budget does not wrap — it is simply cut off at the page edge.
154
+
155
+ ## 5. 処理 — detail pages
156
+
157
+ Same header, then:
158
+
159
+ ```
160
+ row S+2 column D = sub id (PRC01-1-1), column I = sub name
161
+ row S+4 column D = "■", column E = section heading
162
+ then a bordered table and/or "・" note lines
163
+ ```
164
+
165
+ Tables: header row filled `0xD9D9D9`, thin borders on all edges and insides
166
+ (`Borders(7..12).LineStyle = xlContinuous, .Weight = xlThin`). Each logical column is a merged
167
+ run of grid columns, declared as `(title, start column, span in grid columns)`.
168
+
169
+ Note lines sit in column `F` prefixed with `・`.
170
+
171
+ A detail page holds roughly **34 usable rows** — count `1 + rows + 1` per section plus a blank
172
+ row between sections.
173
+
174
+ ## 6. 画面流れ — screen pages
175
+
176
+ Left page (A–BI):
177
+
178
+ | Row | Content |
179
+ |---|---|
180
+ | `S` | header (§2) |
181
+ | `S+2` | `A` = `Figma` (source label) |
182
+ | `S+2` | screenshot picture anchored at column A/B, width ≈ 7 258 050 EMU (≈ 571 pt) |
183
+ | overlay | markers: `msoShapeOval` **15 × 15 pt**, white fill, **red 1 pt border**, red **bold 9 pt** number, `WordWrap = False` |
184
+ | `S+30` | `A` = `<備考>` |
185
+ | `S+31…` | column `C`: `・` note (JP); optionally the next row holds a translation |
186
+
187
+ Right page (BK–BW), a bordered table pre-drawn in the template for the whole 40 rows:
188
+
189
+ | Column | Header |
190
+ |---|---|
191
+ | BK | `項目名` |
192
+ | BL | `部品の種類` |
193
+ | BM | `属性` |
194
+ | BN | `DBカラム` |
195
+ | BO | `桁数` |
196
+ | BP | `初期値` |
197
+ | BQ | `必須` |
198
+ | BR | `特記事項` |
199
+
200
+ Column `BZ` (78) is outside the styled grid and outside the printed range — the existing
201
+ document uses it for working-language translations of the `特記事項` column.
202
+
203
+ Marker coordinates cannot be derived from markdown. The spec expresses them as fractions of the
204
+ screenshot's bounding box (`x`, `y` in `0..1`), which the renderer converts to points.
205
+
206
+ ## 7. 改訂記事 / 機能概要 / 表紙
207
+
208
+ No grid, no blocks.
209
+
210
+ `改訂記事` — one entry per revision, 2 blank rows between entries:
211
+
212
+ ```
213
+ B{r} 2026年9月7日
214
+ C{r+1} ■0.03版
215
+ C{r+2} | D{r+2} ・first bullet
216
+ C{r+3} | D{r+3} ・second bullet
217
+ ```
218
+
219
+ Fonts: `MS Pゴシック` 10 pt for the date / `■版` / `|` cells, 9 pt for the bullet text in
220
+ column `D`. The renderer sets these explicitly because clearing the sheet also drops them.
221
+
222
+ `機能概要` — plain outline: heading in column `A` (`[機能概要]`), bullets in column `B`
223
+ (`・…`), continuation/detail in column `C`. No special formatting — the sheet default is used.
224
+
225
+ `表紙` — different grid (column width 2.54), scale 90 %. `H9:AQ22` merged holds the multi-line
226
+ title, `U37:AD38` holds the date.
227
+
228
+ ## 8. Round-trip hazards
229
+
230
+ - `openpyxl` **destroys all drawings** on save. Read-only inspection is fine; writing is not.
231
+ - Excel renumbers `xl/drawings/drawingN.xml` on save — never hard-code drawing part names.
232
+ - The template grid mixes 8 pt (A–AA, BD–BI) and 11 pt (AB–BC) column fonts. The renderer
233
+ forces the whole block body to 8 pt after stamping, otherwise annotation text at column AH
234
+ comes out visibly larger than the rest.
235
+ - After `.Clear()` on rows below the last block, delete those rows so the used range does not
236
+ grow every render.
237
+ - Stamping a block = `Range(A3:BX42).Copy(Cells(S,1))`, which carries values, formats and
238
+ merges. So **row 3–42 of each block sheet must always remain a clean, correct block header**;
239
+ the renderer treats it as the in-file template.
240
+ - Because the stamp carries *values* too, the first block's own content must be blanked before
241
+ stamping, otherwise re-rendering an already-populated workbook copies block 1's leftover text
242
+ into every following block. `clear_block_values()` does this: it blanks rows 4..42 plus the
243
+ three value cells on row 3 (`E3`/`M3`/`AA3`), and deliberately keeps row 3's static labels —
244
+ on `画面流れ` that row also carries the `BK3:BR3` UI item table header.
245
+ - `Range.ClearContents` refuses to act on a range that only partly covers a merged cell. Clear
246
+ through `cell.MergeArea.Cells(1,1)` instead, and select the cells with
247
+ `SpecialCells(xlCellTypeConstants)` so formats survive.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdtk-spec-kit",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "SDTK-SPEC CLI toolkit for deterministic software documentation workflows via the sdtk-spec command",
5
5
  "bin": {
6
6
  "sdtk-spec": "bin/sdtk.js"
package/src/lib/scope.js CHANGED
@@ -55,17 +55,17 @@ function resolveSkillsDir(runtime, scope, projectPath) {
55
55
  */
56
56
  const MANAGED_CODEX_SKILLS = [
57
57
  "sdtk-api-design-spec", "sdtk-api-doc", "sdtk-arch", "sdtk-ba",
58
- "sdtk-design-layout", "sdtk-dev", "sdtk-dev-backend", "sdtk-dev-frontend",
58
+ "sdtk-customer-qa-sheet", "sdtk-db-design", "sdtk-design-layout", "sdtk-dev", "sdtk-dev-backend", "sdtk-dev-frontend",
59
59
  "sdtk-evolve", "sdtk-orchestrator", "sdtk-pm", "sdtk-qa",
60
- "sdtk-screen-design-spec", "sdtk-smoke-test-spec", "sdtk-test-case-spec",
60
+ "sdtk-screen-design-spec", "sdtk-screen-design-xlsx", "sdtk-session-handoff", "sdtk-smoke-test-spec", "sdtk-test-case-spec",
61
61
  "sdtk-test-case-xlsx", "sdtk-xlsx-safe-edit",
62
62
  ];
63
63
 
64
64
  const MANAGED_CLAUDE_SKILLS = [
65
65
  "api-design-spec", "api-doc", "arch", "ba",
66
- "design-layout", "dev", "dev-backend", "dev-frontend",
66
+ "customer-qa-sheet", "db-design", "design-layout", "dev", "dev-backend", "dev-frontend",
67
67
  "evolve", "orchestrator", "pm", "qa",
68
- "screen-design-spec", "smoke-test-spec", "test-case-spec", "test-case-xlsx",
68
+ "screen-design-spec", "screen-design-xlsx", "session-handoff", "smoke-test-spec", "test-case-spec", "test-case-xlsx",
69
69
  "xlsx-safe-edit",
70
70
  ];
71
71