evnict-kit 0.2.2 → 0.2.4

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 (80) hide show
  1. package/README.md +39 -2
  2. package/bin/cli.js +7 -1
  3. package/package.json +1 -1
  4. package/scripts/patch-workflows.js +142 -0
  5. package/scripts/postinstall.js +1 -1
  6. package/src/commands/init.js +18 -9
  7. package/src/commands/sync.js +317 -0
  8. package/src/commands/upgrade.js +7 -1
  9. package/src/utils/config.js +2 -2
  10. package/templates/GETTING-STARTED.md +23 -2
  11. package/templates/content/skills/evnict-kit-bug-fix/SKILL.md +1 -1
  12. package/templates/content/skills/evnict-kit-git-worktrees/SKILL.md +0 -2
  13. package/templates/content/skills/evnict-kit-onboard/SKILL.md +0 -1
  14. package/templates/content/skills/evnict-kit-spec/SKILL.md +1 -1
  15. package/templates/content/skills/evnict-kit-wiki/SKILL.md +16 -54
  16. package/templates/content/workflows/evnict-kit-archive-wiki.md +4 -5
  17. package/templates/content/workflows/evnict-kit-attt.md +1 -1
  18. package/templates/content/workflows/evnict-kit-bug-fix.md +1 -1
  19. package/templates/content/workflows/evnict-kit-feature-large.md +2 -2
  20. package/templates/content/workflows/evnict-kit-feature-small.md +1 -1
  21. package/templates/content/workflows/evnict-kit-init-wiki.md +18 -47
  22. package/templates/content/workflows/evnict-kit-wiki-archive-feature.md +2 -3
  23. package/templates/content/workflows/evnict-kit-wiki-query.md +3 -3
  24. package/templates/content/workflows/evnict-kit-wiki-scan-project.md +3 -4
  25. package/templates/skills/evnict-kit-bug-fix/SKILL.md +1 -1
  26. package/templates/skills/evnict-kit-create-component/SKILL.md +23 -0
  27. package/templates/skills/evnict-kit-create-page/SKILL.md +23 -0
  28. package/templates/skills/evnict-kit-frontend-design/SKILL.md +161 -0
  29. package/templates/skills/evnict-kit-spec/SKILL.md +1 -1
  30. package/templates/skills/evnict-kit-wiki/SKILL.md +16 -54
  31. package/templates/wiki/AGENTS.md +280 -0
  32. package/templates/wiki/CLAUDE.md +280 -0
  33. package/templates/wiki/FAQ.md +168 -0
  34. package/templates/wiki/README.md +272 -35
  35. package/templates/wiki/config.example.yaml +145 -17
  36. package/templates/wiki/scripts/run-wiki.sh +17 -0
  37. package/templates/wiki/scripts/setup-scheduler.ps1 +29 -0
  38. package/templates/wiki/skills/llm-wiki/SKILL.md +341 -0
  39. package/templates/wiki/wiki/INDEX.md +9 -0
  40. package/templates/wiki/wiki/INDEX.template.md +29 -0
  41. package/templates/wiki/wiki/LOG.md +3 -0
  42. package/templates/wiki/wiki/LOG.template.md +7 -0
  43. package/templates/wiki/wiki-viewer.html +408 -0
  44. package/templates/workflows/antigravity/evnict-kit-archive-wiki.md +24 -5
  45. package/templates/workflows/antigravity/evnict-kit-attt.md +21 -1
  46. package/templates/workflows/antigravity/evnict-kit-bug-fix.md +24 -1
  47. package/templates/workflows/antigravity/evnict-kit-feature-large.md +26 -2
  48. package/templates/workflows/antigravity/evnict-kit-feature-small.md +24 -1
  49. package/templates/workflows/antigravity/evnict-kit-handoff.md +23 -0
  50. package/templates/workflows/antigravity/evnict-kit-implement.md +23 -0
  51. package/templates/workflows/antigravity/evnict-kit-init-check.md +20 -0
  52. package/templates/workflows/antigravity/evnict-kit-init-context.md +20 -0
  53. package/templates/workflows/antigravity/evnict-kit-init-rules.md +20 -0
  54. package/templates/workflows/antigravity/evnict-kit-init-wiki.md +26 -8
  55. package/templates/workflows/antigravity/evnict-kit-plan.md +24 -0
  56. package/templates/workflows/antigravity/evnict-kit-review.md +20 -0
  57. package/templates/workflows/antigravity/evnict-kit-spec-archive.md +20 -0
  58. package/templates/workflows/antigravity/evnict-kit-wiki-archive-feature.md +22 -3
  59. package/templates/workflows/antigravity/evnict-kit-wiki-query.md +23 -3
  60. package/templates/workflows/antigravity/evnict-kit-wiki-scan-project.md +23 -4
  61. package/templates/workflows/claude/evnict-kit-archive-wiki.md +24 -5
  62. package/templates/workflows/claude/evnict-kit-attt.md +21 -1
  63. package/templates/workflows/claude/evnict-kit-bug-fix.md +24 -1
  64. package/templates/workflows/claude/evnict-kit-feature-large.md +26 -2
  65. package/templates/workflows/claude/evnict-kit-feature-small.md +24 -1
  66. package/templates/workflows/claude/evnict-kit-handoff.md +23 -0
  67. package/templates/workflows/claude/evnict-kit-implement.md +23 -0
  68. package/templates/workflows/claude/evnict-kit-init-check.md +20 -0
  69. package/templates/workflows/claude/evnict-kit-init-context.md +20 -0
  70. package/templates/workflows/claude/evnict-kit-init-rules.md +20 -0
  71. package/templates/workflows/claude/evnict-kit-init-wiki.md +25 -7
  72. package/templates/workflows/claude/evnict-kit-plan.md +24 -0
  73. package/templates/workflows/claude/evnict-kit-review.md +20 -0
  74. package/templates/workflows/claude/evnict-kit-spec-archive.md +20 -0
  75. package/templates/workflows/claude/evnict-kit-wiki-archive-feature.md +22 -3
  76. package/templates/workflows/claude/evnict-kit-wiki-query.md +23 -3
  77. package/templates/workflows/claude/evnict-kit-wiki-scan-project.md +23 -4
  78. package/templates/wiki/package.json +0 -17
  79. package/templates/wiki/raw/notes/.gitkeep +0 -1
  80. package/templates/wiki/scripts/ingest.js +0 -66
