sdtk-spec-kit 0.9.1 → 0.10.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/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/assets/manifest/toolkit-bundle.manifest.json +200 -25
  4. package/assets/manifest/toolkit-bundle.sha256.txt +47 -12
  5. package/assets/toolkit/toolkit/AGENTS.md +1 -1
  6. package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +7 -3
  7. package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +3 -0
  8. package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +28 -0
  9. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +18 -0
  10. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +2 -0
  11. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +1 -1
  12. package/assets/toolkit/toolkit/skills/sdtk-smoke-test-spec/SKILL.md +69 -0
  13. package/assets/toolkit/toolkit/skills/sdtk-smoke-test-spec/scripts/test_validate_smoke_test.py +58 -0
  14. package/assets/toolkit/toolkit/skills/sdtk-smoke-test-spec/scripts/validate_smoke_test.py +152 -0
  15. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/SKILL.md +297 -0
  16. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/prompts/agent_brief_template.md +59 -0
  17. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/check_coverage.py +50 -0
  18. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/extract_sources.py +224 -0
  19. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/merge_parts.py +78 -0
  20. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/render_testcase.py +421 -0
  21. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/template_set.py +57 -0
  22. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/test_write_results.py +89 -0
  23. package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/write_results.py +126 -0
  24. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/SKILL.md +146 -0
  25. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/pictures.py +68 -0
  26. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/test_pictures.py +55 -0
  27. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/xlsafe.py +137 -0
  28. package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/xlsx_xml_edit.py +153 -0
  29. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +76 -0
  30. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +1 -1
  31. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +1 -1
  32. package/assets/toolkit/toolkit/skills-claude/smoke-test-spec/SKILL.md +66 -0
  33. package/assets/toolkit/toolkit/skills-claude/test-case-xlsx/SKILL.md +294 -0
  34. package/assets/toolkit/toolkit/skills-claude/xlsx-safe-edit/SKILL.md +143 -0
  35. package/assets/toolkit/toolkit/templates/README.md +8 -1
  36. package/assets/toolkit/toolkit/templates/smoke-test/PROFILE_TEMPLATE.md +36 -0
  37. package/assets/toolkit/toolkit/templates/smoke-test/vi-default/AUTHORING_RULES.md +32 -0
  38. package/assets/toolkit/toolkit/templates/smoke-test/vi-default/SMOKE_TEST_TEMPLATE.md +147 -0
  39. package/assets/toolkit/toolkit/templates/smoke-test/vi-default/TEMPLATE.md +25 -0
  40. package/assets/toolkit/toolkit/templates/test-case-xlsx/PROFILE_TEMPLATE.md +78 -0
  41. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/TEMPLATE.md +28 -0
  42. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/README.md +73 -0
  43. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/_template.xlsx +0 -0
  44. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/common/common.xlsx +0 -0
  45. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/mobile_app.xlsx +0 -0
  46. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/smartphone_web.xlsx +0 -0
  47. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/web.xlsx +0 -0
  48. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/windows_app.xlsx +0 -0
  49. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default//343/203/206/343/202/271/343/203/210/344/273/225/346/247/230/346/233/270/344/275/234/346/210/220/343/203/253/343/203/274/343/203/253.md +514 -0
  50. package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default//343/203/206/343/202/271/343/203/210/344/273/225/346/247/230/346/233/270/351/233/233/345/236/213.xlsx +0 -0
  51. package/package.json +1 -1
  52. package/src/lib/scope.js +4 -2
