@leejungkiin/awkit 1.4.3 → 1.5.1

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 (64) hide show
  1. package/README.md +38 -14
  2. package/bin/awk.js +438 -86
  3. package/bin/claude-generators.js +3 -1
  4. package/bin/cline-generators.js +3 -1
  5. package/bin/codex-generators.js +7 -2
  6. package/core/orchestrator.md +17 -3
  7. package/core/skill-runtime-manifest.json +37 -0
  8. package/package.json +2 -2
  9. package/skill-packs/creator-studio/README.md +19 -0
  10. package/skill-packs/creator-studio/pack.json +10 -0
  11. package/skill-packs/marketing/README.md +64 -0
  12. package/skill-packs/marketing/pack.json +37 -0
  13. package/skill-packs/mobile-android/README.md +16 -0
  14. package/skill-packs/mobile-android/pack.json +10 -0
  15. package/skill-packs/mobile-ios/README.md +22 -0
  16. package/skill-packs/mobile-ios/pack.json +16 -0
  17. package/skill-packs/neural-memory/pack.json +8 -2
  18. package/skill-packs/superpowers/pack.json +1 -0
  19. package/skill-packs/superpowers/skills/single-flow-task-execution/SKILL.md +59 -358
  20. package/skill-packs/superpowers/skills/writing-skills/SKILL.md +60 -654
  21. package/skill-packs/superpowers/skills/writing-skills/examples/anti-rationalization.md +75 -0
  22. package/skill-packs/superpowers/skills/writing-skills/examples/cso-optimization.md +67 -0
  23. package/skill-packs/superpowers/skills/writing-skills/examples/tdd-for-skills.md +63 -0
  24. package/skills/CATALOG.md +49 -44
  25. package/skills/brainstorm-agent/SKILL.md +55 -315
  26. package/skills/brainstorm-agent/templates/brief-template.md +76 -0
  27. package/skills/codex-conductor/SKILL.md +55 -259
  28. package/skills/codex-conductor/examples/prompt-templates.md +72 -0
  29. package/skills/module-spec-writer/SKILL.md +38 -365
  30. package/skills/module-spec-writer/examples/port-migration-mode.md +40 -0
  31. package/skills/module-spec-writer/templates/module-spec-template.md +118 -0
  32. package/skills/orchestrator/SKILL.md +17 -8
  33. package/skills/single-flow-task-execution/SKILL.md +56 -363
  34. package/skills/single-flow-task-execution/examples/workflow-example.md +91 -0
  35. package/skills/smali-to-kotlin/SKILL.md +23 -416
  36. package/skills/smali-to-kotlin/examples/getting-started/tech-stack.md +58 -0
  37. package/skills/smali-to-kotlin/examples/pipeline/data-ui-parity.md +118 -0
  38. package/skills/smali-to-kotlin/examples/pipeline/scanner-and-bootstrap.md +106 -0
  39. package/skills/smali-to-swift/SKILL.md +18 -621
  40. package/skills/smali-to-swift/examples/getting-started/tech-stack.md +72 -0
  41. package/skills/smali-to-swift/examples/getting-started/toolchain.md +32 -0
  42. package/skills/smali-to-swift/examples/pipeline/core-logic.md +45 -0
  43. package/skills/smali-to-swift/examples/pipeline/data-layer.md +76 -0
  44. package/skills/smali-to-swift/examples/pipeline/framework-scanner.md +73 -0
  45. package/skills/smali-to-swift/examples/pipeline/project-bootstrap.md +76 -0
  46. package/skills/smali-to-swift/examples/pipeline/sdk-integration.md +66 -0
  47. package/skills/smali-to-swift/examples/pipeline/ui-viewmodel.md +96 -0
  48. package/skills/smali-to-swift/references/objc-to-swift-mapping.md +57 -0
  49. package/skills/spec-gate/SKILL.md +51 -265
  50. package/skills/spec-gate/templates/design-templates.md +93 -0
  51. package/skills/symphony-enforcer/SKILL.md +24 -555
  52. package/skills/symphony-enforcer/examples/startup-protocol.md +92 -0
  53. package/skills/symphony-enforcer/examples/task-completion.md +100 -0
  54. package/skills/symphony-enforcer/examples/three-phase.md +107 -0
  55. package/skills/symphony-enforcer/examples/trigger-points.md +99 -0
  56. package/skills/symphony-orchestrator/SKILL.md +1 -1
  57. package/skills/writing-skills/SKILL.md +82 -70
  58. package/skills/writing-skills/examples/anti-rationalization.md +53 -0
  59. package/skills/writing-skills/examples/cso-optimization.md +52 -0
  60. package/skills/writing-skills/examples/tdd-for-skills.md +48 -0
  61. package/templates/help.html +447 -0
  62. package/skills/memory-sync/SKILL.md +0 -424
  63. package/skills/memory-sync/memory-router.md +0 -185
  64. package/skills/memory-sync/memory-templates.md +0 -201
