sdtk-kit 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +131 -0
  2. package/assets/manifest/toolkit-bundle.manifest.json +303 -0
  3. package/assets/manifest/toolkit-bundle.sha256.txt +59 -0
  4. package/assets/toolkit/toolkit/AGENTS.md +103 -0
  5. package/assets/toolkit/toolkit/install.ps1 +155 -0
  6. package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +32 -0
  7. package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +32 -0
  8. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +253 -0
  9. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +181 -0
  10. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +116 -0
  11. package/assets/toolkit/toolkit/sdtk.config.json +28 -0
  12. package/assets/toolkit/toolkit/sdtk.config.profiles.example.json +50 -0
  13. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +78 -0
  14. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_CREATION_RULES.md +212 -0
  15. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/FLOWCHART_CREATION_RULES.md +397 -0
  16. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +565 -0
  17. package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +36 -0
  18. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/FLOWCHART_CREATION_RULES.md +397 -0
  19. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +43 -0
  20. package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_CREATION_RULES.md +212 -0
  21. package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOWCHART_CREATION_RULES.md +397 -0
  22. package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +136 -0
  23. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +24 -0
  24. package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +21 -0
  25. package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +20 -0
  26. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +17 -0
  27. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +15 -0
  28. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +44 -0
  29. package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +26 -0
  30. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +22 -0
  31. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +59 -0
  32. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +136 -0
  33. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +51 -0
  34. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +54 -0
  35. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +76 -0
  36. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +136 -0
  37. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +249 -0
  38. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +65 -0
  39. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/references/TEST_CASE_CREATION_RULES.md +129 -0
  40. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +97 -0
  41. package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +124 -0
  42. package/assets/toolkit/toolkit/templates/README.md +56 -0
  43. package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +80 -0
  44. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +212 -0
  45. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +62 -0
  46. package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +229 -0
  47. package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +20 -0
  48. package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +397 -0
  49. package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +12 -0
  50. package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +109 -0
  51. package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +175 -0
  52. package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +49 -0
  53. package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +73 -0
  54. package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +50 -0
  55. package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +66 -0
  56. package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +98 -0
  57. package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +61 -0
  58. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +129 -0
  59. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +104 -0
  60. package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +139 -0
  61. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +136 -0
  62. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +160 -0
  63. package/bin/sdtk.js +15 -0
  64. package/package.json +47 -0
  65. package/src/commands/auth.js +85 -0
  66. package/src/commands/generate.js +177 -0
  67. package/src/commands/help.js +69 -0
  68. package/src/commands/init.js +73 -0
  69. package/src/index.js +56 -0
  70. package/src/lib/args.js +116 -0
  71. package/src/lib/errors.js +41 -0
  72. package/src/lib/github-access.js +68 -0
  73. package/src/lib/powershell.js +85 -0
  74. package/src/lib/state.js +83 -0
  75. package/src/lib/toolkit-payload.js +99 -0