@@ -233,6 +233,29 @@ Test fail > 3 lần cho cùng 1 task → **DỪNG NGAY**.
233
233
 
234
234
  ---
235
235
 
236
+ > 🎨 **FE UI Quality:** Khi tạo/sửa UI component, tham khảo skill `evnict-kit-frontend-design`
237
+ > để đảm bảo chất lượng thiết kế cao. Áp dụng Design Thinking (Purpose → Tone → Constraints → Differentiation) trước khi code UI.
238
+
239
+ ---
240
+
241
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
242
+
243
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
244
+
245
+ ### Quick Check (agent tự đánh giá)
246
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
247
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
248
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
249
+
250
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
251
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
252
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
253
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
254
+
255
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
256
+
257
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
258
+
236
259
  ## Checklist
237
260
  - [ ] Plan confirmed
238
261
  - [ ] Resume logic checked (progress.md)
@@ -70,5 +70,25 @@ git branch -D demo/init-check
70
70
 
71
71
  ---
72
72
 
73
+ ---
74
+
75
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
76
+
77
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
78
+
79
+ ### Quick Check (agent tự đánh giá)
80
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
81
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
82
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
83
+
84
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
85
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
86
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
87
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
88
+
89
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
90
+
91
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
92
+
73
93
  ## Output
74
94
  Demo code + verification report. User quyết định giữ hoặc xóa demo.
@@ -52,5 +52,25 @@ Tạo file AGENTS.md ở root project (400-600 dòng) với sections:
52
52
 
53
53
  ---
54
54
 
