sdtk-kit 0.3.9 → 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 -310
- 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 -169
- 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 -732
- 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 -220
- 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 -52
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +0 -246
- 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 -86
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +0 -220
- 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 -28
- 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 -414
- 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 -90
- package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +0 -47
- package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +0 -59
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +0 -50
- package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +0 -57
- 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 -90
- 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 -60
- 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 -220
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +0 -197
- 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,229 +0,0 @@
|
|
|
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 `YAML_CREATION_RULES.md` for API contract rules and `API_DESIGN_FLOWCHART_CREATION_RULES.md` for flow/depth alignment.
|
|
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 |
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# FLOWCHART CREATION RULES (Compatibility Note)
|
|
2
|
-
|
|
3
|
-
This file is kept only for backward compatibility.
|
|
4
|
-
|
|
5
|
-
Do not use this file as the primary source of truth anymore.
|
|
6
|
-
The rule set has been split into two files:
|
|
7
|
-
- `YAML_CREATION_RULES_FINAL.md` (root) / `templates/docs/api/YAML_CREATION_RULES.md` (toolkit)
|
|
8
|
-
- `API_DESIGN_FLOWCHART_CREATION_RULES_FINAL.md` (root) / `templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md` (toolkit)
|
|
9
|
-
|
|
10
|
-
Use the YAML rules file for:
|
|
11
|
-
- endpoint path/method conventions
|
|
12
|
-
- request/response schema design
|
|
13
|
-
- contract-level API rules
|
|
14
|
-
|
|
15
|
-
Use the API design + flowchart rules file for:
|
|
16
|
-
- flow list writing
|
|
17
|
-
- PlantUML flow depth and wording
|
|
18
|
-
- API design detail markdown rules
|
|
19
|
-
|
|
20
|
-
This compatibility note should remain only until all references are migrated.
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# YAML CREATION RULES FINAL
|
|
2
|
-
|
|
3
|
-
This file is the canonical rule set for designing and maintaining feature-level OpenAPI YAML.
|
|
4
|
-
|
|
5
|
-
Use this file for:
|
|
6
|
-
- OpenAPI YAML contract design
|
|
7
|
-
- endpoint path/method decisions
|
|
8
|
-
- request/response schema design
|
|
9
|
-
- endpoint summary and contract consistency checks
|
|
10
|
-
|
|
11
|
-
Do not use this file as the primary rule source for:
|
|
12
|
-
- flowchart writing details
|
|
13
|
-
- API design detail markdown layout
|
|
14
|
-
|
|
15
|
-
Use `API_DESIGN_FLOWCHART_CREATION_RULES_FINAL.md` for those.
|
|
16
|
-
|
|
17
|
-
## 1. Rule Precedence
|
|
18
|
-
- Priority 1: follow the existing system's real route, method, payload, and response conventions.
|
|
19
|
-
- Priority 2: match the current source code and runtime behavior.
|
|
20
|
-
- Priority 3: apply the reusable standards in this document.
|
|
21
|
-
- If a reusable rule conflicts with the target system, keep the system rule and document the exception explicitly.
|
|
22
|
-
|
|
23
|
-
## 2. API Scope Classification
|
|
24
|
-
- Every endpoint must be classified as one of:
|
|
25
|
-
- `New`
|
|
26
|
-
- `Deferred`
|
|
27
|
-
- `Existing (reuse)`
|
|
28
|
-
- Do not silently create a new feature-local API if an existing system API already provides the same behavior with a compatible contract.
|
|
29
|
-
- If the existing API is close in purpose but payload or response is incompatible with the feature need, create a bounded new API.
|
|
30
|
-
|
|
31
|
-
## 3. Endpoint Path Design
|
|
32
|
-
- Use singular resource names in endpoint paths.
|
|
33
|
-
- Use explicit action segments only when needed by system convention:
|
|
34
|
-
- `list`
|
|
35
|
-
- `search`
|
|
36
|
-
- `edit`
|
|
37
|
-
- `delete`
|
|
38
|
-
- `multi-create`
|
|
39
|
-
- Prefer stable system-style patterns such as:
|
|
40
|
-
- list: `GET /{resource}/list/{company_uuid}/{parent_uuid}`
|
|
41
|
-
- search: `POST /{resource}/search/{company_uuid}`
|
|
42
|
-
- view-specific search: `POST /{resource}/bukken-view/search/{company_uuid}`
|
|
43
|
-
- create: `POST /{resource}/{company_uuid}`
|
|
44
|
-
- detail: `GET /{resource}/{company_uuid}/{resource_uuid}`
|
|
45
|
-
- edit: `POST /{resource}/edit/{company_uuid}/{resource_uuid}`
|
|
46
|
-
- delete: `POST /{resource}/delete/{company_uuid}/{resource_uuid}`
|
|
47
|
-
- Separate namespaces by bounded context.
|
|
48
|
-
- Do not repeat namespace meaning in child path segments.
|
|
49
|
-
|
|
50
|
-
## 4. Request Contract Rules
|
|
51
|
-
- For feature-owned POST search and write APIs, prefer a stable wrapper:
|
|
52
|
-
- `data: { ... }`
|
|
53
|
-
- For complex filters, place fields under:
|
|
54
|
-
- `data.info`
|
|
55
|
-
- If reusing an existing system API, keep the owning module's contract shape exactly as-is.
|
|
56
|
-
- Do not force reused APIs into the feature wrapper pattern.
|
|
57
|
-
- If a payload field changes behavior, the field must be explicit in the schema and must not remain only in examples.
|
|
58
|
-
|
|
59
|
-
## 5. Response Contract Rules
|
|
60
|
-
- Success responses must include `status` at minimum.
|
|
61
|
-
- Create APIs should return the minimum new identifier required by the caller.
|
|
62
|
-
- Example: `status + sagyo_assign_uuid`
|
|
63
|
-
- Edit and delete APIs should return status-only unless the target system has a stronger standard.
|
|
64
|
-
- Pre-check or validation helper APIs should return only the minimum boolean or status needed by the UI.
|
|
65
|
-
- Do not return detail payloads the UI does not consume.
|
|
66
|
-
- Do not add FE-only visual helper payloads when the client can derive them safely.
|
|
67
|
-
- Example: remove `timeline_backgrounds` if the frontend renders timeline lines from existing data.
|
|
68
|
-
|
|
69
|
-
## 6. Naming and Field Mapping Rules
|
|
70
|
-
- Use canonical business-domain terminology from the system glossary and database.
|
|
71
|
-
- Prefer actual system terms such as:
|
|
72
|
-
- `bukken`
|
|
73
|
-
- `sagyo`
|
|
74
|
-
- `sagyoin`
|
|
75
|
-
- `certification`
|
|
76
|
-
- Avoid legacy aliases when an official term already exists.
|
|
77
|
-
- Field names should align with database semantics when they represent the same concept.
|
|
78
|
-
- If the DB uses a string state code, the API field must not be modeled as an integer.
|
|
79
|
-
- If a field is date-only (`format: date`), include the display format in the description.
|
|
80
|
-
- Example: `Start date (YYYYMMDD)`
|
|
81
|
-
|
|
82
|
-
## 7. Search and List API Rules
|
|
83
|
-
- One search API may serve multiple UI actions when the logic is the same:
|
|
84
|
-
- initial load
|
|
85
|
-
- search button
|
|
86
|
-
- refresh after mode/date change
|
|
87
|
-
- If one endpoint serves multiple UI actions, document that explicitly in YAML description and endpoint docs.
|
|
88
|
-
- Search APIs must define filter combination semantics clearly:
|
|
89
|
-
- AND across different fields
|
|
90
|
-
- OR within each `*_uuids` array
|
|
91
|
-
- If UI rendering depends on stable order, the YAML description must state the confirmed ORDER BY logic.
|
|
92
|
-
|
|
93
|
-
## 8. Split vs Reuse Rules
|
|
94
|
-
- Split read/search endpoints when the FE needs materially different grouped or view-shaped datasets.
|
|
95
|
-
- Merge or remove helper payloads when they add maintenance cost without business value.
|
|
96
|
-
- Reuse existing platform APIs when behavior already exists and only a feature-level mapping layer is needed.
|
|
97
|
-
- Example: reuse shared environment setting APIs instead of creating feature-local setting APIs.
|
|
98
|
-
|
|
99
|
-
## 9. Sample Data Rules
|
|
100
|
-
- For fields declared as `format: uuid`, use canonical UUID samples.
|
|
101
|
-
- Example: `123e4567-e89b-12d3-a456-426614174000`
|
|
102
|
-
- Do not use placeholder UUID-like labels such as:
|
|
103
|
-
- `customer-uuid-001`
|
|
104
|
-
- `assign-uuid-001`
|
|
105
|
-
- Keep sample data deterministic and internally consistent across request and response examples.
|
|
106
|
-
|
|
107
|
-
## 10. Cross-Artifact Consistency Rules
|
|
108
|
-
- The YAML contract is the source of truth for:
|
|
109
|
-
- endpoint path
|
|
110
|
-
- method
|
|
111
|
-
- request wrapper
|
|
112
|
-
- response shape
|
|
113
|
-
- After any YAML contract change, sync these artifacts:
|
|
114
|
-
- endpoint markdown
|
|
115
|
-
- flow list
|
|
116
|
-
- PlantUML flow assets
|
|
117
|
-
- API design detail markdown
|
|
118
|
-
- If any artifact cannot yet be synced, note the mismatch explicitly rather than leaving stale content.
|
|
119
|
-
|
|
120
|
-
## 11. Minimum YAML Quality Gate
|
|
121
|
-
- Path/method follow the target system convention.
|
|
122
|
-
- API type is classified (`New`, `Deferred`, `Existing (reuse)`).
|
|
123
|
-
- Request/response wrappers are stable and explicit.
|
|
124
|
-
- FE-only helper payloads are removed.
|
|
125
|
-
- Field names and types match DB semantics.
|
|
126
|
-
- UUID examples are valid UUIDs.
|
|
127
|
-
- Date descriptions include display format where needed.
|
|
128
|
-
- Search/list APIs document filter semantics and ordering when relevant.
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# Technical Architecture: {{FEATURE_KEY}} ({{FEATURE_NAME}})
|
|
2
|
-
|
|
3
|
-
**Document ID:** ARCH_DESIGN_{{FEATURE_KEY}}
|
|
4
|
-
**Version:** 1.0.0
|
|
5
|
-
**Date:** {{DATE}}
|
|
6
|
-
**Author:** ARCH Agent
|
|
7
|
-
**Status:** DRAFT - Ready for DEV Review
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Abbreviations
|
|
12
|
-
|
|
13
|
-
| No | Abbreviation | Meaning |
|
|
14
|
-
| ---: | --- | --- |
|
|
15
|
-
| 1 | API | Application Programming Interface |
|
|
16
|
-
| 2 | DB | Database |
|
|
17
|
-
| 3 | OQ | Open Question |
|
|
18
|
-
| 4 | NFR | Non-Functional Requirement |
|
|
19
|
-
| 5 | UC | Use Case |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 1. EXECUTIVE SUMMARY
|
|
24
|
-
|
|
25
|
-
### 1.1 Tech Stack (project-level)
|
|
26
|
-
- Backend: {{STACK_BACKEND}}
|
|
27
|
-
- Frontend: {{STACK_FRONTEND}}
|
|
28
|
-
- Mobile: {{STACK_MOBILE}}
|
|
29
|
-
- Database: {{STACK_DATABASE}}
|
|
30
|
-
- Auth: {{STACK_AUTH}}
|
|
31
|
-
|
|
32
|
-
## 2. SCOPE
|
|
33
|
-
|
|
34
|
-
- In scope (Phase 1):
|
|
35
|
-
- TBD
|
|
36
|
-
- Out of scope:
|
|
37
|
-
- TBD
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## 3. ASSUMPTIONS & OPEN QUESTIONS
|
|
42
|
-
|
|
43
|
-
### 3.1 Assumptions
|
|
44
|
-
- TBD (must be approved by PM if impacting behavior/API/security)
|
|
45
|
-
|
|
46
|
-
### 3.2 Open Questions (Clarifications Needed)
|
|
47
|
-
|
|
48
|
-
| No | Q-ID | Question | Decision Owner (PM/User) | Needed By (Phase) | Status (OPEN/RESOLVED) | Notes/Options | Resolution |
|
|
49
|
-
| ---: | --- | --- | --- | --- | --- | --- | --- |
|
|
50
|
-
| 1 | OQ-01 | TBD | PM | Phase 3 (ARCH) | OPEN | TBD | TBD |
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 4. SYSTEM ARCHITECTURE
|
|
55
|
-
|
|
56
|
-
### 4.1 Diagram
|
|
57
|
-
TBD (ASCII/PlantUML/Mermaid)
|
|
58
|
-
|
|
59
|
-
### 4.2 Component Responsibilities
|
|
60
|
-
|
|
61
|
-
| No | Component | Responsibility | Technology | Notes |
|
|
62
|
-
| ---: | --- | --- | --- | --- |
|
|
63
|
-
| 1 | API | TBD | TBD | TBD |
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## 5. DATA MODEL
|
|
68
|
-
|
|
69
|
-
| No | Table/Entity | Purpose | Key Fields | Notes |
|
|
70
|
-
| ---: | --- | --- | --- | --- |
|
|
71
|
-
| 1 | TBD | TBD | TBD | TBD |
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## 6. API DESIGN (if applicable)
|
|
76
|
-
|
|
77
|
-
- OpenAPI: `docs/api/{{FEATURE_PASCAL}}_API.yaml`
|
|
78
|
-
- API endpoints spec (markdown): `docs/api/{{FEATURE_KEY}}_ENDPOINTS.md`
|
|
79
|
-
- Flow list: `docs/api/{{FEATURE_SNAKE}}_api_flow_list.txt`
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## 7. UI DESIGN (if applicable)
|
|
84
|
-
|
|
85
|
-
- Screen layouts: `docs/design/DESIGN_LAYOUT_{{FEATURE_KEY}}.md`
|
|
86
|
-
- Flow-action screen spec: `docs/specs/{{FEATURE_KEY}}_FLOW_ACTION_SPEC.md`
|
|
87
|
-
- Related rule file: `toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md`
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 8. DATABASE DESIGN (if applicable)
|
|
92
|
-
|
|
93
|
-
- Database spec: `docs/database/DATABASE_SPEC_{{FEATURE_KEY}}.md`
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## 9. SECURITY & COMPLIANCE
|
|
98
|
-
|
|
99
|
-
- TBD
|
|
100
|
-
|
|
101
|
-
## 10. OBSERVABILITY
|
|
102
|
-
|
|
103
|
-
- TBD
|
|
104
|
-
|
|
105
|
-
## 11. HANDOFF
|
|
106
|
-
|
|
107
|
-
HANDOFF TO DEV:
|
|
108
|
-
`@dev please implement {{FEATURE_KEY}} based on ARCH_DESIGN + BACKLOG + API/layout/docs`
|
|
109
|
-
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# DATABASE SPECIFICATION: {{FEATURE_KEY}}
|
|
2
|
-
|
|
3
|
-
**Document ID:** DATABASE_SPEC_{{FEATURE_KEY}}
|
|
4
|
-
**Version:** 1.0.0
|
|
5
|
-
**Date:** {{DATE}}
|
|
6
|
-
**Author:** ARCH Agent
|
|
7
|
-
**Status:** DRAFT
|
|
8
|
-
**Source:** `docs/specs/BA_SPEC_{{FEATURE_KEY}}.md`, `docs/architecture/ARCH_DESIGN_{{FEATURE_KEY}}.md`
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Abbreviations
|
|
13
|
-
|
|
14
|
-
| No | Abbreviation | Meaning |
|
|
15
|
-
| ---: | --- | --- |
|
|
16
|
-
| 1 | DB | Database |
|
|
17
|
-
| 2 | PK | Primary Key |
|
|
18
|
-
| 3 | FK | Foreign Key |
|
|
19
|
-
| 4 | ERD | Entity Relationship Diagram |
|
|
20
|
-
| 5 | OQ | Open Question |
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Table of Contents
|
|
25
|
-
|
|
26
|
-
1. [Overview](#1-overview)
|
|
27
|
-
2. [ERD Diagram (PlantUML)](#2-erd-diagram-plantuml)
|
|
28
|
-
3. [Core Tables](#3-core-tables)
|
|
29
|
-
4. [Related/Referenced Tables](#4-relatedreferenced-tables)
|
|
30
|
-
5. [Settings Storage](#5-settings-storage)
|
|
31
|
-
6. [Indexes & Constraints](#6-indexes--constraints)
|
|
32
|
-
7. [Open Questions](#7-open-questions)
|
|
33
|
-
8. [Document History](#document-history)
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 1. Overview
|
|
38
|
-
|
|
39
|
-
### 1.1 Scope
|
|
40
|
-
- Describe database scope for `{{FEATURE_NAME}}`.
|
|
41
|
-
- Clarify whether each table is new/modified/reused.
|
|
42
|
-
|
|
43
|
-
### 1.2 Table Categories
|
|
44
|
-
|
|
45
|
-
| No | Category | Tables | Purpose |
|
|
46
|
-
| ---: | --- | --- | --- |
|
|
47
|
-
| 1 | Core (New/Modified) | TBD | Main feature tables |
|
|
48
|
-
| 2 | Referenced (Existing) | TBD | Existing tables reused by feature |
|
|
49
|
-
| 3 | Settings | TBD | Configuration storage |
|
|
50
|
-
|
|
51
|
-
### 1.3 Naming Conventions
|
|
52
|
-
|
|
53
|
-
| No | Prefix | Type | Example |
|
|
54
|
-
| ---: | --- | --- | --- |
|
|
55
|
-
| 1 | `cld_dat_` | Data table | `cld_dat_example_info` |
|
|
56
|
-
| 2 | `cld_mst_` | Master table | `cld_mst_example_info` |
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## 2. ERD Diagram (PlantUML)
|
|
61
|
-
|
|
62
|
-
```plantuml
|
|
63
|
-
@startuml {{FEATURE_KEY}}_ERD
|
|
64
|
-
!define TABLE(name) entity name << (T,#FFAAAA) >>
|
|
65
|
-
!define PK(x) <b><u>x</u></b>
|
|
66
|
-
!define FK(x) <i>x</i>
|
|
67
|
-
|
|
68
|
-
skinparam linetype ortho
|
|
69
|
-
skinparam entity {
|
|
70
|
-
BackgroundColor #FEFEFE
|
|
71
|
-
BorderColor #333333
|
|
72
|
-
ArrowColor #666666
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
title {{FEATURE_NAME}} - Entity Relationship Diagram
|
|
76
|
-
|
|
77
|
-
TABLE(cld_dat_example_info) {
|
|
78
|
-
PK(example_uuid) : UUID
|
|
79
|
-
--
|
|
80
|
-
FK(parent_uuid) : UUID <<nullable>>
|
|
81
|
-
name : VARCHAR
|
|
82
|
-
start_dt : DATETIME <<nullable>>
|
|
83
|
-
end_dt : DATETIME <<nullable>>
|
|
84
|
-
--
|
|
85
|
-
CREATE_DT : DATETIME
|
|
86
|
-
UPDATE_DT : DATETIME
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@enduml
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 2.1 ERD Summary
|
|
93
|
-
- Summarize key relations and ownership boundaries.
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## 3. Core Tables
|
|
98
|
-
|
|
99
|
-
### 3.1 cld_dat_example_info (Example Info)
|
|
100
|
-
|
|
101
|
-
| No | Column Name (JP) | Column Name | Data Type | Size | Key | Nullable | Default | Description |
|
|
102
|
-
| ---: | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
103
|
-
| 1 | Example UUID (JP) | example_uuid | UUID | - | PK | No | - | Primary key |
|
|
104
|
-
| 2 | Parent UUID (JP) | parent_uuid | UUID | - | FK | Yes | NULL | Parent reference |
|
|
105
|
-
|
|
106
|
-
### 3.2 cld_dat_example_detail_info (Example Detail)
|
|
107
|
-
|
|
108
|
-
| No | Column Name (JP) | Column Name | Data Type | Size | Key | Nullable | Default | Description |
|
|
109
|
-
| ---: | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
110
|
-
| 1 | Detail UUID (JP) | example_detail_uuid | UUID | - | PK | No | - | Primary key |
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## 4. Related/Referenced Tables
|
|
115
|
-
|
|
116
|
-
### 4.1 cld_dat_related_info (Related Entity)
|
|
117
|
-
|
|
118
|
-
| No | Key Column | Type | Description |
|
|
119
|
-
| ---: | --- | --- | --- |
|
|
120
|
-
| 1 | related_uuid | UUID | Referenced by core table |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 5. Settings Storage
|
|
125
|
-
|
|
126
|
-
### 5.1 Environment Settings Table
|
|
127
|
-
|
|
128
|
-
| No | Setting | category1 | category2 | key | value_type | Example Value | Description |
|
|
129
|
-
| ---: | --- | --- | --- | --- | --- | --- | --- |
|
|
130
|
-
| 1 | TBD | TBD | TBD | TBD | string | TBD | TBD |
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## 6. Indexes & Constraints
|
|
135
|
-
|
|
136
|
-
### 6.1 Recommended Indexes
|
|
137
|
-
|
|
138
|
-
#### cld_dat_example_info
|
|
139
|
-
|
|
140
|
-
| No | Index Name | Columns | Type | Purpose |
|
|
141
|
-
| ---: | --- | --- | --- | --- |
|
|
142
|
-
| 1 | idx_example_parent | parent_uuid | BTREE | Parent lookup |
|
|
143
|
-
|
|
144
|
-
### 6.2 Foreign Key Constraints
|
|
145
|
-
|
|
146
|
-
| No | Constraint Name | From Table.Column | To Table.Column | On Update | On Delete |
|
|
147
|
-
| ---: | --- | --- | --- | --- | --- |
|
|
148
|
-
| 1 | fk_example_parent | cld_dat_example_info.parent_uuid | cld_dat_related_info.related_uuid | RESTRICT | SET NULL |
|
|
149
|
-
|
|
150
|
-
### 6.3 Check Constraints
|
|
151
|
-
|
|
152
|
-
| No | Constraint Name | Expression | Purpose |
|
|
153
|
-
| ---: | --- | --- | --- |
|
|
154
|
-
| 1 | chk_example_range | start_dt < end_dt | Validate datetime range |
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## 7. Open Questions
|
|
159
|
-
|
|
160
|
-
### 7.1 Questions Requiring Clarification
|
|
161
|
-
|
|
162
|
-
| No | Q-ID | Area | Question | Impact | Priority | Status | Resolution |
|
|
163
|
-
| ---: | --- | --- | --- | --- | --- | --- | --- |
|
|
164
|
-
| 1 | Q-01 | Schema | TBD | TBD | High | OPEN | TBD |
|
|
165
|
-
|
|
166
|
-
### 7.2 Missing Information
|
|
167
|
-
- List unresolved schema details (size/default/nullability/code maps).
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Document History
|
|
172
|
-
|
|
173
|
-
| No | Version | Date | Author | Changes |
|
|
174
|
-
| ---: | --- | --- | --- | --- |
|
|
175
|
-
| 1 | 1.0.0 | {{DATE}} | ARCH Agent | Initial template-based version |
|