sdtk-spec-kit 0.9.2 → 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 +370 -35
- package/assets/manifest/toolkit-bundle.sha256.txt +84 -17
- package/assets/toolkit/toolkit/AGENTS.md +2 -1
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +11 -3
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +7 -0
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +46 -0
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +19 -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-orchestrator/SKILL.md +2 -0
- package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +1 -1
- 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-smoke-test-spec/SKILL.md +69 -0
- package/assets/toolkit/toolkit/skills/sdtk-smoke-test-spec/scripts/test_validate_smoke_test.py +58 -0
- package/assets/toolkit/toolkit/skills/sdtk-smoke-test-spec/scripts/validate_smoke_test.py +152 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/SKILL.md +297 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/prompts/agent_brief_template.md +59 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/check_coverage.py +50 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/extract_sources.py +224 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/merge_parts.py +78 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/render_testcase.py +421 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/template_set.py +57 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/test_write_results.py +89 -0
- package/assets/toolkit/toolkit/skills/sdtk-test-case-xlsx/scripts/write_results.py +126 -0
- package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/SKILL.md +149 -0
- package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/pictures.py +68 -0
- 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/test_pictures.py +55 -0
- package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/xlsafe.py +137 -0
- package/assets/toolkit/toolkit/skills/sdtk-xlsx-safe-edit/scripts/xlsx_xml_edit.py +217 -0
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +172 -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/orchestrator/SKILL.md +1 -1
- package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +1 -1
- 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/smoke-test-spec/SKILL.md +66 -0
- package/assets/toolkit/toolkit/skills-claude/test-case-xlsx/SKILL.md +294 -0
- package/assets/toolkit/toolkit/skills-claude/xlsx-safe-edit/SKILL.md +146 -0
- package/assets/toolkit/toolkit/templates/README.md +11 -1
- 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/assets/toolkit/toolkit/templates/smoke-test/PROFILE_TEMPLATE.md +36 -0
- package/assets/toolkit/toolkit/templates/smoke-test/vi-default/AUTHORING_RULES.md +32 -0
- package/assets/toolkit/toolkit/templates/smoke-test/vi-default/SMOKE_TEST_TEMPLATE.md +147 -0
- package/assets/toolkit/toolkit/templates/smoke-test/vi-default/TEMPLATE.md +25 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/PROFILE_TEMPLATE.md +78 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/TEMPLATE.md +28 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/README.md +73 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/_template.xlsx +0 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/common/common.xlsx +0 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/mobile_app.xlsx +0 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/smartphone_web.xlsx +0 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/web.xlsx +0 -0
- package/assets/toolkit/toolkit/templates/test-case-xlsx/ja-default/viewpoints/platform/windows_app.xlsx +0 -0
- 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
- 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
- package/package.json +1 -1
- package/src/lib/scope.js +6 -4
|
@@ -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 |
|
|
@@ -70,7 +70,7 @@ sdtk-spec generate --feature-key YOUR_FEATURE --feature-name "Your Feature"
|
|
|
70
70
|
- If phase is `ARCH` and API detail spec is in scope, invoke `sdtk-api-design-spec`.
|
|
71
71
|
- If phase is `ARCH` and UI flow behavior is in scope, invoke `sdtk-screen-design-spec`.
|
|
72
72
|
- If phase is `DEV`, stop at `FEATURE_IMPL_PLAN + CODE_HANDOFF`; downstream implementation runs in SDTK-CODE, not here.
|
|
73
|
-
- If phase is `QA` and test-case specification is in scope, invoke `sdtk-test-case-spec
|
|
73
|
+
- If phase is `QA` and test-case specification is in scope, invoke `sdtk-test-case-spec` — or `sdtk-test-case-xlsx` when `orchestration.testCaseSpecMode = xlsx` (Excel workbook from the customer's template).
|
|
74
74
|
- Update `SHARED_PLANNING.md` and `QUALITY_CHECKLIST.md`.
|
|
75
75
|
- Hand off only after the current phase has fresh evidence.
|
|
76
76
|
|
|
@@ -43,7 +43,7 @@ If no arguments are provided, read current feature context from SHARED_PLANNING.
|
|
|
43
43
|
1. Validate prerequisites: `FEATURE_IMPL_PLAN`, `CODE_HANDOFF`, `REVIEW_PACKET`, `OPS_HANDOFF`, downstream implementation evidence, and downstream OPS evidence are available and aligned.
|
|
44
44
|
2. Treat SDTK-CODE workflow evidence as the normal bridge into QA. In the current formal suite flow, `OPS_HANDOFF` plus downstream OPS evidence are also required before final QA approval.
|
|
45
45
|
3. Create test strategy mapped to UC/AC.
|
|
46
|
-
4. If test-case specification artifact is required, invoke `/test-case-spec` and align counts/coverage with release testing scope. Keep the structured TEST_CASE total consistent with the release-report baseline; track E2E separately if needed.
|
|
46
|
+
4. If test-case specification artifact is required, invoke `/test-case-spec` (`/test-case-xlsx` when `orchestration.testCaseSpecMode = xlsx`) and align counts/coverage with release testing scope. Keep the structured TEST_CASE total consistent with the release-report baseline; track E2E separately if needed.
|
|
47
47
|
5. Apply `governance/ai/core/SDTK_BENCHMARK_QA_MODE_POLICY.md` for benchmark-mode verdict rules when no executable build exists.
|
|
48
48
|
6. If acceptance criteria / expected behavior is unclear, record OQ-xx in QA report and preserve benchmark-expected ambiguity per `governance/ai/core/SDTK_BENCHMARK_OQ_POLICY.md`; escalate to PM.
|
|
49
49
|
7. Execute/record results (unit/integration/e2e as applicable).
|
|
@@ -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) |
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smoke-test-spec
|
|
3
|
+
description: Use when writing or updating a manual smoke-test / acceptance-test document (kịch bản kiểm thử, スモークテスト) for one feature or task, before the feature is fully implemented or after a spec change, when the cases must trace to the customer's spec and later be run by testers or by an automation runner keyed by case id.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
# SDTK-SPEC Smoke Test Spec
|
|
10
|
+
|
|
11
|
+
One markdown file per feature/task, cases grouped UI / FN / ER / BV / RG, every case traceable to a spec source,
|
|
12
|
+
expected results limited to what a tester can see. The file is also the input of automation runners (they read the
|
|
13
|
+
case ids of section 4), so its structure is checked by a script, not by eye.
|
|
14
|
+
|
|
15
|
+
## Critical Constraints
|
|
16
|
+
|
|
17
|
+
1. **Never guess behaviour that is not decided.** Write what the spec says, put the open point in §7, mark the case
|
|
18
|
+
("record actual behaviour" or `保留`).
|
|
19
|
+
2. **On-screen strings verbatim** from the spec / mockup / running app; a missing one is the template's placeholder.
|
|
20
|
+
3. **Expected results are what a tester can see.** Logs, DB, registry and code go to Appendix A.
|
|
21
|
+
4. **Only section 4 holds cases.** Ids of older suites listed elsewhere (e.g. §1 "impact on older suites") are not
|
|
22
|
+
cases of this suite.
|
|
23
|
+
5. **Never renumber delivered cases.** Append new ids; mark removed ones.
|
|
24
|
+
6. **The validator must exit 0 before hand-over**, and the §8 totals are its counts, never typed by hand.
|
|
25
|
+
|
|
26
|
+
## Process
|
|
27
|
+
|
|
28
|
+
### 1. Read the inputs in full
|
|
29
|
+
|
|
30
|
+
1. The project profile `docs/qa/smoke_test_profile.md` (copy `./references/templates/smoke-test/PROFILE_TEMPLATE.md` if
|
|
31
|
+
missing and fill it with the person). It names the template set, the spec sources and their codes, the task list,
|
|
32
|
+
the existing smoke suites, devices and accounts.
|
|
33
|
+
2. The template set, resolved in this order: the profile's `template_set` path → `docs/templates/smoke-test/<set>/`
|
|
34
|
+
in the project → `./references/templates/smoke-test/<set>/` (default set `vi-default`). Read its `TEMPLATE.md`,
|
|
35
|
+
`AUTHORING_RULES.md` and `SMOKE_TEST_TEMPLATE.md`.
|
|
36
|
+
3. Every spec source the profile lists for the feature, the decisions log, and the existing smoke suites that cover
|
|
37
|
+
the same screens (for the "impact on older suites" list and for regression cases).
|
|
38
|
+
|
|
39
|
+
### 2. Write
|
|
40
|
+
|
|
41
|
+
- Copy `SMOKE_TEST_TEMPLATE.md`, keep its sections and column names, follow `AUTHORING_RULES.md`.
|
|
42
|
+
- Undecided behaviour, missing strings: rules 1–2 above.
|
|
43
|
+
|
|
44
|
+
### 3. Check before handing over
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
python .claude/skills/smoke-test-spec/scripts/validate_smoke_test.py <file> --template-dir <set dir>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Exit 0 is required. It checks sections, columns, ids (pattern, uniqueness, subsection), Spec / severity / result
|
|
51
|
+
cells and that the §8 totals equal the counted cases and 🔴 cases; it counts placeholders left for developers.
|
|
52
|
+
Asked how many cases a file has, run the validator and give its section-4 count.
|
|
53
|
+
|
|
54
|
+
## Common mistakes
|
|
55
|
+
|
|
56
|
+
| Mistake | Effect | Instead |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| Counting ids anywhere in the file | Old suites' ids listed in §1 inflate the count | Only section 4 holds cases (the validator does this) |
|
|
59
|
+
| Typing the §8 totals by hand | Totals drift from the table | Copy the validator's counts |
|
|
60
|
+
| `|` inside a cell (forbidden characters, commands) | Row splits into an extra cell | Escape it as `\|` |
|
|
61
|
+
| Expected result names a log line or DB column | Tester cannot see it | Visible result in the table, the rest in Appendix A |
|
|
62
|
+
| Renumbering cases after delivery | Results and automation lose their case | Append new ids; mark removed ones |
|
|
63
|
+
|
|
64
|
+
## Report
|
|
65
|
+
|
|
66
|
+
File name, cases / 🔴 per group (from the validator), open points (§7), what the PM must decide.
|