@@ -7,7 +7,7 @@ description: >-
7
7
  khi Gate 2 chưa thỏa mãn. Hỗ trợ auto-detect .kiro/specs/design.md.
8
8
  metadata:
9
9
  stage: core
10
- version: "1.1"
10
+ version: "1.2"
11
11
  tags: [gate, architecture, database, design, spec-first, core, kiro]
12
12
  requires: orchestrator
13
13
  agent: Architect
@@ -19,293 +19,83 @@ activation_keywords:
19
19
  - "schema design"
20
20
  - "data model"
21
21
  - "API design"
22
- - "architect"
23
22
  ---
24
23
 
25
- # Spec Gate v1.0 — Architecture & Data Design Gate
24
+ # Spec Gate v1.2 — Architecture & Data Design Gate (Router)
26
25
 
27
- > **Purpose:** Chốt thiết kế kỹ thuật (DB Schema, API Contract, State Machine)
28
- > TRƯỚC KHI viết code. Đảm bảo tất cả persistence changes đã được suy nghĩ kỹ
29
- > và user đã approve trước khi AI bắt tay implement.
30
- >
31
- > **Problem it solves:** "Vừa làm vừa sửa database dẫn tới lung tung"
26
+ > **Purpose:** Chốt thiết kế kỹ thuật (DB Schema, API Contract, State Machine)
27
+ > TRƯỚC KHI code. Đảm bảo persistence changes đã được suy nghĩ kỹ + user approved.
32
28
 
33
- ---
29
+ ## ⚠️ SCOPE
34
30
 
35
- ## ⚠️ SCOPE CLARITY
31
+ | LÀM | KHÔNG làm |
32
+ |-----|-----------|
33
+ | Data Model (tables, fields, indexes) | Viết code |
34
+ | API Contract (endpoints, req/res) | Tạo BRIEF/spec (brainstorm-agent) |
35
+ | State Machine diagram | Track tasks (symphony-enforcer) |
36
+ | Self-review checklist + user approve | Deploy, sửa lỗi |
36
37
 
37
- | Skill này LÀM | Skill này KHÔNG làm |
38
- |---------------|---------------------|
39
- | Phác thảo Data Model (tables, fields, indexes) | Viết code |
40
- | Thiết kế API Contract (endpoints, request/response) | Tạo BRIEF/spec (việc của brainstorm-agent) |
41
- | Vẽ State Machine diagram (nếu cần) | Track tasks (việc của symphony-enforcer) |
42
- | Checklist tự kiểm tra thiết kế | Deploy |
43
- | Yêu cầu user approve design | Sửa lỗi |
38
+ ## 📋 Topic Index
44
39
 
45
- ---
40
+ | Topic | Khi nào load | File |
41
+ |-------|-------------|------|
42
+ | Design templates (Data/API/State Machine) + Review checklist | Khi tạo design doc | `templates/design-templates.md` |
46
43
 
47
44
  ## 🚀 ACTIVATION
48
45
 
49
- Skill này được kích hoạt bởi:
50
- 1. **Orchestrator auto-trigger:** Khi Gate 2 check FAIL (không tìm thấy design doc đã approved)
51
- 2. **Explicit command:** `/architect` hoặc `/design-db`
52
- 3. **Keyword trigger:** "thiết kế database", "schema design", "data model"
53
-
54
- ---
55
-
56
- ## 📋 INPUT REQUIREMENTS
46
+ - **Orchestrator auto-trigger:** Gate 2 check FAIL
47
+ - **Commands:** `/architect`, `/design-db`
48
+ - **Keywords:** "thiết kế database", "schema design", "data model"
57
49
 
58
- Trước khi chạy, PHẢI có:
50
+ ## 📋 INPUT
59
51
 
