@leejungkiin/awkit 1.4.2 → 1.5.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/README.md +32 -9
- package/bin/awk.js +464 -87
- package/bin/claude-generators.js +3 -1
- package/bin/cline-generators.js +3 -1
- package/bin/codex-generators.js +7 -2
- package/core/orchestrator.md +17 -3
- package/core/skill-runtime-manifest.json +37 -0
- package/package.json +2 -2
- package/skill-packs/creator-studio/README.md +19 -0
- package/skill-packs/creator-studio/pack.json +10 -0
- package/skill-packs/marketing/README.md +64 -0
- package/skill-packs/marketing/pack.json +37 -0
- package/skill-packs/mobile-android/README.md +16 -0
- package/skill-packs/mobile-android/pack.json +10 -0
- package/skill-packs/mobile-ios/README.md +22 -0
- package/skill-packs/mobile-ios/pack.json +16 -0
- package/skill-packs/neural-memory/pack.json +8 -2
- package/skill-packs/superpowers/pack.json +1 -0
- package/skill-packs/superpowers/skills/single-flow-task-execution/SKILL.md +59 -358
- package/skill-packs/superpowers/skills/writing-skills/SKILL.md +60 -654
- package/skill-packs/superpowers/skills/writing-skills/examples/anti-rationalization.md +75 -0
- package/skill-packs/superpowers/skills/writing-skills/examples/cso-optimization.md +67 -0
- package/skill-packs/superpowers/skills/writing-skills/examples/tdd-for-skills.md +63 -0
- package/skills/CATALOG.md +49 -44
- package/skills/brainstorm-agent/SKILL.md +55 -315
- package/skills/brainstorm-agent/templates/brief-template.md +76 -0
- package/skills/codex-conductor/SKILL.md +55 -259
- package/skills/codex-conductor/examples/prompt-templates.md +72 -0
- package/skills/module-spec-writer/SKILL.md +38 -365
- package/skills/module-spec-writer/examples/port-migration-mode.md +40 -0
- package/skills/module-spec-writer/templates/module-spec-template.md +118 -0
- package/skills/orchestrator/SKILL.md +17 -8
- package/skills/single-flow-task-execution/SKILL.md +56 -363
- package/skills/single-flow-task-execution/examples/workflow-example.md +91 -0
- package/skills/smali-to-kotlin/SKILL.md +23 -416
- package/skills/smali-to-kotlin/examples/getting-started/tech-stack.md +58 -0
- package/skills/smali-to-kotlin/examples/pipeline/data-ui-parity.md +118 -0
- package/skills/smali-to-kotlin/examples/pipeline/scanner-and-bootstrap.md +106 -0
- package/skills/smali-to-swift/SKILL.md +18 -621
- package/skills/smali-to-swift/examples/getting-started/tech-stack.md +72 -0
- package/skills/smali-to-swift/examples/getting-started/toolchain.md +32 -0
- package/skills/smali-to-swift/examples/pipeline/core-logic.md +45 -0
- package/skills/smali-to-swift/examples/pipeline/data-layer.md +76 -0
- package/skills/smali-to-swift/examples/pipeline/framework-scanner.md +73 -0
- package/skills/smali-to-swift/examples/pipeline/project-bootstrap.md +76 -0
- package/skills/smali-to-swift/examples/pipeline/sdk-integration.md +66 -0
- package/skills/smali-to-swift/examples/pipeline/ui-viewmodel.md +96 -0
- package/skills/smali-to-swift/references/objc-to-swift-mapping.md +57 -0
- package/skills/spec-gate/SKILL.md +51 -265
- package/skills/spec-gate/templates/design-templates.md +93 -0
- package/skills/symphony-enforcer/SKILL.md +24 -555
- package/skills/symphony-enforcer/examples/startup-protocol.md +92 -0
- package/skills/symphony-enforcer/examples/task-completion.md +100 -0
- package/skills/symphony-enforcer/examples/three-phase.md +107 -0
- package/skills/symphony-enforcer/examples/trigger-points.md +99 -0
- package/skills/symphony-orchestrator/SKILL.md +1 -1
- package/skills/writing-skills/SKILL.md +82 -70
- package/skills/writing-skills/examples/anti-rationalization.md +53 -0
- package/skills/writing-skills/examples/cso-optimization.md +52 -0
- package/skills/writing-skills/examples/tdd-for-skills.md +48 -0
- package/templates/help.html +447 -0
- package/skills/memory-sync/SKILL.md +0 -424
- package/skills/memory-sync/memory-router.md +0 -185
- package/skills/memory-sync/memory-templates.md +0 -201
|
@@ -8,7 +8,7 @@ description: >-
|
|
|
8
8
|
Hỗ trợ auto-detect .kiro/specs modules để bypass khi IDE đã tạo specs.
|
|
9
9
|
metadata:
|
|
10
10
|
stage: core
|
|
11
|
-
version: "1.
|
|
11
|
+
version: "1.2"
|
|
12
12
|
tags: [gate, spec, module, product-spec, documentation, core, kiro]
|
|
13
13
|
requires: orchestrator
|
|
14
14
|
agent: Spec Writer
|
|
@@ -21,22 +21,12 @@ activation_keywords:
|
|
|
21
21
|
- "screen inventory"
|
|
22
22
|
- "feature spec"
|
|
23
23
|
- "product spec"
|
|
24
|
-
- "mô tả app"
|
|
25
|
-
- "document modules"
|
|
26
24
|
---
|
|
27
25
|
|
|
28
|
-
# Module Spec Writer v1.
|
|
26
|
+
# Module Spec Writer v1.2 — Gate 1.5: Product Specification (Router)
|
|
29
27
|
|
|
30
|
-
> **Purpose:** Tạo tài liệu
|
|
31
|
-
>
|
|
32
|
-
> kỹ thuật (DB/API). Đảm bảo AI và user có shared understanding về "app làm gì"
|
|
33
|
-
> trước khi bàn "app xây thế nào".
|
|
34
|
-
>
|
|
35
|
-
> **Problem it solves:**
|
|
36
|
-
> - "Nhảy thẳng vào code mà chưa ai mô tả rõ app có bao nhiêu màn hình"
|
|
37
|
-
> - "Port app từ iOS sang Android mà không ai document chi tiết app gốc"
|
|
38
|
-
|
|
39
|
-
---
|
|
28
|
+
> **Purpose:** Tạo tài liệu product-level cho từng module (screens, flows, rules)
|
|
29
|
+
> TRƯỚC KHI thiết kế kỹ thuật. Đảm bảo shared understanding "app làm gì".
|
|
40
30
|
|
|
41
31
|
## ⚠️ SCOPE CLARITY
|
|
42
32
|
|
|
@@ -45,39 +35,31 @@ activation_keywords:
|
|
|
45
35
|
| Mô tả screens, user flows, business rules per module | Thiết kế DB/API (việc của spec-gate) |
|
|
46
36
|
| Tạo screen inventory cho toàn app | Viết code |
|
|
47
37
|
| Document validation rules & edge cases | Track tasks (việc của symphony-enforcer) |
|
|
48
|
-
| Scan existing codebase để auto-generate spec
|
|
49
|
-
| Yêu cầu user approve module spec | Deploy |
|
|
50
|
-
|
|
51
|
-
---
|
|
38
|
+
| Scan existing codebase để auto-generate spec | Brainstorm ý tưởng (việc của brainstorm-agent) |
|
|
52
39
|
|
|
53
|
-
##
|
|
40
|
+
## 📋 Topic Index — Load deep dives as needed
|
|
54
41
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
| Topic | Khi nào load | File |
|
|
43
|
+
|-------|-------------|------|
|
|
44
|
+
| Module Spec Template | Khi viết spec cho 1 module | `templates/module-spec-template.md` |
|
|
45
|
+
| Port/Migration Mode | Khi port iOS↔Android hoặc có .kiro/specs | `examples/port-migration-mode.md` |
|
|
59
46
|
|
|
60
|
-
|
|
47
|
+
## 🚀 ACTIVATION
|
|
61
48
|
|
|
62
49
|
```yaml
|
|
63
50
|
mandatory_when:
|
|
64
51
|
- complexity: COMPLEX (score ≥6)
|
|
65
52
|
- project_type: port/migration (iOS→Android, Android→iOS)
|
|
66
53
|
- module_count: >3 modules in BRIEF.md
|
|
67
|
-
- explicit_request: user asks for module documentation
|
|
68
54
|
|
|
69
55
|
skip_when:
|
|
70
56
|
- complexity: TRIVIAL or MODERATE
|
|
71
57
|
- module_count: ≤3 AND not port/migration
|
|
72
58
|
- user_override: "skip spec" or "bỏ qua spec"
|
|
73
|
-
- kiro_specs: .kiro/specs/ chứa ≥2 module folders
|
|
59
|
+
- kiro_specs: .kiro/specs/ chứa ≥2 module folders
|
|
74
60
|
→ AUTO-SKIP: "Kiro module specs detected. Gate 1.5 AUTO-PASS."
|
|
75
|
-
→ Load .kiro/specs/<module>/requirements.md làm module specs
|
|
76
|
-
→ Chuyển thẳng Gate 2
|
|
77
61
|
```
|
|
78
62
|
|
|
79
|
-
---
|
|
80
|
-
|
|
81
63
|
## 📋 INPUT REQUIREMENTS
|
|
82
64
|
|
|
83
65
|
```
|
|
@@ -87,373 +69,64 @@ REQUIRED:
|
|
|
87
69
|
→ .project-identity (projectId, techStack)
|
|
88
70
|
|
|
89
71
|
OPTIONAL:
|
|
90
|
-
→ CODEBASE.md
|
|
91
|
-
→ KnowledgeItems (existing module documentation)
|
|
92
|
-
→ NeuralMemory context (previous decisions)
|
|
93
|
-
→ Source codebase (for port/migration — iOS/Android source files)
|
|
72
|
+
→ CODEBASE.md, KnowledgeItems, NeuralMemory context
|
|
94
73
|
```
|
|
95
74
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
## 🔄 PROCESS
|
|
75
|
+
## 🔄 PROCESS (6 Phases)
|
|
99
76
|
|
|
100
77
|
### Phase 1: Module Discovery
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
🔍 KIRO CHECK (HIGHEST PRIORITY):
|
|
106
|
-
A0) Scan .kiro/specs/ folder:
|
|
107
|
-
- Nếu tồn tại ≥2 module folders (mỗi folder có requirements.md):
|
|
108
|
-
→ AUTO-PASS Gate 1.5
|
|
109
|
-
→ Load từng .kiro/specs/<module>/requirements.md làm module spec
|
|
110
|
-
→ Thông báo:
|
|
111
|
-
"🔍 Phát hiện .kiro/specs/ với [N] module specs từ IDE Kiro.
|
|
112
|
-
Modules: [list module names]
|
|
113
|
-
Gate 1.5 AUTO-PASS. Chuyển thẳng Gate 2 (Architecture)."
|
|
114
|
-
→ SKIP Phase 2-6, không cần user approve (Kiro đã chốt)
|
|
115
|
-
→ Lưu vào NeuralMemory: "Kiro module specs loaded: <list>"
|
|
116
|
-
- Nếu không có → tiếp tục các check bình thường bên dưới
|
|
117
|
-
|
|
118
|
-
FALLBACK SOURCES:
|
|
119
|
-
A) Có BRIEF.md → Extract module list từ "TÍNH NĂNG" section
|
|
120
|
-
B) Có existing codebase (port project) → Scan source code structure:
|
|
121
|
-
- iOS: Xcode project groups, Views/, Features/ folders
|
|
122
|
-
- Android: feature/ packages, activities, fragments
|
|
123
|
-
- Đọc CODEBASE.md nếu có
|
|
124
|
-
C) Cả hai → Cross-reference BRIEF với source code
|
|
125
|
-
|
|
126
|
-
OUTPUT: Danh sách modules cần spec:
|
|
127
|
-
Module 1: [name] — [1-line description]
|
|
128
|
-
Module 2: [name] — [1-line description]
|
|
129
|
-
...
|
|
130
|
-
|
|
131
|
-
PRESENT cho user:
|
|
132
|
-
"📋 Em tìm thấy [N] modules cần document:
|
|
133
|
-
1. [Module A] — [description]
|
|
134
|
-
2. [Module B] — [description]
|
|
135
|
-
...
|
|
136
|
-
Anh xem có đúng/đủ không? Bổ sung/bỏ bớt cứ nói nhé."
|
|
137
|
-
```
|
|
78
|
+
- Kiro check first (.kiro/specs/ → AUTO-PASS nếu ≥2 modules)
|
|
79
|
+
- Fallback: BRIEF.md → extract modules | Scan source code (port)
|
|
80
|
+
- Present danh sách modules → user confirm
|
|
138
81
|
|
|
139
82
|
### Phase 2: Per-Module Spec Generation
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
Quy trình:
|
|
145
|
-
1. Gather context:
|
|
146
|
-
- BRIEF.md → extract relevant features
|
|
147
|
-
- Source code (nếu port) → scan screens, ViewModels, models
|
|
148
|
-
- KnowledgeItems → extract existing documentation
|
|
149
|
-
- NeuralMemory → previous decisions
|
|
150
|
-
|
|
151
|
-
2. Generate spec draft using template (see TEMPLATE section)
|
|
152
|
-
|
|
153
|
-
3. Self-review checklist (per module):
|
|
154
|
-
- [ ] Tất cả screens đã liệt kê?
|
|
155
|
-
- [ ] Happy path flow rõ ràng?
|
|
156
|
-
- [ ] Error/edge cases đã cover?
|
|
157
|
-
- [ ] Business rules explicit (không implicit)?
|
|
158
|
-
- [ ] Data contracts rõ input/output?
|
|
159
|
-
- [ ] Acceptance criteria testable?
|
|
160
|
-
```
|
|
83
|
+
- Gather context (BRIEF, source code, KI, NeuralMemory)
|
|
84
|
+
- Generate spec theo template → `templates/module-spec-template.md`
|
|
85
|
+
- Self-review checklist: screens đủ? flows rõ? edge cases?
|
|
161
86
|
|
|
162
87
|
### Phase 3: Cross-Module Consistency Check
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
1. Dependency graph:
|
|
168
|
-
- Module A depends on Module B? Đã ghi trong cả 2 specs?
|
|
169
|
-
- Circular dependency? → Cảnh báo
|
|
170
|
-
|
|
171
|
-
2. Shared concepts:
|
|
172
|
-
- User model xuất hiện ở nhiều modules? → Consistent fields?
|
|
173
|
-
- Navigation flow giữa modules logic?
|
|
174
|
-
|
|
175
|
-
3. Coverage check:
|
|
176
|
-
- Mọi feature trong BRIEF.md đã có module spec?
|
|
177
|
-
- Mọi screen trong source code (port) đã có trong inventory?
|
|
178
|
-
```
|
|
88
|
+
- Dependency graph (circular? missing cross-refs?)
|
|
89
|
+
- Shared concepts consistent?
|
|
90
|
+
- Coverage vs BRIEF.md / source code
|
|
179
91
|
|
|
180
92
|
### Phase 4: Multi-Role Review (AI Simulated)
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
Trước khi gửi bản thảo cho user, AI BẮT BUỘC đóng vai 6 vai trò sau để review chéo:
|
|
184
|
-
1. Tech Lead: Tính khả thi kỹ thuật? Có edge cases nào chưa cover?
|
|
185
|
-
2. PM: Có phục vụ đúng mục tiêu kinh doanh? Scope creep?
|
|
186
|
-
3. UX Designer: Flow có mượt không? Quá nhiều bước? Có nghĩ đến empty states/error states?
|
|
187
|
-
4. QA Engineer: Acceptance Criteria đã test được chưa (SMART)? Có đủ rõ ràng?
|
|
188
|
-
5. Security/Privacy: Có rò rỉ PII? Có checklist GDPR chưa (riêng đối với data y tế)?
|
|
189
|
-
6. DevOps: Có cản trở CI/CD hoặc scaling không?
|
|
190
|
-
```
|
|
93
|
+
6 roles: Tech Lead, PM, UX Designer, QA, Security, DevOps
|
|
191
94
|
|
|
192
95
|
### Phase 5: Present & Approval
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
Present cho user với format:
|
|
196
|
-
|
|
197
|
-
────────────────────────────────────
|
|
198
|
-
📋 MODULE SPECIFICATIONS: <Project Name>
|
|
199
|
-
────────────────────────────────────
|
|
200
|
-
|
|
201
|
-
Đã tạo [N] module specs:
|
|
202
|
-
|
|
203
|
-
| # | Module | Screens | Flows | Status |
|
|
204
|
-
|---|--------|---------|-------|--------|
|
|
205
|
-
| 1 | [name] | [count] | [count] | Draft |
|
|
206
|
-
| 2 | [name] | [count] | [count] | Draft |
|
|
207
|
-
|
|
208
|
-
## Cross-Module Notes
|
|
209
|
-
- [Note 1: shared concern]
|
|
210
|
-
- [Note 2: dependency]
|
|
211
|
-
|
|
212
|
-
────────────────────────────────────
|
|
213
|
-
⏳ Anh review từng file spec nhé. Sửa gì cứ nói.
|
|
214
|
-
Chốt hết thì mình chuyển sang thiết kế kỹ thuật (Gate 2).
|
|
215
|
-
────────────────────────────────────
|
|
216
|
-
```
|
|
96
|
+
Show summary table → user review → approve
|
|
217
97
|
|
|
218
98
|
### Phase 6: Write & Store
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
1. Tạo folder: docs/specs/modules/ (nếu chưa có)
|
|
224
|
-
|
|
225
|
-
2. Write files:
|
|
226
|
-
docs/specs/modules/<module-name>_spec.md (cho mỗi module)
|
|
227
|
-
docs/specs/modules/MODULE_INDEX.md (index file)
|
|
228
|
-
|
|
229
|
-
3. Thêm approval marker cho mỗi file:
|
|
230
|
-
## Status: Approved
|
|
231
|
-
**Approved by:** User
|
|
232
|
-
**Approved at:** <ISO date>
|
|
233
|
-
|
|
234
|
-
4. Lưu vào NeuralMemory:
|
|
235
|
-
nmem_remember(
|
|
236
|
-
content="Module specs approved for <project>. Modules: <list>. Total screens: <N>",
|
|
237
|
-
type="decision",
|
|
238
|
-
tags=["module-spec", "<projectId>"]
|
|
239
|
-
)
|
|
240
|
-
|
|
241
|
-
5. Proceed → orchestrator re-checks Gate 1.5 → PASS → Gate 2
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
## 📝 MODULE SPEC TEMPLATE
|
|
247
|
-
|
|
248
|
-
```markdown
|
|
249
|
-
# 📋 Module Spec: [Module Name]
|
|
250
|
-
|
|
251
|
-
**Project:** [project-name]
|
|
252
|
-
**Version:** 1.0
|
|
253
|
-
**Created:** [date]
|
|
254
|
-
**Status:** Draft | Approved
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Overview
|
|
259
|
-
[1-2 câu mô tả mục đích module này trong app]
|
|
260
|
-
|
|
261
|
-
## Dependencies
|
|
262
|
-
- **Depends on:** [list modules this depends on]
|
|
263
|
-
- **Used by:** [list modules that depend on this]
|
|
264
|
-
- **Shared services:** [auth, analytics, etc.]
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## Screen Inventory
|
|
269
|
-
|
|
270
|
-
| # | Screen Name | Type | Key Elements | Notes |
|
|
271
|
-
|---|------------|------|--------------|-------|
|
|
272
|
-
| 1 | [name] | [full/modal/sheet/overlay/tab] | [main UI components] | [optional] |
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
## User Flows
|
|
277
|
-
|
|
278
|
-
### Flow 1: [Happy Path Name]
|
|
279
|
-
**Entry:** [how user gets here]
|
|
280
|
-
**Steps:**
|
|
281
|
-
1. User [action] → Screen [A]
|
|
282
|
-
2. User [action] → System [response]
|
|
283
|
-
3. System [shows/navigates] → Screen [B]
|
|
284
|
-
4. **End state:** [what user sees/has achieved]
|
|
285
|
-
|
|
286
|
-
### Flow 2: [Alternative Path / Error Path]
|
|
287
|
-
**Trigger:** [what causes this path]
|
|
288
|
-
**Steps:**
|
|
289
|
-
1. ...
|
|
290
|
-
|
|
291
|
-
---
|
|
292
|
-
|
|
293
|
-
## Business Rules
|
|
294
|
-
|
|
295
|
-
| ID | Rule | Details |
|
|
296
|
-
|----|------|---------|
|
|
297
|
-
| BR-01 | [rule name] | [full description] |
|
|
298
|
-
| BR-02 | [rule name] | [full description] |
|
|
299
|
-
|
|
300
|
-
---
|
|
301
|
-
|
|
302
|
-
## Validation Rules
|
|
303
|
-
|
|
304
|
-
| Field | Condition | Error Message | Screen |
|
|
305
|
-
|-------|-----------|---------------|--------|
|
|
306
|
-
| [field] | [rule] | [message] | [where] |
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## Data Contracts
|
|
311
|
-
|
|
312
|
-
### Input (consumed by this module)
|
|
313
|
-
| Data | Type | Source | Required |
|
|
314
|
-
|------|------|--------|----------|
|
|
315
|
-
| [name] | [type] | [module/API/local] | [yes/no] |
|
|
316
|
-
|
|
317
|
-
### Output (produced by this module)
|
|
318
|
-
| Data | Type | Destination | Trigger |
|
|
319
|
-
|------|------|-------------|---------|
|
|
320
|
-
| [name] | [type] | [module/API/local] | [when] |
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## Edge Cases & Error States
|
|
325
|
-
|
|
326
|
-
| ID | Scenario | Expected Behavior |
|
|
327
|
-
|----|----------|-------------------|
|
|
328
|
-
| EC-01 | [scenario] | [what should happen] |
|
|
329
|
-
| EC-02 | [scenario] | [what should happen] |
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Acceptance Criteria
|
|
334
|
-
- [ ] [measurable criterion 1]
|
|
335
|
-
- [ ] [measurable criterion 2]
|
|
336
|
-
- [ ] [measurable criterion 3]
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
---
|
|
340
|
-
|
|
341
|
-
## 📄 MODULE INDEX TEMPLATE
|
|
342
|
-
|
|
343
|
-
```markdown
|
|
344
|
-
# 📚 Module Index: [Project Name]
|
|
345
|
-
|
|
346
|
-
**Total modules:** [N]
|
|
347
|
-
**Created:** [date]
|
|
348
|
-
**Status:** [All Approved / Some Draft]
|
|
349
|
-
|
|
350
|
-
| # | Module | Spec File | Screens | Status |
|
|
351
|
-
|---|--------|-----------|---------|--------|
|
|
352
|
-
| 1 | [name] | [link to spec file] | [count] | Approved |
|
|
353
|
-
| 2 | [name] | [link to spec file] | [count] | Draft |
|
|
354
|
-
|
|
355
|
-
## Dependency Graph
|
|
356
|
-
[Module A] → [Module B] → [Module C]
|
|
357
|
-
[Module D] → [Module B]
|
|
358
|
-
|
|
359
|
-
## Shared Services
|
|
360
|
-
- **Auth:** Used by [modules]
|
|
361
|
-
- **Analytics:** Used by [modules]
|
|
362
|
-
- **AI/ML:** Used by [modules]
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## 🔄 PORT/MIGRATION MODE
|
|
368
|
-
|
|
369
|
-
Khi project là port/migration (iOS→Android, Android→iOS):
|
|
370
|
-
|
|
371
|
-
```
|
|
372
|
-
SPECIAL BEHAVIOR:
|
|
373
|
-
|
|
374
|
-
🔍 KIRO-FIRST CHECK (luôn chạy trước):
|
|
375
|
-
0. Scan .kiro/specs/ → nếu có module folders với requirements.md:
|
|
376
|
-
→ Dùng Kiro specs làm source of truth
|
|
377
|
-
→ SKIP source code scanning (Kiro đã tổng hợp)
|
|
378
|
-
→ Cross-reference với source code CHỈ để verify completeness
|
|
379
|
-
|
|
380
|
-
FALLBACK (khi không có .kiro/specs):
|
|
381
|
-
1. Scan source codebase TRƯỚC → auto-detect modules
|
|
382
|
-
2. Đọc existing KnowledgeItems cho source project
|
|
383
|
-
3. Cross-reference với BRIEF.md để catch missing modules
|
|
384
|
-
4. Generate specs từ source code structure + knowledge
|
|
385
|
-
|
|
386
|
-
AUTO-DETECTION SOURCES:
|
|
387
|
-
iOS:
|
|
388
|
-
→ Xcode project navigator groups
|
|
389
|
-
→ Features/ or Presentation/Views/ folders
|
|
390
|
-
→ NavigationStack/TabView structure
|
|
391
|
-
→ Existing CODEBASE.md
|
|
392
|
-
|
|
393
|
-
Android:
|
|
394
|
-
→ feature/ packages
|
|
395
|
-
→ Navigation graph (nav_graph.xml)
|
|
396
|
-
→ Activity/Fragment inventory
|
|
397
|
-
→ Existing CODEBASE.md
|
|
398
|
-
|
|
399
|
-
Kiro:
|
|
400
|
-
→ .kiro/specs/<module>/requirements.md (pre-generated)
|
|
401
|
-
→ .kiro/specs/<module>/design.md (pre-generated)
|
|
402
|
-
→ .kiro/specs/<module>/tasks.md (pre-generated)
|
|
403
|
-
|
|
404
|
-
OUTPUT: Pre-filled module specs with data from source code OR Kiro specs
|
|
405
|
-
→ User chỉ cần review + approve, không cần viết từ đầu
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
---
|
|
409
|
-
|
|
410
|
-
## 🗣️ Communication Style
|
|
411
|
-
|
|
412
|
-
```
|
|
413
|
-
❌ "Module specification documents are required before proceeding."
|
|
414
|
-
✅ "Trước khi bắt tay vào thiết kế kỹ thuật, để em mô tả chi tiết
|
|
415
|
-
từng module — screens nào, flow ra sao — để anh em hiểu rõ cùng nhau."
|
|
416
|
-
|
|
417
|
-
❌ "Please review 8 specification documents."
|
|
418
|
-
✅ "Em đã viết xong spec cho 8 modules. Anh xem từng cái nhé,
|
|
419
|
-
sửa gì cứ nói, chốt hết rồi mình chuyển sang thiết kế DB/API."
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
---
|
|
99
|
+
- Write to `docs/specs/modules/<module-name>_spec.md`
|
|
100
|
+
- Create `MODULE_INDEX.md`
|
|
101
|
+
- Tag NeuralMemory → proceed to Gate 2
|
|
423
102
|
|
|
424
103
|
## 🚫 Anti-Patterns
|
|
425
104
|
|
|
426
105
|
```yaml
|
|
427
106
|
never_do:
|
|
428
107
|
- Tự approve module specs (user PHẢI approve)
|
|
429
|
-
- Viết spec quá vắn tắt (< 5 screens → cảnh báo
|
|
108
|
+
- Viết spec quá vắn tắt (< 5 screens → cảnh báo)
|
|
430
109
|
- Skip cross-module consistency check
|
|
431
110
|
- Trộn lẫn product spec với technical spec (DB/API)
|
|
432
|
-
- Bắt đầu Gate 2 khi còn
|
|
433
|
-
- Force Gate 1.5 cho TRIVIAL tasks
|
|
111
|
+
- Bắt đầu Gate 2 khi còn "Draft"
|
|
434
112
|
|
|
435
113
|
always_do:
|
|
436
|
-
- Show module list cho user confirm TRƯỚC
|
|
437
|
-
-
|
|
438
|
-
-
|
|
439
|
-
- Scan source code khi port/migration
|
|
114
|
+
- Show module list cho user confirm TRƯỚC
|
|
115
|
+
- Cross-module consistency check SAU khi viết hết
|
|
116
|
+
- Acceptance criteria phải testable (SMART)
|
|
117
|
+
- Scan source code khi port/migration
|
|
440
118
|
- Tag specs vào NeuralMemory
|
|
441
119
|
```
|
|
442
120
|
|
|
443
|
-
---
|
|
444
|
-
|
|
445
121
|
## 🧩 Skill Relationships
|
|
446
122
|
|
|
447
123
|
```
|
|
448
124
|
TRIGGERED BY: orchestrator (Gate 1.5 check fail)
|
|
449
|
-
DEPENDS ON: brainstorm-agent output (Gate 1 must pass
|
|
450
|
-
FEEDS INTO: spec-gate (Gate 2 reads module specs
|
|
451
|
-
WORKS WITH:
|
|
452
|
-
- nm-memory-sync (store module decisions)
|
|
453
|
-
- gitnexus-intelligence (scan source codebase structure)
|
|
454
|
-
- KnowledgeItems (read existing project documentation)
|
|
125
|
+
DEPENDS ON: brainstorm-agent output (Gate 1 must pass)
|
|
126
|
+
FEEDS INTO: spec-gate (Gate 2 reads module specs)
|
|
127
|
+
WORKS WITH: nm-memory-sync, gitnexus-intelligence, KnowledgeItems
|
|
455
128
|
```
|
|
456
129
|
|
|
457
130
|
---
|
|
458
131
|
|
|
459
|
-
*module-spec-writer v1.
|
|
132
|
+
*module-spec-writer v1.2 — Modular Router Architecture*
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Port/Migration Mode
|
|
2
|
+
|
|
3
|
+
Khi project là port/migration (iOS→Android, Android→iOS):
|
|
4
|
+
|
|
5
|
+
## Special Behavior
|
|
6
|
+
|
|
7
|
+
### Kiro-First Check (luôn chạy trước)
|
|
8
|
+
0. Scan `.kiro/specs/` → nếu có module folders với `requirements.md`:
|
|
9
|
+
- Dùng Kiro specs làm source of truth
|
|
10
|
+
- SKIP source code scanning (Kiro đã tổng hợp)
|
|
11
|
+
- Cross-reference với source code CHỈ để verify completeness
|
|
12
|
+
|
|
13
|
+
### Fallback (khi không có .kiro/specs)
|
|
14
|
+
1. Scan source codebase TRƯỚC → auto-detect modules
|
|
15
|
+
2. Đọc existing KnowledgeItems cho source project
|
|
16
|
+
3. Cross-reference với BRIEF.md để catch missing modules
|
|
17
|
+
4. Generate specs từ source code structure + knowledge
|
|
18
|
+
|
|
19
|
+
## Auto-Detection Sources
|
|
20
|
+
|
|
21
|
+
### iOS
|
|
22
|
+
- Xcode project navigator groups
|
|
23
|
+
- `Features/` or `Presentation/Views/` folders
|
|
24
|
+
- NavigationStack/TabView structure
|
|
25
|
+
- Existing CODEBASE.md
|
|
26
|
+
|
|
27
|
+
### Android
|
|
28
|
+
- `feature/` packages
|
|
29
|
+
- Navigation graph (`nav_graph.xml`)
|
|
30
|
+
- Activity/Fragment inventory
|
|
31
|
+
- Existing CODEBASE.md
|
|
32
|
+
|
|
33
|
+
### Kiro
|
|
34
|
+
- `.kiro/specs/<module>/requirements.md` (pre-generated)
|
|
35
|
+
- `.kiro/specs/<module>/design.md` (pre-generated)
|
|
36
|
+
- `.kiro/specs/<module>/tasks.md` (pre-generated)
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
Pre-filled module specs with data from source code OR Kiro specs.
|
|
40
|
+
User chỉ cần review + approve, không cần viết từ đầu.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Module Spec Template
|
|
2
|
+
|
|
3
|
+
```markdown
|
|
4
|
+
# 📋 Module Spec: [Module Name]
|
|
5
|
+
|
|
6
|
+
**Project:** [project-name]
|
|
7
|
+
**Version:** 1.0
|
|
8
|
+
**Created:** [date]
|
|
9
|
+
**Status:** Draft | Approved
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
[1-2 câu mô tả mục đích module này trong app]
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
- **Depends on:** [list modules this depends on]
|
|
18
|
+
- **Used by:** [list modules that depend on this]
|
|
19
|
+
- **Shared services:** [auth, analytics, etc.]
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Screen Inventory
|
|
24
|
+
|
|
25
|
+
| # | Screen Name | Type | Key Elements | Notes |
|
|
26
|
+
|---|------------|------|--------------|-------|
|
|
27
|
+
| 1 | [name] | [full/modal/sheet/overlay/tab] | [main UI components] | [optional] |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## User Flows
|
|
32
|
+
|
|
33
|
+
### Flow 1: [Happy Path Name]
|
|
34
|
+
**Entry:** [how user gets here]
|
|
35
|
+
**Steps:**
|
|
36
|
+
1. User [action] → Screen [A]
|
|
37
|
+
2. User [action] → System [response]
|
|
38
|
+
3. System [shows/navigates] → Screen [B]
|
|
39
|
+
4. **End state:** [what user sees/has achieved]
|
|
40
|
+
|
|
41
|
+
### Flow 2: [Alternative Path / Error Path]
|
|
42
|
+
**Trigger:** [what causes this path]
|
|
43
|
+
**Steps:**
|
|
44
|
+
1. ...
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Business Rules
|
|
49
|
+
|
|
50
|
+
| ID | Rule | Details |
|
|
51
|
+
|----|------|---------|
|
|
52
|
+
| BR-01 | [rule name] | [full description] |
|
|
53
|
+
| BR-02 | [rule name] | [full description] |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Validation Rules
|
|
58
|
+
|
|
59
|
+
| Field | Condition | Error Message | Screen |
|
|
60
|
+
|-------|-----------|---------------|--------|
|
|
61
|
+
| [field] | [rule] | [message] | [where] |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Data Contracts
|
|
66
|
+
|
|
67
|
+
### Input (consumed by this module)
|
|
68
|
+
| Data | Type | Source | Required |
|
|
69
|
+
|------|------|--------|----------|
|
|
70
|
+
| [name] | [type] | [module/API/local] | [yes/no] |
|
|
71
|
+
|
|
72
|
+
### Output (produced by this module)
|
|
73
|
+
| Data | Type | Destination | Trigger |
|
|
74
|
+
|------|------|-------------|---------|
|
|
75
|
+
| [name] | [type] | [module/API/local] | [when] |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Edge Cases & Error States
|
|
80
|
+
|
|
81
|
+
| ID | Scenario | Expected Behavior |
|
|
82
|
+
|----|----------|-------------------|
|
|
83
|
+
| EC-01 | [scenario] | [what should happen] |
|
|
84
|
+
| EC-02 | [scenario] | [what should happen] |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Acceptance Criteria
|
|
89
|
+
- [ ] [measurable criterion 1]
|
|
90
|
+
- [ ] [measurable criterion 2]
|
|
91
|
+
- [ ] [measurable criterion 3]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
# Module Index Template
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
# 📚 Module Index: [Project Name]
|
|
100
|
+
|
|
101
|
+
**Total modules:** [N]
|
|
102
|
+
**Created:** [date]
|
|
103
|
+
**Status:** [All Approved / Some Draft]
|
|
104
|
+
|
|
105
|
+
| # | Module | Spec File | Screens | Status |
|
|
106
|
+
|---|--------|-----------|---------|--------|
|
|
107
|
+
| 1 | [name] | [link to spec file] | [count] | Approved |
|
|
108
|
+
| 2 | [name] | [link to spec file] | [count] | Draft |
|
|
109
|
+
|
|
110
|
+
## Dependency Graph
|
|
111
|
+
[Module A] → [Module B] → [Module C]
|
|
112
|
+
[Module D] → [Module B]
|
|
113
|
+
|
|
114
|
+
## Shared Services
|
|
115
|
+
- **Auth:** Used by [modules]
|
|
116
|
+
- **Analytics:** Used by [modules]
|
|
117
|
+
- **AI/ML:** Used by [modules]
|
|
118
|
+
```
|
|
@@ -42,10 +42,24 @@ ads_intent:
|
|
|
42
42
|
action: Suggest `/ads-audit` or `/adsExpert`
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
### 3. Skill Pack Check
|
|
45
|
+
### 3. Lean Runtime + Skill Pack Check
|
|
46
46
|
```
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
Default runtime is intentionally lean. Domain-heavy skills should be enabled on demand.
|
|
48
|
+
|
|
49
|
+
If user request involves iOS / Swift / Xcode / App Clip / SwiftUI
|
|
50
|
+
→ Suggest: "awkit enable-pack mobile-ios"
|
|
51
|
+
|
|
52
|
+
If user request involves Android / Kotlin / Compose / AdMob / APK reverse engineering
|
|
53
|
+
→ Suggest: "awkit enable-pack mobile-android"
|
|
54
|
+
|
|
55
|
+
If user request involves ASO / App Store marketing / ASA / competitor tracking / ratings
|
|
56
|
+
→ Suggest: "awkit enable-pack marketing"
|
|
57
|
+
|
|
58
|
+
If user request involves sprite generation / LucyLab TTS / short-form video production
|
|
59
|
+
→ Suggest: "awkit enable-pack creator-studio"
|
|
60
|
+
|
|
61
|
+
If user request involves NeuralMemory audits / intake / evolution workflows
|
|
62
|
+
→ Suggest: "awkit enable-pack neural-memory"
|
|
49
63
|
```
|
|
50
64
|
|
|
51
65
|
### 4. Fallback
|
|
@@ -54,10 +68,5 @@ No match → Ask clarifying question (max 2 times)
|
|
|
54
68
|
Still unclear → Suggest `/help`
|
|
55
69
|
```
|
|
56
70
|
|
|
57
|
-
### 5. Post-Action Rules
|
|
58
|
-
```
|
|
59
|
-
Build hoàn tất thành công (không có lỗi) → Tự động chạy git commit.
|
|
60
|
-
```
|
|
61
|
-
|
|
62
71
|
## Auto-Activation
|
|
63
72
|
This skill is always active. It runs as the first layer before any other processing.
|