@@ -0,0 +1,397 @@
1
+ # Flowchart Creation Rules for AI Agents (PlantUML)
2
+
3
+ This document defines reusable rules for creating and updating API flowcharts in this project.
4
+ Target files are usually API flow list documents (for example `*_api.txt`) and API YAML files (for example `docs/api/*.yaml`).
5
+
6
+ ## 1. Scope and Goal
7
+
8
+ - Use PlantUML activity diagrams for API process flows.
9
+ - Keep diagrams readable, implementation-aware, and consistent with current backend logic.
10
+ - Prefer minimal-impact documentation changes when existing customer logic is already running.
11
+
12
+ ## 2. File and Diagram Structure
13
+
14
+ - One API flow = one `@startuml ... @enduml` block.
15
+ - If helper logic is extracted, add a separate `@startuml ... @enduml` block for that helper.
16
+ - Keep API title in `partition`:
17
+ - `partition "POST **/api/path/{company_uuid}** Japanese summary" { ... }`
18
+ - Optional helper flow style:
19
+ - `rectangle "Logic function name" { ... }`
20
+
21
+ ## 3. Mandatory Activity Syntax Rules
22
+
23
+ - Every action line must end with `;`
24
+ - Every `if (...) then (...)` must be closed by `endif`
25
+ - Use `else (no)` and `then (yes)` labels explicitly for branch readability.
26
+ - Use `repeat ... repeat while ...` only when loop behavior is required.
27
+
28
+ ## 4. Color/Highlight Rules (Non-deprecated)
29
+
30
+ Use stereotype-based color syntax (new style), not old prefix style.
31
+
32
+ - Correct:
33
+ - `:Return Error status = 100: Parameter invalid;<<#pink>>`
34
+ - `:Call query_search_by_keyword() function;<<#lightGreen>>`
35
+ - Avoid deprecated old style:
36
+ - `#pink:...`
37
+ - `#lightGreen:...`
38
+
39
+ ## 5. Standard API Flow Skeleton
40
+
41
+ ```plantuml
42
+ @startuml
43
+ partition "POST **/sample/path/{company_uuid}** API summary" {
44
+ start
45
+ :Process authentication\\nCommon auth process;
46
+ :Validate parameter;
47
+ if (is valid) then (no)
48
+ :Return Error status = 100: Parameter invalid;<<#pink>>
49
+ stop
50
+ else (yes)
51
+ endif
52
+ :Main process;
53
+ :Close DB connection;
54
+ :Create api response;
55
+ stop
56
+ }
57
+ @enduml
58
+ ```
59
+
60
+ ## 6. Query-Building Style Rules
61
+
62
+ When describing SQL-like logic in flowchart:
63
+
64
+ - Build query in steps:
65
+ 1. `Create search query and condition statement from request.data;`
66
+ 2. `query = "...";`
67
+ 3. `condition = "...";`
68
+ 4. optional condition append blocks
69
+ 5. `Compose full query: fullQuery = query + condition;`
70
+ 6. apply order/paging
71
+ 7. execute query
72
+
73
+ - Keyword pattern:
74
+ - `LIKE '%data.info.keyword%'`
75
+ - Order pattern:
76
+ - `Add order by data.info.order_flg data.info.order_type into fullQuery;`
77
+ - Paging pattern:
78
+ - `Add "LIMIT = data.info.limit OFFSET = data.info.offset" into fullQuery;`
79
+
80
+ ### 6.1 Endpoint-level Mapping Must Be Explicit
81
+
82
+ For keyword/order enhancements, always document mapping between request params and DB columns per endpoint.
83
+
84
+ - `keyword` must list all searchable columns/tables.
85
+ - `order_flg` must list allowed sort targets and mapped columns.
86
+ - `order_type` must be documented as `asc/desc`.
87
+ - If payload includes new fields that are not handled by current legacy code,
88
+ add explicit processing logic for those new fields in the helper flow.
89
+ Do not silently ignore newly introduced request fields.
90
+
91
+ Example (`/bukken-manager/regno/customer/search/{company_uuid}`):
92
+ - `keyword`:
93
+ - `CLD_DAT_CUSTOMER_REG_NO_INFO.customer_reg_no`
94
+ - `CLD_MST_LOCATION_INFO.location_name`
95
+ - `CLD_MST_REG_NO_TYPE_INFO.name`
96
+ - `order_flg`:
97
+ - `customer_reg_no` / `location_name` / `name`
98
+ - `order_type`:
99
+ - `asc` / `desc`
100
+
101
+ ## 7. Backward-Compatible Merge Pattern
102
+
103
+ When new requirements are added to an existing API:
104
+
105
+ - Keep current handler path for old request behavior.
106
+ - Add conditional branch for new logic only when required params exist.
107
+ - Recommended branch style:
108
+ - If all new params are null -> keep old logic
109
+ - Else -> call extracted helper function
110
+ - Use this exact "no-impact first" branch when preserving customer legacy handlers:
111
+ - `if (data.info.keyword null and data.info.order_flg null and data.info.order_type null) then (yes)`
112
+ - `:Keep the current search logic handler: <existing_handler>();`
113
+ - `else (no)` -> call helper for new query logic
114
+ - In the legacy branch, do not duplicate old internal sub-steps unless explicitly requested.
115
+ - Avoid extra lines like mapping/query detail when they are already part of existing handler behavior.
116
+ - Prefer one concise line:
117
+ - `:Keep the current search logic handler: <existing_handler>();`
118
+
119
+ Example:
120
+
121
+ ```plantuml
122
+ if (data.info.keyword null and data.info.order_flg null and data.info.order_type null) then (yes)
123
+ :Keep the current search logic handler: regno_search();
124
+ else (no)
125
+ :Call query_search_by_keyword() function;<<#lightGreen>>
126
+ endif
127
+ ```
128
+
129
+ ## 8. Helper Function Diagram Pattern
130
+
131
+ ```plantuml
132
+ @startuml
133
+ rectangle "Logic query search by keyword" {
134
+ :query_search_by_keyword();<<#lightGreen>>
135
+ :Create search query and condition statement from request.data;
136
+ :query = "...";
137
+ :condition = "...";
138
+ if (data.info.keyword not null) then (yes)
139
+ :condition += "...";
140
+ else (no)
141
+ endif
142
+ :Compose full query:\\nfullQuery = query + condition;
143
+ :Add order by data.info.order_flg data.info.order_type into fullQuery;
144
+ :Add "LIMIT = data.info.limit OFFSET = data.info.offset" into fullQuery;
145
+ :Execute fullQuery and get data;
146
+ :return return_datas;
147
+ }
148
+ @enduml
149
+ ```
150
+
151
+ ### 8.1 Helper Naming Rule
152
+
153
+ - Use helper names that include endpoint domain to avoid collisions across many APIs.
154
+ - Recommended:
155
+ - `query_search_by_keyword()` for generic case
156
+ - `query_search_by_keyword_customer_regno()` for customer-regno endpoint
157
+
158
+ ### 8.2 Legacy Fallback Rule (Search APIs)
159
+
160
+ - When modernizing an existing search endpoint, explicitly describe legacy fallback behavior:
161
+ - soft-delete flag fallback from existing code path (if any)
162
+ - default order fallback when `order_flg/order_type` is absent
163
+ - default filters applied when optional inputs are null
164
+ - Keep these fallback notes visible in flowchart text to avoid behavior drift.
165
+
166
+ ### 8.3 Extended Filter Branch/Response Rule
167
+
168
+ - If new optional filter fields are added, include all of them in the no-impact branch check.
169
+ - When relation-based filters are used, explicitly show join/filter logic in helper flow.
170
+ - If response contains multiple typed lists, keep each list explicit in flowchart/YAML (for example `data.<entity>_info[]`) and include summary metadata such as `count` when applicable.
171
+
172
+ ## 9. Path Canonicalization Rule
173
+
174
+ - If YAML path and actual route path are different, use the confirmed actual route path in flowchart.
175
+ - Always prioritize route path defined in backend code (`urls.py`) over YAML documentation.
176
+ - If route path cannot be found in code, fallback to YAML path and mark it as assumed/temporary.
177
+ - Always confirm this with user before finalizing.
178
+
179
+ ## 9A. API Endpoint Design Rules (Project Standard)
180
+
181
+ These rules must be applied when creating/updating API flowcharts and YAML in this project.
182
+
183
+ - Use singular object keyword in endpoint path:
184
+ - Correct: `/invoice`, `/assignment`, `/personal-schedule`
185
+ - Avoid: `/invoices`, `/assignments`
186
+ - Use canonical business-domain keywords from glossary/spec terminology.
187
+ - Avoid ambiguous aliases when official domain terms exist.
188
+ - Use action keywords that describe behavior clearly:
189
+ - List: `.../list/...`
190
+ - Update: `.../edit/...`
191
+ - Delete: `.../delete/...`
192
+ - Multi-create: `.../multi-create`
193
+ - Avoid vague action keyword `bulk` when behavior is multi-create.
194
+
195
+ ### 9A.1 Endpoint Pattern
196
+
197
+ - List API:
198
+ - `GET /{object}/list/{company_uuid}/{bukken_uuid}`
199
+ - Create API:
200
+ - `POST /{object}/{company_uuid}/{bukken_uuid}`
201
+ - Edit API:
202
+ - `POST /{object}/edit/{company_uuid}/{object_uuid}`
203
+ - Detail API:
204
+ - `GET /{object}/edit/{company_uuid}/{object_uuid}`
205
+ - Delete API:
206
+ - `POST /{object}/delete/{company_uuid}/{object_uuid}`
207
+
208
+ ### 9A.2 HTTP Method Policy
209
+
210
+ - Do not use `PUT` for update APIs. Use `POST .../edit/{uuid}`.
211
+ - Do not use `DELETE` method for delete APIs. Use `POST .../delete/{uuid}`.
212
+
213
+ ### 9A.3 Canonical Examples
214
+
215
+ - Invoice sample:
216
+ - `GET /invoice/list/{company_uuid}/{bukken_uuid}`
217
+ - `POST /invoice/{company_uuid}/{bukken_uuid}`
218
+ - `POST /invoice/edit/{company_uuid}/{invoice_uuid}`
219
+ - `GET /invoice/edit/{company_uuid}/{invoice_uuid}`
220
+ - `POST /invoice/delete/{company_uuid}/{bukken_uuid}`
221
+
222
+ ## 9B. General Design and Documentation Governance Rules
223
+
224
+ Apply the rules below as cross-project standards for API YAML and flowchart generation.
225
+ These rules complement section `9A` (path syntax + method policy) and avoid redefining it.
226
+
227
+ ### 9B.1 Rule Precedence and Consistency
228
+
229
+ - Endpoint naming/method conventions must follow section `9A`.
230
+ - If a feature needs an exception from `9A`, document the reason and get explicit confirmation before finalizing.
231
+ - Keep terminology consistent across path, request/response schema, flowchart labels, and API summary tables.
232
+
233
+ ### 9B.2 Parameter Placement Rule
234
+
235
+ - Path parameters: identity and routing keys (`{company_uuid}`, `{resource_uuid}`).
236
+ - Query parameters: lightweight filtering/sorting/paging.
237
+ - Request body: complex/multi-field search criteria.
238
+ - If retrieval requires many filter fields, prefer dedicated `POST .../search` over overloaded query strings.
239
+
240
+ ### 9B.3 Read Contract Shape Rule (List vs Search)
241
+
242
+ - Use list-style read API for simple retrieval contracts.
243
+ - Use search-style read API when filter logic is complex or payload-based.
244
+ - If one endpoint forces heavy client-side matching/filtering for different screen modes, split read endpoints by view purpose.
245
+
246
+ ### 9B.4 Endpoint Split vs Merge Decision Rule
247
+
248
+ - Split endpoints when:
249
+ - view/use-case shaping is materially different
250
+ - one endpoint causes excessive client orchestration
251
+ - Merge endpoints/datasets when:
252
+ - data is always consumed together under the same filter context
253
+ - separate endpoints only add latency and maintenance cost
254
+ - Record split/merge rationale in API description and flowchart notes.
255
+
256
+ ### 9B.5 Reuse vs New Endpoint Rule
257
+
258
+ - Reuse existing endpoints only when request/response contract is truly compatible with target screen logic.
259
+ - If existing API is semantically close but contract-incompatible, create a bounded new endpoint for that use case.
260
+ - Mark endpoint lifecycle in docs via `API Type` classification (see `9B.8`).
261
+
262
+ ### 9B.6 Namespace and Path Redundancy Rule
263
+
264
+ - Separate namespaces by bounded context/domain.
265
+ - Avoid repeating parent namespace meaning in child path segments.
266
+ - Keep paths concise but semantically clear.
267
+
268
+ ### 9B.7 Screen-to-API Traceability Rule
269
+
270
+ - Every UI flow/action section must map:
271
+ - trigger/action
272
+ - called API
273
+ - response fields used for rendering
274
+ - Explicitly mark when a single endpoint serves multiple actions (initial load, search, refresh, etc.).
275
+
276
+ ### 9B.8 API List Governance Rule (Markdown Specs)
277
+
278
+ - API summary tables must include at least:
279
+ - `No`
280
+ - `Method`
281
+ - `Endpoint`
282
+ - `API Type`
283
+ - `Description`
284
+ - Group APIs by delivery status for planning visibility:
285
+ 1. `New`
286
+ 2. `Deferred`
287
+ 3. `Existing (reuse)`
288
+ - After regrouping, renumber `No` sequentially.
289
+
290
+ ### 9B.9 Change Management Rule
291
+
292
+ - For every endpoint rename/add/remove/merge:
293
+ - update endpoint detail sections
294
+ - update API summary tables
295
+ - update screen-to-API mapping
296
+ - append a new row in document history
297
+ - Preserve old history rows; never rewrite historical entries.
298
+
299
+ ### 9B.10 Canonical Response Envelope Rule
300
+
301
+ - Use one canonical response envelope across a bounded module/feature.
302
+ - Keep the envelope shape consistent in YAML examples, flowchart return nodes, and markdown endpoint tables.
303
+ - Recommended normalized envelope keys:
304
+ - `status`
305
+ - `msg`
306
+ - `data`
307
+ - `format_version`
308
+ - If a legacy API has a different wrapper, document it explicitly as an exception.
309
+
310
+ ### 9B.11 Business Status Rule
311
+
312
+ - Business execution result must be represented in response body `status` (not only by HTTP code).
313
+ - Flowchart branches must map to business status outcomes, including validation and duplicate/conflict-like results.
314
+ - Document endpoint-level status code matrix in API docs when branching is non-trivial.
315
+ - HTTP status policy can vary by system profile, but body `status` must remain deterministic.
316
+
317
+ ### 9B.12 Request Body Wrapper Rule
318
+
319
+ - For write/search APIs that use POST payloads, prefer a stable top-level wrapper object:
320
+ - `data: { ... }`
321
+ - Keep filter/search fields under `data` when criteria are complex or nested.
322
+ - If legacy contracts do not use wrapper objects, document exception and compatibility reason.
323
+
324
+ ### 9B.13 Traceability Metadata Rule
325
+
326
+ - YAML should include explicit traceability metadata for each endpoint (for example `x-traceability`).
327
+ - Minimum mapping targets:
328
+ - BR (business rule)
329
+ - UC (use case)
330
+ - AC (acceptance criteria)
331
+ - Flow list and markdown API docs should preserve the same mapping IDs to keep cross-artifact traceability.
332
+
333
+ ### 9B.14 Language and Encoding Governance
334
+
335
+ - EN artifact set must use English narrative consistently.
336
+ - Save generated markdown/YAML as UTF-8 and remove mojibake/corrupted characters before handoff.
337
+ - If source input is VI/JP, keep original text only in dedicated appendix/quotation blocks when needed for traceability.
338
+
339
+ ### 9B.15 Abbreviations and Table Numbering Governance
340
+
341
+ - For generated markdown specs, include an `Abbreviations` section near the top when acronyms are used.
342
+ - Apply `No` column and sequential renumbering policy by following section `9B.8`.
343
+
344
+ ## 9C. Project Profile Overlay Rule (Cross-Project Reuse)
345
+
346
+ - Separate reusable core rules from system-specific constraints.
347
+ - Keep system-specific choices in a project profile layer, for example:
348
+ - fixed HTTP policy patterns
349
+ - datetime timezone/local-naive policy
350
+ - method conventions such as POST-based edit/delete
351
+ - When reusing these rules for a new system, adopt core rules first, then explicitly decide profile overrides.
352
+ - Do not silently promote one system profile as global default for all projects.
353
+
354
+ ## 10. Wording Rules
355
+
356
+ - Use concrete action verbs:
357
+ - `Select ...`
358
+ - `Update ...`
359
+ - `Insert ...`
360
+ - `Create api response;`
361
+ - For existing behavior preservation, use explicit wording:
362
+ - `Keep the current search logic handler: <function>();`
363
+ - Do not add redundant response details if globally standardized.
364
+ - Prefer `:Create api response;` over verbose wrappers.
365
+
366
+ ## 11. Error/Status Rules in Flow Text
367
+
368
+ - Parameter validation error: usually `status = 100` (unless API-specific rule says otherwise).
369
+ - Temporary unknown error code policy may use `status = 900` if already agreed.
370
+ - Keep status usage consistent with confirmed project decisions.
371
+
372
+ ## 12. Common Preview Errors and Fixes
373
+
374
+ - Error: `Cannot find group ... @enduml`
375
+ - Cause: missing `endif` or malformed action statement
376
+ - Fix: close all branches and ensure each action line ends with `;`
377
+
378
+ - Warning: `This syntax is deprecated...`
379
+ - Cause: old color syntax (`#pink:...`, `#lightGreen:...`)
380
+ - Fix: move color marker to end of action:
381
+ - `:...;<<#pink>>`
382
+ - `:...;<<#lightGreen>>`
383
+
384
+ ## 13. Final Checklist Before Handoff
385
+
386
+ - Diagram renders in PlantUML Preview without error.
387
+ - No deprecated color syntax warnings.
388
+ - All `if` blocks have matching `endif`.
389
+ - New logic branch does not remove old logic path unless explicitly requested.
390
+ - SQL condition/order/paging statements match agreed spec.
391
+ - API path and method match the confirmed actual route (use YAML path only when they are identical).
392
+ - Response envelope is consistent with module-level canonical contract.
393
+ - Business `status` mapping is explicit in both YAML and flow branches.
394
+ - POST search/write payload wrapper (`data`) is consistent (or exception documented).
395
+ - Traceability links (BR/UC/AC) are present and consistent across artifacts.
396
+ - EN/UTF-8 quality check passed (no mixed-language drift, no mojibake).
397
+