60
52
  ```
61
- REQUIRED (theo thứ tự ưu tiên):
62
- → CHECK 1 (Kiro): .kiro/specs/<module>/design.md
63
- Nếu tồn tại AUTO-APPROVE: Load làm pre-approved architecture
64
- Skip Phase 2-7, thẳng Phase 8 (Write to NeuralMemory)
65
- → Thông báo: "🔍 Phát hiện .kiro/specs design docs.
66
- Thiết kế đã được chốt trong Kiro IDE. Auto-approve → Gate 2 PASS."
67
- → CHECK 2: docs/specs/<feature>.md HOẶC BRIEF.md (output từ Gate 1)
68
- → .project-identity (projectId, techStack)
53
+ REQUIRED (priority order):
54
+ 1. .kiro/specs/<module>/design.md → AUTO-APPROVE (skip Phase 2-7)
55
+ 2. BRIEF.md hoặc docs/specs/<feature>.md (Gate 1 output)
56
+ 3. .project-identity (projectId, techStack)
69
57
 
70
- OPTIONAL:
71
- → docs/specs/TECH-SPEC.md (project-level constraints)
72
- → Existing DB schema (nếu project đã có database)
73
- → NeuralMemory context (decisions trước đó về architecture)
58
+ OPTIONAL: TECH-SPEC.md, existing DB schema, NeuralMemory context
74
59
  ```
75
60
 
76
- ---
77
-
78
- ## 🔄 PROCESS
61
+ ## 🔄 PROCESS (8 Phases)
79
62
 
80
63
  ### Phase 1: Context Gathering (Silent)
81
-
82
- ```
83
- 0. CHECK KIRO SPECS FIRST (HIGHEST PRIORITY):
84
- - Scan .kiro/specs/<module>/design.md
85
- - Nếu tồn tại:
86
- → Load design.md làm approved architecture
87
- → Load .kiro/specs/<project>/design.md cho project-wide schema
88
- → Load .kiro/specs/<module>/requirements.md cho acceptance criteria
89
- → Lưu vào NeuralMemory: "Kiro architecture loaded: <summary>"
90
- → SKIP Phase 2-7, thẳng Phase 8 (write decision to NeuralMemory)
91
- → Gate 2 AUTO-PASS
92
- - Không tồn tại → tiếp Phase 1 bình thường
93
-
94
- 1. Đọc BRIEF.md / spec document → Extract:
95
- - Core entities (Users, Orders, Products...)
96
- - Relationships (1-N, N-N)
97
- - Business rules (unique constraints, validation rules)
98
- - Flows requiring state tracking
99
-
100
- 2. Đọc .project-identity → Extract:
101
- - Tech stack (SQL? NoSQL? ORM?)
102
- - Coding standards
103
- - Existing patterns
104
-
105
- 3. Đọc TECH-SPEC.md nếu có → Extract constraints:
106
- - Database choice (PostgreSQL, Firestore, GRDB, Realm...)
107
- - Performance requirements
108
- - Offline-first requirements
109
- - Migration strategy
110
-
111
- 4. NeuralMemory recall → Previous architecture decisions
112
- ```
64
+ - **Kiro check first** → .kiro/specs/design.md → AUTO-PASS Gate 2
65
+ - Fallback: Read BRIEF.md → extract entities, relationships, rules
66
+ - Read .project-identity, TECH-SPEC.md, NeuralMemory
113
67
 
114
68
  ### Phase 2: Data Model Design
69
+ - Per entity: Fields, Indexes, Relationships, Constraints
70
+ - Template → `templates/design-templates.md`
115
71
 
116
- ```
117
- Cho MỖI entity phát hiện từ spec:
118
-
119
- TABLE/COLLECTION: <name>
120
- ├── Fields:
121
- │ ├── id: <type> (PK)
122
- │ ├── field_1: <type> [NOT NULL | OPTIONAL]
123
- │ ├── field_2: <type> [DEFAULT: <value>]
124
- │ └── ...
125
- ├── Indexes:
126
- │ ├── idx_<name>_<field> (purpose)
127
- │ └── ...
128
- ├── Relationships:
129
- │ ├── belongs_to: <table> (FK: <field>)
130
- │ └── has_many: <table>
131
- └── Constraints:
132
- ├── UNIQUE: <fields>
133
- └── CHECK: <condition>
134
- ```
135
-
136
- ### Phase 3: API Contract Design (nếu có API)
137
-
138
- ```
139
- Cho MỖI endpoint cần thiết:
140
-
141
- ENDPOINT: [METHOD] /api/<path>
142
- ├── Purpose: <mô tả ngắn>
143
- ├── Auth: <required | optional | public>
144
- ├── Request:
145
- │ ├── Headers: <required headers>
146
- │ ├── Params: <path/query params>
147
- │ └── Body: { field: type, ... }
148
- ├── Response:
149
- │ ├── 200: { field: type, ... }
150
- │ ├── 400: { error: "validation message" }
151
- │ └── 500: { error: "server error" }
152
- └── Notes: <edge cases, rate limiting, etc.>
153
- ```
72
+ ### Phase 3: API Contract (nếu có API)
73
+ - Per endpoint: Method, Auth, Request, Response, Notes
154
74
 
