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.
- package/README.md +1 -1
- package/assets/manifest/toolkit-bundle.manifest.json +193 -33
- package/assets/manifest/toolkit-bundle.sha256.txt +47 -15
- package/assets/toolkit/toolkit/AGENTS.md +2 -1
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +5 -1
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +4 -0
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +18 -0
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +1 -0
- package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +1 -1
- package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +1 -1
- package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/SKILL.md +117 -0
- package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/references/PROFILE_TEMPLATE.md +60 -0
- package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/scripts/oq_sync.py +349 -0
- package/assets/toolkit/toolkit/skills/sdtk-customer-qa-sheet/scripts/test_oq_sync.py +175 -0
- package/assets/toolkit/toolkit/skills/sdtk-db-design/SKILL.md +130 -0
- package/assets/toolkit/toolkit/skills/sdtk-db-design/references/REVIEW_PROCESS.md +82 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/SKILL.md +104 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/REVIEW_AND_MISTAKES.md +63 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SCR01.json +46 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SCR01.png +0 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/SPEC_SCHEMA.md +208 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/references/example_spec.yaml +115 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/build_design_xlsx.py +550 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/design_spec.py +305 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/export_preview.py +111 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/export_spec_md.py +181 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/make_template.py +113 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/test_screen_design.py +198 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/uia_dump.py +64 -0
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-xlsx/scripts/validate_spec.py +260 -0
- package/assets/toolkit/toolkit/skills/sdtk-session-handoff/SKILL.md +76 -0
- package/assets/toolkit/toolkit/skills/sdtk-session-handoff/references/HANDOFF_TEMPLATE.md +63 -0
- package/assets/toolkit/toolkit/skills/sdtk-session-handoff/references/MOVING_A_PROJECT.md +18 -0
- package/assets/toolkit/toolkit/skills/sdtk-session-handoff/scripts/dirty_files.py +133 -0
- package/assets/toolkit/toolkit/skills/sdtk-session-handoff/scripts/test_dirty_files.py +94 -0
- package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/SKILL.md +4 -1
- package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/test_metadata.py +76 -0
- package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/xlsx_xml_edit.py +65 -1
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +96 -0
- package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +1 -1
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +1 -1
- package/assets/toolkit/toolkit/skills-claude/customer-qa-sheet/SKILL.md +115 -0
- package/assets/toolkit/toolkit/skills-claude/db-design/SKILL.md +128 -0
- package/assets/toolkit/toolkit/skills-claude/screen-design-xlsx/SKILL.md +101 -0
- package/assets/toolkit/toolkit/skills-claude/session-handoff/SKILL.md +74 -0
- package/assets/toolkit/toolkit/skills-claude/xlsx-safe-edit/SKILL.md +4 -1
- package/assets/toolkit/toolkit/templates/README.md +3 -0
- package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +14 -0
- package/assets/toolkit/toolkit/templates/screen-design-xlsx/ja-default/TEMPLATE.md +247 -0
- package/assets/toolkit/toolkit/templates/screen-design-xlsx/ja-default/template.xlsx +0 -0
- package/package.json +1 -1
- package/src/lib/scope.js +4 -4
|
@@ -373,6 +373,102 @@ skills:
|
|
|
373
373
|
runtime_support: [claude, codex]
|
|
374
374
|
dependencies: []
|
|
375
375
|
pack: core
|
|
376
|
+
- name: sdtk-session-handoff
|
|
377
|
+
phase: orchestration
|
|
378
|
+
role_tag: /session-handoff
|
|
379
|
+
use_when: A session ends, is compacted or hands over to a new session or person, or a moved project folder must keep its old sessions; packages memory, local instructions, a handoff document, a classification of every uncommitted file and a first prompt.
|
|
380
|
+
primary_inputs:
|
|
381
|
+
- git worktrees and their uncommitted files
|
|
382
|
+
- the session's decisions, released versions and open work
|
|
383
|
+
primary_outputs:
|
|
384
|
+
- .sdtk/handoff/session-<date>-<topic>/HANDOFF.md, STATUS.md, FILES.md (git-ignored)
|
|
385
|
+
- CLAUDE.local.md (Claude Code, git-excluded) and runtime memory entries
|
|
386
|
+
hard_gates:
|
|
387
|
+
- Every uncommitted file in every worktree is classified PR / LOCAL / STASH / DROP and dirty_files.py check exits 0 before the handoff is called done.
|
|
388
|
+
- Never git add -A; DROP only after the person said so; the handoff stays out of the repository.
|
|
389
|
+
references:
|
|
390
|
+
- toolkit/skills/sdtk-session-handoff/references/HANDOFF_TEMPLATE.md
|
|
391
|
+
- toolkit/skills/sdtk-session-handoff/references/MOVING_A_PROJECT.md
|
|
392
|
+
prompts: []
|
|
393
|
+
scripts:
|
|
394
|
+
- toolkit/skills/sdtk-session-handoff/scripts/dirty_files.py
|
|
395
|
+
runtime_support: [claude, codex]
|
|
396
|
+
dependencies: []
|
|
397
|
+
pack: core
|
|
398
|
+
- name: sdtk-customer-qa-sheet
|
|
399
|
+
phase: ba
|
|
400
|
+
role_tag: /customer-qa-sheet
|
|
401
|
+
use_when: Open questions (OQ-xx) go to a customer through their hand-maintained Q&A / issue-tracking Excel sheet, the customer's answers are read back into the spec and decision log, or a reply to the customer's question is written into that sheet.
|
|
402
|
+
primary_inputs:
|
|
403
|
+
- qa_sheet_profile.md of the project
|
|
404
|
+
- BA_SPEC open questions (OQ-xx) and the customer's Q&A workbook
|
|
405
|
+
primary_outputs:
|
|
406
|
+
- review draft of rows, then the approved rows in the customer's sheet
|
|
407
|
+
- spec / decision-log update proposal keyed by OQ id
|
|
408
|
+
hard_gates:
|
|
409
|
+
- Nothing is written before the person approves the exact row values or reply text.
|
|
410
|
+
- Never overwrite a cell holding text; never edit the customer's answer; writes go through the XML route of sdtk-xlsx-safe-edit.
|
|
411
|
+
- Rows and OQs are matched by id, never by position; candidates are checked against existing rows first.
|
|
412
|
+
references:
|
|
413
|
+
- toolkit/skills/sdtk-customer-qa-sheet/references/PROFILE_TEMPLATE.md
|
|
414
|
+
prompts: []
|
|
415
|
+
scripts:
|
|
416
|
+
- toolkit/skills/sdtk-customer-qa-sheet/scripts/oq_sync.py
|
|
417
|
+
runtime_support: [claude, codex]
|
|
418
|
+
dependencies: [sdtk-xlsx-safe-edit]
|
|
419
|
+
pack: core
|
|
420
|
+
- name: sdtk-db-design
|
|
421
|
+
phase: arch
|
|
422
|
+
role_tag: /db-design
|
|
423
|
+
use_when: A new table or column is proposed, a schema is reviewed / trimmed before release, a legacy database is replaced, or a schema change can reach machines holding real user data; decides what sdtk-arch's DATABASE_SPEC contains.
|
|
424
|
+
primary_inputs:
|
|
425
|
+
- requirements and approved decisions; current DDL and every write path
|
|
426
|
+
- legacy schema and external contracts when replacing or syncing
|
|
427
|
+
primary_outputs:
|
|
428
|
+
- fact inventory with a verdict per column (DATABASE_SPEC section 8)
|
|
429
|
+
- legacy column map, upgrade ladder and migration policy when data may exist
|
|
430
|
+
hard_gates:
|
|
431
|
+
- Every durable field names a writer, a reader, a recovery purpose and the requirement that fails without it.
|
|
432
|
+
- Read the DDL and all write paths before stating meaning; once real data can exist, never drop and recreate.
|
|
433
|
+
- Product semantics are the owner's decision; the schema of record changes only after sign-off.
|
|
434
|
+
references:
|
|
435
|
+
- toolkit/skills/sdtk-db-design/references/REVIEW_PROCESS.md
|
|
436
|
+
- toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md
|
|
437
|
+
prompts: []
|
|
438
|
+
scripts: []
|
|
439
|
+
runtime_support: [claude, codex]
|
|
440
|
+
dependencies: [sdtk-arch]
|
|
441
|
+
pack: core
|
|
442
|
+
- name: sdtk-screen-design-xlsx
|
|
443
|
+
phase: arch
|
|
444
|
+
role_tag: /screen-design-xlsx
|
|
445
|
+
use_when: A Japanese 画面設計書 Excel workbook (表紙 / 改訂記事 / 機能概要 / 画面流れ / 処理) must be built, updated or audited from the screen flow-action spec and other sources, through a reviewable YAML spec rendered by Excel COM.
|
|
446
|
+
primary_inputs:
|
|
447
|
+
- screen flow-action spec, design layout, API list, DB spec; screenshots or UI Automation dumps
|
|
448
|
+
- template set toolkit/templates/screen-design-xlsx/<set> (or the project's own)
|
|
449
|
+
primary_outputs:
|
|
450
|
+
- docs/screen_design/design_spec.yaml (the reviewed artifact)
|
|
451
|
+
- the 画面設計書 workbook, PNG previews, optional Markdown of the process sheets
|
|
452
|
+
hard_gates:
|
|
453
|
+
- validate_spec.py exits 0 before rendering; every rendered page is looked at as PNG.
|
|
454
|
+
- On an existing workbook only the changed sheets are rendered (--sheets); a finalized or hand-edited workbook is never re-rendered without the person's confirmation (final mode via sdtk-xlsx-safe-edit).
|
|
455
|
+
- Never save with openpyxl, never attach to the person's Excel; cite only identifiers that exist in the sources.
|
|
456
|
+
references:
|
|
457
|
+
- toolkit/skills/sdtk-screen-design-xlsx/references/SPEC_SCHEMA.md
|
|
458
|
+
- toolkit/skills/sdtk-screen-design-xlsx/references/REVIEW_AND_MISTAKES.md
|
|
459
|
+
- toolkit/templates/screen-design-xlsx/ja-default/TEMPLATE.md
|
|
460
|
+
prompts: []
|
|
461
|
+
scripts:
|
|
462
|
+
- toolkit/skills/sdtk-screen-design-xlsx/scripts/design_spec.py
|
|
463
|
+
- toolkit/skills/sdtk-screen-design-xlsx/scripts/validate_spec.py
|
|
464
|
+
- toolkit/skills/sdtk-screen-design-xlsx/scripts/build_design_xlsx.py
|
|
465
|
+
- toolkit/skills/sdtk-screen-design-xlsx/scripts/export_preview.py
|
|
466
|
+
- toolkit/skills/sdtk-screen-design-xlsx/scripts/export_spec_md.py
|
|
467
|
+
- toolkit/skills/sdtk-screen-design-xlsx/scripts/uia_dump.py
|
|
468
|
+
- toolkit/skills/sdtk-screen-design-xlsx/scripts/make_template.py
|
|
469
|
+
runtime_support: [claude, codex]
|
|
470
|
+
dependencies: [sdtk-screen-design-spec, sdtk-xlsx-safe-edit]
|
|
471
|
+
pack: core
|
|
376
472
|
- name: sdtk-smoke-test-spec
|
|
377
473
|
phase: qa
|
|
378
474
|
role_tag: /smoke-test-spec
|
|
@@ -32,7 +32,7 @@ $ARGUMENTS
|
|
|
32
32
|
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
|
|
33
33
|
- `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
|
|
34
34
|
- `docs/api/[feature_snake]_api_flow_list.txt`
|
|
35
|
-
- `docs/database/DATABASE_SPEC_[FEATURE_KEY].md`
|
|
35
|
+
- `docs/database/DATABASE_SPEC_[FEATURE_KEY].md` (a new table, a legacy replacement or a migration that can meet real data: run `/db-design` first)
|
|
36
36
|
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md`
|
|
37
37
|
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
|
|
38
38
|
|
|
@@ -62,6 +62,6 @@ forward as explicit OQ-xx items in BA_SPEC rather than silently resolved.
|
|
|
62
62
|
- Traceability summary table (REQ -> UC/BR/AC)
|
|
63
63
|
3. If source requirements are VI/JP, preserve the original text and add a literal EN translation in appendices.
|
|
64
64
|
4. For benchmark runs, apply `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md`: keep benchmark-expected open questions explicitly OPEN and do not silently resolve them in BA output.
|
|
65
|
-
5. If anything is unclear, record OQ-xx in BA_SPEC "Open Questions" and escalate to PM.
|
|
65
|
+
5. If anything is unclear, record OQ-xx in BA_SPEC "Open Questions" and escalate to PM. OQs the customer must answer through their Q&A Excel sheet go there with `/customer-qa-sheet` (answers come back keyed by OQ id).
|
|
66
66
|
6. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 2.
|
|
67
67
|
7. Handoff: suggest user run `/pm` to proceed with PRD planning.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: customer-qa-sheet
|
|
3
|
+
description: Use when open questions (OQ-xx, 確認事項, 仕様確認) must go to a customer through their hand-maintained Q&A or issue-tracking Excel sheet (one numbered question per row, an answer column), when reading the customer's answers back into the spec / decision log, or when writing replies to questions the customer asked in that sheet.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
# SDTK-SPEC Customer Q&A Sheet: questions, answers, replies
|
|
10
|
+
|
|
11
|
+
The sheet is a customer-facing record. Every row you add is read by the customer and answered in
|
|
12
|
+
writing, so a row must be correct, not a duplicate, in the sheet's own style, and approved by the
|
|
13
|
+
person before it lands. The workbook itself is hand-maintained.
|
|
14
|
+
|
|
15
|
+
**REQUIRED SUB-SKILL:** `sdtk-xlsx-safe-edit` — preflight, backup, XML route for every write. Never save
|
|
16
|
+
this workbook through Excel or openpyxl: that rewrites fonts and row heights on every other sheet.
|
|
17
|
+
|
|
18
|
+
## Critical Constraints
|
|
19
|
+
|
|
20
|
+
1. **Nothing is written before the person approves the exact row values** (or the exact reply text).
|
|
21
|
+
"The PM approved the wording" is not approval of row values, placement or numbering.
|
|
22
|
+
2. **Never overwrite a cell that holds text.** New questions go into empty rows; replies are appended
|
|
23
|
+
after existing answer text. The customer's answer text is never edited.
|
|
24
|
+
3. **Search before asking.** Every candidate is checked against the existing rows; overlap with an
|
|
25
|
+
unanswered row → reference it or drop the question; answered already → do not ask again.
|
|
26
|
+
4. **Rows and OQs are matched by id** — the `OQ-xx` in an OQ column or in the question text, and the
|
|
27
|
+
sheet's No — never by row position.
|
|
28
|
+
5. **Facts stated to the customer come from the code that runs, logs or a measurement**, not from
|
|
29
|
+
comments or design documents.
|
|
30
|
+
|
|
31
|
+
## Project profile (read first)
|
|
32
|
+
|
|
33
|
+
Project facts live in the project repository, not here: find `qa_sheet_profile.md` by file search over the
|
|
34
|
+
working tree (it may be untracked; `git ls-files` misses it). It names the workbook, sheet, header row,
|
|
35
|
+
column map, our contact name, the customer's, category values, numbering format, answer-block format,
|
|
36
|
+
ordering rule, and a ```json block the script reads. No profile → build one from
|
|
37
|
+
`.claude/skills/customer-qa-sheet/references/PROFILE_TEMPLATE.md` by reading the sheet, and confirm it with
|
|
38
|
+
the person.
|
|
39
|
+
|
|
40
|
+
Script: `.claude/skills/customer-qa-sheet/scripts/oq_sync.py` (`oqs`, `sheet`, `export`, `answers`, `write`).
|
|
41
|
+
It reads the workbook from a copy with openpyxl and writes only through `sdtk-xlsx-safe-edit`'s `xlsx_xml_edit`
|
|
42
|
+
(the sheet part changes, every other part stays byte-identical, a `.bak` is kept).
|
|
43
|
+
|
|
44
|
+
## Process
|
|
45
|
+
|
|
46
|
+
Read the profile, then follow the section that matches the request: A (adding questions), B (reading answers)
|
|
47
|
+
or C (replying to the customer). Each ends with a draft for the person before anything is written.
|
|
48
|
+
|
|
49
|
+
### A. Adding questions
|
|
50
|
+
|
|
51
|
+
1. **Read the sheet read-only** (`oq_sync.py sheet --profile …`): the last 5–10 filled rows for style, the
|
|
52
|
+
first empty number, pre-numbered empty rows, where data validation / conditional formatting end.
|
|
53
|
+
2. **Collect the candidates.** From the spec: `oq_sync.py export --profile … --spec docs/specs/BA_SPEC_<KEY>.md
|
|
54
|
+
--out <draft>.md` lists every OPEN OQ not yet in the sheet with a proposed No and row, and the rows that share
|
|
55
|
+
words with it ("possibly related" — rows written before OQ ids were used carry no id); OQs already in the
|
|
56
|
+
sheet are shown with their No (answered or not). Other candidates come from the person or the work.
|
|
57
|
+
3. **Check every candidate against existing rows.** Search the question, detail and function columns for
|
|
58
|
+
the same topic. Overlap with an unanswered row → reference it (e.g. "関連 No024") or drop the question.
|
|
59
|
+
4. **Keep only questions that block work:** the spec leaves a user-visible or data-affecting behaviour
|
|
60
|
+
undefined, or the spec cannot be built as written and a deviation needs consent. Do not ask what the spec
|
|
61
|
+
states clearly. A mockup is an illustration, not a decision; when a cell and a mockup disagree, quote
|
|
62
|
+
both. Before asking about a limit or rule in your own system, read the code that enforces it and state
|
|
63
|
+
what it really counts.
|
|
64
|
+
5. **Write each row's text in this shape** (the customer's language and the sheet's style):
|
|
65
|
+
1. context, 1–2 sentences: the spec sheet / section it comes from, and the current behaviour stated plainly
|
|
66
|
+
("not implemented yet", "limited to 20 in total");
|
|
67
|
+
2. the question; several points → one numbered item each — (1), (2)… — each answerable alone;
|
|
68
|
+
3. choices when they help: (A), (B)… with our proposal marked as the profile says (e.g. "… 弊社案");
|
|
69
|
+
4. a closing ask (e.g. "どちらがよろしいでしょうか。").
|
|
70
|
+
Each row carries its `OQ-xx` (OQ column, or the profile's `oq_tag` at the start of the text). Customer text
|
|
71
|
+
carries no code paths, no internal ticket ids, and no apology or correction of an earlier document unless
|
|
72
|
+
the person asks for one.
|
|
73
|
+
6. **Draft for review:** the export draft completed with, per row, every column value exactly as it will be
|
|
74
|
+
written, the existing rows on the same topic (or "none"), and a translation for the reviewer (not written to
|
|
75
|
+
Excel). End with the open choices and a default for each (start number, one row vs one row per point,
|
|
76
|
+
order, column values, date).
|
|
77
|
+
7. **Write only after the person approves.** Save the approved rows as JSON (`[{"row", "oq", "values": {<profile
|
|
78
|
+
column key>: text}}]`), run `oq_sync.py write --profile … --rows <file>` (dry run), then with `--apply`.
|
|
79
|
+
The script refuses rows that already hold a question, OQs already in the sheet, unknown columns, and any
|
|
80
|
+
value in the answer column. Report: rows written, No, backup path.
|
|
81
|
+
|
|
82
|
+
### B. Reading the customer's answers
|
|
83
|
+
|
|
84
|
+
1. `oq_sync.py answers --profile … --snapshot <last>.json --save-snapshot <new>.json` — rows whose answer is
|
|
85
|
+
non-empty and changed since the last snapshot, each with its `OQ-xx` ids (`unmatched: true` when the row
|
|
86
|
+
names none). Keep the snapshot next to the profile.
|
|
87
|
+
2. Per row: question, answer verbatim, the decision it implies, the specs or tasks it changes, and whether it
|
|
88
|
+
is ambiguous. Ambiguous → draft a follow-up row ("関連 No…") under section A. Any statement about how your
|
|
89
|
+
system works follows constraint 5.
|
|
90
|
+
3. **Propose** the spec update, keyed by OQ id: in BA_SPEC §5.2 the row's Status → `RESOLVED`, Resolution →
|
|
91
|
+
the decision + `(<sheet> No<n>, <answer date>)`; a dated row in the decision log. Show the patch; apply it
|
|
92
|
+
after the person agrees. Unmatched rows are reported, never guessed onto an OQ.
|
|
93
|
+
|
|
94
|
+
### C. Replying to a question the customer asked
|
|
95
|
+
|
|
96
|
+
1. Establish every fact you will state from the code that executes, logs or a measurement; note which of
|
|
97
|
+
these each fact rests on. Behaviour you did not measure is stated as design, not as observed.
|
|
98
|
+
2. When the person's statement contradicts the code (for example which version uses which path), write what
|
|
99
|
+
the code does and say so explicitly in the draft.
|
|
100
|
+
3. Draft the reply in the answer-block format from the profile (e.g. `YYYY/MM/DD <our name>` + newline +
|
|
101
|
+
text), in the sheet's existing style: 1–2 lines per item; several product versions → "path 1 / path 2"
|
|
102
|
+
with one note on top; commands short, one per line. Show the draft unless the person approved this exact
|
|
103
|
+
text.
|
|
104
|
+
4. Write it **after** any existing text in the answer cell (XML route of `sdtk-xlsx-safe-edit`), never over it.
|
|
105
|
+
|
|
106
|
+
## Red flags — stop
|
|
107
|
+
|
|
108
|
+
| Thought | Reality |
|
|
109
|
+
|---|---|
|
|
110
|
+
| "The PM approved the wording, just write it" | Approved wording ≠ approved row values / placement / a reply you composed. Show what you will write unless it was approved verbatim. |
|
|
111
|
+
| "Save once through Excel, it's quicker" | Every other sheet's layout changes. XML route. |
|
|
112
|
+
| "This question is new" | You have not searched the existing rows yet. |
|
|
113
|
+
| "The answers are in the same order as our OQs" | Match by OQ id; report rows without one. |
|
|
114
|
+
| "The mockup shows it, so it's required" | Ask only if the spec text is silent or contradicts it. |
|
|
115
|
+
| "I know how the app behaves" / "the design doc says so" | Read the code path that runs; quote what it counts or returns. |
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: db-design
|
|
3
|
+
description: Use when designing, reviewing, trimming or migrating a database schema or durable app state (tables, columns, keys, indexes, enums, queues, recovery records) - a new table or column is proposed, a legacy database is replaced, or a schema change may reach machines holding real user data.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
# SDTK-SPEC Database Design, Review and Migration
|
|
10
|
+
|
|
11
|
+
A schema is a set of claims about what must be remembered. Keep the smallest schema that serves a present, evidenced requirement. Every durable field needs a named writer, reader, recovery purpose, and owner-approved meaning.
|
|
12
|
+
|
|
13
|
+
The product owner decides product semantics. Establish evidence, distinguish product policy from implementation mechanics, propose the smallest safe design, and obtain sign-off before changing the schema of record.
|
|
14
|
+
|
|
15
|
+
## Critical Constraints
|
|
16
|
+
|
|
17
|
+
1. **Every durable field names a writer, a reader, a recovery purpose and the requirement that fails without it.**
|
|
18
|
+
No such requirement → cut or defer it, and record what would reopen it.
|
|
19
|
+
2. **Read the DDL and every write path** before stating what a column means or which states exist; never infer a
|
|
20
|
+
rule from a table's shape.
|
|
21
|
+
3. **Once any build can hold data that exists nowhere else, a schema change never drops and recreates.** Upgrade
|
|
22
|
+
ladder, engine backup, one transaction per step, refuse to open a newer database with an older client.
|
|
23
|
+
4. **The product owner decides product semantics** (ownership, retention, recovery, conflict policy, external
|
|
24
|
+
field meaning). Stop and ask for those; propose the smallest design for everything else.
|
|
25
|
+
5. **The schema of record changes only after sign-off**; superseded design text is marked with date and reason,
|
|
26
|
+
never deleted.
|
|
27
|
+
|
|
28
|
+
## Modes and outputs
|
|
29
|
+
|
|
30
|
+
`sdtk-arch` writes `docs/database/DATABASE_SPEC_[FEATURE_KEY].md` from the toolkit's DATABASE_SPEC template.
|
|
31
|
+
This skill decides **what goes into it** and how it may change:
|
|
32
|
+
|
|
33
|
+
| Mode | When | Output |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| **design** | a new table / column is proposed, or a feature has DB impact | the fact inventory (section 8 of the DATABASE_SPEC template) with a verdict per column, then the tables of the spec |
|
|
36
|
+
| **review / trim** | an existing schema, before a release or a refactor | the inventory of the current DDL **and all write paths**, a verdict per column (keep / derive / fold / defer / cut), the evidence |
|
|
37
|
+
| **migration** | a schema change, a legacy replacement, or any build that can meet real data | the legacy column map, the upgrade ladder, the migration policy and its stop point |
|
|
38
|
+
|
|
39
|
+
Every mode follows `.claude/skills/db-design/references/REVIEW_PROCESS.md` for the evidence it needs, and ends
|
|
40
|
+
with proposals for the owner — the schema of record changes only after sign-off.
|
|
41
|
+
|
|
42
|
+
Examples in this skill come from two kinds of systems; apply the rule, not the domain:
|
|
43
|
+
- a **web application** (orders, order lines, customers): "store inputs, not rendered output" → keep `amount` and
|
|
44
|
+
`currency`, not `amount_display`; "stable identity" → an order is keyed by its id, never by its order number
|
|
45
|
+
when that number can be re-issued; "one meaning, one name" → `status` of an order and `status` of a payment are
|
|
46
|
+
different value sets, named `order_status` / `payment_status`;
|
|
47
|
+
- a **local client that syncs with a server** (files, queues, recovery records): the durable-workflow rules below.
|
|
48
|
+
|
|
49
|
+
## Core principles
|
|
50
|
+
|
|
51
|
+
1. **Start from durable facts, not feature names.** For each table and column, name the requirement that fails without it. Otherwise cut or defer it.
|
|
52
|
+
2. **Do not duplicate or cache durable truth without a failure reason.** Prefer filesystem state, upstream records, or values derivable from stored facts when they remain available at recovery time. The other store must hold the *same* fact: a read-only attribute on disk does not say whether this app set it or the user did, so ownership of a change is still a fact worth one column.
|
|
53
|
+
3. **Keep an object's attributes on its own row.** Avoid one-to-one side tables unless lifecycle, access, or retention genuinely differs.
|
|
54
|
+
4. **Persist only what must survive restart or crash.** Keep process-only coordination in memory; persist the minimal recovery fact.
|
|
55
|
+
5. **Preserve external semantics.** Copy externally owned IDs, timestamps, bitmasks, names, defaults, and error meanings verbatim. Do not invent a local enum over an upstream contract.
|
|
56
|
+
6. **Make identity stable.** Do not use mutable names, paths, parents, or nullable values as an object's identity key. Treat a path as location, not identity.
|
|
57
|
+
7. **Derive states from real writers.** Every enum value must have a writer; every writer must have a documented value. A queue that deletes successful rows does not have a durable `Done` state.
|
|
58
|
+
8. **Give indexes one explicit job.** Each index enforces a named invariant or accelerates a named query. Match collation to the platform's identity rules, such as case-insensitive Windows paths.
|
|
59
|
+
9. **Preserve real user data from the first shared-system build.** "Dev only" ends when any build can contain a user's only copy of queued work, edits, or settings.
|
|
60
|
+
10. **One meaning, one name; different meanings, different names.** Unify columns that hold the same domain and value set. Never merge columns whose same numbers mean different things in each table.
|
|
61
|
+
11. **Store inputs, not rendered output.** Do not persist a display string that is fully derivable from other columns; store only what the UI cannot rebuild (an error reason, a conflict copy's name).
|
|
62
|
+
12. **Keep some data outside the database.** Secrets stay in an encrypted store unless the database is encrypted at rest. Anything needed after the database file is deleted (an uninstaller's cleanup path) lives elsewhere too.
|
|
63
|
+
13. **No schema for unspecified features.** When a feature's spec has not been delivered, defer its tables and columns and record the trigger that reopens them.
|
|
64
|
+
|
|
65
|
+
## Durable workflows, queues, and synchronization
|
|
66
|
+
|
|
67
|
+
Use these rules whenever a database coordinates local files, background work, or an external service.
|
|
68
|
+
|
|
69
|
+
- Treat a queue row as **durable intent**, not merely a log. Complete it only after the external system has confirmed the requested effect.
|
|
70
|
+
- When state, queue, and protection records must agree, update them in **one transaction**. Check affected-row counts: a successful SQLite commit can still contain an UPDATE or DELETE that matched zero rows.
|
|
71
|
+
- Do not assume "no exception" means success. Repositories that log and return zero require callers to verify their result.
|
|
72
|
+
- A missing local row is not evidence that an item is new. Guard the "empty DB + populated workspace" shape; suspend or require recovery rather than mass-uploading existing content.
|
|
73
|
+
- Preserve the authoritative baseline needed for conflict detection. Do not overwrite a server baseline with local timestamps, malformed external values, or a refresh that races with a locally modified item.
|
|
74
|
+
- For a crash-recoverable multi-step operation, write a durable manifest or intent before the first irreversible external/local step; make each step idempotent; verify independently before cleanup; remove the manifest last.
|
|
75
|
+
- Do not adopt an external object by name alone. Name collisions cannot prove ownership.
|
|
76
|
+
- A retry ID is safe as an idempotency key only when it identifies one immutable operation and payload. A queue ID reused after a payload rewrite must not be sent as such a key.
|
|
77
|
+
- Identify client/server atomicity gaps explicitly. A server success before the local commit cannot be made exactly-once by client-side preflight alone; require an upstream idempotency contract if exact-once is a requirement.
|
|
78
|
+
|
|
79
|
+
## Migration and write safety
|
|
80
|
+
|
|
81
|
+
- Once real user data can exist, schema mismatch must not mean drop-and-recreate. Use an explicit upgrade ladder, one atomic transaction per step, and a backup made through the database engine before risky changes.
|
|
82
|
+
- Commit DDL and the schema-version bump together. Test that a version change has a corresponding upgrade step, and refuse to open a newer database with an older client.
|
|
83
|
+
- A rebuild-on-change policy is acceptable only while its written precondition is true: no machine can hold data worth preserving. Record when that policy expires.
|
|
84
|
+
- Preserve legacy behavior by mapping required facts column by column, not by copying legacy table shapes. Every unmapped field needs an explicit reason it is obsolete.
|
|
85
|
+
|
|
86
|
+
## Process
|
|
87
|
+
|
|
88
|
+
1. Pick the mode (table above) and gather the evidence REVIEW_PROCESS.md names for it.
|
|
89
|
+
2. Inventory and challenge every field (core principles, durable-workflow rules).
|
|
90
|
+
3. For migrations: answer "can real data exist?" first, then the ladder (migration rules).
|
|
91
|
+
4. Stop for the owner on the questions under "Stop and clarify"; present proposals with evidence.
|
|
92
|
+
5. After sign-off: update the DATABASE_SPEC (section 8 included), then code and tests.
|
|
93
|
+
|
|
94
|
+
### Review workflow
|
|
95
|
+
|
|
96
|
+
For a new schema, a material change, a legacy replacement, or release to machines with data, read `.claude/skills/db-design/references/REVIEW_PROCESS.md` and produce the relevant evidence before implementation.
|
|
97
|
+
|
|
98
|
+
At minimum, inspect the DDL **and all write paths**. Schema shape alone does not establish a field's meaning, state transitions, or recovery guarantees.
|
|
99
|
+
|
|
100
|
+
## Stop and clarify
|
|
101
|
+
|
|
102
|
+
Stop for owner or backend confirmation when any of these is unknown:
|
|
103
|
+
|
|
104
|
+
- a user-visible ownership, retention, recovery, or conflict policy;
|
|
105
|
+
- the semantic meaning/default of an external field or response;
|
|
106
|
+
- whether a migration may encounter real data;
|
|
107
|
+
- whether a backend accepts a client idempotency key and its exact replay/concurrency contract.
|
|
108
|
+
|
|
109
|
+
Do not stop merely because an internal transaction boundary, naming convention, or retry implementation is undecided; propose the smallest design consistent with the approved product policy.
|
|
110
|
+
|
|
111
|
+
## Red flags - stop and re-check
|
|
112
|
+
|
|
113
|
+
- "Add the table now so we don't have to migrate later."
|
|
114
|
+
- A local enum invented over values that come from another system.
|
|
115
|
+
- A status value no code path writes, or a written value with no status name.
|
|
116
|
+
- A design rule inferred from a table's shape ("it has no parent column, so...") without grepping who writes the table.
|
|
117
|
+
- A column justified only by "might help debugging/UI" with no requirement or screen named.
|
|
118
|
+
- "It's only on dev machines" - check whether any build points at a shared server.
|
|
119
|
+
- Design doc, ERD, definition sheet and code disagreeing about a name or value.
|
|
120
|
+
|
|
121
|
+
## Common mistakes
|
|
122
|
+
|
|
123
|
+
| Mistake | Fix |
|
|
124
|
+
|---|---|
|
|
125
|
+
| Proposing tables from requirement titles | Map each requirement to the facts it must remember across restarts |
|
|
126
|
+
| Renaming columns in docs and code in many small rounds | Agree names with stakeholders first, then change code once |
|
|
127
|
+
| Deleting superseded design text | Mark it superseded with date and reason; keep it under the current version |
|
|
128
|
+
| Showing internal notes or implementation status in customer copies | Strip to PK, defaults and enum values |
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: screen-design-xlsx
|
|
3
|
+
description: Use when a Japanese 画面設計書 Excel workbook (表紙 / 改訂記事 / 機能概要 / 画面流れ / 処理) must be built, updated or reviewed from the screen flow-action spec and other sources, via a reviewable YAML spec rendered by Excel COM; also for read-only coverage audits of such a workbook. Windows + Excel + pywin32 to render.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
# SDTK-SPEC Screen Design Workbook (画面設計書 .xlsx)
|
|
10
|
+
|
|
11
|
+
`sdtk-screen-design-spec` owns the content (screens, UI items, actions, APIs). This skill renders it into a
|
|
12
|
+
customer's 画面設計書 house format, through a YAML spec that is reviewed, diffed and re-rendered:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
flow-action spec + sources ──(you)──▶ design_spec.yaml ──(build_design_xlsx.py)──▶ .xlsx
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Never hand-write Excel-building code for this format; the YAML is the artifact.
|
|
19
|
+
|
|
20
|
+
**REQUIRED SUB-SKILL:** `sdtk-xlsx-safe-edit` — preflight, backup, final mode, metadata scan.
|
|
21
|
+
|
|
22
|
+
## Critical Constraints
|
|
23
|
+
|
|
24
|
+
1. **Rendering wipes and rebuilds each named sheet.** On an existing workbook `--sheets` is mandatory and names
|
|
25
|
+
only the sheets you changed; the renderer refuses otherwise.
|
|
26
|
+
2. **A workbook the person finalized by hand is never re-rendered.** Mark it `workbook.final: true`; changes go
|
|
27
|
+
through `sdtk-xlsx-safe-edit` final mode (surgical edit + change table). A workbook that changed after this
|
|
28
|
+
skill's last render (render stamp beside the spec) is rendered only with `--accept-hand-edits`, after the person
|
|
29
|
+
confirmed the named sheets hold nothing to keep.
|
|
30
|
+
3. **Never save it with `openpyxl`** (drawings vanish) and **never attach to the person's Excel** — the scripts use
|
|
31
|
+
a private instance (`DispatchEx`); preflight stops when the workbook or one of the same name is open.
|
|
32
|
+
4. **Validate before rendering and look after it.** `validate_spec.py` exits 0; then export PNGs and read every page —
|
|
33
|
+
clipped shape text and overlaps are only visible in the render.
|
|
34
|
+
5. **Cite real identifiers only** (API numbers, tables, columns, screen ids from the sources). Never invent one: it
|
|
35
|
+
survives into the customer's issue log.
|
|
36
|
+
6. **Before the workbook leaves the team**, `xlsx_xml_edit.py scan-metadata <file> --name <customer> …` exits 0
|
|
37
|
+
(author, saved path, external links, old defined names, names in any part).
|
|
38
|
+
|
|
39
|
+
## Inputs
|
|
40
|
+
|
|
41
|
+
- the screen flow-action spec (`sdtk-screen-design-spec`), design layout, API list, DB spec; the implementation when
|
|
42
|
+
the document must describe real behaviour;
|
|
43
|
+
- the template set: `./references/templates/screen-design-xlsx/<set>/` (`ja-default` shipped; a customer's own set in
|
|
44
|
+
`docs/templates/screen-design-xlsx/<set>/` of the project wins) — `TEMPLATE.md` is the format the renderer assumes;
|
|
45
|
+
- screenshots, and for markers either measured fractions or a UI Automation dump (`scripts/uia_dump.py`).
|
|
46
|
+
|
|
47
|
+
## Process
|
|
48
|
+
|
|
49
|
+
1. Read the template set's `TEMPLATE.md` and `.claude/skills/screen-design-xlsx/references/SPEC_SCHEMA.md`
|
|
50
|
+
(a complete fictional spec: `.claude/skills/screen-design-xlsx/references/example_spec.yaml`).
|
|
51
|
+
2. Write or extend the spec YAML (default `docs/screen_design/design_spec.yaml`). Map the flow-action spec's UI item
|
|
52
|
+
table onto `screens[].items` (項目名 / 部品の種類 / 属性 / DBカラム / 桁数 / 初期値 / 必須 / 特記事項); one flow
|
|
53
|
+
block per process, detail pages for API calls and rules. Count flowchart nodes before adding one (max 6, a
|
|
54
|
+
decision spends two markers).
|
|
55
|
+
3. `python .claude/skills/screen-design-xlsx/scripts/validate_spec.py --spec <spec>` — fix every error. It checks
|
|
56
|
+
shape text, annotation widths, page overflow (flow end, terminating branches, screenshot + <備考>), sub-process
|
|
57
|
+
and `…を参照` targets, marker ↔ item counts, UI Automation markers.
|
|
58
|
+
4. **Read-only requests stop here** (audit, "is it complete?"): see
|
|
59
|
+
`.claude/skills/screen-design-xlsx/references/REVIEW_AND_MISTAKES.md` §1. No Excel, no render.
|
|
60
|
+
5. `build_design_xlsx.py --spec <spec> --sheets <changed sheets> --check` (no Excel needed) says what would be
|
|
61
|
+
rendered or why not. Render — Windows + Excel:
|
|
62
|
+
`python .claude/skills/screen-design-xlsx/scripts/build_design_xlsx.py --spec <spec> --sheets <changed sheets>`.
|
|
63
|
+
It preflights, backs up to `_backup/`, renders in a private Excel, closes without saving on any error, and writes
|
|
64
|
+
the render stamp. A refusal names the reason (final, hand edits, missing `--sheets`): report it, do not work
|
|
65
|
+
around it. `--out <copy.xlsx>` renders a preview copy without touching the workbook.
|
|
66
|
+
6. `python .claude/skills/screen-design-xlsx/scripts/export_preview.py --spec <spec> --sheets <same>` and read
|
|
67
|
+
every PNG. Iterate on the YAML until the pages are clean.
|
|
68
|
+
7. Add a `改訂記事` entry for the change and render that sheet.
|
|
69
|
+
8. Optional: `export_spec_md.py --spec <spec>` writes the process sheets as Markdown (Mermaid + notes) for the
|
|
70
|
+
architecture docs — generated, never edited by hand.
|
|
71
|
+
|
|
72
|
+
## Numbering conventions
|
|
73
|
+
|
|
74
|
+
- `画面ID`: `<PREFIX><nn>` per screen (`SCR01`), stable forever; new screens append.
|
|
75
|
+
- `処理番号`: screen-driven processes reuse the screen id (`SCR03-1`); background processes get their own series
|
|
76
|
+
(`PRC01-1`) with the trigger in `画面名`; sub-processes append a level (`PRC01-1-1`). Never renumber a series.
|
|
77
|
+
- Step markers `①②③…` match the right-hand explanation list one-for-one.
|
|
78
|
+
|
|
79
|
+
## Content conventions
|
|
80
|
+
|
|
81
|
+
- Confirmed-but-unimplemented design is still documented, prefixed `【現行未実装】…(〜の確定後)` on every sheet
|
|
82
|
+
that mentions it (`機能概要` included).
|
|
83
|
+
- Sources that disagree with each other or with the code are decisions for the person, not text to copy across.
|
|
84
|
+
|
|
85
|
+
## When To Stop Or Escalate
|
|
86
|
+
|
|
87
|
+
- Not Windows, or no desktop Excel: stop before rendering and say so (validate / audit / Markdown still work).
|
|
88
|
+
- The workbook is open, final, or changed since the last render: stop and report (constraint 2).
|
|
89
|
+
- A flow needs more than 6 main-column nodes: split it into a parent flow + a sub-process page — ask if unsure.
|
|
90
|
+
- Marker positions cannot be derived from markdown: ask for a screenshot + UI Automation dump, or coordinates.
|
|
91
|
+
|
|
92
|
+
## Scripts
|
|
93
|
+
|
|
94
|
+
| Script | Needs | Does |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| `validate_spec.py --spec` | PyYAML | schema, layout budgets, overflow, references, UIA markers |
|
|
97
|
+
| `build_design_xlsx.py --spec --sheets [--out] [--accept-hand-edits] [--check]` | Windows, Excel, pywin32 | render (safe-edit preflight / backup, stamp) |
|
|
98
|
+
| `export_preview.py --spec [--sheets] [--outdir]` | Windows, Excel | one PNG per printed page |
|
|
99
|
+
| `export_spec_md.py --spec [--sheet]` | PyYAML | process sheets as Markdown |
|
|
100
|
+
| `uia_dump.py --title --out [--inset]` | Windows, pywinauto, Pillow | screenshot + element rectangles of one window |
|
|
101
|
+
| `make_template.py --from --out` | Windows, Excel | blank template.xlsx for a (customer's) template set |
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-handoff
|
|
3
|
+
description: Use when a session is about to end, be compacted or hand over to a new session or another person ("wrap up", "prepare a handoff", "new phase tomorrow"), or when a project folder moved and old sessions must find it; packages memory, local instructions, a handoff document, a classification of every uncommitted file and a first prompt.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
# SDTK Session Handoff
|
|
10
|
+
|
|
11
|
+
A new session knows only what it can read. This skill writes it down in the right places, and makes sure no
|
|
12
|
+
uncommitted file is lost or swept into a commit on the way.
|
|
13
|
+
|
|
14
|
+
## Critical Constraints
|
|
15
|
+
|
|
16
|
+
1. **Every uncommitted file gets a class before the session ends** — `PR`, `LOCAL`, `STASH` or `DROP` — in every
|
|
17
|
+
worktree. `dirty_files.py check` exits 0 before you say the handoff is done.
|
|
18
|
+
2. **Never `git add -A` / `git add .` / `git commit -a`.** A `PR` file is staged by its own path; a `LOCAL` file is never
|
|
19
|
+
staged. `DROP` happens only after the person said so, and is their command to run.
|
|
20
|
+
3. **The handoff document stays out of the repository** (`.sdtk/handoff/`, git-ignored). Check with
|
|
21
|
+
`git check-ignore` first; if it is not ignored, add it to `.git/info/exclude` — never edit the project's
|
|
22
|
+
`.gitignore` for this.
|
|
23
|
+
4. **Memory holds durable facts only** (decisions, conventions, where things are, traps). Work in progress goes in the
|
|
24
|
+
handoff document; facts the repository already records (code, git history, docs) go nowhere.
|
|
25
|
+
5. **Exact facts come from the source, not from a summary.** After a compaction, a summary has lost detail: copy ids,
|
|
26
|
+
versions, paths and commands from files, git or the transcript, and say which you could not check.
|
|
27
|
+
6. **The next session starts in the same folder.** Runtime memory is keyed by the working-directory path; a different
|
|
28
|
+
folder (or a moved project) starts with no memory — see
|
|
29
|
+
`.claude/skills/session-handoff/references/MOVING_A_PROJECT.md`.
|
|
30
|
+
|
|
31
|
+
## Process
|
|
32
|
+
|
|
33
|
+
1. **State.** `git worktree list`; per worktree: branch, upstream, ahead / behind, open PRs if a forge CLI is signed
|
|
34
|
+
in. Released or published versions, running processes the next session must know about (servers, background jobs).
|
|
35
|
+
2. **Uncommitted files.**
|
|
36
|
+
`python .claude/skills/session-handoff/scripts/dirty_files.py inventory --out .sdtk/handoff/<handoff>/FILES.md`,
|
|
37
|
+
fill the `class` and `note` columns (ask the person for anything you cannot place), carry out PR / STASH rows the
|
|
38
|
+
person agreed to, then `dirty_files.py check .sdtk/handoff/<handoff>/FILES.md` until it exits 0.
|
|
39
|
+
3. **Memory.** One durable fact per entry, in the runtime's memory (for Claude Code: one file per fact plus its index
|
|
40
|
+
line); update an entry that exists rather than adding a second one; delete entries proven wrong. When the project
|
|
41
|
+
uses `sdtk-wiki` memory, promote there as well.
|
|
42
|
+
4. **Handoff document** `.sdtk/handoff/<handoff>/HANDOFF.md` + `STATUS.md` from
|
|
43
|
+
`.claude/skills/session-handoff/references/HANDOFF_TEMPLATE.md`: worktrees, what was released, open work with
|
|
44
|
+
its next step, decisions waiting for the person, traps, where the evidence is.
|
|
45
|
+
5. **Local instructions.** Claude Code: `CLAUDE.local.md` at the project root (git-excluded) with the "read first" list
|
|
46
|
+
pointing at the handoff. Other runtimes: the `.sdtk/handoff/` `STATUS.md` is what their bootstrap surfaces.
|
|
47
|
+
6. **First prompt** for the new session (template §4): it makes the session summarize state from the handoff before
|
|
48
|
+
doing anything. When the person pastes that summary back, check it against the handoff and correct every
|
|
49
|
+
difference.
|
|
50
|
+
7. **Keep it current.** When the state changes before the session ends, update the handoff and `FILES.md`, not only
|
|
51
|
+
the chat.
|
|
52
|
+
|
|
53
|
+
## Outputs
|
|
54
|
+
|
|
55
|
+
| File | In git? | For |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `.sdtk/handoff/<handoff>/HANDOFF.md`, `STATUS.md`, `FILES.md` | no | the next session / person |
|
|
58
|
+
| `CLAUDE.local.md` (Claude Code) | no (`.git/info/exclude`) | what a new session reads first |
|
|
59
|
+
| runtime memory entries | outside the repository | durable facts |
|
|
60
|
+
|
|
61
|
+
`<handoff>` = `session-<YYYYMMDD>-<topic>`.
|
|
62
|
+
|
|
63
|
+
## When To Stop Or Ask
|
|
64
|
+
|
|
65
|
+
- A dirty file you cannot classify, or one that looks like someone else's work → ask; never guess `DROP`.
|
|
66
|
+
- A `PR` file on the wrong branch → say so; moving it is the person's call.
|
|
67
|
+
- Secrets in a dirty file (`.env`, keys) → class `LOCAL`, never quoted in the handoff.
|
|
68
|
+
|
|
69
|
+
## Scripts
|
|
70
|
+
|
|
71
|
+
| Script | Does |
|
|
72
|
+
|---|---|
|
|
73
|
+
| `dirty_files.py inventory [--repo] [--out]` | table of every dirty path in every worktree, `class` empty |
|
|
74
|
+
| `dirty_files.py check <table> [--repo]` | exit 0 only when every path dirty now has a class (+ note for PR / STASH / DROP) |
|
|
@@ -122,6 +122,9 @@ of truth. Do **not** re-render it, not even one sheet, unless the person says so
|
|
|
122
122
|
- Layout: `layout_diff(backup, result, skip_sheets=[...])` is empty for untouched sheets.
|
|
123
123
|
- Content: read the written cells back; picture counts per sheet unchanged elsewhere.
|
|
124
124
|
- Pictures: every picture ends above the next heading (`insert_pictures_below` checks it).
|
|
125
|
+
- Leaving the team (a template, a deliverable, a shared copy): `python .claude/skills/xlsx-safe-edit/scripts/xlsx_xml_edit.py
|
|
126
|
+
scan-metadata <file> --name <customer> --name <product> …` exits 0 — author / company fields, the saved absolute
|
|
127
|
+
path and the names are checked in **every** part (sharedStrings, comments, drawings, docProps), not only cell values.
|
|
125
128
|
|
|
126
129
|
## Pitfalls seen in practice
|
|
127
130
|
|
|
@@ -135,7 +138,7 @@ of truth. Do **not** re-render it, not even one sheet, unless the person says so
|
|
|
135
138
|
| Reading page breaks through COM (`HPageBreaks`) | Throws on some sheets | Read `row_breaks` with openpyxl (read-only) |
|
|
136
139
|
| Windows paths in a heredoc script | `\` sequences mangled | Write scripts with a file tool; raw strings |
|
|
137
140
|
| Screenshots for the document | Desktop corners, personal data (e-mail, tokens, user names) | Trim ~8 px; point out personal data before publishing |
|
|
138
|
-
| Metadata of a shared template (`docProps`)
|
|
141
|
+
| Metadata of a shared template or deliverable | Author / company names (`docProps`), the saved folder (`xl/workbook.xml` `x15ac:absPath`) and names in sharedStrings / comments travel with the file | Clear `dc:creator`, `cp:lastModifiedBy`, `Company`, the `absPath` element; `scan-metadata` on the result |
|
|
139
142
|
|
|
140
143
|
## Reporting
|
|
141
144
|
|
|
@@ -69,6 +69,9 @@ The script renders templates into `docs/**` and updates:
|
|
|
69
69
|
`testcase_profile.base.json` (`"template_set"`):
|
|
70
70
|
- `templates/test-case-xlsx/PROFILE_TEMPLATE.md`
|
|
71
71
|
- `templates/test-case-xlsx/ja-default/` (`TEMPLATE.md` manifest naming the Japanese rules file and output workbook, `viewpoints/`)
|
|
72
|
+
- Screen design workbook template sets (`sdtk-screen-design-xlsx`), one folder per set; a spec picks one with
|
|
73
|
+
`workbook.template_set` (a project's own set under `docs/templates/screen-design-xlsx/<set>/` wins):
|
|
74
|
+
- `templates/screen-design-xlsx/ja-default/` (`TEMPLATE.md` = the Japanese screen design format the renderer assumes, `template.xlsx`)
|
|
72
75
|
- Skill-specific local helper refs retained outside `templates/docs/**`:
|
|
73
76
|
- `toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md`
|
|
74
77
|
- `toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md`
|
|
@@ -168,6 +168,20 @@ TABLE(app_data_example_info) {
|
|
|
168
168
|
|
|
169
169
|
---
|
|
170
170
|
|
|
171
|
+
## 8. Fact Inventory (optional - filled by `sdtk-db-design`)
|
|
172
|
+
|
|
173
|
+
One row per current or proposed column. An empty Writer means the field is dead or planned: say which.
|
|
174
|
+
|
|
175
|
+
| Table.column | Type / example | Writer | Reader | Crash / recovery purpose | Requirement | Verdict (keep / derive / fold / defer / cut) |
|
|
176
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
177
|
+
| app_data_example_info.example_cd | VARCHAR(20) / `EX-001` | TBD | TBD | TBD | TBD | TBD |
|
|
178
|
+
|
|
179
|
+
### 8.1 Migration Policy
|
|
180
|
+
- Can any machine running this build hold data that exists nowhere else? (yes / no + precondition and expiry)
|
|
181
|
+
- Upgrade steps, backup through the database engine, downgrade protection.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
171
185
|
## Document History
|
|
172
186
|
|
|
173
187
|
| No | Version | Date | Author | Changes |
|