55
+ ---
56
+
57
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
58
+
59
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
60
+
61
+ ### Quick Check (agent tự đánh giá)
62
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
63
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
64
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
65
+
66
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
67
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
68
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
69
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
70
+
71
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
72
+
73
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
74
+
55
75
  ## Output
56
76
  File `AGENTS.md` ở root project — context file duy nhất cho AI Agent.
@@ -99,6 +99,26 @@ Tạo `.agent/context/init-summary-backend.md` hoặc `init-summary-frontend.md`
99
99
  - KHÔNG ghi passwords, connection strings
100
100
  - Chỉ ghi PATTERNS không ghi VALUES
101
101
 
102
+ ---
103
+
104
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
105
+
106
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
107
+
108
+ ### Quick Check (agent tự đánh giá)
109
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
110
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
111
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
112
+
113
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
114
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
115
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
116
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
117
+
118
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
119
+
120
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
121
+
102
122
  ## Output
103
123
  ```
104
124
  ✅ RP01 Naming: ACTIVE
@@ -29,7 +29,6 @@ cp -r {evnict-kit}/templates/wiki/ ./{project}-wiki/
29
29
  ### Bước 3: Install dependencies
30
30
  ```bash
31
31
  cd {project}-wiki
32
- npm install
33
32
  ```
34
33
 
35
34
  ### Bước 4: Configure
@@ -37,25 +36,24 @@ Tạo `config.yaml` từ `config.example.yaml`:
37
36
  ```yaml
38
37
  project: "{project-name}"
39
38
  raw_path: "raw/notes"
40
- processed_path: "processed"
41
- index_path: "processed/index.json"
39
+ processed_path: "wiki"
40
+ index_path: "wiki/index.json"
42
41
  ```
43
42
 
44
43
  ### Bước 5: Tạo folder structure
45
44
  ```bash
46
45
  mkdir -p raw/notes
47
- mkdir -p processed
46
+ mkdir -p wiki
48
47
  ```
49
48
 
50
49
  ### Bước 6: First ingest (nếu có notes sẵn)
51
50
  ```bash
52
- npm run ingest
51
+ Agent follow SKILL.md to ingest
53
52
  ```
54
53
 
55
54
  ### Bước 7: Verify
56
55
  ```
57
56
  ✅ Wiki setup: {project}-wiki/
58
- ✅ Dependencies installed
59
57
  ✅ Config created
60
58
  ✅ Folders ready
61
59
  ```
@@ -74,5 +72,25 @@ Same as steps 3-7 above.
74
72
 
75
73
  ---
76
74
 
75
+ ---
76
+
77
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
78
+
79
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
80
+
81
+ ### Quick Check (agent tự đánh giá)
82
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
83
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
84
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
85
+
86
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
87
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
88
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
89
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
90
+
91
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
92
+
93
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
94
+
77
95
  ## Output
78
- Wiki folder ready at `{project}-wiki/` with npm dependencies installed.
96
+ Wiki folder ready at `{project}-wiki/` ready for Agent to populate.
@@ -303,3 +303,27 @@ C) ❌ Hủy — xóa plan, quay lại spec
303
303
  ```
304
304
 
305
305
  Sau khi người dùng Approve, hãy nhắc họ chạy lệnh: `/evnict-kit:implement`.
306
+
307
+ > 🎨 **FE UI Quality:** Khi tạo/sửa UI component, tham khảo skill `evnict-kit-frontend-design`
308
+ > để đảm bảo chất lượng thiết kế cao. Áp dụng Design Thinking (Purpose → Tone → Constraints → Differentiation) trước khi code UI.
309
+
310
+ ---
311
+
312
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
313
+
314
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
315
+
316
+ ### Quick Check (agent tự đánh giá)
317
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
318
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
319
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
320
+
321
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
322
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
323
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
324
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
325
+
326
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
327
+
328
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
329
+
@@ -45,6 +45,26 @@ Gọi skill `evnict-kit-merge-checklist`:
45
45
 
46
46
  ---
47
47
 
