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,56 @@
1
+ # Templates (SDTK)
2
+
3
+ Files in `toolkit/templates/` are skeleton artifacts used by `init-feature.ps1`
4
+ to bootstrap a new feature across the SDLC phases.
5
+
6
+ ## Tokens
7
+ - `{{FEATURE_KEY}}` (UPPER_SNAKE_CASE), example: `WORKFLOW_ENGINE`
8
+ - `{{FEATURE_NAME}}`, example: `Workflow Engine`
9
+ - `{{FEATURE_PASCAL}}`, example: `WorkflowEngine`
10
+ - `{{FEATURE_SNAKE}}` (lower_snake_case), example: `workflow_engine`
11
+ - `{{DATE}}` format: `YYYY-MM-DD`
12
+ - `{{DATETIME}}` format: `YYYY-MM-DD HH:mm`
13
+
14
+ ## Generate
15
+ Run from project root:
16
+
17
+ `powershell -ExecutionPolicy Bypass -File ".\\toolkit\\\scripts\\init-feature.ps1" -FeatureKey YOUR_FEATURE -FeatureName "Your Feature"`
18
+
19
+ The script renders templates into `docs/**` and updates:
20
+ - `SHARED_PLANNING.md`
21
+ - `QUALITY_CHECKLIST.md`
22
+
23
+ ## Stack Configuration
24
+ - Stack and command values come from `sdtk.config.json` (project root).
25
+ - `init-feature.ps1` reads config values and injects them into templates.
26
+
27
+ ## Added Architecture Outputs
28
+ - `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
29
+ - `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
30
+ - `docs/database/DATABASE_SPEC_[FEATURE_KEY].md`
31
+ - `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
32
+
33
+ ## Added QA Outputs
34
+ - `docs/qa/[FEATURE_KEY]_TEST_CASE.md`
35
+ - `docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md`
36
+
37
+ ## ARCH Orchestration Mapping
38
+ - API scope: use `sdtk-api-doc`.
39
+ - API detail scope (from YAML + flow list): use `sdtk-api-design-spec` (mode `apiDesignDetailMode: auto|on|off`).
40
+ - UI flow-action scope: use `sdtk-screen-design-spec`.
41
+
42
+ ## QA Orchestration Mapping
43
+ - QA release decision/report scope: use `sdtk-qa`.
44
+ - QA detailed test-case spec scope: use `sdtk-test-case-spec` (mode `testCaseSpecMode: auto|on|off`).
45
+
46
+ ## Rules Used by Toolkit
47
+ - API design/flowchart rules:
48
+ - `templates/docs/api/FLOWCHART_CREATION_RULES.md`
49
+ - `templates/docs/api/API_DESIGN_CREATION_RULES.md`
50
+ - Screen flow-action spec rules:
51
+ - `templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md`
52
+ - Numbering mode is fixed: global numbering across full document (no screen-level reset).
53
+ - QA test-case spec rules:
54
+ - `templates/docs/qa/TEST_CASE_CREATION_RULES.md`
55
+
56
+
@@ -0,0 +1,80 @@
1
+ # SHARED PLANNING DOCUMENT
2
+ ## Multi-Agent Development Pipeline Tracker (v2.1 - 6 Phases)
3
+
4
+ **Current Feature:** `{{FEATURE_KEY}}`
5
+ **Feature Name:** `{{FEATURE_NAME}}`
6
+ **Last Updated:** `{{DATETIME}}`
7
+ **Pipeline Status:** `PHASE 1 - PM INITIATION (IN PROGRESS)`
8
+
9
+ ---
10
+
11
+ ## PIPELINE STATUS TABLE (6 Phases)
12
+
13
+ | Phase | Status | Owner | Start Date | Finish Date | Primary Artifact | Secondary Artifacts | Notes/Blockers |
14
+ |-------|--------|-------|------------|-------------|------------------|-------------------|---------------|
15
+ | **1. PM Init** | IN_PROGRESS | `@pm` | {{DATE}} | - | `PROJECT_INITIATION_{{FEATURE_KEY}}.md` | Scope + REQ-xx | |
16
+ | **2. BA** | Pending | `@ba` | - | - | `BA_SPEC_{{FEATURE_KEY}}.md` | BR/UC/AC/NFR | |
17
+ | **2+. PM Plan** | Pending | `@pm` | - | - | `PRD_{{FEATURE_KEY}}.md` | `BACKLOG_{{FEATURE_KEY}}.md` | |
18
+ | **3. ARCH** | Pending | `@arch` | - | - | `ARCH_DESIGN_{{FEATURE_KEY}}.md` | API + API_DETAIL + DB + UI specs | |
19
+ | **4. Dev** | Pending | `@dev` | - | - | `FEATURE_IMPL_PLAN_{{FEATURE_KEY}}.md` | Code + Tests + Code Review | |
20
+ | **5. QA** | Pending | `@qa` | - | - | `QA_RELEASE_REPORT_{{FEATURE_KEY}}.md` | `{{FEATURE_KEY}}_TEST_CASE.md` + Test results | |
21
+ | **6. PM Closure** | Pending | `@pm` | - | - | Release decision recorded | Handoff complete | |
22
+
23
+ ---
24
+
25
+ ## VISUAL PIPELINE STATUS
26
+ ```
27
+ [PM Init] IN_PROGRESS --> [BA] PENDING --> [PM Plan] PENDING --> [ARCH] PENDING --> [Dev] PENDING --> [QA] PENDING --> [PM Closure] PENDING
28
+ ```
29
+
30
+ ---
31
+
32
+ ## ARTIFACTS LOCATION GUIDE
33
+
34
+ ```
35
+ PM OUTPUTS: docs/product/PROJECT_INITIATION_{{FEATURE_KEY}}.md
36
+ docs/product/PRD_{{FEATURE_KEY}}.md
37
+ docs/product/BACKLOG_{{FEATURE_KEY}}.md
38
+ BA OUTPUTS: docs/specs/BA_SPEC_{{FEATURE_KEY}}.md
39
+ ARCH OUTPUTS: docs/architecture/ARCH_DESIGN_{{FEATURE_KEY}}.md
40
+ docs/api/{{FEATURE_PASCAL}}_API.yaml
41
+ docs/api/{{FEATURE_KEY}}_ENDPOINTS.md
42
+ docs/api/{{FEATURE_KEY}}_API_DESIGN_DETAIL.md
43
+ docs/api/{{FEATURE_SNAKE}}_api_flow_list.txt
44
+ docs/database/DATABASE_SPEC_{{FEATURE_KEY}}.md
45
+ docs/specs/{{FEATURE_KEY}}_FLOW_ACTION_SPEC.md
46
+ docs/design/DESIGN_LAYOUT_{{FEATURE_KEY}}.md
47
+ DEV OUTPUTS: docs/dev/FEATURE_IMPL_PLAN_{{FEATURE_KEY}}.md
48
+ QA OUTPUTS: docs/qa/{{FEATURE_KEY}}_TEST_CASE.md
49
+ docs/qa/QA_RELEASE_REPORT_{{FEATURE_KEY}}.md
50
+ SHARED STATE: SHARED_PLANNING.md + QUALITY_CHECKLIST.md
51
+ ```
52
+
53
+ ---
54
+
55
+ ## CURRENT BLOCKERS / ISSUES
56
+ ```
57
+ NO BLOCKERS
58
+ ```
59
+
60
+ ---
61
+
62
+ ## OPEN QUESTIONS (Summary)
63
+ List any unresolved OQ-xx items here with a pointer to the owning artifact (PM consolidates).
64
+
65
+ | Q-ID | Summary | Owner | Source Doc | Status |
66
+ |------|---------|-------|------------|--------|
67
+ | OQ-01 | TBD | PM | docs/specs/BA_SPEC_{{FEATURE_KEY}}.md | OPEN |
68
+
69
+ ---
70
+
71
+ ## RECENT ACTIVITY LOG (Agent Updates)
72
+
73
+ ```
74
+ {{DATETIME}} | [SYSTEM] | INIT | Toolkit initialized for {{FEATURE_KEY}} | @pm please create PROJECT_INITIATION
75
+ ```
76
+
77
+ **Append updates with format:**
78
+ ```
79
+ YYYY-MM-DD HH:MM | [PM/BA/ARCH/DEV/QA] | [Status] | [Artifact] | @next_agent
80
+ ```
@@ -0,0 +1,212 @@
1
+ # API Design Creation Rules for AI Agents (Excel Template)
2
+
3
+ This document defines reusable rules for creating API design documents in Excel format based on `Example/Docs/API/API_design.xlsx`.
4
+
5
+ ## 1. Scope and Goal
6
+
7
+ - Reuse one consistent Excel structure for API contract documentation.
8
+ - Keep flow, endpoint parameters, request schema, response schema, and revision history in one workbook.
9
+ - Keep generated sheets deterministic and review-friendly.
10
+
11
+ ## 2. Source Template Baseline
12
+
13
+ | No | Sheet Pattern | Purpose |
14
+ | ---: | --- | --- |
15
+ | 1 | `History` | Global workbook change history |
16
+ | 2 | `API detail (...)` | One API per sheet |
17
+
18
+ Observed baseline in `API_design.xlsx`:
19
+ - 1 history sheet.
20
+ - 5 API detail sheets (list/create/detail/update/logical delete).
21
+
22
+ ## 3. Workbook Rules
23
+
24
+ ### 3.1 Sheet Naming
25
+
26
+ - Use one API per sheet.
27
+ - Recommended naming style:
28
+ - `API detail (<domain action>)`
29
+ - Keep API sheet order stable (for example: list -> create -> detail -> update -> delete).
30
+
31
+ ### 3.2 History Sheet
32
+
33
+ - Keep `History` as the first sheet.
34
+ - Header layout:
35
+ - `A3=Date`
36
+ - `C3=Version`
37
+ - `F3=Editor`
38
+ - `M3=Edit content`
39
+ - Append rows only. Do not rewrite historical rows.
40
+
41
+ ## 4. API Detail Sheet Layout
42
+
43
+ ### 4.1 Header Metadata Block
44
+
45
+ Use this label/value map:
46
+
47
+ | No | Label Cell Group | Value Cell Group | Meaning |
48
+ | ---: | --- | --- | --- |
49
+ | 1 | `Q1:X1` | `Y1:AQ1` | System name |
50
+ | 2 | `Q2:X2` | `Y2:AQ2` | System ID |
51
+ | 3 | `Q3:X3` | `Y3:AQ3` | Subsystem name |
52
+ | 4 | `Q4:X4` | `Y4:AQ4` | Function name |
53
+ | 5 | `AR1:AV1` | `AW1:BC1` | Created by |
54
+ | 6 | `AR2:AV2` | `AW2:BC2` | Created date |
55
+ | 7 | `AR3:AV3` | `AW3:BC3` | Revised by |
56
+ | 8 | `AR4:AV4` | `AW4:BC4` | Revised date |
57
+
58
+ Also keep document title block:
59
+ - `A1:P4` = document title area.
60
+
61
+ ### 4.2 Mandatory Section Order
62
+
63
+ Each API sheet must keep this order:
64
+ 1. Process flow section
65
+ 2. `Parameters:`
66
+ 3. Request parameter section (JSON format)
67
+ 4. Success response section (JSON format)
68
+ 5. Error response section (JSON format)
69
+
70
+ ### 4.3 Endpoint Title Placement
71
+
72
+ - Put endpoint summary at top flow area: `B7`.
73
+ - Format: `<METHOD> <PATH> <summary>`
74
+ - Repeat the same endpoint summary in contract area:
75
+ - Column `A`, one row above `Parameters:`.
76
+ - Both endpoint strings must be identical.
77
+
78
+ ### 4.4 Flowchart Placement
79
+
80
+ - Put PlantUML text in `BG8` (multi-line content in one cell).
81
+ - `BG6` can contain tool/reference note.
82
+ - Helper + main flows can be placed in one cell value if clearly separated.
83
+ - Flow syntax/content standards follow:
84
+ - `Example/Docs/API/FLOWCHART_CREATION_RULES.md`
85
+
86
+ ## 5. Endpoint and Parameter Rules
87
+
88
+ ### 5.1 Path Parameter Block
89
+
90
+ - Anchor row: column `B` equals `Parameters:`.
91
+ - Parameter rows:
92
+ - parameter key in column `C`
93
+ - description in column `K`
94
+ - Include every path placeholder from endpoint path.
95
+ - Keep parameter order aligned with placeholder order.
96
+
97
+ ### 5.2 Consistency Checks
98
+
99
+ - Every `{placeholder}` in path must exist exactly once in the parameter rows.
100
+ - Avoid duplicate parameter names unless explicitly documented.
101
+ - Remove stale parameter rows after endpoint rename.
102
+
103
+ ## 6. Request/Response Table Rules
104
+
105
+ ### 6.1 Common Column Model
106
+
107
+ | No | Column Group | Meaning |
108
+ | ---: | --- | --- |
109
+ | 1 | `A:B` | Row No |
110
+ | 2 | `C:J` | Item label |
111
+ | 3 | `K:N` | Hierarchy level 1 |
112
+ | 4 | `O:R` | Hierarchy level 2 |
113
+ | 5 | `S:V` | Hierarchy level 3 |
114
+ | 6 | `W:Z` | Hierarchy level 4 |
115
+ | 7 | `AA:AD` | Hierarchy level 5 |
116
+ | 8 | `AE:AH` | Hierarchy level 6 |
117
+ | 9 | `AI:AK` | Data type |
118
+
119
+ ### 6.2 Request Header Mode
120
+
121
+ For write/search request tables, include:
122
+ - `No`
123
+ - `Item Name`
124
+ - `Item`
125
+ - `Type`
126
+ - `Format`
127
+ - `Length`
128
+ - `Required`
129
+
130
+ Column groups:
131
+ - `AL:AN` -> `Format`
132
+ - `AO:AP` -> `Length`
133
+ - `AQ:AR` -> `Required`
134
+
135
+ ### 6.3 Response Header Mode
136
+
137
+ For response tables, include:
138
+ - `No`
139
+ - `Item Name`
140
+ - `Item`
141
+ - `Type`
142
+ - `Note`
143
+
144
+ Column group:
145
+ - `AL:AN` -> `Note`
146
+
147
+ ### 6.4 GET Request Body Rule
148
+
149
+ - If API has no JSON request body, set request body to:
150
+ - `None`
151
+
152
+ ### 6.5 Hierarchy Modeling Rule
153
+
154
+ - Use hierarchy columns (level 1 to level 6) to represent nesting.
155
+ - Represent root wrapper explicitly (for example `data`).
156
+ - For array object children, define parent array node first, then child fields at deeper levels.
157
+
158
+ ## 7. Status and Error Contract Rules
159
+
160
+ - Success response must include `status` at minimum.
161
+ - Error response must include:
162
+ - `status`
163
+ - `data` (message or detail payload)
164
+ - If status detail references an external code table, note that in response notes.
165
+
166
+ ## 8. Type and Format Rules
167
+
168
+ - Use stable type keywords:
169
+ - `string`
170
+ - `integer`
171
+ - `number`
172
+ - `object`
173
+ - `array`
174
+ - If datetime format is constrained, write it in `Format` or `Note` (for example `yyyymmddHHMMSS`).
175
+ - Business constraints (constant flags, nullable behavior, etc.) go to `Note`.
176
+
177
+ ## 9. Recommended Generation Procedure
178
+
179
+ 1. Duplicate an existing API detail sheet.
180
+ 2. Update metadata fields (`Q..BC` blocks).
181
+ 3. Update endpoint title in `B7`.
182
+ 4. Update PlantUML in `BG8`.
183
+ 5. Update repeated endpoint title above `Parameters:`.
184
+ 6. Update path parameters (`C/K` rows).
185
+ 7. Update request section:
186
+ - `None` for no-body APIs.
187
+ - request table for body APIs.
188
+ 8. Update success response table.
189
+ 9. Update error response table.
190
+ 10. Append one new row in `History`.
191
+
192
+ ## 10. Quality Gate Checklist Before Handoff
193
+
194
+ - Section order is complete and unchanged.
195
+ - Endpoint title in `B7` matches the endpoint title above `Parameters:`.
196
+ - Path placeholders and parameter rows are 1:1 matched.
197
+ - Request/response sections use correct header mode.
198
+ - `No` is sequential in every table.
199
+ - Hierarchy columns reflect actual payload nesting.
200
+ - `status` and error payload structure are documented.
201
+ - PlantUML in `BG8` matches endpoint behavior.
202
+ - `History` has a new appended entry.
203
+
204
+ ## 11. Known Pitfalls and Prevention
205
+
206
+ | No | Pitfall | Prevention Rule |
207
+ | ---: | --- | --- |
208
+ | 1 | Endpoint placeholder renamed but parameter rows not synced | Run path-vs-parameter check for every API sheet |
209
+ | 2 | Request/response headers mixed (`Note` vs `Required`) | Use section-specific header mode only |
210
+ | 3 | Nested array fields placed at wrong hierarchy level | Define parent array first, then child fields deeper |
211
+ | 4 | Endpoint summary mismatch between top and contract blocks | Maintain a single canonical endpoint title string and reuse it |
212
+
@@ -0,0 +1,62 @@
1
+ # {{FEATURE_KEY}} API DESIGN DETAIL
2
+
3
+ ## 0. Abbreviations
4
+
5
+ | No | Term | Meaning |
6
+ | ---: | --- | --- |
7
+ | 1 | API | Application Programming Interface |
8
+ | 2 | UUID | Universally Unique Identifier |
9
+ | 3 | FE | Frontend |
10
+ | 4 | BE | Backend |
11
+ | 5 | DT | Datetime |
12
+
13
+ ## 1. Document Scope
14
+
15
+ | No | Method | Endpoint | Reference Template |
16
+ | ---: | --- | --- | --- |
17
+ | 1 | TBD | TBD | `API_design.xlsx` |
18
+
19
+ ## 2. API Detail 1 - TBD
20
+
21
+ **Endpoint:** `TBD`
22
+
23
+ ### 2.1 Process Flow
24
+
25
+ Source of truth: `docs/api/{{FEATURE_SNAKE}}_api_flow_list.txt`
26
+
27
+ ```text
28
+ @startuml
29
+ partition "TBD" {
30
+ start
31
+ :TBD;
32
+ stop
33
+ }
34
+ @enduml
35
+ ```
36
+
37
+ ![Flowchart - API 1](./images/{{FEATURE_SNAKE}}__api_1.svg)
38
+
39
+ ### 2.2 Parameters
40
+
41
+ `None`
42
+
43
+ ### 2.3 Request Parameters (JSON format)
44
+
45
+ `None`
46
+
47
+ ### 2.4 Success Response (JSON format)
48
+
49
+ `None`
50
+
51
+ ### 2.5 Error Response (JSON format)
52
+
53
+ `None`
54
+
55
+ ## 3. Generation Notes
56
+
57
+ - This file should be generated/updated by skill `sdtk-api-design-spec`.
58
+ - Rules source: `templates/docs/api/API_DESIGN_CREATION_RULES.md`.
59
+ - Contract source:
60
+ - `docs/api/{{FEATURE_PASCAL}}_API.yaml`
61
+ - `docs/api/{{FEATURE_SNAKE}}_api_flow_list.txt`
62
+
@@ -0,0 +1,229 @@
1
+ # {{FEATURE_KEY}} API ENDPOINTS
2
+
3
+ **Document ID:** {{FEATURE_KEY}}_ENDPOINTS
4
+ **Version:** 1.0.0
5
+ **Date:** {{DATE}}
6
+ **Author:** ARCH Agent
7
+ **Status:** DRAFT
8
+ **Related Specs:** `docs/specs/BA_SPEC_{{FEATURE_KEY}}.md`, `docs/specs/{{FEATURE_KEY}}_FLOW_ACTION_SPEC.md`, `docs/database/DATABASE_SPEC_{{FEATURE_KEY}}.md`, `docs/api/{{FEATURE_KEY}}_API_DESIGN_DETAIL.md`
9
+
10
+ ---
11
+
12
+ ## Abbreviations
13
+
14
+ | No | Abbreviation | Meaning |
15
+ | ---: | --- | --- |
16
+ | 1 | API | Application Programming Interface |
17
+ | 2 | DB | Database |
18
+ | 3 | UI | User Interface |
19
+ | 4 | BR | Business Rule |
20
+ | 5 | UC | Use Case |
21
+ | 6 | OQ | Open Question |
22
+
23
+ ---
24
+
25
+ ## Domain Keywords
26
+
27
+ | No | Keyword | Source Term | Meaning Used In This API Spec |
28
+ | ---: | --- | --- | --- |
29
+ | 1 | `resource_a` | TBD | TBD |
30
+ | 2 | `resource_b` | TBD | TBD |
31
+
32
+ ---
33
+
34
+ ## Table of Contents
35
+
36
+ 1. [Overview](#1-overview)
37
+ 2. [Authentication & Authorization](#2-authentication--authorization)
38
+ 3. [Common Response Formats](#3-common-response-formats)
39
+ 4. [Core APIs](#4-core-apis)
40
+ 5. [Master/Reuse APIs](#5-masterreuse-apis)
41
+ 6. [Error Codes Reference](#6-error-codes-reference)
42
+ 7. [Appendices](#appendix-a-data-model-reference)
43
+ 8. [Document History](#document-history)
44
+
45
+ ---
46
+
47
+ ## 1. Overview
48
+
49
+ ### 1.1 Base URL
50
+ ```
51
+ {BASE_URL}/api
52
+ ```
53
+
54
+ ### 1.2 API Versioning
55
+ Current version: `v1` (confirm final path policy in BA/ARCH decisions).
56
+
57
+ ### 1.3 Content Type
58
+ - Request: `application/json`
59
+ - Response: `application/json`
60
+
61
+ ### 1.4 Date/Time Format
62
+ - Date: `YYYY-MM-DD`
63
+ - DateTime: `YYYY-MM-DDTHH:mm:ss` (or timezone-aware per project decision)
64
+
65
+ ### 1.5 Endpoint Naming Convention
66
+ - Apply `FLOWCHART_CREATION_RULES.md` (API endpoint design + governance rules).
67
+ - Keep resource naming and method policy consistent across all sections.
68
+
69
+ ---
70
+
71
+ ## 2. Authentication & Authorization
72
+
73
+ ### 2.1 Authentication
74
+ All endpoints require Bearer token authentication unless explicitly documented.
75
+
76
+ ### 2.2 Permission Model
77
+
78
+ | No | Permission | Description | Allowed Operations |
79
+ | ---: | --- | --- | --- |
80
+ | 1 | `feature:view` | Read permission | Read/search endpoints |
81
+ | 2 | `feature:edit` | Write permission | Create/edit/delete endpoints |
82
+
83
+ ---
84
+
85
+ ## 3. Common Response Formats
86
+
87
+ ### 3.1 Success Response
88
+ ```json
89
+ {
90
+ "status": 0,
91
+ "msg": "success",
92
+ "data": {},
93
+ "errors": []
94
+ }
95
+ ```
96
+
97
+ ### 3.2 Error Response
98
+ ```json
99
+ {
100
+ "status": 100,
101
+ "msg": "validation error",
102
+ "data": {},
103
+ "errors": [
104
+ {
105
+ "field": "field_name",
106
+ "code": "INVALID",
107
+ "detail": "TBD"
108
+ }
109
+ ]
110
+ }
111
+ ```
112
+
113
+ ### 3.3 Pagination Parameters
114
+
115
+ | No | Parameter | Type | Default | Description |
116
+ | ---: | --- | --- | --- | --- |
117
+ | 1 | `page` | integer | 1 | Page number |
118
+ | 2 | `page_size` | integer | 20 | Items per page |
119
+
120
+ ---
121
+
122
+ ## 4. Core APIs
123
+
124
+ ### 4.1 METHOD /api/... (TBD)
125
+
126
+ **Description:** TBD
127
+ **Related Use Cases:** UC-xx
128
+ **Authentication:** Required (`feature:view` or `feature:edit`)
129
+
130
+ **Request Schema:**
131
+
132
+ | No | Field | Type | Required | Description |
133
+ | ---: | --- | --- | --- | --- |
134
+ | 1 | `field_1` | string | Yes | TBD |
135
+
136
+ **Request Example:**
137
+ ```http
138
+ METHOD /api/...
139
+ Authorization: Bearer {token}
140
+ Content-Type: application/json
141
+ ```
142
+
143
+ ```json
144
+ {
145
+ "field_1": "value"
146
+ }
147
+ ```
148
+
149
+ **Response Schema (key fields):**
150
+ ```json
151
+ {
152
+ "status": 0,
153
+ "msg": "success",
154
+ "data": {
155
+ "items": []
156
+ },
157
+ "errors": []
158
+ }
159
+ ```
160
+
161
+ **Possible Error Codes:**
162
+
163
+ | No | Code | Description |
164
+ | ---: | --- | --- |
165
+ | 1 | `ERR-xxx` | TBD |
166
+
167
+ ---
168
+
169
+ ## 5. Master/Reuse APIs
170
+
171
+ | No | Method | Endpoint | API Type | Description |
172
+ | ---: | --- | --- | --- | --- |
173
+ | 1 | GET | /api/... | Existing (reuse) | TBD |
174
+
175
+ ---
176
+
177
+ ## 6. Error Codes Reference
178
+
179
+ ### 6.1 Standard HTTP Status Codes
180
+
181
+ | No | Code | Description |
182
+ | ---: | --- | --- |
183
+ | 1 | 200 | Success |
184
+ | 2 | 400 | Bad Request |
185
+ | 3 | 401 | Unauthorized |
186
+ | 4 | 403 | Forbidden |
187
+ | 5 | 404 | Not Found |
188
+ | 6 | 409 | Conflict |
189
+ | 7 | 500 | Internal Server Error |
190
+
191
+ ### 6.2 Application Error Codes
192
+
193
+ | No | Code | HTTP Status | Description |
194
+ | ---: | --- | --- | --- |
195
+ | 1 | `ERR-VALIDATION` | 400 | Request validation failed |
196
+ | 2 | `ERR-AUTH` | 401/403 | Auth/permission failure |
197
+ | 3 | `ERR-CONFLICT` | 409 | Business conflict |
198
+
199
+ ---
200
+
201
+ ## Appendix A: Data Model Reference
202
+
203
+ | No | Entity | Key Fields | Notes |
204
+ | ---: | --- | --- | --- |
205
+ | 1 | TBD | TBD | TBD |
206
+
207
+ ---
208
+
209
+ ## Appendix B: API Endpoint Summary
210
+
211
+ | No | Method | Endpoint | API Type | Description |
212
+ | ---: | --- | --- | --- | --- |
213
+ | 1 | METHOD | /api/... | New | TBD |
214
+
215
+ ---
216
+
217
+ ## Appendix C: API Required For Screen Logic
218
+
219
+ | No | Method | Endpoint | API Type | Description (screen logic) | Spec can confirm (Q&A) |
220
+ | ---: | --- | --- | --- | --- | --- |
221
+ | 1 | METHOD | /api/... | New | TBD | TBD |
222
+
223
+ ---
224
+
225
+ ## Document History
226
+
227
+ | No | Version | Date | Author | Changes |
228
+ | ---: | --- | --- | --- | --- |
229
+ | 1 | 1.0.0 | {{DATE}} | ARCH Agent | Initial template-based version |
@@ -0,0 +1,20 @@
1
+ openapi: '3.0.3'
2
+ info:
3
+ title: '{{FEATURE_NAME}} API'
4
+ version: '1.0.0'
5
+ description: |
6
+ # {{FEATURE_NAME}} API
7
+ - FeatureKey: {{FEATURE_KEY}}
8
+ servers:
9
+ - url: /api/v1
10
+ security:
11
+ - Bearer: []
12
+ paths: {}
13
+ components:
14
+ securitySchemes:
15
+ Bearer:
16
+ type: http
17
+ scheme: bearer
18
+ description: Access token
19
+ schemas: {}
20
+