@leejungkiin/awkit 1.0.7 → 1.0.9
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/core/GEMINI.md.bak +168 -181
- package/package.json +2 -2
- package/schemas/brain-snapshot.json +167 -0
- package/skills/CATALOG.md +70 -0
- package/skills/beads-manager/SKILL.md +20 -1
- package/skills/memory-sync/SKILL.md +20 -2
- package/skills/nm-memory-audit/SKILL.md +157 -0
- package/skills/nm-memory-evolution/SKILL.md +202 -0
- package/skills/nm-memory-intake/SKILL.md +135 -0
- package/skills/nm-memory-sync/SKILL.md +184 -0
- package/skills/orchestrator/SKILL.md +41 -50
- package/skills/schemas/brain-snapshot.json +167 -0
- package/skills/skills/nm-memory-audit/SKILL.md +157 -0
- package/skills/skills/nm-memory-evolution/SKILL.md +202 -0
- package/skills/skills/nm-memory-intake/SKILL.md +135 -0
- package/skills/skills/nm-memory-sync/SKILL.md +184 -0
- package/skills/smali-to-kotlin/SKILL.md +331 -85
- package/skills/smali-to-kotlin/phase-0-discovery.md +93 -94
- package/skills/smali-to-kotlin/phase-1-architecture.md +67 -58
- package/skills/smali-to-kotlin/phase-2-blueprint.md +228 -0
- package/skills/smali-to-kotlin/phase-3-build.md +248 -0
- package/skills/smali-to-kotlin/templates/app-map.md +101 -0
- package/skills/smali-to-kotlin/templates/architecture.md +142 -0
- package/skills/smali-to-kotlin/templates/blueprint.md +145 -0
- package/skills/smali-to-swift/SKILL.md +532 -91
- package/skills/smali-to-swift/phase-0-discovery.md +101 -118
- package/skills/smali-to-swift/phase-1-architecture.md +62 -67
- package/skills/smali-to-swift/phase-2-blueprint.md +173 -0
- package/skills/smali-to-swift/phase-3-build.md +257 -0
- package/skills/smali-to-swift/templates/app-map.md +82 -0
- package/skills/smali-to-swift/templates/architecture.md +97 -0
- package/skills/smali-to-swift/templates/blueprint.md +82 -0
- package/skills/workflows/nm-import.md +73 -0
- package/skills/workflows/nm-recall.md +67 -0
- package/skills/workflows/nm-snapshot.md +69 -0
- package/workflows/_uncategorized/nm-import.md +73 -0
- package/workflows/_uncategorized/nm-recall.md +67 -0
- package/workflows/_uncategorized/nm-snapshot.md +69 -0
- package/workflows/_uncategorized/reverse-android-build.md +222 -0
- package/workflows/_uncategorized/reverse-android-design.md +139 -0
- package/workflows/_uncategorized/reverse-android-discover.md +150 -0
- package/workflows/_uncategorized/reverse-android-scan.md +158 -0
- package/workflows/_uncategorized/reverse-android.md +143 -0
- package/workflows/_uncategorized/reverse-ios-build.md +240 -0
- package/workflows/_uncategorized/reverse-ios-design.md +112 -0
- package/workflows/_uncategorized/reverse-ios-discover.md +120 -0
- package/workflows/_uncategorized/reverse-ios-scan.md +155 -0
- package/workflows/_uncategorized/reverse-ios.md +152 -0
- package/skills/adaptive-language/SKILL.md +0 -189
- package/skills/ambient-brain/SKILL.md +0 -314
- package/skills/ambient-brain/brain-router.md +0 -185
- package/skills/ambient-brain/brain-templates.md +0 -201
- package/skills/context-help/SKILL.md +0 -180
- package/skills/error-translator/SKILL.md +0 -153
- package/skills/session-restore/SKILL.md +0 -240
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
# Brain Entry Templates
|
|
2
|
-
|
|
3
|
-
> Các template chuẩn để lưu vào brain/ — dùng cho cả auto-save và manual /save-brain.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Template 1: Decision (brain/decisions/)
|
|
8
|
-
|
|
9
|
-
**Filename:** `brain/decisions/YYYY-MM-DD-[slug].md`
|
|
10
|
-
|
|
11
|
-
```markdown
|
|
12
|
-
---
|
|
13
|
-
date: 2026-02-22
|
|
14
|
-
type: decision
|
|
15
|
-
topic: [brief topic, e.g., "Database choice for neural-brain"]
|
|
16
|
-
feature: [which feature/project this belongs to]
|
|
17
|
-
tags: [tech, architecture, database, ...]
|
|
18
|
-
salience: 0.90
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
# Decision: [Topic]
|
|
22
|
-
|
|
23
|
-
## What was decided
|
|
24
|
-
[Clear statement of the decision]
|
|
25
|
-
|
|
26
|
-
## Why this approach
|
|
27
|
-
[Rationale — key reasons]
|
|
28
|
-
|
|
29
|
-
## Alternatives considered
|
|
30
|
-
- **[Option A]**: [Why rejected]
|
|
31
|
-
- **[Option B]**: [Why rejected]
|
|
32
|
-
|
|
33
|
-
## Trade-offs
|
|
34
|
-
- ✅ [Pro 1]
|
|
35
|
-
- ✅ [Pro 2]
|
|
36
|
-
- ⚠️ [Con/caveat]
|
|
37
|
-
|
|
38
|
-
## Context
|
|
39
|
-
[Additional context: task ID, feature, constraints]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Template 2: Solution (brain/solutions/)
|
|
45
|
-
|
|
46
|
-
**Filename:** `brain/solutions/YYYY-MM-DD-[slug].md`
|
|
47
|
-
|
|
48
|
-
```markdown
|
|
49
|
-
---
|
|
50
|
-
date: 2026-02-22
|
|
51
|
-
type: solution
|
|
52
|
-
error_pattern: [e.g., "TypeError: Cannot read property of undefined"]
|
|
53
|
-
files_affected: [e.g., "activation.js, store.js"]
|
|
54
|
-
tags: [javascript, sqlite, null-check, ...]
|
|
55
|
-
salience: 0.85
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
# Solution: [Error Pattern]
|
|
59
|
-
|
|
60
|
-
## The Error
|
|
61
|
-
```
|
|
62
|
-
[Paste exact error or describe the bug]
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Root Cause
|
|
66
|
-
[Why this happened — 1-2 sentences]
|
|
67
|
-
|
|
68
|
-
## The Fix
|
|
69
|
-
[Step-by-step or code snippet showing the solution]
|
|
70
|
-
|
|
71
|
-
```js
|
|
72
|
-
// Before (broken)
|
|
73
|
-
code here
|
|
74
|
-
|
|
75
|
-
// After (fixed)
|
|
76
|
-
code here
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## How to Prevent
|
|
80
|
-
[Rule or pattern to avoid this in future]
|
|
81
|
-
|
|
82
|
-
## Context
|
|
83
|
-
[What feature/task was being worked on when this occurred]
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Template 3: Architecture (brain/decisions/)
|
|
89
|
-
|
|
90
|
-
**Filename:** `brain/decisions/arch-[feature]-[date].md`
|
|
91
|
-
|
|
92
|
-
```markdown
|
|
93
|
-
---
|
|
94
|
-
date: 2026-02-22
|
|
95
|
-
type: architecture
|
|
96
|
-
feature: [feature name, e.g., "neural-brain"]
|
|
97
|
-
tags: [architecture, design, ...]
|
|
98
|
-
salience: 0.95
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
# Architecture: [Feature Name]
|
|
102
|
-
|
|
103
|
-
## Overview
|
|
104
|
-
[Brief description of what was designed]
|
|
105
|
-
|
|
106
|
-
## Structure
|
|
107
|
-
```
|
|
108
|
-
[directory tree or component diagram]
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Key Decisions
|
|
112
|
-
1. [Decision 1 + rationale]
|
|
113
|
-
2. [Decision 2 + rationale]
|
|
114
|
-
3. [Decision 3 + rationale]
|
|
115
|
-
|
|
116
|
-
## Tech Choices
|
|
117
|
-
| Component | Choice | Reason |
|
|
118
|
-
|-----------|--------|--------|
|
|
119
|
-
| [Layer] | [Tech] | [Why] |
|
|
120
|
-
|
|
121
|
-
## Data Flow
|
|
122
|
-
[How data flows through the system]
|
|
123
|
-
|
|
124
|
-
## Open Questions
|
|
125
|
-
- [ ] [Question to resolve later]
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Template 4: Session (brain/session.json)
|
|
131
|
-
|
|
132
|
-
**Auto-updated by ambient-brain skill.**
|
|
133
|
-
|
|
134
|
-
```json
|
|
135
|
-
{
|
|
136
|
-
"last_updated": "2026-02-22T16:56:00+07:00",
|
|
137
|
-
"working_on": {
|
|
138
|
-
"project": "main-awf",
|
|
139
|
-
"feature": "neural-brain + ambient-brain skill",
|
|
140
|
-
"phase": "implementation",
|
|
141
|
-
"current_task_id": null,
|
|
142
|
-
"current_files": ["skills/ambient-brain/SKILL.md"]
|
|
143
|
-
},
|
|
144
|
-
"recent_decisions": [
|
|
145
|
-
{
|
|
146
|
-
"ref": "decisions/2026-02-22-use-better-sqlite3.md",
|
|
147
|
-
"summary": "Use better-sqlite3 for neural brain storage"
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
"recent_solutions": [],
|
|
151
|
-
"active_context": {
|
|
152
|
-
"neural_brain_port": "Planning phase - studying Python source",
|
|
153
|
-
"ambient_brain": "Implementing skill files"
|
|
154
|
-
},
|
|
155
|
-
"completed_milestones": [],
|
|
156
|
-
"context_checkpoints": []
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Template 5: Active Plans (brain/active_plans.json)
|
|
163
|
-
|
|
164
|
-
```json
|
|
165
|
-
{
|
|
166
|
-
"plans": [
|
|
167
|
-
{
|
|
168
|
-
"id": "neural-brain-nodejs-port",
|
|
169
|
-
"title": "Port neural-memory to Node.js for main-awf",
|
|
170
|
-
"status": "planning",
|
|
171
|
-
"phases": [
|
|
172
|
-
{ "id": "p1", "name": "Study Python source", "status": "done" },
|
|
173
|
-
{ "id": "p2", "name": "Build SQLite schema", "status": "next" },
|
|
174
|
-
{ "id": "p3", "name": "Core data structures", "status": "pending" },
|
|
175
|
-
{ "id": "p4", "name": "Spreading activation engine", "status": "pending" },
|
|
176
|
-
{ "id": "p5", "name": "Public API integration", "status": "pending" }
|
|
177
|
-
],
|
|
178
|
-
"created": "2026-02-22",
|
|
179
|
-
"last_updated": "2026-02-22"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"id": "ambient-brain-skill",
|
|
183
|
-
"title": "Ambient Brain Sync skill for AWF",
|
|
184
|
-
"status": "implementing",
|
|
185
|
-
"phases": [
|
|
186
|
-
{ "id": "p1", "name": "Design & brainstorm", "status": "done" },
|
|
187
|
-
{ "id": "p2", "name": "Create skill files", "status": "in_progress" },
|
|
188
|
-
{ "id": "p3", "name": "Update GEMINI.md", "status": "next" },
|
|
189
|
-
{ "id": "p4", "name": "Deploy to antigravity", "status": "pending" },
|
|
190
|
-
{ "id": "p5", "name": "Test with real workflow", "status": "pending" }
|
|
191
|
-
],
|
|
192
|
-
"created": "2026-02-22",
|
|
193
|
-
"last_updated": "2026-02-22"
|
|
194
|
-
}
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
*brain-templates v1.0.0 — Standard formats for consistent brain storage*
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: awf-context-help
|
|
3
|
-
description: >-
|
|
4
|
-
Context-aware help based on current workflow state. Keywords: help, what,
|
|
5
|
-
how, confused, stuck, lost, guide, tutorial, explain.
|
|
6
|
-
Activates on /help or when user asks questions.
|
|
7
|
-
version: 1.0.0
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# AWF Context Help
|
|
11
|
-
|
|
12
|
-
Trợ giúp thông minh dựa trên context hiện tại.
|
|
13
|
-
|
|
14
|
-
## Trigger Conditions
|
|
15
|
-
|
|
16
|
-
**Activates when:**
|
|
17
|
-
- User runs `/help`
|
|
18
|
-
- User types "?", "giúp", "help", "làm sao"
|
|
19
|
-
- User seems confused (repeated errors, long pause)
|
|
20
|
-
|
|
21
|
-
## Execution Logic
|
|
22
|
-
|
|
23
|
-
### Step 1: Read Context
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
context = {}
|
|
27
|
-
|
|
28
|
-
if exists(".brain/session.json"):
|
|
29
|
-
context.workflow = session.working_on.feature
|
|
30
|
-
context.task = session.working_on.task
|
|
31
|
-
context.status = session.working_on.status
|
|
32
|
-
context.pending = session.pending_tasks
|
|
33
|
-
|
|
34
|
-
if exists(".brain/brain.json"):
|
|
35
|
-
context.project = brain.project.name
|
|
36
|
-
context.tech = brain.tech_stack
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Step 2: Detect State
|
|
40
|
-
|
|
41
|
-
| State | Detection | Response |
|
|
42
|
-
|-------|-----------|----------|
|
|
43
|
-
| `no_project` | No .brain/ folder | Show onboarding |
|
|
44
|
-
| `planning` | workflow contains "plan" | Planning help |
|
|
45
|
-
| `coding` | workflow contains "code" | Coding help |
|
|
46
|
-
| `debugging` | workflow contains "debug" | Debug help |
|
|
47
|
-
| `deploying` | workflow contains "deploy" | Deploy help |
|
|
48
|
-
| `stuck` | status = "blocked" or pending > 5 | Stuck help |
|
|
49
|
-
| `idle` | No active workflow | General help |
|
|
50
|
-
|
|
51
|
-
### Step 3: Show Contextual Help
|
|
52
|
-
|
|
53
|
-
## Help Templates
|
|
54
|
-
|
|
55
|
-
### No Project State
|
|
56
|
-
```
|
|
57
|
-
🆕 Chưa có dự án
|
|
58
|
-
|
|
59
|
-
Bạn có thể:
|
|
60
|
-
1. /brainstorm - Bàn ý tưởng trước
|
|
61
|
-
2. /init - Tạo dự án mới
|
|
62
|
-
3. Mô tả ý tưởng cho em nghe
|
|
63
|
-
|
|
64
|
-
Em sẽ hướng dẫn từng bước!
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Planning State
|
|
68
|
-
```
|
|
69
|
-
📋 Đang lập kế hoạch: {context.workflow}
|
|
70
|
-
|
|
71
|
-
Bạn có thể:
|
|
72
|
-
1. Tiếp tục plan hiện tại
|
|
73
|
-
2. /code - Bắt đầu code phase đầu tiên
|
|
74
|
-
3. Hỏi em về cách thiết kế
|
|
75
|
-
|
|
76
|
-
💡 Mẹo: Plan tốt = Code nhanh hơn!
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Coding State
|
|
80
|
-
```
|
|
81
|
-
💻 Đang code: {context.task}
|
|
82
|
-
Status: {context.status}
|
|
83
|
-
|
|
84
|
-
Bạn có thể:
|
|
85
|
-
1. Tiếp tục code
|
|
86
|
-
2. /test - Kiểm tra code vừa viết
|
|
87
|
-
3. /debug - Nếu gặp lỗi
|
|
88
|
-
4. /save-brain - Lưu tiến độ
|
|
89
|
-
|
|
90
|
-
💡 Pending tasks: {context.pending.length}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Debugging State
|
|
94
|
-
```
|
|
95
|
-
🔧 Đang debug: {context.task}
|
|
96
|
-
|
|
97
|
-
Bạn có thể:
|
|
98
|
-
1. Mô tả lỗi chi tiết hơn
|
|
99
|
-
2. Paste error message
|
|
100
|
-
3. /code - Quay lại code sau khi fix
|
|
101
|
-
|
|
102
|
-
💡 Mẹo: Copy paste lỗi giúp em hiểu nhanh hơn!
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Deploying State
|
|
106
|
-
```
|
|
107
|
-
🚀 Đang deploy: {context.workflow}
|
|
108
|
-
|
|
109
|
-
Bạn có thể:
|
|
110
|
-
1. Tiếp tục deploy process
|
|
111
|
-
2. /rollback - Quay về bản trước nếu lỗi
|
|
112
|
-
3. Kiểm tra logs sau deploy
|
|
113
|
-
|
|
114
|
-
⚠️ Nhớ test kỹ trước khi deploy production!
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Stuck State
|
|
118
|
-
```
|
|
119
|
-
😅 Có vẻ bạn đang bị kẹt
|
|
120
|
-
|
|
121
|
-
Thử những cách này:
|
|
122
|
-
1. /recap - Xem lại đang làm gì
|
|
123
|
-
2. /debug - Nếu có lỗi
|
|
124
|
-
3. Nghỉ 5 phút rồi quay lại
|
|
125
|
-
4. Hỏi em cụ thể vấn đề
|
|
126
|
-
|
|
127
|
-
💡 {context.pending.length} tasks đang chờ.
|
|
128
|
-
Có thể tạm skip task khó, làm cái khác trước?
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Idle/General State
|
|
132
|
-
```
|
|
133
|
-
👋 Em có thể giúp gì?
|
|
134
|
-
|
|
135
|
-
Lệnh phổ biến:
|
|
136
|
-
┌─────────────────────────────────────┐
|
|
137
|
-
│ /next │ Gợi ý việc tiếp theo │
|
|
138
|
-
│ /recap │ Nhớ lại context │
|
|
139
|
-
│ /brainstorm │ Bàn ý tưởng mới │
|
|
140
|
-
│ /plan │ Lập kế hoạch │
|
|
141
|
-
│ /code │ Viết code │
|
|
142
|
-
└─────────────────────────────────────┘
|
|
143
|
-
|
|
144
|
-
Hoặc hỏi em bất cứ điều gì!
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Adaptive Language
|
|
148
|
-
|
|
149
|
-
Help responses adapt to `technical_level`:
|
|
150
|
-
|
|
151
|
-
**newbie:**
|
|
152
|
-
- Dùng tiếng Việt thuần
|
|
153
|
-
- Giải thích mọi khái niệm
|
|
154
|
-
- Bước nhỏ, chi tiết
|
|
155
|
-
|
|
156
|
-
**basic:**
|
|
157
|
-
- Mix Việt-Anh
|
|
158
|
-
- Giải thích term lần đầu
|
|
159
|
-
- Bước vừa phải
|
|
160
|
-
|
|
161
|
-
**technical:**
|
|
162
|
-
- Dùng thuật ngữ chuẩn
|
|
163
|
-
- Không cần giải thích
|
|
164
|
-
- Tập trung action
|
|
165
|
-
|
|
166
|
-
## Fallback
|
|
167
|
-
|
|
168
|
-
If context unreadable:
|
|
169
|
-
```
|
|
170
|
-
👋 Em ở đây giúp bạn!
|
|
171
|
-
|
|
172
|
-
Gõ /next để em gợi ý việc cần làm,
|
|
173
|
-
hoặc mô tả vấn đề cho em nghe.
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Performance
|
|
177
|
-
|
|
178
|
-
- Context read: < 200ms
|
|
179
|
-
- Response generation: Instant
|
|
180
|
-
- No external API calls
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: awf-error-translator
|
|
3
|
-
description: >-
|
|
4
|
-
Translate technical errors to human-friendly language. Keywords: error,
|
|
5
|
-
translate, explain, help, fix, fail, broken, crash, bug.
|
|
6
|
-
Activates on /debug, /code, /test when errors detected.
|
|
7
|
-
version: 1.0.0
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# AWF Error Translator
|
|
11
|
-
|
|
12
|
-
Dịch lỗi kỹ thuật sang ngôn ngữ đời thường cho non-tech users.
|
|
13
|
-
|
|
14
|
-
## Trigger Conditions
|
|
15
|
-
|
|
16
|
-
**Post-hook for:** `/debug`, `/code`, `/test`
|
|
17
|
-
|
|
18
|
-
**When:** Error message detected in output
|
|
19
|
-
|
|
20
|
-
## Execution Logic
|
|
21
|
-
|
|
22
|
-
### Step 1: Detect Error
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
if output contains error patterns:
|
|
26
|
-
→ Activate translation
|
|
27
|
-
else:
|
|
28
|
-
→ Skip (no error)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Step 2: Match & Translate
|
|
32
|
-
|
|
33
|
-
Match error against database, return human message + action.
|
|
34
|
-
|
|
35
|
-
### Step 3: Display
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
❌ Lỗi: [human message]
|
|
39
|
-
💡 Gợi ý: [action]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Error Translation Database
|
|
43
|
-
|
|
44
|
-
### Database Errors
|
|
45
|
-
|
|
46
|
-
| Pattern | Human Message | Action |
|
|
47
|
-
|---------|---------------|--------|
|
|
48
|
-
| `ECONNREFUSED` | Database chưa chạy | Khởi động PostgreSQL/MySQL |
|
|
49
|
-
| `ETIMEDOUT` | Database phản hồi chậm quá | Kiểm tra kết nối mạng |
|
|
50
|
-
| `ER_ACCESS_DENIED` | Sai mật khẩu database | Kiểm tra file .env |
|
|
51
|
-
| `relation .* does not exist` | Bảng chưa tồn tại | Chạy migration: `/run migrate` |
|
|
52
|
-
| `duplicate key` | Dữ liệu bị trùng | Kiểm tra unique constraint |
|
|
53
|
-
|
|
54
|
-
### JavaScript/TypeScript Errors
|
|
55
|
-
|
|
56
|
-
| Pattern | Human Message | Action |
|
|
57
|
-
|---------|---------------|--------|
|
|
58
|
-
| `TypeError: Cannot read` | Đang đọc biến chưa có giá trị | Kiểm tra null/undefined |
|
|
59
|
-
| `ReferenceError` | Dùng biến chưa khai báo | Kiểm tra tên biến |
|
|
60
|
-
| `SyntaxError` | Code viết sai cú pháp | Kiểm tra dấu ngoặc, chấm phẩy |
|
|
61
|
-
| `Maximum call stack` | Vòng lặp vô hạn | Kiểm tra điều kiện dừng |
|
|
62
|
-
| `Cannot find module` | Thiếu package | Chạy `npm install` |
|
|
63
|
-
|
|
64
|
-
### Network Errors
|
|
65
|
-
|
|
66
|
-
| Pattern | Human Message | Action |
|
|
67
|
-
|---------|---------------|--------|
|
|
68
|
-
| `fetch failed` | Không kết nối được server | Kiểm tra URL và internet |
|
|
69
|
-
| `CORS` | Website chặn request | Cấu hình CORS trên server |
|
|
70
|
-
| `ERR_CERT` | Chứng chỉ SSL lỗi | Dùng HTTP thay HTTPS (dev only) |
|
|
71
|
-
| `timeout` | Request quá lâu | Tăng timeout hoặc kiểm tra server |
|
|
72
|
-
| `ENOTFOUND` | Domain không tồn tại | Kiểm tra lại URL |
|
|
73
|
-
|
|
74
|
-
### Package Errors
|
|
75
|
-
|
|
76
|
-
| Pattern | Human Message | Action |
|
|
77
|
-
|---------|---------------|--------|
|
|
78
|
-
| `npm ERR!` | Cài package bị lỗi | Xóa node_modules, cài lại |
|
|
79
|
-
| `peer dep` | Phiên bản không tương thích | Cập nhật package.json |
|
|
80
|
-
| `EACCES` | Không có quyền truy cập | Chạy với sudo hoặc sửa quyền |
|
|
81
|
-
| `ENOSPC` | Hết dung lượng ổ đĩa | Dọn dẹp disk |
|
|
82
|
-
| `gyp ERR!` | Lỗi build native module | Cài build tools |
|
|
83
|
-
|
|
84
|
-
### Test Errors
|
|
85
|
-
|
|
86
|
-
| Pattern | Human Message | Action |
|
|
87
|
-
|---------|---------------|--------|
|
|
88
|
-
| `Expected .* but received` | Test thất bại - kết quả sai | Sửa code hoặc update test |
|
|
89
|
-
| `Timeout` | Test chạy quá lâu | Tăng timeout hoặc optimize |
|
|
90
|
-
| `before each hook` | Setup test bị lỗi | Kiểm tra beforeEach |
|
|
91
|
-
| `snapshot` | UI thay đổi | Update snapshot nếu đúng |
|
|
92
|
-
| `coverage` | Thiếu test coverage | Viết thêm test |
|
|
93
|
-
|
|
94
|
-
### Build Errors
|
|
95
|
-
|
|
96
|
-
| Pattern | Human Message | Action |
|
|
97
|
-
|---------|---------------|--------|
|
|
98
|
-
| `tsc.*error` | Lỗi TypeScript | Sửa type errors |
|
|
99
|
-
| `ESLint` | Code không đúng style | Chạy lint fix |
|
|
100
|
-
| `Build failed` | Build thất bại | Đọc log chi tiết |
|
|
101
|
-
| `Out of memory` | Hết RAM | Tăng memory limit |
|
|
102
|
-
| `FATAL ERROR` | Lỗi nghiêm trọng | Restart và thử lại |
|
|
103
|
-
|
|
104
|
-
### Git Errors
|
|
105
|
-
|
|
106
|
-
| Pattern | Human Message | Action |
|
|
107
|
-
|---------|---------------|--------|
|
|
108
|
-
| `conflict` | Code bị xung đột | Merge conflict manually |
|
|
109
|
-
| `rejected` | Push bị từ chối | Pull trước khi push |
|
|
110
|
-
| `detached HEAD` | Không ở branch nào | Checkout về branch |
|
|
111
|
-
| `not a git repo` | Chưa init git | Chạy `git init` |
|
|
112
|
-
|
|
113
|
-
### Deploy Errors
|
|
114
|
-
|
|
115
|
-
| Pattern | Human Message | Action |
|
|
116
|
-
|---------|---------------|--------|
|
|
117
|
-
| `502 Bad Gateway` | Server không phản hồi | Restart server |
|
|
118
|
-
| `503 Service` | Server quá tải | Scale up resources |
|
|
119
|
-
| `permission denied` | Không có quyền deploy | Kiểm tra credentials |
|
|
120
|
-
| `quota exceeded` | Hết quota | Nâng cấp plan |
|
|
121
|
-
|
|
122
|
-
## Output Format
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
🔍 Translating error...
|
|
126
|
-
|
|
127
|
-
❌ Lỗi: [human_message]
|
|
128
|
-
└─ Gốc: [original_error_snippet]
|
|
129
|
-
|
|
130
|
-
💡 Gợi ý: [action]
|
|
131
|
-
└─ Hoặc chạy: /debug để tìm hiểu thêm
|
|
132
|
-
|
|
133
|
-
────────────────────────────────
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Fallback
|
|
137
|
-
|
|
138
|
-
If no pattern matches:
|
|
139
|
-
```
|
|
140
|
-
❌ Lỗi: Có vấn đề xảy ra
|
|
141
|
-
💡 Gợi ý: Chạy /debug để em phân tích chi tiết
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Performance
|
|
145
|
-
|
|
146
|
-
- Translation: < 100ms
|
|
147
|
-
- Pattern matching: Simple regex
|
|
148
|
-
- No external API calls
|
|
149
|
-
|
|
150
|
-
## Security
|
|
151
|
-
|
|
152
|
-
- Sanitize error messages (remove credentials, paths)
|
|
153
|
-
- Never expose sensitive info in translations
|