48
+ ---
49
+
50
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
51
+
52
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
53
+
54
+ ### Quick Check (agent tự đánh giá)
55
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
56
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
57
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
58
+
59
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
60
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
61
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
62
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
63
+
64
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
65
+
66
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
67
+
48
68
  ## Checklist
49
69
  - [ ] Code review completed (9 items)
50
70
  - [ ] Merge checklist completed (9 items)
@@ -46,6 +46,26 @@ cat .evnict/specs/{slug}/spec.md
46
46
 
47
47
  ---
48
48
 
49
+ ---
50
+
51
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
52
+
53
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
54
+
55
+ ### Quick Check (agent tự đánh giá)
56
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
57
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
58
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
59
+
60
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
61
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
62
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
63
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
64
+
65
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
66
+
67
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
68
+
49
69
  ## Checklist
50
70
  - [ ] Action executed successfully
51
71
  - [ ] Output formatted clearly
@@ -23,7 +23,7 @@ Nếu không tồn tại → DỪNG: *"Wiki chưa được liên kết. Chạy `
23
23
 
24
24
  ### Check 2: Wiki đã setup
25
25
  ```bash
26
- ls {project_name}-wiki/package.json
26
+ ls {project_name}-wiki/CLAUDE.md
27
27
  ```
28
28
  Nếu không tồn tại → DỪNG: *"Wiki chưa khởi tạo. Chạy `/evnict-kit:init-wiki` trước."*
29
29
 
@@ -134,9 +134,8 @@ type: feature
134
134
  ## Bước 3: Push + Auto-ingest
135
135
  ```bash
136
136
  cp {generated_file} {wiki_path}/raw/notes/{module}-{feature-slug}.md
137
- cd {wiki_path} && node scripts/ingest.js
137
+ cd {wiki_path} && Agent follow SKILL.md to ingest
138
138
  ```
139
- Nếu `scripts/ingest.js` không tồn tại → thử `npm run ingest`.
140
139
  Nếu vẫn fail → báo: *"Chạy `/evnict-kit:init-wiki`"*
141
140
 
142
141
  ## Bước 4: Confirm
@@ -154,6 +153,26 @@ Nếu vẫn fail → báo: *"Chạy `/evnict-kit:init-wiki`"*
154
153
  - Nếu feature có cả BE+FE → ghi đủ cả 2 phần (Backend + Frontend)
155
154
  - Nếu thiếu thông tin FE/BE → ghi phần có, note phần thiếu
156
155
 
156
+ ---
157
+
158
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
159
+
160
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
161
+
162
+ ### Quick Check (agent tự đánh giá)
163
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
164
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
165
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
166
+
167
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
168
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
169
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
170
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
171
+
172
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
173
+
174
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
175
+
157
176
  ## Checklist hoàn thành
158
177
  - [ ] Đọc đủ nguồn (spec, plan, tasks, contract, git log)
159
178
  - [ ] Wiki note sinh đúng format frontmatter
@@ -23,9 +23,9 @@ $ARGUMENTS chứa mô tả từ user.
23
23
 
24
24
  ## Bước 2: Search
25
25
  1. Đọc `{wiki_path}/wiki/INDEX.md` → map keywords (nếu INDEX tồn tại)
26
- 2. Search trong `{wiki_path}/processed/` và `{wiki_path}/raw/notes/`:
26
+ 2. Search trong `{wiki_path}/wiki/` và `{wiki_path}/raw/notes/`:
27
27
  ```bash
28
- grep -rl "{keyword}" {wiki_path}/processed/ --include="*.md"
28
+ grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"
29
29
  grep -rl "{keyword}" {wiki_path}/raw/notes/ --include="*.md"
30
30
  ```
31
31
  3. Đọc các pages liên quan (đọc ĐỦ nội dung, không chỉ 1-2 trang)
@@ -51,7 +51,7 @@ Tìm thấy {N} trang liên quan:
51
51
  {Tổng hợp nội dung liên quan từ các trang — đây là phần QUAN TRỌNG NHẤT}
52
52
 
53
53
  ## Nguồn:
