sdtk-kit 0.3.8 → 1.0.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/LICENSE +21 -0
- package/README.md +123 -177
- package/package.json +52 -46
- package/scripts/postinstall.js +40 -0
- package/assets/manifest/toolkit-bundle.manifest.json +0 -473
- package/assets/manifest/toolkit-bundle.sha256.txt +0 -93
- package/assets/toolkit/toolkit/AGENTS.md +0 -131
- package/assets/toolkit/toolkit/install.ps1 +0 -270
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +0 -54
- package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +0 -32
- package/assets/toolkit/toolkit/scripts/init-feature.ps1 +0 -261
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +0 -129
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +0 -189
- package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +0 -139
- package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +0 -116
- package/assets/toolkit/toolkit/sdtk.config.json +0 -28
- package/assets/toolkit/toolkit/sdtk.config.profiles.example.json +0 -50
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +0 -84
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +0 -656
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +0 -43
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +0 -83
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -200
- package/assets/toolkit/toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +0 -29
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +0 -41
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +0 -213
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +0 -90
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +0 -35
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +0 -61
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +0 -42
- package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +0 -21
- package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +0 -19
- package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +0 -80
- package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +0 -30
- package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +0 -53
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +0 -73
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -200
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +0 -51
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +0 -54
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +0 -76
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +0 -136
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +0 -249
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +0 -74
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/references/TEST_CASE_CREATION_RULES.md +0 -129
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +0 -97
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +0 -302
- package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +0 -76
- package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +0 -47
- package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +0 -72
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +0 -50
- package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +0 -25
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +0 -45
- package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +0 -20
- package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +0 -18
- package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +0 -63
- package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +0 -52
- package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +0 -48
- package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +0 -68
- package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +0 -61
- package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +0 -124
- package/assets/toolkit/toolkit/templates/README.md +0 -63
- package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +0 -80
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +0 -22
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +0 -67
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +0 -468
- package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +0 -229
- package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +0 -20
- package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +0 -20
- package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +0 -128
- package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +0 -12
- package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +0 -109
- package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +0 -175
- package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +0 -49
- package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +0 -73
- package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +0 -50
- package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +0 -66
- package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +0 -98
- package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +0 -61
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +0 -129
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +0 -104
- package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +0 -139
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -200
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +0 -172
- package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +0 -31
- package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +0 -28
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +0 -26
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +0 -20
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +0 -23
- package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +0 -26
- package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +0 -21
- package/bin/sdtk.js +0 -15
- package/src/commands/auth.js +0 -85
- package/src/commands/generate.js +0 -177
- package/src/commands/help.js +0 -101
- package/src/commands/init.js +0 -97
- package/src/commands/runtime.js +0 -217
- package/src/index.js +0 -59
- package/src/lib/args.js +0 -116
- package/src/lib/errors.js +0 -41
- package/src/lib/github-access.js +0 -68
- package/src/lib/powershell.js +0 -85
- package/src/lib/scope.js +0 -68
- package/src/lib/state.js +0 -83
- package/src/lib/toolkit-payload.js +0 -99
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
# Flow Action Spec Creation Rules for AI Agents
|
|
2
|
-
|
|
3
|
-
This document defines reusable rules for creating and updating screen flow-action specifications
|
|
4
|
-
(for example `docs/specs/*_FLOW_ACTION_SPEC.md`).
|
|
5
|
-
|
|
6
|
-
## 1. Scope and Goal
|
|
7
|
-
|
|
8
|
-
- Produce a screen-level specification that is traceable from BA/ARCH to FE/BE implementation.
|
|
9
|
-
- Keep one source of truth for:
|
|
10
|
-
- screen flow
|
|
11
|
-
- UI items and actions
|
|
12
|
-
- API calls per action
|
|
13
|
-
- screen-to-API mapping
|
|
14
|
-
- Keep documentation implementation-aware and review-friendly.
|
|
15
|
-
|
|
16
|
-
## 2. Mandatory Document Structure
|
|
17
|
-
|
|
18
|
-
A flow-action spec should include, at minimum:
|
|
19
|
-
|
|
20
|
-
1. `Abbreviations`
|
|
21
|
-
2. `Feature overview`
|
|
22
|
-
3. `Assumptions`
|
|
23
|
-
4. `Screen flow action` (with PlantUML)
|
|
24
|
-
5. `Screen layout spec by flow action`
|
|
25
|
-
6. `System processing flow`
|
|
26
|
-
7. `Open questions`
|
|
27
|
-
8. `Screen - API mapping`
|
|
28
|
-
9. `Document history`
|
|
29
|
-
|
|
30
|
-
If a section is not in scope, keep the section and mark explicitly as `N/A` with reason.
|
|
31
|
-
|
|
32
|
-
## 3. Table Standards
|
|
33
|
-
|
|
34
|
-
- Every table must include a `No` column (sequential numbering).
|
|
35
|
-
- Use stable headers for action tables:
|
|
36
|
-
- `No | Item Name | Item Type | Attribute | DB Column | Size | Default Value | Action | Description | Note`
|
|
37
|
-
- Use stable headers for API mapping tables:
|
|
38
|
-
- `No | Trigger/When | UI item (No / Item Name) | API to call | Data usage / Notes`
|
|
39
|
-
- Use stable headers for screen mapping:
|
|
40
|
-
- `No | Screen (section) | Screen ID | Read/Search APIs | Write APIs | Notes / Q&A refs`
|
|
41
|
-
- Table rows must keep column count consistent with the header (no broken or merged rows).
|
|
42
|
-
- Avoid single-line merged content that collapses multiple logical items into one table row.
|
|
43
|
-
|
|
44
|
-
### 3.1 Action Table Mapping Completion Rules
|
|
45
|
-
|
|
46
|
-
- After API endpoint spec and database spec are available, the action-table columns `Attribute`, `DB Column`, `Size`, and `Default Value` must not be left blank when the mapping can be derived from current source-of-truth inputs.
|
|
47
|
-
- Fill these four columns only after the relevant API contract and DB schema are stable enough to be treated as the current source of truth for the active phase.
|
|
48
|
-
- Source priority for filling the four columns:
|
|
49
|
-
1. `docs/api/*_ENDPOINTS.md` and OpenAPI YAML for request/response contract
|
|
50
|
-
2. `docs/database/DATABASE_SPEC_*.md` for physical column names, nullability, storage shape, and query-source aliases
|
|
51
|
-
3. confirmed flow/business rules for default state and behavior
|
|
52
|
-
4. design source (Figma/Excel) for screen label and control type only
|
|
53
|
-
- `Attribute` rules:
|
|
54
|
-
- input item: use the canonical request payload path
|
|
55
|
-
- display item: use the canonical response path
|
|
56
|
-
- UI-only item: use `ui.*` namespace
|
|
57
|
-
- `DB Column` rules:
|
|
58
|
-
- use physical DB column names or query-source aliases from the API/database spec
|
|
59
|
-
- if multiple columns participate, list them explicitly
|
|
60
|
-
- if the control is UI-only, write `N/A`
|
|
61
|
-
- `Size` rules:
|
|
62
|
-
- document data format/type, not pixel width
|
|
63
|
-
- prefer canonical forms such as `uuid`, `DATE (YYYY-MM-DD)`, `DATETIME`, `TIME (HH:mm)`, `boolean`, `array[uuid]`, `enum(...)`, `JSON string`
|
|
64
|
-
- prefer DB storage type first; if not available, fall back to API schema type/format
|
|
65
|
-
- `Default Value` rules:
|
|
66
|
-
- use confirmed business, UI, or runtime defaults
|
|
67
|
-
- if the default comes from settings or environment, state that clearly
|
|
68
|
-
- if not finalized, use `TBD` and keep or raise an open-question reference in `Note`
|
|
69
|
-
- If screen labels conflict with canonical API/DB naming, preserve the original screen label in the visible screen columns, but keep `Attribute` and `DB Column` aligned to API/DB source of truth and explain the mismatch in `Note`.
|
|
70
|
-
|
|
71
|
-
### 3.2 Language and Encoding Standards (EN Artifacts)
|
|
72
|
-
|
|
73
|
-
- For EN artifacts (`docs/en/**` or explicitly requested EN version), narrative text must be English.
|
|
74
|
-
- JP labels, if provided by the input, should be kept in a clearly marked appendix or note column, not in the default item table columns.
|
|
75
|
-
- Do not leave mixed-language fragments in one sentence/cell (for example VI+EN mixed text).
|
|
76
|
-
- If original VI/JP text is required for traceability, keep it in a clearly marked appendix block (`Original Text`), then provide EN translation.
|
|
77
|
-
- Save files as UTF-8 and avoid mojibake/broken glyphs (`�`, `ↁE`, garbled sequences).
|
|
78
|
-
- Keep canonical terminology stable across documents (for example: `bukken`, `sagyo`, `customer employee`).
|
|
79
|
-
|
|
80
|
-
### 3.3 Markdown Structure Hygiene
|
|
81
|
-
|
|
82
|
-
- Keep each heading on its own line; do not concatenate multiple headings/sections on one line.
|
|
83
|
-
- Keep metadata blocks (`Information`, `Note`, `Behavior notes`) as structured bullet blocks, not single compressed lines.
|
|
84
|
-
- Keep image, table, and separator (`---`) boundaries explicit to preserve parser/render stability.
|
|
85
|
-
|
|
86
|
-
### 3.4 Assumptions Section
|
|
87
|
-
|
|
88
|
-
- Every flow-action spec must include a top-level `## Assumptions` section.
|
|
89
|
-
- Use this table format exactly: `# | Assumption | Verified | Risk if wrong`.
|
|
90
|
-
- Keep assumptions explicit when downstream mapping or behavior depends on an unresolved decision.
|
|
91
|
-
- If an assumption affects UI behavior, API mapping, or DB mapping, reflect the risk in `Note` and keep or raise the related `OQ-xx` item.
|
|
92
|
-
|
|
93
|
-
## 4. Item Numbering and Duplication Rules
|
|
94
|
-
|
|
95
|
-
- Use one numbering mode only: `global across document`.
|
|
96
|
-
- Number values must increase across all action tables in the document.
|
|
97
|
-
- Avoid duplicate item descriptions for the same UI control across screens unless behavior differs.
|
|
98
|
-
- If duplicate number is intentional (rare), annotate reason in `Note`.
|
|
99
|
-
|
|
100
|
-
## 5. Screen Section Rules
|
|
101
|
-
|
|
102
|
-
For each screen section:
|
|
103
|
-
|
|
104
|
-
- Provide metadata:
|
|
105
|
-
- official screen name
|
|
106
|
-
- Screen ID
|
|
107
|
-
- Design Source Type
|
|
108
|
-
- Design Source Reference
|
|
109
|
-
- Embed one representative image per screen (from Figma, screenshot, or generated layout).
|
|
110
|
-
- Provide one action table.
|
|
111
|
-
- Provide one API mapping table.
|
|
112
|
-
- If a screen has dialogs, create explicit dialog sub-sections with their own tables and API mapping.
|
|
113
|
-
|
|
114
|
-
## 5.1 Design Source Modes
|
|
115
|
-
|
|
116
|
-
Each screen section must declare a design source using one of these modes:
|
|
117
|
-
|
|
118
|
-
| Mode | When | Design Source Reference |
|
|
119
|
-
|------|------|----------------------|
|
|
120
|
-
| `source-backed` | Figma URL or screenshot is available | Figma URL or screenshot path |
|
|
121
|
-
| `generated-draft` | No Figma/screenshot, but feature has UI scope | Section reference in `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md` |
|
|
122
|
-
| `none` | Feature has no UI scope for this screen | State `N/A - no UI scope` |
|
|
123
|
-
|
|
124
|
-
Rules:
|
|
125
|
-
- For UI-scope features, `none` is only valid when the specific screen truly has no visual layout.
|
|
126
|
-
- When using `generated-draft`, the `DESIGN_LAYOUT_[FEATURE_KEY].md` must exist before the flow-action spec is finalized.
|
|
127
|
-
- The flow-action spec and the design-layout doc must remain separate documents.
|
|
128
|
-
- When Figma becomes available later, update the source mode from `generated-draft` to `source-backed`.
|
|
129
|
-
|
|
130
|
-
## 6. API Traceability Rules
|
|
131
|
-
|
|
132
|
-
- Every actionable UI event that changes state must map to a write API.
|
|
133
|
-
- Every data-loading UI event must map to a read/search API.
|
|
134
|
-
- If one endpoint serves multiple actions (initial load, search, refresh), state this explicitly.
|
|
135
|
-
- If no API is called for an action, state `No API` and explain why.
|
|
136
|
-
|
|
137
|
-
## 7. PlantUML Rules for Screen Flow
|
|
138
|
-
|
|
139
|
-
- Use valid PlantUML syntax and renderability checks before handoff.
|
|
140
|
-
- Use `\\n` for multi-line labels in nodes.
|
|
141
|
-
- Keep diagram at navigation/action level (not low-level SQL or backend internals).
|
|
142
|
-
- Ensure screen names in PlantUML match section names in layout spec.
|
|
143
|
-
|
|
144
|
-
## 8. Data Source and Asset Rules
|
|
145
|
-
|
|
146
|
-
- Prioritize source order:
|
|
147
|
-
1. Confirmed design source (for example Figma)
|
|
148
|
-
2. Confirmed requirement files (Excel/spec)
|
|
149
|
-
3. User-provided screenshots
|
|
150
|
-
- Store images in repository-relative paths.
|
|
151
|
-
- Do not keep temporary local absolute paths in markdown.
|
|
152
|
-
|
|
153
|
-
### 8.1 Rendered Screen Images for Generated-Draft Screens
|
|
154
|
-
|
|
155
|
-
When `Design Source Type` is `generated-draft`:
|
|
156
|
-
- Screen preview images may be rendered from `DESIGN_LAYOUT_[FEATURE_KEY].md` PlantUML SALT wireframes.
|
|
157
|
-
- Renderer: `toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py`
|
|
158
|
-
- Expected output path: `docs/specs/assets/<feature_snake>/screens/<screen_id>.svg`
|
|
159
|
-
- If the rendered `.svg` file exists, use it as the `Screen image:` reference.
|
|
160
|
-
- If rendering is unavailable or the `.svg` does not exist, replace the image line with:
|
|
161
|
-
`> Screen image not rendered in this environment. See Design Source Reference for layout.`
|
|
162
|
-
- Do not leave a broken image reference pointing to a non-existent file.
|
|
163
|
-
|
|
164
|
-
## 9. Consistency with Other Specs
|
|
165
|
-
|
|
166
|
-
- Align terms with:
|
|
167
|
-
- BA spec glossary
|
|
168
|
-
- API endpoints spec
|
|
169
|
-
- Database spec
|
|
170
|
-
- If terminology differs across docs, raise an open question and add a temporary mapping note.
|
|
171
|
-
- Keep endpoint paths in flow-action spec consistent with API endpoint spec.
|
|
172
|
-
|
|
173
|
-
## 10. Open Questions and Uncertainty Handling
|
|
174
|
-
|
|
175
|
-
- Capture unresolved items in `Open questions` table.
|
|
176
|
-
- Do not invent UI behavior or API contracts when source is ambiguous.
|
|
177
|
-
- Mark uncertain mappings as `Draft` and include impacted files/sections.
|
|
178
|
-
|
|
179
|
-
## 11. Change Management
|
|
180
|
-
|
|
181
|
-
- On each update:
|
|
182
|
-
- update impacted screen sections
|
|
183
|
-
- update API mapping tables
|
|
184
|
-
- update screen-to-API mapping summary
|
|
185
|
-
- append one row in document history
|
|
186
|
-
- Never overwrite past history rows.
|
|
187
|
-
|
|
188
|
-
## 12. Final Checklist Before Handoff
|
|
189
|
-
|
|
190
|
-
- PlantUML renders successfully.
|
|
191
|
-
- All mandatory sections exist.
|
|
192
|
-
- All tables include `No`.
|
|
193
|
-
- Numbering is global across the document (no resets).
|
|
194
|
-
- No broken image links (for `generated-draft` screens: `.svg` exists or render-skipped note is present).
|
|
195
|
-
- Screen/API mappings are consistent with `*_ENDPOINTS.md`.
|
|
196
|
-
- Assumptions section exists and unresolved assumptions are traceable.
|
|
197
|
-
- Open questions are explicit and traceable.
|
|
198
|
-
- For EN artifact: no leftover VI text outside allowed `Original Text` appendix blocks.
|
|
199
|
-
- No mojibake/encoding corruption markers.
|
|
200
|
-
- Headings/tables are structurally clean (no merged lines that break readability/traceability).
|
package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Export anh tu Excel (sheet co hinh/shape) - tranh vo layout & loi anh trang
|
|
2
|
-
|
|
3
|
-
## Khi nao can
|
|
4
|
-
|
|
5
|
-
- Sheet `画面遷移` hoac `画面|...` chua hinh (picture/shape) thay vi text trong cell.
|
|
6
|
-
- Can anh de embed vao markdown hoac overlay so.
|
|
7
|
-
|
|
8
|
-
## Loi da gap & nguyen nhan
|
|
9
|
-
|
|
10
|
-
1) `Chart.Export()` ra PNG trang (~1.3KB)
|
|
11
|
-
- Nguyen nhan: Excel COM export chart/picture khong on dinh voi group/picture phuc tap.
|
|
12
|
-
|
|
13
|
-
2) Sai duong dan thu muc anh khi SaveAs HTML
|
|
14
|
-
- Excel tao folder anh theo quy uoc: `<basename>.files`
|
|
15
|
-
- Vi du: `export.html` -> folder `export.files` (khong phai `export.html.files`).
|
|
16
|
-
|
|
17
|
-
3) Excel COM crash / OLE error `0x800a01a8`
|
|
18
|
-
- Nguyen nhan pho bien: goi `Quit()` nham instance Excel dang duoc attach boi COM (dac biet khi dung `Dispatch`).
|
|
19
|
-
|
|
20
|
-
4) Marker 2 chu so bi mat digit (10 hien thi nhu 1)
|
|
21
|
-
- Nguyen nhan: oval qua nho + wrap/align khong chuan.
|
|
22
|
-
|
|
23
|
-
## Cach lam khuyen nghi (tu dong)
|
|
24
|
-
|
|
25
|
-
Dung script trong repo, vi du:
|
|
26
|
-
`Requirements/_generate_numbered_screen_images.py`
|
|
27
|
-
|
|
28
|
-
Script nen dam bao:
|
|
29
|
-
- Flatten group + SaveAs HTML de lay PNG that (tranh PNG trang).
|
|
30
|
-
- Dung `DispatchEx` khi mo Excel rieng de overlay len PNG (tranh crash do Quit nham instance).
|
|
31
|
-
- Tang size oval + tat WordWrap de hien thi du 2-3 chu so.
|
|
32
|
-
- Su dung dung quy uoc `.files` folder khi export HTML.
|
|
33
|
-
|
|
34
|
-
Chay (vi du, tai project root):
|
|
35
|
-
```powershell
|
|
36
|
-
python Requirements\_generate_numbered_screen_images.py
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Cach lam thu cong (fallback)
|
|
40
|
-
|
|
41
|
-
1) Mo Excel -> chon vung UI can export (picture/group) -> Copy as Picture.
|
|
42
|
-
2) Paste sang sheet trong hoac workbook moi.
|
|
43
|
-
3) Save As -> "Web Page (*.htm; *.html)".
|
|
44
|
-
4) Vao folder `<basename>.files` -> chon file `imageXXX.png` co kich thuoc phu hop nhat.
|
|
45
|
-
5) Copy sang `docs/specs/assets/[feature_snake]/screens/` va dat ten theo convention.
|
|
46
|
-
|
|
47
|
-
## Luu y khi script fail do ten Picture thay doi
|
|
48
|
-
|
|
49
|
-
Neu script tham chieu theo `picture_name` (vd: `Picture 4`, `Picture 7`), khi Excel doi ten:
|
|
50
|
-
- Mo Excel -> chon picture -> xem/doi ten trong Selection Pane, hoac
|
|
51
|
-
- Cap nhat lai `picture_name` trong script.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Figma MCP: lay layout/style/tokens + export anh
|
|
2
|
-
|
|
3
|
-
## Parse URL Figma
|
|
4
|
-
|
|
5
|
-
Mau URL:
|
|
6
|
-
`https://www.figma.com/design/<fileKey>/<fileName>?node-id=<nodeId>&m=dev&t=...`
|
|
7
|
-
|
|
8
|
-
- `fileKey` = segment sau `/design/`.
|
|
9
|
-
- `nodeId`:
|
|
10
|
-
- query param `node-id=1-2695`
|
|
11
|
-
- chuyen sang format API: `1:2695` (thay `-` bang `:`).
|
|
12
|
-
|
|
13
|
-
## Lay du lieu layout/style (uu tien)
|
|
14
|
-
|
|
15
|
-
Dung MCP:
|
|
16
|
-
- `mcp__figma__get_figma_data`
|
|
17
|
-
- Input: `fileKey`, `nodeId`
|
|
18
|
-
- Goi y: thu `depth=2` hoac `depth=3` (tang dan neu thieu thong tin).
|
|
19
|
-
|
|
20
|
-
Khi tong hop vao `docs/specs/[FEATURE_KEY]_FIGMA_LAYOUT.md`, giu khung:
|
|
21
|
-
- Design Structure: frame dimensions, components/instances, key layers, variants/properties.
|
|
22
|
-
- Styling Data: color (Hex/RGB), typography (font/size/weight/line-height), shadow/opacity/border.
|
|
23
|
-
- Layout Information: padding/gap/alignment, width/height, border radius.
|
|
24
|
-
- Design Tokens: color/typography/spacing tokens neu co ten style (vd: `style_...`).
|
|
25
|
-
|
|
26
|
-
## Rate-limit 429 / du lieu thieu
|
|
27
|
-
|
|
28
|
-
Neu gap `429 Too Many Requests`:
|
|
29
|
-
1) Giam `depth` va thu lai.
|
|
30
|
-
2) Cho va retry (backoff 20s -> 40s -> 80s).
|
|
31
|
-
3) Neu van fail: de trong cac muc khong lay duoc va ghi note ro ly do 429.
|
|
32
|
-
|
|
33
|
-
Khong tu bịa mau/typography/token khi khong co du lieu.
|
|
34
|
-
|
|
35
|
-
## Export anh man hinh
|
|
36
|
-
|
|
37
|
-
Dung MCP:
|
|
38
|
-
- `mcp__figma__download_figma_images`
|
|
39
|
-
- Input: `fileKey`, danh sach `nodes` (nodeId), `fileName` (png), `pngScale` (thuong 2).
|
|
40
|
-
|
|
41
|
-
Luu y ve `localPath`:
|
|
42
|
-
- Mot so moi truong chan duong dan tuyet doi.
|
|
43
|
-
- Dung thu muc tuong doi trong repo (vd: `Requirements/_tmp/figma_downloads`) roi copy anh ve:
|
|
44
|
-
- `docs/specs/assets/[feature_snake]/screens/`
|
|
45
|
-
|
|
46
|
-
## Quy uoc dat ten file anh
|
|
47
|
-
|
|
48
|
-
Khuyen nghi dat ten on dinh de embed lau dai, vi du:
|
|
49
|
-
- `screen_3_1_main.png`
|
|
50
|
-
- `screen_3_2_search.png`
|
|
51
|
-
- `screen_3_3_dialog.png`
|
|
52
|
-
- `screen_3_3_dialog_numbered.png`
|
|
53
|
-
|
|
54
|
-
Neu dung anh tu Excel thay the, van giu cung naming de tranh sua nhieu link trong markdown.
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Quy tắc đánh số UI item (Flow Action Spec)
|
|
2
|
-
|
|
3
|
-
## Mục tiêu
|
|
4
|
-
|
|
5
|
-
- Gắn số lên ảnh màn hình để người đọc map nhanh sang bảng action.
|
|
6
|
-
- Đánh số **toàn cục**, tăng dần theo thứ tự màn hình trong flow.
|
|
7
|
-
- **Không trùng số** giữa các item mới.
|
|
8
|
-
- **Không lặp mô tả** item đã xuất hiện ở màn hình trước.
|
|
9
|
-
|
|
10
|
-
## Quy ước “item đã xuất hiện”
|
|
11
|
-
|
|
12
|
-
Xem item là “đã xuất hiện” nếu:
|
|
13
|
-
- Cùng ý nghĩa chức năng và cùng vị trí/khu vực UI (dù ở chế độ view khác).
|
|
14
|
-
- Đã được đánh số trong một màn hình trước đó.
|
|
15
|
-
|
|
16
|
-
Hệ quả:
|
|
17
|
-
- Màn hình sau **không thêm dòng mới** vào bảng action cho item này.
|
|
18
|
-
- Nếu cần người đọc định vị, vẫn có thể giữ số trên ảnh (để đối chiếu), nhưng ghi chú trong section: “Đã mô tả ở màn X (No Y)”.
|
|
19
|
-
|
|
20
|
-
## Cách làm chuẩn (không đoán khi thiếu dữ liệu)
|
|
21
|
-
|
|
22
|
-
1) Xác định thứ tự màn hình trong flow (mặc định theo danh sách Figma + luồng `画面遷移`).
|
|
23
|
-
2) Tạo “sổ tay đánh số” (mapping) dạng:
|
|
24
|
-
- `key` (tên/nhãn JP + loại control + khu vực)
|
|
25
|
-
- `value` (số No)
|
|
26
|
-
3) Với từng màn hình:
|
|
27
|
-
- Liệt kê item tương tác cần mô tả (button/link/selectbox/checkbox…).
|
|
28
|
-
- Nếu item mới: cấp số tiếp theo và thêm vào mapping.
|
|
29
|
-
- Nếu item cũ: không cấp số mới, không lặp mô tả.
|
|
30
|
-
4) Nếu **chưa xác định được vị trí đặt số trên ảnh**:
|
|
31
|
-
- Yêu cầu user cung cấp ảnh có đánh dấu hoặc chỉ rõ vị trí (tỷ lệ/tọa độ/ô Excel).
|
|
32
|
-
- Không tự suy đoán vị trí.
|
|
33
|
-
|
|
34
|
-
## Nguồn dữ liệu tham khảo
|
|
35
|
-
|
|
36
|
-
- Excel: sheet `画面|作業員割付` (bảng mô tả + cột BK thường chứa ký hiệu số tròn ㉕/㉖…)
|
|
37
|
-
- Ví dụ:
|
|
38
|
-
- `BK205`: `㉕リスト表示切替ボタン`
|
|
39
|
-
- `BK245`: `㉖マグネット表示切替ボタン`
|
|
40
|
-
- Ảnh/screenshot đã được user đánh số (nguồn xác thực tốt nhất).
|
|
41
|
-
- Ảnh export từ Figma/Excel để overlay số.
|
|
42
|
-
|
|
43
|
-
## Case lỗi đã gặp & cách tránh
|
|
44
|
-
|
|
45
|
-
### 1) Trùng số “1” trong màn Search / Edit
|
|
46
|
-
|
|
47
|
-
Nguyên nhân thường gặp:
|
|
48
|
-
- Overlay tool chỉ đọc được “1” khi marker là 2 chữ số (10,11,12…).
|
|
49
|
-
|
|
50
|
-
Cách tránh:
|
|
51
|
-
- Khi tạo marker (oval) cho 2+ chữ số, tăng kích thước tối thiểu (>= 32px) và tắt WordWrap.
|
|
52
|
-
- Nếu lấy marker từ Excel, đảm bảo marker trong Excel hiển thị đúng 2 chữ số trước khi export.
|
|
53
|
-
|
|
54
|
-
### 2) Excel spec bị “duplicate numbering” (ví dụ ㉑ xuất hiện 2 lần)
|
|
55
|
-
|
|
56
|
-
Nguyên nhân:
|
|
57
|
-
- Dữ liệu Excel gốc bị trùng ký hiệu số.
|
|
58
|
-
|
|
59
|
-
Cách xử lý:
|
|
60
|
-
- Ưu tiên theo logic UI + screenshot user xác nhận.
|
|
61
|
-
- Renumber phần bị duplicate theo số tiếp theo (vd: 21 bị trùng → “đóng/xoá/search” thành 22/23/24 theo thứ tự thao tác).
|
|
62
|
-
- Ghi chú rõ “Excel có duplicate; đã chuẩn hoá lại theo sequence toàn cục”.
|
|
63
|
-
|
|
64
|
-
### 3) Item đã mô tả ở màn trước vẫn bị lặp trong bảng màn sau
|
|
65
|
-
|
|
66
|
-
Cách tránh:
|
|
67
|
-
- Trước khi thêm dòng vào bảng, đối chiếu mapping toàn cục.
|
|
68
|
-
- Nếu cần nhắc lại, chỉ thêm bullet note “đã mô tả ở …”, không thêm dòng mới trong bảng.
|
|
69
|
-
|
|
70
|
-
## Ví dụ theo dự án tham chiếu
|
|
71
|
-
|
|
72
|
-
- Màn 3.1 (Bukken View): đã đánh số 1–9.
|
|
73
|
-
- Màn 3.2 (Search): tiếp tục 10–24.
|
|
74
|
-
- Màn 3.3 (Bukken Magnet): chỉ đánh số 25 cho nút chuyển List.
|
|
75
|
-
- Màn 3.4 (Bukken List): chỉ đánh số 26 cho nút chuyển Magnet.
|
|
76
|
-
- Màn 3.7 (Worker Magnet): chỉ đánh số các item mới theo yêu cầu (vd: selectbox 物件名, nút 検索, checkbox 複数日登録モード).
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import argparse
|
|
4
|
-
import re
|
|
5
|
-
import sys
|
|
6
|
-
from pathlib import Path
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
TABLE_ROW_RE = re.compile(r"^\|.*\|\s*$")
|
|
10
|
-
TABLE_SEP_RE = re.compile(r"^\|\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|\s*$")
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _split_table_row(line: str) -> list[str]:
|
|
14
|
-
return [p.strip() for p in line.strip().strip("|").split("|")]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def _read_text(path: Path) -> tuple[str, str]:
|
|
18
|
-
for enc in ("utf-8-sig", "utf-8", "cp1252"):
|
|
19
|
-
try:
|
|
20
|
-
return path.read_text(encoding=enc), enc
|
|
21
|
-
except UnicodeDecodeError:
|
|
22
|
-
continue
|
|
23
|
-
return path.read_text(errors="replace"), "utf-8"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def _make_row(cells: list[str]) -> str:
|
|
27
|
-
return "| " + " | ".join(cells) + " |"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def renumber_action_tables(md_text: str) -> tuple[str, int, int]:
|
|
31
|
-
lines = md_text.splitlines()
|
|
32
|
-
out = lines[:]
|
|
33
|
-
|
|
34
|
-
expected_no = 1
|
|
35
|
-
touched = 0
|
|
36
|
-
rows = 0
|
|
37
|
-
|
|
38
|
-
i = 0
|
|
39
|
-
while i < len(lines):
|
|
40
|
-
line = lines[i]
|
|
41
|
-
if i + 1 < len(lines) and TABLE_ROW_RE.match(line) and TABLE_ROW_RE.match(lines[i + 1]):
|
|
42
|
-
header = _split_table_row(line)
|
|
43
|
-
if not TABLE_SEP_RE.match(lines[i + 1]):
|
|
44
|
-
i += 1
|
|
45
|
-
continue
|
|
46
|
-
|
|
47
|
-
lowered = [h.lower() for h in header]
|
|
48
|
-
if "action" not in lowered or "description" not in lowered:
|
|
49
|
-
i += 1
|
|
50
|
-
continue
|
|
51
|
-
if "no" in lowered:
|
|
52
|
-
no_index = lowered.index("no")
|
|
53
|
-
elif "no." in lowered:
|
|
54
|
-
no_index = lowered.index("no.")
|
|
55
|
-
else:
|
|
56
|
-
i += 1
|
|
57
|
-
continue
|
|
58
|
-
|
|
59
|
-
j = i + 2
|
|
60
|
-
while j < len(lines) and TABLE_ROW_RE.match(lines[j]):
|
|
61
|
-
row = _split_table_row(lines[j])
|
|
62
|
-
if len(row) <= no_index:
|
|
63
|
-
j += 1
|
|
64
|
-
continue
|
|
65
|
-
|
|
66
|
-
try:
|
|
67
|
-
current_no = int(row[no_index])
|
|
68
|
-
except ValueError:
|
|
69
|
-
j += 1
|
|
70
|
-
continue
|
|
71
|
-
|
|
72
|
-
rows += 1
|
|
73
|
-
if current_no != expected_no:
|
|
74
|
-
row[no_index] = str(expected_no)
|
|
75
|
-
out[j] = _make_row(row)
|
|
76
|
-
touched += 1
|
|
77
|
-
expected_no += 1
|
|
78
|
-
j += 1
|
|
79
|
-
|
|
80
|
-
i = j
|
|
81
|
-
continue
|
|
82
|
-
|
|
83
|
-
i += 1
|
|
84
|
-
|
|
85
|
-
return "\n".join(out) + "\n", rows, touched
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
def main() -> int:
|
|
89
|
-
parser = argparse.ArgumentParser(
|
|
90
|
-
description="Renumber action table `No` fields globally in *_FLOW_ACTION_SPEC.md"
|
|
91
|
-
)
|
|
92
|
-
parser.add_argument("--spec", required=True, help="Path to *_FLOW_ACTION_SPEC.md")
|
|
93
|
-
parser.add_argument(
|
|
94
|
-
"--write",
|
|
95
|
-
action="store_true",
|
|
96
|
-
help="Write changes to file. Without this flag, runs in dry-run mode.",
|
|
97
|
-
)
|
|
98
|
-
args = parser.parse_args()
|
|
99
|
-
|
|
100
|
-
try:
|
|
101
|
-
sys.stdout.reconfigure(encoding="utf-8") # type: ignore[attr-defined]
|
|
102
|
-
sys.stderr.reconfigure(encoding="utf-8") # type: ignore[attr-defined]
|
|
103
|
-
except Exception:
|
|
104
|
-
pass
|
|
105
|
-
|
|
106
|
-
spec_path = Path(args.spec)
|
|
107
|
-
if not spec_path.exists():
|
|
108
|
-
print(f"[ERROR] Not found: {spec_path}", file=sys.stderr)
|
|
109
|
-
return 2
|
|
110
|
-
|
|
111
|
-
text, enc = _read_text(spec_path)
|
|
112
|
-
new_text, rows, touched = renumber_action_tables(text)
|
|
113
|
-
|
|
114
|
-
print(f"Checked: {spec_path}")
|
|
115
|
-
print(f"- Numbered action rows: {rows}")
|
|
116
|
-
print(f"- Rows changed: {touched}")
|
|
117
|
-
print(f"- Mode: {'write' if args.write else 'dry-run'}")
|
|
118
|
-
|
|
119
|
-
if touched == 0:
|
|
120
|
-
print("[OK] Already globally numbered.")
|
|
121
|
-
return 0
|
|
122
|
-
|
|
123
|
-
if not args.write:
|
|
124
|
-
print("[INFO] Re-run with --write to apply changes.")
|
|
125
|
-
return 1
|
|
126
|
-
|
|
127
|
-
if enc not in ("utf-8", "utf-8-sig"):
|
|
128
|
-
enc = "utf-8"
|
|
129
|
-
spec_path.write_text(new_text, encoding=enc)
|
|
130
|
-
print("[OK] Updated file with global numbering.")
|
|
131
|
-
return 0
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if __name__ == "__main__":
|
|
135
|
-
raise SystemExit(main())
|
|
136
|
-
|