155
75
  ### Phase 4: State Machine (nếu có stateful flows)
156
-
157
- ```
158
- Cho flows có trạng thái chuyển đổi (order lifecycle, booking flow...):
159
-
160
- STATE MACHINE: <name>
161
- [initial] → [state_1] → [state_2] → [final]
162
- ↓ ↓
163
- [error] [cancelled]
164
-
165
- Transitions:
166
- initial → state_1: trigger=<event>, guard=<condition>
167
- state_1 → state_2: trigger=<event>
168
- any → cancelled: trigger=user_cancel
169
- ```
76
+ - States, transitions, triggers, guards
170
77
 
171
78
  ### Phase 5: Self-Review Checklist
172
-
173
- **TRƯỚC KHI present cho user, AI PHẢI tự kiểm tra:**
174
-
175
- ```yaml
176
- checklist:
177
- data_integrity:
178
- - [ ] Mọi entity có Primary Key?
179
- - [ ] Foreign Keys đúng direction?
180
- - [ ] Không có circular dependencies?
181
- - [ ] Cascade delete rules đã define?
182
-
183
- performance:
184
- - [ ] Indexes cho frequent queries?
185
- - [ ] N+1 query potential identified?
186
- - [ ] Pagination strategy cho list endpoints?
187
- - [ ] Caching strategy nếu cần?
188
-
189
- consistency:
190
- - [ ] Chuẩn với .project-identity tech stack?
191
- - [ ] Chuẩn với TECH-SPEC.md constraints?
192
- - [ ] Naming convention thống nhất?
193
- - [ ] Date/time format thống nhất?
194
-
195
- edge_cases:
196
- - [ ] Concurrent access handling?
197
- - [ ] Null/empty value handling?
198
- - [ ] Soft delete vs hard delete?
199
- - [ ] Offline-first sync strategy (nếu mobile)?
200
-
201
- security:
202
- - [ ] PII data identified + encrypted?
203
- - [ ] Auth rules per endpoint?
204
- - [ ] Input validation cho mọi user input?
205
- ```
79
+ - Data integrity, performance, consistency, edge cases, security
80
+ - Full checklist `templates/design-templates.md`
206
81
 
207
82
  ### Phase 6: Multi-Role Architecture Review (AI Simulated)
208
-
209
- **Trước khi gửi cho user approve, AI TỰ ĐỘNG đóng 5 vai trò chuyên sâu để soát lỗi:**
210
-
211
- ```
212
- 1. DBA (Database Admin): Đã đánh index các trường queries thường xuyên? Bảng có chuẩn hóa (normalize) chưa? Có issue N+1 query không?
213
- 2. Backend Lead: API có reusable không? Có tính đến rate limit chưa? Transaction boundaries ở đâu?
214
- 3. Security Officer: Có chống SQL Injection không? Data at rest/in transit encrypt thế nào? Cấp quyền Row-level (RBAC)?
215
- 4. QA Automation: Việc setup test data có khó không? Mock API/DB có thuận lợi không?
216
- 5. SRE / DevOps: Nếu data lớn lên, hệ thống có scale nổi? Quá trình migrate db (schema update) có gây downtime không?
217
-
218
- *Nếu có P0/P1 issues, AI phải fix bản draft ngay lập tức.*
219
- ```
83
+ - 5 roles: DBA, Backend Lead, Security, QA, SRE
84
+ - P0/P1 issues fix draft before presenting
220
85
 
221
86
  ### Phase 7: Present & Approval
222
-
223
- ```
224
- Present cho user với format:
225
-
226
- ───────────────────────────────────
227
- 📐 ARCHITECTURE DESIGN: <Feature Name>
228
- ───────────────────────────────────
229
-
230
- ## Data Model
231
- [Phase 2 output]
232
-
233
- ## API Endpoints
234
- [Phase 3 output — nếu có]
235
-
236
- ## State Machine
237
- [Phase 4 output — nếu có]
238
-
239
- [Phase 7 checklist results]
240
-
241
- ## Concerns & Trade-offs
242
- - [Concern 1]: [Mô tả + recommendation]
243
- - [Concern 2]: [Mô tả + recommendation]
244
-
245
- ───────────────────────────────────
246
- ⏳ Chờ anh approve thiết kế này trước khi code nhé.
247
- Sửa gì cứ nói, tôi update lại.
248
- ───────────────────────────────────
249
- ```
87
+ - Show design doc → user review → approve
250
88
 