54
- - {wiki_path}/processed/{page_1}.md
54
+ - {wiki_path}/wiki/{page_1}.md
55
55
  - {wiki_path}/raw/notes/{page_2}.md
56
56
  ```
57
57
 
@@ -81,6 +81,26 @@ Nếu query dẫn đến so sánh/phân tích giữa nhiều trang:
81
81
  - Nếu trang wiki bị thiếu/cũ → gợi ý user chạy `/evnict-kit:wiki-archive-feature` hoặc `/evnict-kit:wiki-scan-project`
82
82
  - Workflow này được gọi TỰ ĐỘNG bởi các workflow khác (feature-large, feature-small, bug-fix) ở bước đầu tiên
83
83
 
84
+ ---
85
+
86
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
87
+
88
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
89
+
90
+ ### Quick Check (agent tự đánh giá)
91
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
92
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
93
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
94
+
95
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
96
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
97
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
98
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
99
+
100
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
101
+
102
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
103
+
84
104
  ## Checklist hoàn thành
85
105
  - [ ] Wiki path xác định
86
106
  - [ ] Search hoàn tất
@@ -23,7 +23,7 @@ Nếu không tồn tại → DỪNG: *"Wiki chưa được liên kết. Chạy `
23
23
 
24
24
  ### Check 2: Wiki đã setup
25
25
  ```bash
26
- ls {project_name}-wiki/package.json
26
+ ls {project_name}-wiki/CLAUDE.md
27
27
  ```
28
28
  Nếu không tồn tại → DỪNG: *"Wiki chưa khởi tạo. Chạy `/evnict-kit:init-wiki` trước."*
29
29
 
@@ -33,7 +33,7 @@ Nếu không tồn tại → DỪNG: *"Wiki chưa khởi tạo. Chạy `/evnict-
33
33
  Đang ở BE hay FE?
34
34
  - Có `pom.xml` hoặc `build.gradle` → **Backend**
35
35
  - Có `angular.json` → **Frontend (Angular)**
36
- - Có `package.json` + react dependency → **Frontend (React)**
36
+ - Có `CLAUDE.md` + react dependency → **Frontend (React)**
37
37
 
38
38
  ---
39
39
 
@@ -229,9 +229,8 @@ Append vào `.evnict/handoff/handoff.md`:
229
229
 
230
230
  ## Bước 6: Auto-ingest
231
231
  ```bash
232
- cd {wiki_path} && node scripts/ingest.js
232
+ cd {wiki_path} && Agent follow SKILL.md to ingest
233
233
  ```
234
- Nếu `scripts/ingest.js` không tồn tại → thử `npm run ingest`.
235
234
  Nếu vẫn fail → báo: *"Chạy `/evnict-kit:init-wiki`"*
236
235
 
237
236
  ---
@@ -258,6 +257,26 @@ Nếu vẫn fail → báo: *"Chạy `/evnict-kit:init-wiki`"*
258
257
  - Workflow này GỌI skill `evnict-kit-wiki` cho phần push + ingest
259
258
  - Mỗi module 1 file — KHÔNG gộp tất cả vào 1 file khổng lồ
260
259
 
260
+ ---
261
+
262
+ ## ⚠️ NHẮC NHỞ: Tuân thủ Rules & Context
263
+
264
+ > **Agent dùng lâu có thể quên rules.** Trước khi bắt đầu code, tự kiểm tra:
265
+
266
+ ### Quick Check (agent tự đánh giá)
267
+ 1. ✅ Tôi đã đọc `.agent/rules/` trong phiên làm việc này chưa?
268
+ 2. ✅ Tôi đã đọc AGENTS.md (hoặc context file) chưa?
269
+ 3. ✅ Tôi nhớ rõ coding conventions của dự án này không?
270
+
271
+ **→ Nếu BẤT KỲ câu nào = "CHƯA" hoặc "KHÔNG CHẮC":**
272
+ - Đọc lại tất cả files trong `.agent/rules/` (hoặc thư mục rules tương ứng)
273
+ - Đọc lại AGENTS.md (hoặc context file tương ứng)
274
+ - Query wiki nếu có: `grep -rl "{keyword}" {wiki_path}/wiki/ --include="*.md"`
275
+
276
+ **→ Nếu TẤT CẢ = "RỒI" → tiếp tục workflow, KHÔNG cần đọc lại.**
277
+
278
+ > **NGUYÊN TẮC:** Không chắc convention → ĐỌC LẠI rule file. KHÔNG đoán.
279
+
261
280
  ## Checklist hoàn thành
