@leejungkiin/awkit 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/CHANGELOG.md +27 -0
- package/README.md +146 -0
- package/VERSION +1 -0
- package/bin/awf.js +549 -0
- package/bin/awk.js +1759 -0
- package/core/AGENTS.md +39 -0
- package/core/GEMINI.md +202 -0
- package/core/GEMINI.md.bak +244 -0
- package/core/orchestrator.md +58 -0
- package/package.json +46 -0
- package/schemas/brain.schema.json +342 -0
- package/schemas/preferences.schema.json +95 -0
- package/schemas/session.schema.json +112 -0
- package/skill-packs/neural-memory/README.md +111 -0
- package/skill-packs/neural-memory/pack.json +35 -0
- package/skill-packs/neural-memory/schemas/brain-snapshot.json +167 -0
- package/skill-packs/neural-memory/skills/nm-memory-audit/SKILL.md +157 -0
- package/skill-packs/neural-memory/skills/nm-memory-evolution/SKILL.md +202 -0
- package/skill-packs/neural-memory/skills/nm-memory-intake/SKILL.md +135 -0
- package/skill-packs/neural-memory/skills/nm-memory-sync/SKILL.md +184 -0
- package/skill-packs/neural-memory/workflows/nm-import.md +73 -0
- package/skill-packs/neural-memory/workflows/nm-recall.md +67 -0
- package/skill-packs/neural-memory/workflows/nm-snapshot.md +69 -0
- package/skills/adaptive-language/SKILL.md +189 -0
- package/skills/ambient-brain/SKILL.md +314 -0
- package/skills/ambient-brain/brain-router.md +185 -0
- package/skills/ambient-brain/brain-templates.md +201 -0
- package/skills/auto-save/SKILL.md +223 -0
- package/skills/awf-adaptive-language/SKILL.md +189 -0
- package/skills/awf-context-help/SKILL.md +180 -0
- package/skills/awf-error-translator/SKILL.md +153 -0
- package/skills/awf-session-restore/SKILL.md +270 -0
- package/skills/awf-version-tracker/SKILL.md +32 -0
- package/skills/awf-version-tracker/scripts/snapshot.sh +22 -0
- package/skills/beads-manager/SKILL.md +323 -0
- package/skills/brainstorm-agent/SKILL.md +295 -0
- package/skills/context-help/SKILL.md +180 -0
- package/skills/error-translator/SKILL.md +153 -0
- package/skills/ios-engineer/SKILL.md +101 -0
- package/skills/memory-sync/SKILL.md +378 -0
- package/skills/memory-sync/memory-router.md +185 -0
- package/skills/memory-sync/memory-templates.md +201 -0
- package/skills/orchestrator/SKILL.md +193 -0
- package/skills/session-restore/SKILL.md +240 -0
- package/templates/CODEBASE.md +80 -0
- package/templates/brain.example.json +321 -0
- package/templates/preferences.example.json +21 -0
- package/templates/project-identity/android.json +28 -0
- package/templates/project-identity/backend-nestjs.json +24 -0
- package/templates/project-identity/expo.json +27 -0
- package/templates/project-identity/ios.json +27 -0
- package/templates/project-identity/web-nextjs.json +24 -0
- package/templates/session.example.json +53 -0
- package/templates/specs/design-template.md +166 -0
- package/templates/specs/requirements-template.md +65 -0
- package/templates/specs/tasks-template.md +132 -0
- package/templates/structures/android.txt +10 -0
- package/templates/structures/backend-nestjs.txt +6 -0
- package/templates/structures/expo.txt +9 -0
- package/templates/structures/ios.txt +9 -0
- package/templates/structures/web-nextjs.txt +6 -0
- package/templates/workflow_dual_mode_template.md +87 -0
- package/workflows/_uncategorized/README.md +339 -0
- package/workflows/_uncategorized/ads-creative.md +357 -0
- package/workflows/_uncategorized/ads-full-optimization.md +308 -0
- package/workflows/_uncategorized/ads-plan.md +247 -0
- package/workflows/_uncategorized/ads-user-analysis.md +337 -0
- package/workflows/_uncategorized/skill-health.md +35 -0
- package/workflows/_uncategorized/skill-rollback.md +35 -0
- package/workflows/ads/admob.md +62 -0
- package/workflows/ads/ads-analyst.md +201 -0
- package/workflows/ads/ads-audit.md +106 -0
- package/workflows/ads/ads-optimize.md +97 -0
- package/workflows/ads/ads-targeting.md +241 -0
- package/workflows/ads/adsExpert.md +160 -0
- package/workflows/ads/smali-ads-config.md +400 -0
- package/workflows/ads/smali-ads-flow.md +331 -0
- package/workflows/ads/smali-ads-interstitial.md +377 -0
- package/workflows/ads/smali-ads-native.md +382 -0
- package/workflows/context/auto-execution-workflow.md +291 -0
- package/workflows/context/auto-implement.md +211 -0
- package/workflows/context/codebase-sync.md +163 -0
- package/workflows/context/logic-reasoning-workflow.md +260 -0
- package/workflows/context/next.md +195 -0
- package/workflows/context/recap.md +212 -0
- package/workflows/context/save-brain.md +285 -0
- package/workflows/context/user-intent-analysis-workflow.md +206 -0
- package/workflows/expert/codeExpert.md +126 -0
- package/workflows/expert/debugExpert.md +136 -0
- package/workflows/expert/planExpert.md +112 -0
- package/workflows/git/cloudflare-tunnel.md +135 -0
- package/workflows/git/git-commit-workflow.md +75 -0
- package/workflows/git/hotfix.md +357 -0
- package/workflows/git/release-notes.md +160 -0
- package/workflows/git/rollback.md +52 -0
- package/workflows/git/smart-git-ops.md +103 -0
- package/workflows/lifecycle/brainstorm.md +377 -0
- package/workflows/lifecycle/code.md +663 -0
- package/workflows/lifecycle/debug.md +116 -0
- package/workflows/lifecycle/deploy.md +95 -0
- package/workflows/lifecycle/init.md +152 -0
- package/workflows/lifecycle/master-code-workflow.md +300 -0
- package/workflows/lifecycle/migration.md +196 -0
- package/workflows/lifecycle/plan.md +91 -0
- package/workflows/lifecycle/refactor.md +165 -0
- package/workflows/lifecycle/run.md +52 -0
- package/workflows/lifecycle/test.md +91 -0
- package/workflows/meta/customize.md +346 -0
- package/workflows/meta/file-protection-rules.md +129 -0
- package/workflows/meta/help.html +350 -0
- package/workflows/meta/project-identity-enforcement.md +180 -0
- package/workflows/mobile/app-analysis.md +64 -0
- package/workflows/mobile/maestro-qa-workflow.md +470 -0
- package/workflows/mobile/maestro-test-workflow.md +84 -0
- package/workflows/mobile/structure-clean-architect.md +271 -0
- package/workflows/mobile/turbo-mobile-build.md +190 -0
- package/workflows/quality/accessibility-audit.md +311 -0
- package/workflows/quality/audit.md +217 -0
- package/workflows/quality/bug-hunter.md +243 -0
- package/workflows/quality/code-janitor.md +209 -0
- package/workflows/quality/code-quality-rules.md +132 -0
- package/workflows/quality/performance-audit.md +343 -0
- package/workflows/quality/project-audit.md +61 -0
- package/workflows/quality/self-healing-test.md +192 -0
- package/workflows/quality/ui-review.md +130 -0
- package/workflows/quality/ux-audit.md +213 -0
- package/workflows/quality/visual-debug.md +34 -0
- package/workflows/roles/oracle.md +267 -0
- package/workflows/roles/product-manager-workflow.md +52 -0
- package/workflows/roles/qa-engineer-workflow.md +41 -0
- package/workflows/roles/tech-lead-workflow.md +45 -0
- package/workflows/roles/ui-ux-designer-workflow.md +42 -0
- package/workflows/roles/vibe-coding-master-workflow.md +52 -0
- package/workflows/ui/app-screen-analyzer.md +152 -0
- package/workflows/ui/create-feature.md +332 -0
- package/workflows/ui/create-spec-architect.md +184 -0
- package/workflows/ui/design-to-ui.md +308 -0
- package/workflows/ui/ui-first-methodology.md +279 -0
- package/workflows/ui/visualize.md +298 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🤖 Tự động thực thi code từ Spec
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /auto-implement - Spec Executor
|
|
6
|
+
|
|
7
|
+
> **Role:** Antigravity Builder - Đọc specs, code tự động.
|
|
8
|
+
> **Input:** `docs/specs/[feature]/` (đã tạo bởi /design-feature)
|
|
9
|
+
> **Output:** Production-ready code
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Phase 0: Load Specs
|
|
14
|
+
|
|
15
|
+
### 0.1. Verify Specs Exist
|
|
16
|
+
// turbo
|
|
17
|
+
```bash
|
|
18
|
+
FEATURE=$1 # Pass feature name as argument
|
|
19
|
+
[ -d "docs/specs/$FEATURE" ] && echo "✅ Specs found" || echo "❌ No specs"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 0.2. Load All Spec Files
|
|
23
|
+
Đọc và parse:
|
|
24
|
+
1. `requirements.md` → Hiểu WHAT & WHY
|
|
25
|
+
2. `design.md` → Hiểu HOW (architecture, models, UI)
|
|
26
|
+
3. `bd list` → Hiểu execution plan (list tasks in JSON format for parsing)
|
|
27
|
+
|
|
28
|
+
### 0.3. Parse Tasks
|
|
29
|
+
Retrieve tasks using `bd list --json`:
|
|
30
|
+
- Extract task ID
|
|
31
|
+
- Extract description and body
|
|
32
|
+
- Extract requirements from body tags
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Phase 1: Execution Loop
|
|
37
|
+
|
|
38
|
+
### 1.1. For Each Uncompleted Task
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
FOR each task WHERE status = "[ ]":
|
|
42
|
+
1. READ task description
|
|
43
|
+
2. READ related design.md section
|
|
44
|
+
3. READ related requirements
|
|
45
|
+
4. GENERATE code
|
|
46
|
+
5. WRITE to specified file
|
|
47
|
+
6. VERIFY (syntax check)
|
|
48
|
+
7. MARK task as complete: `bd close [id]`
|
|
49
|
+
8. REPORT progress
|
|
50
|
+
END FOR
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 1.2. Execution Rules
|
|
54
|
+
|
|
55
|
+
**Sequential:** Thực hiện theo thứ tự A → B → C → D → E
|
|
56
|
+
|
|
57
|
+
**Context Awareness:**
|
|
58
|
+
- Đọc existing code trước khi modify
|
|
59
|
+
- Không duplicate logic đã có
|
|
60
|
+
- Reuse existing components/utils
|
|
61
|
+
|
|
62
|
+
**Quality Gates:**
|
|
63
|
+
- Mỗi task phải pass syntax check
|
|
64
|
+
- Nếu fail → stop và report, không continue
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Phase 2: Code Generation
|
|
69
|
+
|
|
70
|
+
### 2.1. Per Task Type
|
|
71
|
+
|
|
72
|
+
**type: logic** (Models, ViewModels, Services)
|
|
73
|
+
```swift
|
|
74
|
+
// Auto-generate based on design.md Data Models section
|
|
75
|
+
// Include: Codable, Identifiable, validation
|
|
76
|
+
// Follow: Clean Architecture patterns
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**type: ui** (Views, Components)
|
|
80
|
+
```swift
|
|
81
|
+
// Auto-generate based on Component Hierarchy
|
|
82
|
+
// Apply: Design tokens from design.md
|
|
83
|
+
// Include: Accessibility labels, animations
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**type: i18n** (Localization)
|
|
87
|
+
```swift
|
|
88
|
+
// Scan all created files
|
|
89
|
+
// Extract hardcoded strings
|
|
90
|
+
// Replace with Localized("key")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**type: test** (Unit Tests)
|
|
94
|
+
```swift
|
|
95
|
+
// Generate tests for ViewModels, Repositories
|
|
96
|
+
// Cover: Happy path, error cases
|
|
97
|
+
// Target: 80%+ coverage
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 2.2. Code Standards
|
|
101
|
+
|
|
102
|
+
Mọi code phải tuân thủ:
|
|
103
|
+
- [ ] No hardcoded strings (use localization)
|
|
104
|
+
- [ ] Error handling với do-catch
|
|
105
|
+
- [ ] Logging quan trọng actions
|
|
106
|
+
- [ ] Input validation
|
|
107
|
+
- [ ] Accessibility labels
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Phase 3: Progress Tracking
|
|
112
|
+
|
|
113
|
+
### 3.1. Update Status
|
|
114
|
+
Sau mỗi task hoàn thành:
|
|
115
|
+
```bash
|
|
116
|
+
bd close [id]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 3.2. Progress Report
|
|
120
|
+
```
|
|
121
|
+
📊 Implementation Progress: [feature]
|
|
122
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
123
|
+
Phase A: ██████████ 100% (2/2 tasks)
|
|
124
|
+
Phase B: ██████░░░░ 60% (3/5 tasks)
|
|
125
|
+
Phase C: ░░░░░░░░░░ 0% (0/2 tasks)
|
|
126
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
127
|
+
Overall: 45% complete
|
|
128
|
+
|
|
129
|
+
✅ Completed: A1, A2, B1, B2, B3
|
|
130
|
+
🔄 Current: B4 - Create Item Detail
|
|
131
|
+
⏳ Pending: B5, C1, C2, D1, D2, E1, E2
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Phase 4: Completion
|
|
137
|
+
|
|
138
|
+
### 4.1. Final Checklist
|
|
139
|
+
Khi tất cả tasks `[x]`:
|
|
140
|
+
- [ ] All requirements validated
|
|
141
|
+
- [ ] Build passes without errors
|
|
142
|
+
- [ ] No hardcoded strings
|
|
143
|
+
- [ ] Accessibility implemented
|
|
144
|
+
- [ ] Tests written and passing
|
|
145
|
+
|
|
146
|
+
### 4.2. Handover
|
|
147
|
+
```
|
|
148
|
+
✅ Feature [name] Implementation Complete!
|
|
149
|
+
|
|
150
|
+
📁 Files Created/Modified:
|
|
151
|
+
- Domain/Models/[Feature].swift
|
|
152
|
+
- Data/Repositories/[Feature]Repository.swift
|
|
153
|
+
- Presentation/[Feature]/[Feature]View.swift
|
|
154
|
+
- Presentation/[Feature]/[Feature]ViewModel.swift
|
|
155
|
+
|
|
156
|
+
📋 Requirements Validated:
|
|
157
|
+
- RQ-01 ✅
|
|
158
|
+
- RQ-02 ✅
|
|
159
|
+
|
|
160
|
+
🧪 Tests: 5 passed, 0 failed
|
|
161
|
+
|
|
162
|
+
Next Steps:
|
|
163
|
+
- /run to test on device
|
|
164
|
+
- /code-review before merge
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Error Handling
|
|
170
|
+
|
|
171
|
+
### Task Fails
|
|
172
|
+
```
|
|
173
|
+
❌ Task B2 Failed: [error message]
|
|
174
|
+
|
|
175
|
+
Context:
|
|
176
|
+
- File: Presentation/[Feature]/Components/ItemCard.swift
|
|
177
|
+
- Line: 45
|
|
178
|
+
- Error: Type 'ItemModel' has no member 'subtitle'
|
|
179
|
+
|
|
180
|
+
Suggested Fix:
|
|
181
|
+
- Check design.md for correct property names
|
|
182
|
+
- Update ItemModel or fix reference
|
|
183
|
+
|
|
184
|
+
Options:
|
|
185
|
+
1. [Fix and retry] - Auto-attempt fix
|
|
186
|
+
2. [Skip] - Continue to next task
|
|
187
|
+
3. [Stop] - Pause for manual intervention
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Recovery
|
|
191
|
+
- Tự động thử sửa lỗi đơn giản (missing import, typo)
|
|
192
|
+
- Nếu không sửa được → Stop và báo cáo chi tiết
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Usage
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Execute all pending tasks
|
|
200
|
+
/auto-implement user-profile
|
|
201
|
+
|
|
202
|
+
# Execute specific phase only
|
|
203
|
+
/auto-implement user-profile --phase=B
|
|
204
|
+
|
|
205
|
+
# Dry run (show what would be done)
|
|
206
|
+
/auto-implement user-profile --dry-run
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
**Success:** Code hoàn chỉnh, validated, ready for testing.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Đồng bộ CODEBASE.md với codebase thực tế — cập nhật delta, không rewrite toàn bộ
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /codebase-sync Workflow
|
|
6
|
+
|
|
7
|
+
> **Mục đích:** Giữ CODEBASE.md luôn up-to-date với codebase thực tế.
|
|
8
|
+
> **Nguyên tắc:** Chỉ append/update delta — không xóa thông tin cũ.
|
|
9
|
+
> **Trigger:** Gate 2 (file mới tạo), user gõ /codebase-sync, hoặc AI thấy outdated.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Triggers (Khi nào chạy)
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
AUTO triggers:
|
|
17
|
+
- Gate 2 hoàn thành + needs_codebase_sync = true trong session.json
|
|
18
|
+
- AI biết file không có trong CODEBASE.md (từ orchestrator W6 flag)
|
|
19
|
+
|
|
20
|
+
MANUAL trigger:
|
|
21
|
+
- User gõ: /codebase-sync
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Phase 1: Assess Current State
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# 1. Đọc CODEBASE.md hiện tại
|
|
30
|
+
cat CODEBASE.md
|
|
31
|
+
|
|
32
|
+
# 2. Check git: files changed/added gần đây (14 ngày)
|
|
33
|
+
git log --since="14 days ago" --name-only --pretty=format: | sort -u | grep -v '^$'
|
|
34
|
+
|
|
35
|
+
# 3. Lấy session file edits từ memory-sync W6
|
|
36
|
+
cat brain/session.json | grep files_touched_this_session
|
|
37
|
+
|
|
38
|
+
# 4. Check new files không có trong CODEBASE.md
|
|
39
|
+
# AI tự compare danh sách git + session với entries trong CODEBASE.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Output:**
|
|
43
|
+
```
|
|
44
|
+
📊 CODEBASE Sync Assessment:
|
|
45
|
+
- Files in CODEBASE.md: [N files documented]
|
|
46
|
+
- New/changed files (14d): [M files]
|
|
47
|
+
- Missing from CODEBASE.md: [K files listed]
|
|
48
|
+
- Last updated: [date from CODEBASE.md]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Phase 2: Generate Delta
|
|
54
|
+
|
|
55
|
+
Với mỗi file thiếu trong CODEBASE.md, AI tự suy luận:
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
for each missing_file:
|
|
59
|
+
1. Xác định layer:
|
|
60
|
+
- App/ → App Layer
|
|
61
|
+
- Core/Domain/ → Domain Layer
|
|
62
|
+
- Core/Data/ → Data Layer
|
|
63
|
+
- Core/Services/ → Services Layer
|
|
64
|
+
- Features/[X]/ → Features Layer
|
|
65
|
+
- Presentation/Views/ → Views
|
|
66
|
+
- Presentation/ViewModels/ → ViewModels
|
|
67
|
+
|
|
68
|
+
2. Xác định responsibility từ:
|
|
69
|
+
- Filename (AuthenticationViewModel → Auth UI logic)
|
|
70
|
+
- Directory (Core/Domain/UseCases → Business logic)
|
|
71
|
+
- Content (nếu cần, đọc file — chỉ khi không đủ context)
|
|
72
|
+
|
|
73
|
+
3. Generate entry:
|
|
74
|
+
- File: path/to/File.swift
|
|
75
|
+
- Layer: [layer name]
|
|
76
|
+
- Purpose: [1-line description]
|
|
77
|
+
- Key exports: [main class/struct/func]
|
|
78
|
+
|
|
79
|
+
4. Xác định section trong CODEBASE.md phù hợp để append
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Phase 3: Update CODEBASE.md
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
MO:
|
|
88
|
+
- APPEND vào đúng section, không xóa gì cũ
|
|
89
|
+
- Update "Last Updated" timestamp
|
|
90
|
+
- Nếu thêm feature mới → thêm section mới
|
|
91
|
+
|
|
92
|
+
Format mỗi entry thêm vào:
|
|
93
|
+
#### [FileName.swift]
|
|
94
|
+
**Layer:** [Layer name]
|
|
95
|
+
**Purpose:** [Description]
|
|
96
|
+
**Key class/struct:** `ClassName`
|
|
97
|
+
|
|
98
|
+
Footer update:
|
|
99
|
+
**Last Updated**: [current date]
|
|
100
|
+
**Sync:** Auto-updated via /codebase-sync
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Preview trước khi apply:**
|
|
104
|
+
```
|
|
105
|
+
📝 Sẽ thêm [K] entries vào CODEBASE.md:
|
|
106
|
+
+ Core/Services/PushNotificationService.swift → Services Layer
|
|
107
|
+
+ Features/WeeklyGoal/ViewModels/WeeklyGoalViewModel.swift → Features
|
|
108
|
+
+ Presentation/Views/Dashboard/CombinedDashboardHeader.swift → Views
|
|
109
|
+
|
|
110
|
+
Apply? [auto-yes nếu < 10 entries / confirm nếu lớn hơn]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Phase 4: Update Session State
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
// brain/session.json — reset sau khi sync
|
|
119
|
+
{
|
|
120
|
+
"codebase_last_synced": "2026-02-24T08:35:00Z",
|
|
121
|
+
"files_touched_this_session": [],
|
|
122
|
+
"needs_codebase_sync": false
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Output Summary
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
✅ CODEBASE.md Synced!
|
|
132
|
+
|
|
133
|
+
📊 Added: [K] new entries
|
|
134
|
+
📁 Sections updated: [list]
|
|
135
|
+
🕐 Last Updated: 2026-02-24
|
|
136
|
+
|
|
137
|
+
💡 Next: AI sẽ dùng CODEBASE.md mới trong session tiếp theo
|
|
138
|
+
→ Không cần scan cấu trúc thủ công nữa
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Error Handling
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
No CODEBASE.md found:
|
|
147
|
+
→ AI tạo mới từ đầu bằng cách scan project structure
|
|
148
|
+
→ Template dựa theo architecture trong .project-identity
|
|
149
|
+
|
|
150
|
+
No .git found:
|
|
151
|
+
→ Fallback: dùng session.json files_touched_this_session
|
|
152
|
+
→ Scan core directories thủ công (App/, Core/, Features/, Presentation/)
|
|
153
|
+
|
|
154
|
+
CODEBASE.md quá outdated (> 30 ngày):
|
|
155
|
+
→ Warn: "CODEBASE.md rất cũ, nên rebuild toàn bộ?"
|
|
156
|
+
→ Option A: Rebuild full (scan toàn bộ)
|
|
157
|
+
→ Option B: Chỉ update delta 14 ngày gần nhất
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
*codebase-sync v1.0 — Delta-based CODEBASE.md Synchronizer*
|
|
163
|
+
*Created by Kien AI*
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Quy trình suy luận logic để phân tích đặc trưng, đề xuất thông minh và phát hiện đặc trưng liên quan.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
category: workflow
|
|
5
|
+
priority: medium
|
|
6
|
+
triggers:
|
|
7
|
+
- "keywords: feature analysis, suggestions, recommendations"
|
|
8
|
+
- "context: product planning, feature ideation"
|
|
9
|
+
- "file_patterns: requirements.md, features.md"
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
track:
|
|
12
|
+
- quick
|
|
13
|
+
- method
|
|
14
|
+
- enterprise
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Logic Reasoning Workflow
|
|
18
|
+
|
|
19
|
+
## Core Logic Analysis
|
|
20
|
+
|
|
21
|
+
### Feature Analysis Framework
|
|
22
|
+
|
|
23
|
+
**Primary Analysis**:
|
|
24
|
+
- **Feature Identification**: Extract all visible and implied features
|
|
25
|
+
- **Feature Relationships**: Map dependencies and connections
|
|
26
|
+
- **Feature Gaps**: Identify missing functionality
|
|
27
|
+
- **Feature Redundancy**: Detect overlapping capabilities
|
|
28
|
+
|
|
29
|
+
**Secondary Analysis**:
|
|
30
|
+
- **User Journey Mapping**: Trace user paths through features
|
|
31
|
+
- **Business Logic Extraction**: Identify business rules and constraints
|
|
32
|
+
- **Technical Requirements**: Determine implementation needs
|
|
33
|
+
- **Integration Points**: Find external system connections
|
|
34
|
+
|
|
35
|
+
### Intelligent Suggestion Engine
|
|
36
|
+
|
|
37
|
+
**Pattern Recognition**:
|
|
38
|
+
- **Similar Features**: Identify features with similar functionality
|
|
39
|
+
- **Complementary Features**: Suggest features that enhance existing ones
|
|
40
|
+
- **Missing Features**: Recommend features based on user patterns
|
|
41
|
+
- **Optimization Opportunities**: Suggest improvements to existing features
|
|
42
|
+
|
|
43
|
+
**Context-Aware Suggestions**:
|
|
44
|
+
- **User Behavior Analysis**: Base suggestions on user interaction patterns
|
|
45
|
+
- **Industry Standards**: Suggest features common in similar applications
|
|
46
|
+
- **Technology Trends**: Recommend features based on current tech trends
|
|
47
|
+
- **Business Goals**: Align suggestions with business objectives
|
|
48
|
+
|
|
49
|
+
## Feature Connection Analysis
|
|
50
|
+
|
|
51
|
+
### Dependency Mapping
|
|
52
|
+
|
|
53
|
+
**Direct Dependencies**:
|
|
54
|
+
- **Data Dependencies**: Features that share data
|
|
55
|
+
- **Functional Dependencies**: Features that depend on each other's functionality
|
|
56
|
+
- **UI Dependencies**: Features that share UI components
|
|
57
|
+
- **API Dependencies**: Features that share API endpoints
|
|
58
|
+
|
|
59
|
+
**Indirect Dependencies**:
|
|
60
|
+
- **Workflow Dependencies**: Features that are part of the same user workflow
|
|
61
|
+
- **Business Dependencies**: Features that support the same business process
|
|
62
|
+
- **Technical Dependencies**: Features that share technical infrastructure
|
|
63
|
+
|
|
64
|
+
### Relationship Types
|
|
65
|
+
|
|
66
|
+
**Hierarchical Relationships**:
|
|
67
|
+
- **Parent-Child**: Main feature and sub-features
|
|
68
|
+
- **Master-Detail**: Master record and detail records
|
|
69
|
+
- **Category-Item**: Category and items within category
|
|
70
|
+
|
|
71
|
+
**Lateral Relationships**:
|
|
72
|
+
- **Peer Features**: Features at the same level
|
|
73
|
+
- **Complementary Features**: Features that enhance each other
|
|
74
|
+
- **Alternative Features**: Features that provide similar functionality
|
|
75
|
+
|
|
76
|
+
**Cross-Cutting Relationships**:
|
|
77
|
+
- **Authentication**: Features that require user authentication
|
|
78
|
+
- **Authorization**: Features that require specific permissions
|
|
79
|
+
- **Auditing**: Features that need audit trails
|
|
80
|
+
- **Notifications**: Features that trigger notifications
|
|
81
|
+
|
|
82
|
+
## AI Potential Analysis
|
|
83
|
+
|
|
84
|
+
### Machine Learning Opportunities
|
|
85
|
+
|
|
86
|
+
**Data Analysis Features**:
|
|
87
|
+
- **User Behavior Analytics**: Analyze user interaction patterns
|
|
88
|
+
- **Predictive Analytics**: Predict user actions and preferences
|
|
89
|
+
- **Recommendation Systems**: Suggest content or actions
|
|
90
|
+
- **Anomaly Detection**: Detect unusual patterns or behaviors
|
|
91
|
+
|
|
92
|
+
**Natural Language Processing**:
|
|
93
|
+
- **Chat Support**: Intelligent chat assistance
|
|
94
|
+
- **Content Analysis**: Analyze and categorize content
|
|
95
|
+
- **Sentiment Analysis**: Understand user sentiment
|
|
96
|
+
- **Language Translation**: Multi-language support
|
|
97
|
+
|
|
98
|
+
**Computer Vision**:
|
|
99
|
+
- **Image Recognition**: Identify objects in images
|
|
100
|
+
- **Document Processing**: Extract data from documents
|
|
101
|
+
- **Quality Control**: Visual quality assessment
|
|
102
|
+
- **Accessibility**: Visual accessibility features
|
|
103
|
+
|
|
104
|
+
### Automation Opportunities
|
|
105
|
+
|
|
106
|
+
**Process Automation**:
|
|
107
|
+
- **Workflow Automation**: Automate repetitive processes
|
|
108
|
+
- **Data Entry Automation**: Reduce manual data entry
|
|
109
|
+
- **Report Generation**: Automated report creation
|
|
110
|
+
- **Scheduling**: Intelligent scheduling and reminders
|
|
111
|
+
|
|
112
|
+
**Smart Features**:
|
|
113
|
+
- **Auto-completion**: Intelligent form completion
|
|
114
|
+
- **Smart Defaults**: Context-aware default values
|
|
115
|
+
- **Predictive Input**: Anticipate user input
|
|
116
|
+
- **Context Switching**: Automatic context adaptation
|
|
117
|
+
|
|
118
|
+
## Implementation Strategy
|
|
119
|
+
|
|
120
|
+
### Feature Prioritization Matrix
|
|
121
|
+
|
|
122
|
+
**Impact vs. Effort Analysis**:
|
|
123
|
+
- **High Impact, Low Effort**: Quick wins (implement first)
|
|
124
|
+
- **High Impact, High Effort**: Major projects (plan carefully)
|
|
125
|
+
- **Low Impact, Low Effort**: Fill-ins (implement when time allows)
|
|
126
|
+
- **Low Impact, High Effort**: Avoid (not worth the effort)
|
|
127
|
+
|
|
128
|
+
**User Value Assessment**:
|
|
129
|
+
- **Core Features**: Essential for basic functionality
|
|
130
|
+
- **Enhancement Features**: Improve user experience
|
|
131
|
+
- **Power User Features**: Advanced functionality
|
|
132
|
+
- **Nice-to-Have Features**: Optional improvements
|
|
133
|
+
|
|
134
|
+
### Technical Feasibility Analysis
|
|
135
|
+
|
|
136
|
+
**Implementation Complexity**:
|
|
137
|
+
- **Simple**: Straightforward implementation
|
|
138
|
+
- **Moderate**: Requires some planning and effort
|
|
139
|
+
- **Complex**: Requires significant development effort
|
|
140
|
+
- **Very Complex**: Requires major architectural changes
|
|
141
|
+
|
|
142
|
+
**Resource Requirements**:
|
|
143
|
+
- **Development Time**: Estimated development effort
|
|
144
|
+
- **Technical Skills**: Required technical expertise
|
|
145
|
+
- **Infrastructure**: Required infrastructure changes
|
|
146
|
+
- **Third-Party Services**: External service dependencies
|
|
147
|
+
|
|
148
|
+
## Suggestion Generation Process
|
|
149
|
+
|
|
150
|
+
### Input Analysis
|
|
151
|
+
|
|
152
|
+
**Feature Context**:
|
|
153
|
+
- **Current Features**: Analyze existing functionality
|
|
154
|
+
- **User Feedback**: Consider user suggestions and complaints
|
|
155
|
+
- **Usage Analytics**: Analyze feature usage patterns
|
|
156
|
+
- **Competitive Analysis**: Compare with similar applications
|
|
157
|
+
|
|
158
|
+
**Business Context**:
|
|
159
|
+
- **Business Goals**: Align with business objectives
|
|
160
|
+
- **Market Trends**: Consider market direction
|
|
161
|
+
- **User Needs**: Address user pain points
|
|
162
|
+
- **Revenue Impact**: Consider revenue potential
|
|
163
|
+
|
|
164
|
+
### Suggestion Categories
|
|
165
|
+
|
|
166
|
+
**Functional Suggestions**:
|
|
167
|
+
- **New Features**: Completely new functionality
|
|
168
|
+
- **Feature Enhancements**: Improvements to existing features
|
|
169
|
+
- **Feature Combinations**: Combining existing features
|
|
170
|
+
- **Feature Variations**: Different versions of existing features
|
|
171
|
+
|
|
172
|
+
**Technical Suggestions**:
|
|
173
|
+
- **Performance Improvements**: Optimize existing features
|
|
174
|
+
- **Security Enhancements**: Improve security measures
|
|
175
|
+
- **Scalability Improvements**: Handle increased load
|
|
176
|
+
- **Integration Opportunities**: Connect with external systems
|
|
177
|
+
|
|
178
|
+
**User Experience Suggestions**:
|
|
179
|
+
- **UI/UX Improvements**: Better user interface design
|
|
180
|
+
- **Workflow Optimizations**: Streamline user processes
|
|
181
|
+
- **Accessibility Features**: Improve accessibility
|
|
182
|
+
- **Personalization**: Customize user experience
|
|
183
|
+
|
|
184
|
+
### Suggestion Validation
|
|
185
|
+
|
|
186
|
+
**Feasibility Check**:
|
|
187
|
+
- **Technical Feasibility**: Can it be implemented?
|
|
188
|
+
- **Resource Availability**: Are resources available?
|
|
189
|
+
- **Timeline Constraints**: Does it fit the timeline?
|
|
190
|
+
- **Risk Assessment**: What are the risks?
|
|
191
|
+
|
|
192
|
+
**Value Assessment**:
|
|
193
|
+
- **User Value**: Does it provide user value?
|
|
194
|
+
- **Business Value**: Does it provide business value?
|
|
195
|
+
- **ROI Analysis**: What's the return on investment?
|
|
196
|
+
- **Competitive Advantage**: Does it provide competitive advantage?
|
|
197
|
+
|
|
198
|
+
## Advanced Reasoning Patterns
|
|
199
|
+
|
|
200
|
+
### Pattern Recognition Algorithms
|
|
201
|
+
|
|
202
|
+
**Feature Pattern Matching**:
|
|
203
|
+
- **Similarity Analysis**: Find similar features across applications
|
|
204
|
+
- **Usage Pattern Analysis**: Identify common usage patterns
|
|
205
|
+
- **Success Pattern Analysis**: Identify patterns in successful features
|
|
206
|
+
- **Failure Pattern Analysis**: Identify patterns in failed features
|
|
207
|
+
|
|
208
|
+
**Predictive Modeling**:
|
|
209
|
+
- **User Behavior Prediction**: Predict user actions
|
|
210
|
+
- **Feature Success Prediction**: Predict feature success
|
|
211
|
+
- **Resource Requirement Prediction**: Predict resource needs
|
|
212
|
+
- **Timeline Prediction**: Predict implementation timelines
|
|
213
|
+
|
|
214
|
+
### Context-Aware Reasoning
|
|
215
|
+
|
|
216
|
+
**Dynamic Context Adaptation**:
|
|
217
|
+
- **User Context**: Adapt to user preferences and behavior
|
|
218
|
+
- **Business Context**: Adapt to business requirements
|
|
219
|
+
- **Technical Context**: Adapt to technical constraints
|
|
220
|
+
- **Market Context**: Adapt to market conditions
|
|
221
|
+
|
|
222
|
+
**Multi-Dimensional Analysis**:
|
|
223
|
+
- **User Perspective**: Analyze from user viewpoint
|
|
224
|
+
- **Business Perspective**: Analyze from business viewpoint
|
|
225
|
+
- **Technical Perspective**: Analyze from technical viewpoint
|
|
226
|
+
- **Market Perspective**: Analyze from market viewpoint
|
|
227
|
+
|
|
228
|
+
## Quality Assurance
|
|
229
|
+
|
|
230
|
+
### Suggestion Quality Metrics
|
|
231
|
+
|
|
232
|
+
**Relevance Score**:
|
|
233
|
+
- **User Relevance**: How relevant to users?
|
|
234
|
+
- **Business Relevance**: How relevant to business?
|
|
235
|
+
- **Technical Relevance**: How technically sound?
|
|
236
|
+
- **Market Relevance**: How relevant to market?
|
|
237
|
+
|
|
238
|
+
**Feasibility Score**:
|
|
239
|
+
- **Implementation Feasibility**: Can it be implemented?
|
|
240
|
+
- **Resource Feasibility**: Are resources available?
|
|
241
|
+
- **Timeline Feasibility**: Does it fit timeline?
|
|
242
|
+
- **Risk Feasibility**: Are risks acceptable?
|
|
243
|
+
|
|
244
|
+
### Continuous Improvement
|
|
245
|
+
|
|
246
|
+
**Feedback Integration**:
|
|
247
|
+
- **User Feedback**: Incorporate user feedback
|
|
248
|
+
- **Stakeholder Feedback**: Incorporate stakeholder feedback
|
|
249
|
+
- **Technical Feedback**: Incorporate technical feedback
|
|
250
|
+
- **Market Feedback**: Incorporate market feedback
|
|
251
|
+
|
|
252
|
+
**Learning and Adaptation**:
|
|
253
|
+
- **Success Analysis**: Analyze successful suggestions
|
|
254
|
+
- **Failure Analysis**: Analyze failed suggestions
|
|
255
|
+
- **Pattern Learning**: Learn from patterns
|
|
256
|
+
- **Algorithm Improvement**: Improve suggestion algorithms
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
**Success Criteria**: Accurate feature analysis, relevant suggestions, intelligent recommendations, and continuous improvement through learning and adaptation.
|