251
89
  ### Phase 8: Write Design Doc
252
-
253
- Sau khi user approve:
254
-
255
- ```
256
- 1. Tạo folder nếu chưa có: docs/architecture/
257
- 2. Write file: docs/architecture/<feature>_design.md
258
- 3. Nội dung = Phase 6 output + approval marker:
259
-
260
- ## Status: Approved
261
- **Approved by:** User
262
- **Approved at:** <ISO date>
263
- **Conversation:** <conversation-id>
264
-
265
- 4. Lưu vào NeuralMemory:
266
- nmem_remember(
267
- content="Architecture design for <feature> approved. Schema: <summary>",
268
- type="decision",
269
- tags=["architecture", "<projectId>", "<feature>"]
270
- )
271
-
272
- 5. Proceed → orchestrator re-checks Gate 2 → PASS → Gate 3
273
- ```
274
-
275
- ---
90
+ - Save to `docs/architecture/<feature>_design.md`
91
+ - Approval marker + NeuralMemory tag → proceed Gate 3
276
92
 
277
93
  ## 🔙 DESIGN DEVIATION PROTOCOL
278
94
 
279
- Khi AI đang code (Gate 4) và phát hiện cần sửa schema khác approved design:
280
-
281
- ```
282
- 1. DỪNG CODE NGAY LẬP TỨC
283
- 2. Thông báo user:
284
- "Phát hiện cần thêm/sửa [field/table] ngoài thiết kế đã duyệt.
285
- Để tôi quay lại update design doc trước nhé."
286
- 3. Mở lại design doc
287
- 4. Highlight phần cần thay đổi + lý do
288
- 5. Yêu cầu user re-approve
289
- 6. Update marker: "## Status: Approved (Revision 2)"
290
- 7. Tiếp tục code
291
- ```
292
-
293
- ---
294
-
295
- ## 🗣️ Communication Style
296
-
297
- ```
298
- ❌ "Architecture document required. Please provide data model specification."
299
- ✅ "Đã hiểu yêu cầu! Giờ để tôi phác thảo cấu trúc database cho anh xem
300
- trước — kinh nghiệm cho thấy nếu chốt DB sớm sẽ tiết kiệm rất nhiều
301
- thời gian sửa lại sau."
302
-
303
- ❌ "Design review requires your explicit approval."
304
- ✅ "Anh xem thiết kế này có ổn không? Sửa gì cứ nói, tôi update lại.
305
- Chốt xong là bắt tay code luôn."
306
- ```
307
-
308
- ---
95
+ Khi đang code (Gate 4) và cần sửa schema khác approved:
96
+ 1. ⛔ DỪNG CODE
97
+ 2. Thông báo user → update design doc → re-approve
98
+ 3. Update marker: "Revision 2" tiếp tục code
309
99
 
310
100
  ## 🚫 Anti-Patterns
311
101
 
@@ -313,29 +103,25 @@ Khi AI đang code (Gate 4) và phát hiện cần sửa schema khác approved de
313
103
  never_do:
314
104
  - Tự approve design (user PHẢI approve)
315
105
  - Skip self-review checklist
316
- - Design quá chi tiết cho trivial features (orchestrator đã filter)
317
- - Bắt đầu code trước khi có approval marker
106
+ - Code trước khi approval marker
318
107
  - Phớt lờ TECH-SPEC.md constraints
319
108
 
320
109
  always_do:
321
110
  - Đọc ALL input sources trước khi design
322
- - Chạy self-review checklist 100%
323
111
  - Highlight trade-offs và concerns
324
- - Ghi lại decisions vào NeuralMemory
112
+ - Ghi decisions vào NeuralMemory
325
113
  - Kiểm tra consistency với existing schema
326
114
  ```
327
115
 
328
- ---
329
-
330
- ## 🧩 Skill Relationships
116
+ ## 🧩 Relationships
331
117
 
332
118
  ```
333
119
  TRIGGERED BY: orchestrator (Gate 2 check fail)