262
281
  - [ ] Project type detected
263
282
  - [ ] Code scanned theo type
@@ -1,17 +0,0 @@
1
- {
2
- "name": "llm-wiki",
3
- "version": "1.0.0",
4
- "description": "LLM Wiki — Knowledge base for AI-assisted development",
5
- "type": "module",
6
- "scripts": {
7
- "ingest": "node scripts/ingest.js",
8
- "query": "node scripts/query.js",
9
- "status": "node scripts/status.js"
10
- },
11
- "license": "MIT",
12
- "author": "mduongvandinh",
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/mduongvandinh/llm-wiki"
16
- }
17
- }
@@ -1 +0,0 @@
1
- # placeholder — raw notes go here
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * LLM Wiki — Ingest Script
4
- * Reads raw/notes/*.md → processes → outputs to processed/
5
- *
6
- * Source: https://github.com/mduongvandinh/llm-wiki
7
- * License: MIT
8
- */
9
-
10
- import { readFileSync, writeFileSync, readdirSync, existsSync, mkdirSync } from 'node:fs';
11
- import { join, basename } from 'node:path';
12
-
13
- const RAW_PATH = 'raw/notes';
14
- const PROCESSED_PATH = 'processed';
15
- const INDEX_PATH = join(PROCESSED_PATH, 'index.json');
16
-
17
- // Ensure directories
18
- if (!existsSync(PROCESSED_PATH)) mkdirSync(PROCESSED_PATH, { recursive: true });
19
-
20
- // Read all markdown files
21
- const files = existsSync(RAW_PATH)
22
- ? readdirSync(RAW_PATH).filter(f => f.endsWith('.md'))
23
- : [];
24
-
25
- console.log(`📚 Ingesting ${files.length} notes...`);
26
-
27
- const index = [];
28
-
29
- for (const file of files) {
30
- const content = readFileSync(join(RAW_PATH, file), 'utf8');
31
-
32
- // Extract frontmatter
33
- const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
34
- const frontmatter = {};
35
- if (fmMatch) {
36
- fmMatch[1].split('\n').forEach(line => {
37
- const [key, ...val] = line.split(':');
38
- if (key && val.length) frontmatter[key.trim()] = val.join(':').trim().replace(/^["']|["']$/g, '');
39
- });
40
- }
41
-
42
- // Extract body (after frontmatter)
43
- const body = fmMatch ? content.slice(fmMatch[0].length).trim() : content;
44
-
45
- // Create processed entry
46
- const entry = {
47
- file: file,
48
- title: frontmatter.title || basename(file, '.md'),
49
- domain: frontmatter.domain || 'general',
50
- type: frontmatter.type || 'note',
51
- date: frontmatter.date || new Date().toISOString().split('T')[0],
52
- tags: frontmatter.tags ? frontmatter.tags.replace(/[\[\]]/g, '').split(',').map(t => t.trim()) : [],
53
- summary: body.split('\n').filter(l => l.trim()).slice(0, 3).join(' ').slice(0, 200),
54
- };
55
-
56
- index.push(entry);
57
-
58
- // Copy processed file
59
- writeFileSync(join(PROCESSED_PATH, file), content, 'utf8');
60
- console.log(` ✅ ${file} → ${entry.title} (${entry.domain})`);
61
- }
62
-
63
- // Write index
64
- writeFileSync(INDEX_PATH, JSON.stringify(index, null, 2), 'utf8');
65
- console.log(`\n📋 Index: ${index.length} entries → ${INDEX_PATH}`);
66
- console.log('✅ Ingest complete!');