@@ -0,0 +1,514 @@
1
+ # Test Specification (テスト仕様書) Authoring Rules
2
+
3
+ These are the rules for writing a test specification with the template `テスト仕様書雛型.xlsx`.
4
+ **Checks are performed by hand, by several people splitting the work.** Prioritize readability, printability
5
+ for distribution, and that the person executing a case never has to guess.
6
+
7
+ > Language note: this file is written in English, but every value that is written INTO the workbook
8
+ > (sheet names, column headers, 大分類 / 小分類 values, fixed strings such as `-(画面表示のみのため確認不要)`,
9
+ > result values `OK / NG / …`) stays in Japanese exactly as shown, because the template's formulas,
10
+ > drop-down lists and the scripts match on those exact strings.
11
+
12
+ ---
13
+
14
+ ## 1. Ground rules
15
+
16
+ - **One workbook = one feature.** For another feature, duplicate the whole workbook.
17
+ - **Check items are split into one sheet per screen.** (Procedure: §3)
18
+ - **Never change the template's column layout or row positions.** Adding, deleting or reordering columns is forbidden.
19
+ - **You may write only in columns with a GREEN header.** Columns with a YELLOW header are filled in by people by hand —
20
+ **leave them empty**. Gray cells contain formulas — do not touch them.
21
+ - **The sample row (row 2, gray italics) may be overwritten.** Start writing the first data row there.
22
+ - **All data sheets: header in row 1, data in rows 2–501.**
23
+ - Output is `.xlsx`. If you open and edit it with `openpyxl`, you must read §8.
24
+
25
+ ---
26
+
27
+ ## 2. Workbook structure
28
+
29
+ | Sheet | Role | What you write |
30
+ |---|---|---|
31
+ | 表紙 (cover) | Document info, revision history, per-screen summary (auto-aggregated), instructions | Part of the basic info and the sheet names in the summary table only |
32
+ | テストデータ準備 (test data preparation) | List of data/environment to prepare before testing (shared by all screens, one sheet) | Columns A–G |
33
+ | 00_雛型 (template sheet) | Copy source for per-screen sheets. **Always keep it** | Do not touch |
34
+ | 01_〇〇 / 02_〇〇 … | The test cases of each screen | Columns A–H |
35
+
36
+ ---
37
+
38
+ ## 3. Creating per-screen sheets
39
+
40
+ ### 3.1 Procedure
41
+
42
+ 1. Copy `00_雛型`. **Never delete `00_雛型` itself; always keep it as the copy source.**
43
+ 2. Rename the sheet to **`<2-digit sequence>_<screen name>`** (e.g. `01_作業員一覧`).
44
+ - Number the sheets in the order the tester moves through the screens (導線: list → register → confirm → complete → detail …).
45
+ - Sheet names are at most 31 characters and must not contain `: \ / ? * [ ]`. If too long, the trailing 「画面」 may be dropped.
46
+ 3. In the green cells (A21 onward) of 【画面別テスト結果サマリ】 on the cover, **write the sheet name with not a single character different.**
47
+ Copy the sheet name as a string. If even one character differs the formula shows `#REF!`.
48
+ 4. If you copied with openpyxl, **always run the restore procedure in §8.**
49
+
50
+ ### 3.2 Unit of a sheet
51
+
52
+ **One sheet = one "independent screen the user navigates to".**
53
+
54
+ - Modals, confirmation dialogs and toast notifications **belong to the parent screen's sheet.** Never give them their own sheet.
55
+ - Non-business screens such as print previews or PDF viewers do not get a sheet.
56
+ - When in doubt, do not split — include it in the parent screen and report it in §11.
57
+
58
+ ### 3.3 Row positions (strict)
59
+
60
+ | Row | Content |
61
+ |---|---|
62
+ | 1 | Header row |
63
+ | 2–501 | Data rows (**start writing at row 2**) |
64
+
65
+ ### 3.4 Column definitions
66
+
67
+ | Col | Item | Written by |
68
+ |---|---|---|
69
+ | A | No | You |
70
+ | B | 大分類 (major category) | You |
71
+ | C | 中分類(画面名) (middle category = screen name) | You |
72
+ | D | 小分類 (minor category) | You |
73
+ | E | 関連仕様書ID・画面ID (related spec ID / screen ID) | You |
74
+ | F | 操作手順 (steps) | You |
75
+ | G | 期待結果(画面) (expected result — screen) | You |
76
+ | H | 期待結果(DB) (expected result — DB) | You |
77
+ | I | 実施日 (execution date) | **People (leave empty)** |
78
+ | J | 実施者 (executed by) | **People (leave empty)** |
79
+ | K | 結果 (result) | **People (leave empty)** |
80
+ | L | 不具合チケットNo (defect ticket No.) | **People (leave empty)** |
81
+ | M | 備考 (remarks) | **People (leave empty)** |
82
+
83
+ ### 3.5 Sort order is decided in three levels
84
+
85
+ ```
86
+ 大分類 (band order) → 中分類 (the sheet's screen name, effectively one value) → 小分類 (正常系 → 異常系 → 境界値)
87
+ ```
88
+
89
+ **This order is self-contained within each sheet.** Do not think about an order that runs across sheets.
90
+
91
+ ---
92
+
93
+ ## 4. Rules for each column
94
+
95
+ ### A: No
96
+
97
+ **A sequence starting from 1 in every sheet.** Never number continuously across sheets. Enter it as a number (not the string `"1"`).
98
+
99
+ ### B: 大分類 — why the order is fixed (the basis for any judgment call)
100
+
101
+ **The purpose is to let the tester concentrate on one "way of looking" at a time.**
102
+ First only the screen's appearance, then only operating its parts, and so on — minimize the number of mental context switches.
103
+ If a viewpoint that was already finished shows up again later, the tester has to switch back, which causes oversights and rework.
104
+
105
+ **Decide by this purpose, not by the category's name.**
106
+ The question to ask when unsure: "If the cases are ordered this way, can the tester keep concentrating on the same viewpoint?"
107
+
108
+ #### The "band" decides the position
109
+
110
+ Do not memorize a list of major categories; **assign each one to a "band" by its nature and order by band.** When a new viewpoint
111
+ appears, putting it into the matching band decides its position automatically. **Do not rewrite this rule itself.**
112
+
113
+ | Band | Nature | 大分類 values in this band (in this left-to-right order) |
114
+ |---|---|---|
115
+ | 10 | Looking at the screen as opened | 画面レイアウト (screen layout) |
116
+ | 20 | Operating a single screen part | 各種コントロール (controls) |
117
+ | 30 | Data life cycle | 登録 (register) → 検索・絞り込み (search/filter) → 編集 (edit) → 削除 (delete) → 復元 (restore) |
118
+ | 40 | Taking data out | CSV出力 (CSV output) → 帳票出力 (report output) → 印刷 (print) |
119
+ | 50 | Cross-cutting / non-functional | 権限・認可 (permission/authorization) → 排他制御 (concurrency control) → 外部連携・I/F (external integration/interface) |
120
+
121
+ **How to order**
122
+
123
+ - Order by band number; within a band, order from left to right as in the table.
124
+ - Skip major categories that do not exist on the target screen and close the gap.
125
+ - **Finish ALL cases of one major category before moving to the next. Never interleave major categories.**
126
+
127
+ **Tie-breaker when the band is unclear**
128
+
129
+ If one case seems to fit several bands, decide by **"what the tester is doing at the moment of checking it"**.
130
+
131
+ | How it is checked | Band |
132
+ |---|---|
133
+ | Can be checked with no operation, just by looking at the opened screen | Band 10 (画面レイアウト) |
134
+ | Can be checked by operating a single screen part (no data is registered or updated) | Band 20 (各種コントロール) |
135
+ | A display that appears **as the result of** some operation | The band of that operation. Never band 10 |
136
+
137
+ Example: "A completion message appears after registering" includes a visual check, but it is the result of the
138
+ register operation, so it goes in band 30 「登録」, not band 10.
139
+
140
+ **When a major category not in the table is needed**
141
+
142
+ 1. First consider whether it fits an existing major category. Criteria:
143
+ - Expresses **the object of the operation or the kind of function** → a major category (consider creating one)
144
+ - Expresses **a pattern of input values or states** → not a major category; express it with the minor category (正常系 / 異常系 / 境界値)
145
+ - Expresses **which screen it is about** → not a major category; split the sheet
146
+ - Expresses **what happens on the screen** → not a category at all; write it in column G (期待結果(画面))
147
+ 2. If a new one is still necessary, **put it in the band closest in nature, at the end of that band.**
148
+ **Never append it at the very end, across bands.**
149
+ 3. Always report a newly created major category in §11.
150
+
151
+ **Common mistakes**
152
+
153
+ | Mistake | Correct handling |
154
+ |---|---|
155
+ | Making 「画面遷移」 (screen transition) a major category | A transition is a result, not an object. Write 「遷移先:〇〇画面」 in column G |
156
+ | Making 「エラー処理」 (error handling) a major category | Express it with minor category 「異常系」 |
157
+ | Making 「必須チェック」 (required check) a major category | Band 20 「各種コントロール」 + minor category 「異常系」 |
158
+ | Making a screen name a major category | Screens are split by sheet, never a major category |
159
+ | Gathering hard-to-classify viewpoints at the very end | Always assign them to some band |
160
+
161
+ ### C: 中分類(画面名)
162
+
163
+ Write **the sheet's screen name** on every row, exactly as written in the specification (e.g. `作業員一覧画面`).
164
+ It must equal the sheet name without its sequence number. All rows of a sheet have the same value.
165
+
166
+ - It looks redundant, but **it keeps the screen name on paper when the sheet is printed and distributed.** Never omit it.
167
+ - Use the full official name including 「画面」; do not vary it like `一覧` / `作業員一覧`.
168
+ - Cases of a modal included in the parent sheet also get **the parent screen's name** (not the modal's name).
169
+ Which modal it is, is expressed in the steps.
170
+
171
+ ### D: 小分類
172
+
173
+ **Use only these three words: `正常系` / `異常系` / `境界値`.** Within a major category, order them in this order.
174
+
175
+ | 小分類 | Meaning |
176
+ |---|---|
177
+ | 正常系 (normal) | Input/operate as specified and confirm it works as expected |
178
+ | 異常系 (abnormal) | Confirm operations that are errors by specification: empty input, invalid values, no permission, duplicates, etc. |
179
+ | 境界値 (boundary) | Behavior at boundary values: upper limit / lower limit / upper+1 / lower−1, etc. |
180
+
181
+ Combinations that cannot occur may be skipped (e.g. screen layout usually has no 異常系).
182
+ However, **if a sheet has no 異常系 and no 境界値 case at all, first suspect an omission.**
183
+
184
+ ### E: 関連仕様書ID・画面ID
185
+
186
+ Write the ID of the specification the case is based on and the screen ID, in the form `SPEC-001 / SCR-WRK-001`. **Always fill it.**
187
+ A case whose basis cannot be identified means a missed spec or a guess — report it in §11.
188
+
189
+ ### F: 操作手順
190
+
191
+ Numbered, at a granularity the tester can follow with their hands.
192
+
193
+ ```
194
+ 1. ポータル画面から「作業員割り付け」を押す。
195
+ 2. 作業員一覧画面の表示内容を確認する。
196
+ ```
197
+
198
+ - **Write concrete input values.** 「適当な値」 (some value), 「正しく入力」 (enter correctly), 「任意の文字列」 (any string) are forbidden.
199
+ Write the value actually typed, like `氏名に「山田太郎」を入力する`.
200
+ - A precondition that applies only to this case goes **in step 1** (e.g. `1. 作業員が0件の状態で一覧画面を表示する。`).
201
+ - **Do not write global precondition data here.** Collect it in the test data preparation sheet (§5).
202
+
203
+ ### G: 期待結果(画面)
204
+
205
+ **Write at a verifiable granularity.** Vague words such as 「正しく表示される」 (is displayed correctly) or 「適切に動作する」
206
+ (works appropriately) are forbidden. Be concrete about what is shown where and how, enabled/disabled state,
207
+ message wording, and the destination screen.
208
+
209
+ ### H: 期待結果(DB)
210
+
211
+ Write the table name, column name and expected value to check.
212
+ If no DB check is needed, **do not leave it empty**; write exactly `-(画面表示のみのため確認不要)`.
213
+ Never write just `-`: people could not tell "no DB impact" from "forgot to write it".
214
+
215
+ **When there are several places to check (addendum):** for desktop apps and similar, where the checks go beyond the DB
216
+ (local DB, server, storage, file system, …), prefix each line with a **check-location prefix** defined in the project
217
+ profile, one location per line. Do not change the column name or position.
218
+
219
+ ```
220
+ [SQLite] sync_state.status = 2
221
+ [API] GET /sync/files の結果に「見積書.xlsx」が含まれる
222
+ [S3] 対象オブジェクトのサイズ = 20,480 バイト
223
+ [FS] C:\…\共有フォルダ\見積書.xlsx の状態列が「ローカルで利用可能」
224
+ ```
225
+
226
+ ### Columns I–M
227
+
228
+ **Write nothing.** People fill them by hand. Column K (結果) already has the input rule `OK / NG / 保留 / 対象外 / 未実施`.
229
+
230
+ ---
231
+
232
+ ## 5. Test data preparation sheet (テストデータ準備)
233
+
234
+ The per-case "precondition" column was removed on purpose. **Collect all precondition data and states in this sheet.**
235
+
236
+ - Header: row 1 / data: rows 2–501
237
+ - Columns: A No / B 対象画面 (target screen) / C 分類 (category) / D 対象(テーブル/マスタ/画面) (target: table/master/screen) /
238
+ E 準備するデータ・状態 (data/state to prepare) / F 件数・値の例 (count / example values) / G 準備方法 (how to prepare) /
239
+ **H 準備完了 (prepared — people, leave empty)** / **I 備考 (remarks — people, leave empty)**
240
+
241
+ Rules:
242
+
243
+ - **B (対象画面)** holds the sheet name of the check sheet (e.g. `01_作業員一覧`). Items shared by all screens: `共通`.
244
+ It lets each tester filter to their own screens, so always fill it.
245
+ - **E (準備するデータ・状態)** states "this must be the state before testing starts". If there are boundary tests,
246
+ have the upper/lower-limit data prepared here too.
247
+ - Order the rows so that executing them top to bottom completes the preparation. `共通` first, per-screen items after.
248
+ - **After writing, always cross-check** that the steps in the check sheets do not contradict this sheet.
249
+
250
+ ---
251
+
252
+ ## 6. Cover sheet (表紙)
253
+
254
+ ### Items you fill in
255
+
256
+ | Item | Cell |
257
+ |---|---|
258
+ | システム名 (system name) | B3 |
259
+ | サブシステム名 (subsystem name) | B4 |
260
+ | 機能名/画面名 (feature / screen name) | B5 |
261
+ | 関連仕様書 (related specifications) | B6 |
262
+ | Sheet names in the per-screen summary | A21 onward (green cells) |
263
+
264
+ ### Items you must NOT fill in
265
+
266
+ - **版数 / テスト環境 / 作成者 / 作成日 / 更新者 / 更新日 / テスト実施期間 / 備考** (yellow labels: version, test environment,
267
+ author, created date, updater, updated date, test period, remarks) are filled in by people.
268
+ **Leave them empty.** Never enter guessed values such as 「AI」 or 「開発者」.
269
+ - **Revision history (rows 11–17)** is also filled in by people. Do not even record the initial creation.
270
+ - **The person-in-charge column (B) of the summary table** is filled in by whoever assigns the work. Leave it empty.
271
+ - **Never touch the formulas in C21 onward and C41 onward.**
272
+
273
+ Label colors show who writes: **green label = you, yellow label = people.**
274
+
275
+ ---
276
+
277
+ ## 7. Standard viewpoint checklist for common controls
278
+
279
+ There is no common-control spec master sheet (removed because one workbook = one feature).
280
+ **Instead, viewpoints for common controls are guaranteed by this list.** If the target screen has a matching control,
281
+ consider the viewpoints below and turn every one that is meaningful for the specification into a case
282
+ (major category: band 20 「各種コントロール」).
283
+
284
+ | Control | Viewpoints to consider |
285
+ |---|---|
286
+ | Text box | Required / max length / max length+1 / full-width vs half-width / forbidden characters / trimming leading-trailing spaces / IME mode |
287
+ | Numeric input | Lower limit / upper limit / lower−1 / upper+1 / decimal places / negative values / comma separators / full-width digits |
288
+ | Date input | Format / non-existent date (Feb 30) / leap year / start–end order / calendar picker |
289
+ | Drop-down | Initial selection / option order / executing with nothing selected / redraw of linked drop-downs |
290
+ | Checkbox / radio | Initial state / exclusive selection / deselect all / select all |
291
+ | Grid / list | 0 rows / 1 row / paging boundaries (first page, last page) / sort / wrapping of long text |
292
+ | Button | Enable/disable conditions / repeated clicks (double submit) / cancel in a confirmation dialog |
293
+ | File attachment | Allowed extension / disallowed extension / size limit / size limit+1 / 0 bytes |
294
+ | Screen-wide | Back button / browser back / reload / session timeout |
295
+
296
+ **Controls that do not exist on the screen may be skipped.** But distinguish whether you skipped because
297
+ "the screen does not have it" or because "you could not decide"; report the latter in §11.
298
+
299
+ ### 7.1 Viewpoints that must always become cases (no skipping)
300
+
301
+ Among the rows of the reference viewpoint set, those matching any of the following must NOT be skipped on the grounds that
302
+ "the screen design document does not define it". The viewpoint sheet itself carries the pass criterion,
303
+ so they can be verified without a screen design document.
304
+
305
+ - Viewpoints whose 確認内容・期待結果 (check / expected result) contains px / #RRGGBB / a font name
306
+ - Viewpoints whose 対象 (target) is 「パンくずエリア」 (breadcrumb area)
307
+ - Viewpoints whose 項目 (item) is 「列リサイズ」 (column resize), 「ソート」 (sort) or 「ページング」 (paging)
308
+ - Viewpoints that check a change on hover
309
+ - Viewpoints whose 備考 (remarks) says 「過去障害あり」 (past defect)
310
+
311
+ If one must be skipped anyway, report it in §11 **not** as "a viewpoint skipped because undecidable" but as a separate item,
312
+ **"mandatory viewpoint not implemented" (未実施の必須観点)**, with the reason.
313
+
314
+ ### 7.2 Which viewpoints to use (the reference viewpoint set)
315
+
316
+ Viewpoints come from three layers (see `viewpoints/README.md` of the skill):
317
+
318
+ | Layer | Where | Content |
319
+ |---|---|---|
320
+ | Customer | `viewpoints/customer/<name>/*.xlsx` | The customer's own viewpoint files, used as delivered |
321
+ | Platform | `viewpoints/platform/<platform>.xlsx` | Additions for one kind of system (web, smartphone web, mobile app, Windows app …) |
322
+ | Common | `viewpoints/common/*.xlsx` | Viewpoints valid for every software project |
323
+
324
+ Every viewpoint sheet belongs to one **screen type** (一覧画面, 設定一覧画面, 登録・編集画面, 詳細画面, ダイアログ,
325
+ ポータル画面, or a platform-specific type such as タスクトレイ・通知). A platform sheet named `全画面` applies to every
326
+ screen type of that platform.
327
+
328
+ **For each check sheet, the project profile fixes its screen types** (`screen_types` in the base JSON) and the project
329
+ fixes its platforms and customer. The **reference viewpoint set** of a check sheet is then:
330
+ customer sheets of those screen types (with an allowed tag such as `(PC)`) + platform sheets of those screen types +
331
+ the platform's `全画面` sheets + common sheets of those screen types. `scripts/extract_sources.py` writes exactly
332
+ this set to one file per check sheet.
333
+
334
+ | Screen of the check sheet | Typical screen type |
335
+ |---|---|
336
+ | Screen with search / list display | `一覧画面` |
337
+ | Card-style settings menu screen | `設定一覧画面` |
338
+ | Input screen for register / edit / copy (incl. login and settings forms) | `登録・編集画面` |
339
+ | Read-only detail screen | `詳細画面` |
340
+ | Portal / home / dashboard screen | `ポータル画面` |
341
+ | Modals and dialogs included in the screen | add `ダイアログ` |
342
+ | Platform-specific parts (task tray, Explorer integration, push notifications …) | the platform sheet of that name |
343
+
344
+ **When the same check appears in several layers, use the most specific one: customer > platform > common.**
345
+ The customer's version carries the customer's concrete values (sizes, colors, wording); never create a second case
346
+ for the same check from a lower layer.
347
+
348
+ **A screen that matches no screen type**: choose the closest one and **report in §11 the screen type you chose and
349
+ how you handled the viewpoints that do not fit that screen.**
350
+
351
+ **Never bring in viewpoints from outside the reference viewpoint set.**
352
+ Even if the same part (tab, table, button, …) is defined in more detail for another screen type, do not create
353
+ viewpoints that are not in the set. **The no-skipping rule of §7.1 applies only to viewpoints in the set.**
354
+
355
+ Why it is fixed: the viewpoint sheets deliberately vary the depth of checking per screen type. Bringing viewpoints in
356
+ from another screen type would make the tester judge OK / NG on items whose specification is not settled for this
357
+ screen, and the implementation would end up being treated as correct.
358
+
359
+ Viewpoints not created because they are not in the reference viewpoint set are reported in §11 as
360
+ **"viewpoints not created because the reference viewpoint set does not define them"**. Keep this separate from §7.1's
361
+ "mandatory viewpoint not implemented".
362
+
363
+ ### 7.3 When the spec gives no concrete length / count value
364
+
365
+ For viewpoints where the viewpoint sheet does **not state the value itself** (e.g. "max length", "max count"),
366
+ do not decide the value yourself. **Borrowing it from another definition, such as a DB column length, is also forbidden.**
367
+
368
+ - **Replace it with something verifiable.** E.g. if the max length of a search box is undefined, instead of
369
+ "the input box rejects max length+1 characters", write "searching with a value of the max length of the searched data hits".
370
+ - If it cannot be replaced, do not create the case; report it in §11 as
371
+ **"viewpoints not created because the value is undefined"**.
372
+
373
+ Reason: a case with no basis for its value cannot be judged OK / NG by the tester. The implementation value would be
374
+ treated as correct and a spec violation would be missed.
375
+
376
+ ---
377
+
378
+ ## 8. Required processing when duplicating sheets with openpyxl
379
+
380
+ **`copy_worksheet()` does NOT carry over freeze panes, auto filter, data validation, print title rows, or header/footer.**
381
+ (Column widths, row heights, cell formats and page orientation are carried over.)
382
+
383
+ So **always call the following function right after copying a sheet.** If you forget, the drop-downs disappear and
384
+ the heading row is not printed from page 2 onward.
385
+
386
+ ```python
387
+ from openpyxl import load_workbook
388
+ from openpyxl.worksheet.datavalidation import DataValidation
389
+ from openpyxl.worksheet.page import PageMargins
390
+
391
+ def setup_sheet(ws):
392
+ """Call right after copying 00_雛型. Restores what copy_worksheet drops."""
393
+ ws.freeze_panes = "B2"
394
+ ws.auto_filter.ref = "A1:M501"
395
+ ws.print_title_rows = "1:1"
396
+ ws.oddHeader.left.text = "&A"
397
+ ws.oddHeader.left.size = 9
398
+ ws.oddFooter.center.text = "&P / &N"
399
+ ws.oddFooter.center.size = 9
400
+ ws.page_margins = PageMargins(left=0.4, right=0.4, top=0.6,
401
+ bottom=0.5, header=0.3, footer=0.3)
402
+ for rng, items, strict in [
403
+ ("B2:B501", "画面レイアウト,各種コントロール,登録,検索・絞り込み,編集,削除,復元,"
404
+ "CSV出力,帳票出力,印刷,権限・認可,排他制御,外部連携・I/F", False),
405
+ ("D2:D501", "正常系,異常系,境界値", True),
406
+ ("K2:K501", "OK,NG,保留,対象外,未実施", True),
407
+ ]:
408
+ dv = DataValidation(type="list", formula1=f'"{items}"',
409
+ allow_blank=True, showErrorMessage=strict)
410
+ ws.add_data_validation(dv)
411
+ dv.add(rng)
412
+
413
+ wb = load_workbook("テスト仕様書雛型_v9.xlsx")
414
+ new = wb.copy_worksheet(wb["00_雛型"])
415
+ new.title = "01_作業員一覧"
416
+ setup_sheet(new) # <- do not forget
417
+ ```
418
+
419
+ Other notes:
420
+
421
+ - Open with `load_workbook(path)`. **Never open with `data_only=True` and save** (the formulas are lost).
422
+ - **Never delete or rename `00_雛型`.** Never delete the cover or the test data preparation sheet either.
423
+ - When writing cells keep font `Meiryo UI` / size 9 / `wrap_text=True` / `vertical="top"`.
424
+ When overwriting the sample row 2, **reset its gray italic font to normal black, non-italic.**
425
+ - If there are more than 500 data rows, insert rows above row 501 (rows added below fall outside the aggregation range).
426
+ - After saving, confirm the cover summary shows the expected counts. `#REF!` means a misspelled sheet name.
427
+
428
+ ---
429
+
430
+ ## 9. Coverage viewpoints per major category
431
+
432
+ For each major category, consider at least the following and turn everything applicable into cases.
433
+
434
+ | 大分類 | Viewpoints to consider |
435
+ |---|---|
436
+ | 画面レイアウト | Presence/position of items, label wording, initial values, enabled/disabled, order, display at 0 rows |
437
+ | 各種コントロール | See the checklist in §7 |
438
+ | 登録 | Normal registration, duplicate registration, missing required input, destination and message after registering, values stored in the DB |
439
+ | 検索・絞り込み | Single condition, combined conditions, 0 hits, partial / exact match, clearing conditions |
440
+ | 編集 | Update without changes, update of all items, editing a non-existent ID, reflection of updated-at / updated-by |
441
+ | 削除 | Confirmation dialog, cancel, logical vs physical delete, behavior when related data exists |
442
+ | 復元 | Narrowing the restore targets, state after restore, conditions where restore is impossible |
443
+ | CSV出力・帳票出力 | Output items and their order, 0 rows, character encoding / line endings, file name |
444
+ | 権限・認可 | Display / operability per role, blocking direct URL access |
445
+ | 排他制御 | Error on simultaneous update, releasing the lock |
446
+ | 外部連携・I/F | Success / failure / timeout, retry |
447
+
448
+ Write error messages **including their wording and display position.** "An error is shown" cannot be verified.
449
+
450
+ **Prioritize that the tester never has to guess over sheer coverage.** 50 verifiable cases are worth more than
451
+ 100 cases with vague expected results.
452
+
453
+ ---
454
+
455
+ ## 10. Prohibited
456
+
457
+ - Adding, deleting or reordering columns, or changing row positions
458
+ - Deleting or renaming `00_雛型`; deleting the cover or the test data preparation sheet
459
+ - Not calling the §8 restore procedure after copying a sheet
460
+ - Giving a modal or dialog its own sheet
461
+ - **Any order other than 大分類 → 小分類**
462
+ - **Interleaving major categories** (always keep the band order of §4)
463
+ - **Appending a hard-to-classify major category at the very end** (always put it in some band)
464
+ - **Numbering No continuously across sheets**
465
+ - Using results or state patterns such as 「画面遷移」 or 「エラー処理」 as major categories
466
+ - Using any word other than `正常系` `異常系` `境界値` as a minor category
467
+ - Varying or leaving empty the screen name in 中分類
468
+ - Writing in columns/cells that people fill (check sheet I–M, test data preparation H–I, the cover's yellow-label items, revision history, person-in-charge column)
469
+ - Entering guessed values such as 「AI」 as the author
470
+ - Writing into the cover's formula cells
471
+ - Pasting screen captures (not handled by this specification)
472
+ - Unverifiable expressions such as 「正しく」 (correctly), 「適切に」 (appropriately), 「問題なく」 (without problems)
473
+ - Writing guessed behavior that is not in the specification (report unclear points in §11)
474
+ - **Bringing in viewpoints from outside the reference viewpoint set** (§7.2)
475
+ - **Writing lengths/counts not defined in the specification into steps or expected results by guessing** (§7.3)
476
+
477
+ ---
478
+
479
+ ## 11. Self-check before completion, and the report
480
+
481
+ ### Self-check (always before output)
482
+
483
+ - [ ] `00_雛型` still exists
484
+ - [ ] The §8 restore procedure was called on every copied sheet (drop-downs in columns B, D, K work)
485
+ - [ ] All sheet names are registered in the cover summary table; no `#REF!`
486
+ - [ ] In each sheet, no major category is split into two separate places
487
+ - [ ] Band numbers never go backwards (band 10 does not appear after band 30)
488
+ - [ ] Within each major category the order is 正常系 → 異常系 → 境界値
489
+ - [ ] No minor category other than those three words
490
+ - [ ] No sheet without any 異常系 / 境界値 case
491
+ - [ ] 中分類 (screen name) is filled on every row and written consistently
492
+ - [ ] No starts from 1 and is sequential in each sheet
493
+ - [ ] Columns/cells filled by people are still empty (including the author field)
494
+ - [ ] No 期待結果(DB) is left empty
495
+ - [ ] Print preview fits one page wide, and the heading row appears from page 2 onward
496
+
497
+ If any item fails, **fix it before output.** Fixing after someone points it out is rework.
498
+
499
+ ### Report
500
+
501
+ After outputting the file, report the following to the user.
502
+
503
+ 1. The list of created sheet names and the number of cases per sheet (as a 大分類 × 小分類 cross table)
504
+ 2. The number of items in the test data preparation sheet
505
+ 3. **Points that could not be read from the specification and needed a judgment call, and places written by guessing** (with sheet name and cell position)
506
+ 4. Places where the specification seems contradictory or incomplete
507
+ 5. **Any newly created major category: its name, which band it went into, and why**
508
+ 6. **Screens where you hesitated whether to split the sheet** (the decision to include them in the parent and why)
509
+ 7. Viewpoints from the §7 checklist skipped because you could not decide
510
+ 8. **Viewpoints not created because the §7.2 reference viewpoint set does not define them**
511
+ 9. **Viewpoints not created because the value is undefined (§7.3)**
512
+ 10. **Screens that matched no screen type of §7.2 and for which you chose one** (the screen type chosen and why)
513
+
514
+ Never omit items 3–10. They are the most important information for the people who review the specification.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdtk-spec-kit",
3
- "version": "0.9.1",
3
+ "version": "0.10.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
@@ -57,14 +57,16 @@ const MANAGED_CODEX_SKILLS = [
57
57
  "sdtk-api-design-spec", "sdtk-api-doc", "sdtk-arch", "sdtk-ba",
58
58
  "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-test-case-spec",
60
+ "sdtk-screen-design-spec", "sdtk-smoke-test-spec", "sdtk-test-case-spec",
61
+ "sdtk-test-case-xlsx", "sdtk-xlsx-safe-edit",
61
62
  ];
62
63
 
63
64
  const MANAGED_CLAUDE_SKILLS = [
64
65
  "api-design-spec", "api-doc", "arch", "ba",
65
66
  "design-layout", "dev", "dev-backend", "dev-frontend",
66
67
  "evolve", "orchestrator", "pm", "qa",
67
- "screen-design-spec", "test-case-spec",
68
+ "screen-design-spec", "smoke-test-spec", "test-case-spec", "test-case-xlsx",
69
+ "xlsx-safe-edit",
68
70
  ];
69
71
 
70
72
  function managedSkillNames(runtime) {