334
- DEPENDS ON: brainstorm-agent output (Gate 1 must pass first)
335
- FEEDS INTO: symphony-enforcer (Gate 3 reads design doc to create tasks)
336
- WORKS WITH: nm-memory-sync (store architectural decisions)
120
+ DEPENDS ON: brainstorm-agent output (Gate 1 must pass)
121
+ FEEDS INTO: symphony-enforcer (Gate 3)
122
+ WORKS WITH: nm-memory-sync
337
123
  ```
338
124
 
339
125
  ---
340
126
 
341
- *spec-gate v1.1Architecture & Data Design Gate for AWKit (Kiro Spec Integration)*
127
+ *spec-gate v1.2Modular Router Architecture*
@@ -0,0 +1,93 @@
1
+ # Architecture Design Templates & Review Protocol
2
+
3
+ ## Data Model Template
4
+
5
+ ```
6
+ Cho MỖI entity phát hiện từ spec:
7
+
8
+ TABLE/COLLECTION: <name>
9
+ ├── Fields:
10
+ │ ├── id: <type> (PK)
11
+ │ ├── field_1: <type> [NOT NULL | OPTIONAL]
12
+ │ ├── field_2: <type> [DEFAULT: <value>]
13
+ │ └── ...
14
+ ├── Indexes:
15
+ │ ├── idx_<name>_<field> (purpose)
16
+ │ └── ...
17
+ ├── Relationships:
18
+ │ ├── belongs_to: <table> (FK: <field>)
19
+ │ └── has_many: <table>
20
+ └── Constraints:
21
+ ├── UNIQUE: <fields>
22
+ └── CHECK: <condition>
23
+ ```
24
+
25
+ ## API Contract Template
26
+
27
+ ```
28
+ ENDPOINT: [METHOD] /api/<path>
29
+ ├── Purpose: <mô tả ngắn>
30
+ ├── Auth: <required | optional | public>
31
+ ├── Request:
32
+ │ ├── Headers: <required headers>
33
+ │ ├── Params: <path/query params>
34
+ │ └── Body: { field: type, ... }
35
+ ├── Response:
36
+ │ ├── 200: { field: type, ... }
37
+ │ ├── 400: { error: "validation message" }
38
+ │ └── 500: { error: "server error" }
39
+ └── Notes: <edge cases, rate limiting, etc.>
40
+ ```
41
+
42
+ ## State Machine Template
43
+
44
+ ```
45
+ STATE MACHINE: <name>
46
+ [initial] → [state_1] → [state_2] → [final]
47
+ ↓ ↓
48
+ [error] [cancelled]
49
+
50
+ Transitions:
51
+ initial → state_1: trigger=<event>, guard=<condition>
52
+ state_1 → state_2: trigger=<event>
53
+ any → cancelled: trigger=user_cancel
54
+ ```
55
+
56
+ ## Self-Review Checklist
57
+
58
+ ```yaml
59
+ checklist:
60
+ data_integrity:
61
+ - [ ] Mọi entity có Primary Key?
62
+ - [ ] Foreign Keys đúng direction?
63
+ - [ ] Không có circular dependencies?
64
+ - [ ] Cascade delete rules đã define?
65
+ performance:
66
+ - [ ] Indexes cho frequent queries?
67
+ - [ ] N+1 query potential identified?
68
+ - [ ] Pagination strategy cho list endpoints?
69
+ consistency:
70
+ - [ ] Chuẩn với .project-identity tech stack?
71
+ - [ ] Naming convention thống nhất?
72
+ - [ ] Date/time format thống nhất?
73
+ edge_cases:
74
+ - [ ] Concurrent access handling?
75
+ - [ ] Null/empty value handling?
76
+ - [ ] Soft delete vs hard delete?
77
+ - [ ] Offline-first sync strategy (nếu mobile)?
78
+ security:
79
+ - [ ] PII data identified + encrypted?
80
+ - [ ] Auth rules per endpoint?
81
+ - [ ] Input validation cho mọi user input?
82
+ ```
83
+
84
+ ## Multi-Role Architecture Review
85
+
86
+ 5 vai trò chuyên sâu để soát lỗi:
87
+ 1. **DBA:** Index? Normalize? N+1?
88
+ 2. **Backend Lead:** Reusable? Rate limit? Transaction boundaries?
89
+ 3. **Security Officer:** SQL Injection? Encrypt at rest/in transit? RBAC?
90
+ 4. **QA Automation:** Test data setup? Mock API/DB?
91
+ 5. **SRE/DevOps:** Scale? Migration downtime?
92
+
93
+ If P0/P1 issues → fix draft before presenting to user.