evnict-kit 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +19 -0
  2. package/bin/cli.js +38 -0
  3. package/package.json +48 -0
  4. package/src/commands/add.js +129 -0
  5. package/src/commands/init-check.js +19 -0
  6. package/src/commands/init-context.js +37 -0
  7. package/src/commands/init-rules.js +42 -0
  8. package/src/commands/init-workflow.js +36 -0
  9. package/src/commands/init.js +722 -0
  10. package/src/utils/config.js +167 -0
  11. package/src/utils/file.js +53 -0
  12. package/templates/GETTING-STARTED.md +196 -0
  13. package/templates/content/context/AGENTS.md.template +462 -0
  14. package/templates/content/rules/01-evnict-kit-general-rules.md +303 -0
  15. package/templates/content/rules/02-evnict-kit-security-rules.md +423 -0
  16. package/templates/content/rules/03-evnict-kit-backend-conventions.md +383 -0
  17. package/templates/content/rules/04-evnict-kit-frontend-conventions.md +402 -0
  18. package/templates/content/rules/05-evnict-kit-project-conventions.md +228 -0
  19. package/templates/content/skills/evnict-kit-brainstorm/SKILL.md +140 -0
  20. package/templates/content/skills/evnict-kit-bug-fix/SKILL.md +108 -0
  21. package/templates/content/skills/evnict-kit-checkpoint/SKILL.md +156 -0
  22. package/templates/content/skills/evnict-kit-code-review/SKILL.md +158 -0
  23. package/templates/content/skills/evnict-kit-coordinate/SKILL.md +274 -0
  24. package/templates/content/skills/evnict-kit-create-api/SKILL.md +281 -0
  25. package/templates/content/skills/evnict-kit-create-component/SKILL.md +263 -0
  26. package/templates/content/skills/evnict-kit-create-page/SKILL.md +247 -0
  27. package/templates/content/skills/evnict-kit-database-migration/SKILL.md +164 -0
  28. package/templates/content/skills/evnict-kit-doc-postmortem/SKILL.md +93 -0
  29. package/templates/content/skills/evnict-kit-finish-branch/SKILL.md +87 -0
  30. package/templates/content/skills/evnict-kit-fix-attt/SKILL.md +129 -0
  31. package/templates/content/skills/evnict-kit-fix-business-logic/SKILL.md +89 -0
  32. package/templates/content/skills/evnict-kit-git-worktrees/SKILL.md +104 -0
  33. package/templates/content/skills/evnict-kit-merge-checklist/SKILL.md +108 -0
  34. package/templates/content/skills/evnict-kit-onboard/SKILL.md +143 -0
  35. package/templates/content/skills/evnict-kit-prompt-standard/SKILL.md +103 -0
  36. package/templates/content/skills/evnict-kit-receiving-review/SKILL.md +89 -0
  37. package/templates/content/skills/evnict-kit-security-audit/SKILL.md +190 -0
  38. package/templates/content/skills/evnict-kit-spec/SKILL.md +237 -0
  39. package/templates/content/skills/evnict-kit-tdd/SKILL.md +413 -0
  40. package/templates/content/skills/evnict-kit-wiki/SKILL.md +412 -0
  41. package/templates/content/workflows/evnict-kit-archive-wiki.md +100 -0
  42. package/templates/content/workflows/evnict-kit-attt.md +100 -0
  43. package/templates/content/workflows/evnict-kit-bug-fix.md +107 -0
  44. package/templates/content/workflows/evnict-kit-feature-large.md +393 -0
  45. package/templates/content/workflows/evnict-kit-feature-small.md +86 -0
  46. package/templates/content/workflows/evnict-kit-handoff.md +243 -0
  47. package/templates/content/workflows/evnict-kit-implement.md +247 -0
  48. package/templates/content/workflows/evnict-kit-init-check.md +76 -0
  49. package/templates/content/workflows/evnict-kit-init-context.md +58 -0
  50. package/templates/content/workflows/evnict-kit-init-rules.md +114 -0
  51. package/templates/content/workflows/evnict-kit-init-wiki.md +80 -0
  52. package/templates/content/workflows/evnict-kit-plan.md +308 -0
  53. package/templates/content/workflows/evnict-kit-review.md +53 -0
  54. package/templates/content/workflows/evnict-kit-spec-archive.md +53 -0
  55. package/templates/content/workflows/evnict-kit-wiki-archive-feature.md +164 -0
  56. package/templates/content/workflows/evnict-kit-wiki-query.md +91 -0
  57. package/templates/content/workflows/evnict-kit-wiki-scan-project.md +272 -0
  58. package/templates/context/AGENT.md.template +9 -0
  59. package/templates/context/AGENTS.md.template +462 -0
  60. package/templates/context/CLAUDE.md.template +301 -0
  61. package/templates/context/copilot-instructions.md.template +60 -0
  62. package/templates/context/cursorrules.template +114 -0
  63. package/templates/instruct/Instruct-Agent-AI.be.md +96 -0
  64. package/templates/instruct/Instruct-Agent-AI.fe.md +79 -0
  65. package/templates/rules/antigravity/01-evnict-kit-general-rules.md +303 -0
  66. package/templates/rules/antigravity/02-evnict-kit-security-rules.md +423 -0
  67. package/templates/rules/antigravity/03-evnict-kit-backend-conventions.md +383 -0
  68. package/templates/rules/antigravity/04-evnict-kit-frontend-conventions.md +402 -0
  69. package/templates/rules/antigravity/05-evnict-kit-project-conventions.md +228 -0
  70. package/templates/rules/claude/README.md +8 -0
  71. package/templates/rules/cursor/01-evnict-kit-general-rules.mdc +46 -0
  72. package/templates/rules/cursor/02-evnict-kit-security-rules.mdc +46 -0
  73. package/templates/rules/cursor/03-evnict-kit-backend-conventions.mdc +50 -0
  74. package/templates/rules/cursor/04-evnict-kit-frontend-conventions.mdc +43 -0
  75. package/templates/rules/cursor/05-evnict-kit-project-conventions.mdc +63 -0
  76. package/templates/rules/cursor/README.md +7 -0
  77. package/templates/skills/evnict-kit-brainstorm/SKILL.md +140 -0
  78. package/templates/skills/evnict-kit-bug-fix/SKILL.md +108 -0
  79. package/templates/skills/evnict-kit-checkpoint/SKILL.md +156 -0
  80. package/templates/skills/evnict-kit-code-review/SKILL.md +158 -0
  81. package/templates/skills/evnict-kit-coordinate/SKILL.md +274 -0
  82. package/templates/skills/evnict-kit-create-api/SKILL.md +281 -0
  83. package/templates/skills/evnict-kit-create-component/SKILL.md +263 -0
  84. package/templates/skills/evnict-kit-create-page/SKILL.md +247 -0
  85. package/templates/skills/evnict-kit-database-migration/SKILL.md +164 -0
  86. package/templates/skills/evnict-kit-doc-postmortem/SKILL.md +93 -0
  87. package/templates/skills/evnict-kit-finish-branch/SKILL.md +87 -0
  88. package/templates/skills/evnict-kit-fix-attt/SKILL.md +129 -0
  89. package/templates/skills/evnict-kit-fix-business-logic/SKILL.md +89 -0
  90. package/templates/skills/evnict-kit-git-worktrees/SKILL.md +104 -0
  91. package/templates/skills/evnict-kit-merge-checklist/SKILL.md +108 -0
  92. package/templates/skills/evnict-kit-onboard/SKILL.md +143 -0
  93. package/templates/skills/evnict-kit-prompt-standard/SKILL.md +103 -0
  94. package/templates/skills/evnict-kit-receiving-review/SKILL.md +89 -0
  95. package/templates/skills/evnict-kit-security-audit/SKILL.md +190 -0
  96. package/templates/skills/evnict-kit-spec/SKILL.md +237 -0
  97. package/templates/skills/evnict-kit-tdd/SKILL.md +413 -0
  98. package/templates/skills/evnict-kit-wiki/SKILL.md +412 -0
  99. package/templates/wiki/README.md +35 -0
  100. package/templates/wiki/config.example.yaml +17 -0
  101. package/templates/wiki/package.json +17 -0
  102. package/templates/wiki/raw/notes/.gitkeep +1 -0
  103. package/templates/wiki/scripts/ingest.js +66 -0
  104. package/templates/workflows/antigravity/evnict-kit-archive-wiki.md +100 -0
  105. package/templates/workflows/antigravity/evnict-kit-attt.md +100 -0
  106. package/templates/workflows/antigravity/evnict-kit-bug-fix.md +107 -0
  107. package/templates/workflows/antigravity/evnict-kit-feature-large.md +393 -0
  108. package/templates/workflows/antigravity/evnict-kit-feature-small.md +86 -0
  109. package/templates/workflows/antigravity/evnict-kit-handoff.md +243 -0
  110. package/templates/workflows/antigravity/evnict-kit-implement.md +247 -0
  111. package/templates/workflows/antigravity/evnict-kit-init-check.md +76 -0
  112. package/templates/workflows/antigravity/evnict-kit-init-context.md +58 -0
  113. package/templates/workflows/antigravity/evnict-kit-init-rules.md +114 -0
  114. package/templates/workflows/antigravity/evnict-kit-init-wiki.md +80 -0
  115. package/templates/workflows/antigravity/evnict-kit-plan.md +308 -0
  116. package/templates/workflows/antigravity/evnict-kit-review.md +53 -0
  117. package/templates/workflows/antigravity/evnict-kit-spec-archive.md +53 -0
  118. package/templates/workflows/antigravity/evnict-kit-wiki-archive-feature.md +164 -0
  119. package/templates/workflows/antigravity/evnict-kit-wiki-query.md +91 -0
  120. package/templates/workflows/antigravity/evnict-kit-wiki-scan-project.md +272 -0
  121. package/templates/workflows/claude/README.md +6 -0
  122. package/templates/workflows/claude/evnict-kit-archive-wiki.md +98 -0
  123. package/templates/workflows/claude/evnict-kit-attt.md +98 -0
  124. package/templates/workflows/claude/evnict-kit-bug-fix.md +105 -0
  125. package/templates/workflows/claude/evnict-kit-feature-large.md +391 -0
  126. package/templates/workflows/claude/evnict-kit-feature-small.md +84 -0
  127. package/templates/workflows/claude/evnict-kit-handoff.md +240 -0
  128. package/templates/workflows/claude/evnict-kit-implement.md +245 -0
  129. package/templates/workflows/claude/evnict-kit-init-check.md +74 -0
  130. package/templates/workflows/claude/evnict-kit-init-context.md +56 -0
  131. package/templates/workflows/claude/evnict-kit-init-rules.md +112 -0
  132. package/templates/workflows/claude/evnict-kit-init-wiki.md +78 -0
  133. package/templates/workflows/claude/evnict-kit-plan.md +305 -0
  134. package/templates/workflows/claude/evnict-kit-review.md +51 -0
  135. package/templates/workflows/claude/evnict-kit-spec-archive.md +51 -0
  136. package/templates/workflows/claude/evnict-kit-wiki-archive-feature.md +162 -0
  137. package/templates/workflows/claude/evnict-kit-wiki-query.md +89 -0
  138. package/templates/workflows/claude/evnict-kit-wiki-scan-project.md +270 -0
@@ -0,0 +1,112 @@
1
+ # Init Rules — Khởi tạo Project Conventions
2
+ **Command:** `/evnict-kit:init-rules $ARGUMENTS`
3
+
4
+ $ARGUMENTS chứa mô tả từ user.
5
+
6
+ ## Mục đích
7
+ Đọc toàn bộ codebase → phân tích → tự động điền nội dung cho file `05-evnict-kit-project-conventions.md` (RP01-RP07).
8
+
9
+ ## Pre-conditions
10
+ - Project đã init bằng `evnict-kit init`
11
+ - File `.agent/rules/05-evnict-kit-project-conventions.md` tồn tại (có placeholders)
12
+ - Codebase có source code để phân tích
13
+
14
+ ---
15
+
16
+ ## Workflow
17
+
18
+ ### Task 1: Scan Project Structure
19
+ ```bash
20
+ tree -L 3 --dirsfirst
21
+ ```
22
+ Ghi nhận: package structure, module organization, config files.
23
+
24
+ ### Task 2: RP01 — Naming Convention
25
+ Đọc 5-10 file Java/TypeScript → extract:
26
+ - Package naming pattern
27
+ - Class naming (Controller, Service, Repository, DTO)
28
+ - Method naming (CRUD verbs, prefixes)
29
+ - Variable naming
30
+ - File naming
31
+ - Table/Column naming (từ migration scripts hoặc JOOQ generated)
32
+
33
+ ### Task 3: RP02 — Architecture Pattern
34
+ Phân tích:
35
+ - Folder structure → xác định architecture (MVC, Clean, Hexagonal)
36
+ - Layer dependencies (Controller→Service→Repository)
37
+ - Module organization (by feature, by layer)
38
+
39
+ ### Task 4: RP03 — Coding Convention
40
+ Đọc code → extract:
41
+ - Indentation (tabs/spaces, size)
42
+ - Import ordering
43
+ - Method ordering
44
+ - Comment style
45
+ - Null handling
46
+ - Logging framework
47
+
48
+ ### Task 5: RP04 — API Convention
49
+ Đọc Controller classes → extract:
50
+ - Base URL pattern
51
+ - HTTP method usage
52
+ - Request/Response format
53
+ - Pagination pattern
54
+ - Error format
55
+
56
+ ### Task 6: RP05 — Database Convention
57
+ Đọc migration scripts, JOOQ config, application.yml → extract:
58
+ - Database type & version
59
+ - Schema structure
60
+ - Table/column naming
61
+ - PK pattern (sequence, UUID, identity)
62
+ - Audit columns
63
+
64
+ ### Task 7: RP06 — Component Convention (Frontend only)
65
+ Đọc Angular files → extract:
66
+ - Component structure
67
+ - Selector prefix
68
+ - State management
69
+ - UI library usage
70
+ - Form handling
71
+
72
+ ### Task 8: RP07 — Integration Map
73
+ Đọc config, dependencies, service files → extract:
74
+ - External services (SSO, MinIO, CMIS)
75
+ - Internal dependencies
76
+ - Cache, messaging, storage
77
+
78
+ ### Task 9: Update File
79
+ Cập nhật `05-evnict-kit-project-conventions.md`:
80
+ 1. Thay "⚠️ CHƯA ĐƯỢC KHỞI TẠO" bằng nội dung thực tế
81
+ 2. Thêm code examples LẤY TỪ CODE THỰC TẾ (không mẫu generic)
82
+ 3. Đổi header thành `✅ ĐÃ KHỞI TẠO — {date}`
83
+
84
+ ### Task 10: Summary
85
+ Tạo `.agent/context/init-summary-backend.md` hoặc `init-summary-frontend.md`:
86
+ ```markdown
87
+ # Init Summary — {date}
88
+ ## Conventions found: {count}/7
89
+ ## Files scanned: {count}
90
+ ## Key findings:
91
+ - {finding 1}
92
+ - {finding 2}
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Bảo mật
98
+ - KHÔNG ghi secrets, IP nội bộ, URLs production vào rules
99
+ - KHÔNG ghi passwords, connection strings
100
+ - Chỉ ghi PATTERNS không ghi VALUES
101
+
102
+ ## Output
103
+ ```
104
+ ✅ RP01 Naming: ACTIVE
105
+ ✅ RP02 Architecture: ACTIVE
106
+ ✅ RP03 Coding: ACTIVE
107
+ ✅ RP04 API: ACTIVE
108
+ ✅ RP05 Database: ACTIVE
109
+ ✅ RP06 Component: ACTIVE (hoặc SKIPPED nếu BE only)
110
+ ✅ RP07 Integration: ACTIVE
111
+ 📄 Summary: .agent/context/init-summary-{type}.md
112
+ ```
@@ -0,0 +1,78 @@
1
+ # Init Wiki — Setup LLM Wiki
2
+ **Command:** `/evnict-kit:init-wiki $ARGUMENTS`
3
+
4
+ $ARGUMENTS chứa mô tả từ user.
5
+
6
+ ## Mục đích
7
+ Setup llm-wiki knowledge base cho dự án. Copy từ template có sẵn hoặc clone từ GitHub.
8
+
9
+ ## Options
10
+ - `/evnict-kit:init-wiki` → Copy từ templates/wiki/ (mặc định)
11
+ - `/evnict-kit:init-wiki --from-github` → Clone fresh từ GitHub
12
+
13
+ ---
14
+
15
+ ## Workflow (Default — Copy Template)
16
+
17
+ ### Bước 1: Xác định wiki path
18
+ ```bash
19
+ cat .evnict/config.yaml | grep wiki
20
+ # → wiki.folder: "{project}-wiki"
21
+ ```
22
+
23
+ ### Bước 2: Copy template
24
+ Wiki template đã có sẵn trong evnict-kit package:
25
+ ```bash
26
+ cp -r {evnict-kit}/templates/wiki/ ./{project}-wiki/
27
+ ```
28
+
29
+ ### Bước 3: Install dependencies
30
+ ```bash
31
+ cd {project}-wiki
32
+ npm install
33
+ ```
34
+
35
+ ### Bước 4: Configure
36
+ Tạo `config.yaml` từ `config.example.yaml`:
37
+ ```yaml
38
+ project: "{project-name}"
39
+ raw_path: "raw/notes"
40
+ processed_path: "processed"
41
+ index_path: "processed/index.json"
42
+ ```
43
+
44
+ ### Bước 5: Tạo folder structure
45
+ ```bash
46
+ mkdir -p raw/notes
47
+ mkdir -p processed
48
+ ```
49
+
50
+ ### Bước 6: First ingest (nếu có notes sẵn)
51
+ ```bash
52
+ npm run ingest
53
+ ```
54
+
55
+ ### Bước 7: Verify
56
+ ```
57
+ ✅ Wiki setup: {project}-wiki/
58
+ ✅ Dependencies installed
59
+ ✅ Config created
60
+ ✅ Folders ready
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Workflow (--from-github)
66
+
67
+ ### Bước 1: Clone
68
+ ```bash
69
+ git clone https://github.com/mduongvandinh/llm-wiki.git {project}-wiki
70
+ ```
71
+
72
+ ### Bước 2: Install + Configure
73
+ Same as steps 3-7 above.
74
+
75
+ ---
76
+
77
+ ## Output
78
+ Wiki folder ready at `{project}-wiki/` with npm dependencies installed.
@@ -0,0 +1,305 @@
1
+ # Plan
2
+ **Command:** `/evnict-kit:plan $ARGUMENTS`
3
+
4
+ $ARGUMENTS chứa mô tả từ user.
5
+
6
+ ## Khi nào dùng
7
+ Dùng để tự động sinh cấu trúc công việc CHI TIẾT, Breakdown các thành phần và tạo API Contract từ một bản Specification (Spec) đã chốt.
8
+
9
+ ## Input
10
+ - Spec file path (Agent sẽ auto-detect từ `.evnict/specs/` gần nhất nếu không cung cấp)
11
+ - Hoặc người dùng chỉ định trực tiếp: `/evnict-kit:plan .evnict/specs/feature-xyz/spec.md`
12
+
13
+ ---
14
+
15
+ ## Workflow chi tiết
16
+
17
+ ### Bước 1: Parse Specification
18
+ 1. Đọc file `spec.md` đã confirm.
19
+ 2. Kiểm tra xem có câu hỏi clarify nào chưa được user trả lời hay không.
20
+ - Nếu có: Yêu cầu người dùng trả lời trước khi tiếp tục. Dừng lệnh.
21
+ - Nếu đã trả lời: Tự động update `spec.md` với các quyết định/câu trả lời nếu cần thiết.
22
+ 3. Đọc `.agent/rules/` → nắm conventions dự án (naming, architecture, coding patterns).
23
+ 4. Đọc AGENTS.md → hiểu project overview, tech stack.
24
+
25
+ ### Bước 2: Đọc file mẫu trong project
26
+ **BẮT BUỘC** đọc các file mẫu thật trong project để trích xuất code patterns:
27
+ 1. Tìm file mẫu tương tự với feature cần implement:
28
+ - Repository mẫu (VD: `LrsDepartmentRepository.java`)
29
+ - Service mẫu (VD: `LrsDepartmentService.java`)
30
+ - Controller mẫu (VD: `NCPTController.java`)
31
+ - DTO mẫu (VD: `LrsDepartmentDTO.java`)
32
+ - FE Service mẫu, Component mẫu (nếu FE project)
33
+ 2. Trích skeleton pattern: class structure, imports, method signatures, annotations.
34
+ 3. Lưu lại để paste vào task files ở bước sau.
35
+
36
+ ### Bước 3: Sinh Plan.md — PHẢI có 6 SECTIONS
37
+
38
+ Tạo file `.evnict/specs/{feature-slug}/plan.md` theo template sau:
39
+
40
+ ```markdown
41
+ # Plan: {Feature Name}
42
+
43
+ ## 1. Tổng quan
44
+ - Feature: {tên chức năng}
45
+ - Spec: .evnict/specs/{slug}/spec.md
46
+ - Estimated: {X} tasks, phân bổ BE:{N} / FE:{M} / DB:{K}
47
+ - Priority: {High/Medium/Low}
48
+ - Branch: feature/{slug}
49
+
50
+ ## 2. Database Schema
51
+ ### Tables cần tạo/sửa
52
+ | Table | Column | Type | Nullable | FK | Mô tả |
53
+ |-------|--------|------|----------|-----|-------|
54
+ | {TABLE_NAME} | ID | NUMBER | NO | PK | Primary key |
55
+ | {TABLE_NAME} | {COL} | {TYPE} | {YES/NO} | {FK→TABLE} | {mô tả} |
56
+ | ... | ... | ... | ... | ... | ... |
57
+
58
+ ### Indexes (nếu cần)
59
+ | Index | Columns | Type | Mô tả |
60
+ |-------|---------|------|-------|
61
+ | {IDX_NAME} | {cols} | {UNIQUE/NORMAL} | {mô tả} |
62
+
63
+ ### Migration script naming
64
+ - `V{YYYYMMDD}_{SEQ}__{description}.sql`
65
+
66
+ ## 3. API Design
67
+ ### Endpoints
68
+ | # | Method | Path | Auth | Mô tả |
69
+ |---|--------|------|------|-------|
70
+ | 1 | POST | /api/{module}/{action} | JWT | {mô tả} |
71
+ | ... | ... | ... | ... | ... |
72
+
73
+ ### Request/Response chi tiết cho MỖI endpoint
74
+
75
+ **{METHOD} {PATH}**
76
+ ```json
77
+ // Request
78
+ {
79
+ "field1": "type — description",
80
+ "field2": "type — description",
81
+ "page": 0,
82
+ "size": 20
83
+ }
84
+ // Response (ResponseData wrapper)
85
+ {
86
+ "success": true,
87
+ "message": "OK",
88
+ "data": {
89
+ "content": [{ ... }],
90
+ "totalElements": 100,
91
+ "totalPages": 5
92
+ }
93
+ }
94
+ // Error Response
95
+ {
96
+ "success": false,
97
+ "message": "Lỗi cụ thể",
98
+ "data": null
99
+ }
100
+ ```
101
+
102
+ ## 4. Frontend Design
103
+ ### Pages/Components
104
+ | # | Component | Type | Route | Mô tả |
105
+ |---|-----------|------|-------|-------|
106
+ | 1 | {Name}ListComponent | Page | /{route} | Danh sách + filter + CRUD |
107
+ | 2 | {Name}FormComponent | Dialog | — | Form thêm/sửa |
108
+
109
+ ### UI Elements
110
+ - Filter bar: {dropdowns, date pickers, text inputs}
111
+ - Table: columns mapped từ DTO
112
+ - Actions: Thêm, Sửa, Xóa (confirm dialog)
113
+ - Toolbar: Export Excel (nếu cần)
114
+
115
+ ### Dropdowns cần load
116
+ | Dropdown | API | Value field | Display field |
117
+ |----------|-----|-------------|---------------|
118
+ | {Dropdown name} | {API path} | {value} | {display} |
119
+
120
+ ## 5. Business Rules áp dụng
121
+ | Mã | Rule | Áp dụng cho |
122
+ |----|------|-------------|
123
+ | BR01 | {rule description} | BE: {endpoint} |
124
+ | BR02 | {rule description} | BE + FE: validation |
125
+ | ... | ... | ... |
126
+
127
+ ## 6. Task Breakdown
128
+ ### Thứ tự thực hiện
129
+ ```
130
+ DB Migration → BE Repository → BE Service → BE Controller → FE Service → FE Component → FE Page
131
+ ```
132
+
133
+ ### Dependencies
134
+ - FE tasks chờ BE xong → đọc API contract
135
+ - BE tasks chờ DB migration xong
136
+
137
+ ### Task List
138
+ | # | File | Mô tả | Depends on | Est. |
139
+ |---|------|-------|------------|------|
140
+ | 01 | db-migration | {desc} | — | 3 min |
141
+ | 02 | be-repository | {desc} | 01 | 5 min |
142
+ | ... | ... | ... | ... | ... |
143
+ ```
144
+
145
+ ---
146
+
147
+ ### Bước 4: Sinh Task Files — MỖI FILE PHẢI ≥ 100 DÒNG
148
+
149
+ Tạo thư mục `.evnict/specs/{feature-slug}/tasks/` và sinh task files theo template:
150
+
151
+ ```markdown
152
+ # Task {NN}: {be|fe|db}-{description}
153
+
154
+ ## 1. Mục tiêu
155
+ {Mô tả cụ thể task này làm gì — 3-5 câu.
156
+ Nêu rõ input/output, layer nào trong architecture,
157
+ và kết quả mong đợi khi task hoàn thành.}
158
+
159
+ ## 2. Business Context
160
+ Business rules liên quan đến task này (trích từ spec):
161
+ - BR{XX}: {rule description} — cách áp dụng trong task này
162
+ - BR{YY}: {rule description} — cách áp dụng trong task này
163
+
164
+ Luồng nghiệp vụ liên quan:
165
+ {Trích phần flow liên quan từ spec, giúp Agent hiểu WHY}
166
+
167
+ ## 3. Files cần tạo/sửa
168
+ | File | Action | Mô tả |
169
+ |------|--------|-------|
170
+ | `src/.../XxxRepository.java` | CREATE | Repository JOOQ cho bảng {TABLE} |
171
+ | `src/.../XxxDTO.java` | CREATE | DTO với @JsonProperty UPPER_SNAKE |
172
+ | ... | ... | ... |
173
+
174
+ ## 4. Implementation Guide
175
+ ### Conventions phải tuân thủ (tham chiếu rules)
176
+ - Rule 03: Backend Conventions → {specific convention}
177
+ - Rule 05: Project Conventions → {specific convention}
178
+ - {Liệt kê CỤ THỂ rule nào, section nào áp dụng}
179
+
180
+ ### Code Pattern tham khảo
181
+ Tham khảo file mẫu trong project: `{ReferenceFile.java}`
182
+
183
+ ```java
184
+ // Pattern trích từ {ReferenceFile.java}
185
+ // Agent ĐÃ ĐỌC file thật và paste skeleton ở đây
186
+ @Repository
187
+ public class {EntityName}Repository extends BaseRepositoryImpl<...> {
188
+ @Qualifier(DefineProperties.DSLContextNCPT)
189
+ DSLContext dslContext;
190
+
191
+ @Override
192
+ public List<{EntityName}DTO> getAll(InputCondition input) {
193
+ // JOOQ type-safe query
194
+ // Pattern: select().from().where().fetch()
195
+ }
196
+
197
+ public int insert({EntityName}DTO dto) {
198
+ // Pattern: dslContext.insertInto(TABLE).set(...).execute()
199
+ }
200
+
201
+ public int update({EntityName}DTO dto) {
202
+ // Pattern: dslContext.update(TABLE).set(...).where(...).execute()
203
+ }
204
+
205
+ public int delete(Object id) {
206
+ // Pattern: dslContext.deleteFrom(TABLE).where(...).execute()
207
+ }
208
+ }
209
+ ```
210
+
211
+ ### Validation/Error handling
212
+ - {Mô tả cách xử lý lỗi theo convention dự án}
213
+ - {VD: throw BusinessException("message") cho business rule violations}
214
+
215
+ ## 5. Test Cases (TDD — viết TRƯỚC)
216
+ | # | Test | Input | Expected | Type |
217
+ |---|------|-------|----------|------|
218
+ | 1 | {test_name} | {input description} | {expected result} | Unit |
219
+ | 2 | {test_name} | {input description} | {expected result} | Unit |
220
+ | 3 | {test_name} | {input description} | {expected result} | Unit |
221
+ | 4 | {test_name} | {input description} | {expected result} | Unit |
222
+ | 5 | {test_name} | {input description} | {expected result} | Unit |
223
+
224
+ ### Test code skeleton
225
+ ```java
226
+ @ExtendWith(MockitoExtension.class)
227
+ class {EntityName}{Layer}Test {
228
+ // Arrange — mocks, test data
229
+ // Act — call method under test
230
+ // Assert — verify result + interactions
231
+ }
232
+ ```
233
+
234
+ ## 6. Acceptance Criteria
235
+ - [ ] {Criterion 1 — cụ thể, đo được}
236
+ - [ ] {Criterion 2}
237
+ - [ ] {Criterion 3}
238
+ - [ ] Code theo đúng conventions (rule {XX}, {YY})
239
+ - [ ] Unit tests pass (≥ {N} test cases)
240
+
241
+ ## 7. Dependencies
242
+ - **Requires:** Task {XX} ({description}) hoàn thành
243
+ - **Blocks:** Task {YY} ({description}) — cần output của task này
244
+ - **Related:** {API Contract, handoff, other tasks}
245
+
246
+ ## 8. Estimated: {N} phút
247
+ ```
248
+
249
+ ---
250
+
251
+ ### Bước 5: Sinh API Contract
252
+ Từ API Design trong plan.md, tạo file `.evnict/specs/{feature-slug}/contracts/api-contract.yaml`:
253
+
254
+ ```yaml
255
+ # contracts/api-contract.yaml
256
+ feature: {feature-name}
257
+ generated: {date}
258
+ endpoints:
259
+ - method: POST
260
+ path: /api/{module}/{action}
261
+ description: {mô tả}
262
+ request:
263
+ body:
264
+ fieldName: { type: string, required: true, maxLength: 100 }
265
+ response:
266
+ 200:
267
+ schema: ResponseData
268
+ data:
269
+ id: { type: number }
270
+ 400:
271
+ schema: ResponseData
272
+ error: { message: string }
273
+ ```
274
+
275
+ ### Bước 6: Quality Gate — KIỂM TRA TRƯỚC KHI HIỂN THỊ
276
+
277
+ Agent PHẢI tự kiểm tra trước khi hiển thị plan cho user:
278
+
279
+ | Check | Yêu cầu | Nếu fail |
280
+ |-------|---------|----------|
281
+ | Plan.md sections | Đủ 6 sections | Bổ sung section thiếu |
282
+ | Task file length | Mỗi file ≥ 100 dòng | Bổ sung chi tiết |
283
+ | Test cases | Mỗi task ≥ 3 test cases | Thêm test cases |
284
+ | Code patterns | Mỗi task có skeleton code từ file mẫu THẬT | Đọc lại file mẫu |
285
+ | Dependencies | Mỗi task ghi rõ Requires/Blocks | Bổ sung |
286
+ | Business rules | Task liên quan có trích BR từ spec | Trích bổ sung |
287
+ | API contract | File yaml tồn tại và đầy đủ endpoints | Bổ sung |
288
+
289
+ ### Bước 7: Chờ Confirm
290
+ Hiển thị Plan đã Breakdown ra log cho User duyệt:
291
+ ```
292
+ 📋 Plan đã sinh:
293
+ 📄 plan.md — {N} dòng, {X} tasks
294
+ 📁 tasks/ — {X} files ({be_count} BE, {fe_count} FE, {db_count} DB)
295
+ 📜 contracts/api-contract.yaml
296
+
297
+ Quality Gate: ✅ PASSED (tất cả checks OK)
298
+
299
+ Bạn duyệt plan này không?
300
+ A) ✅ Approve — chạy /evnict-kit:implement
301
+ B) 📝 Sửa — feedback cụ thể
302
+ C) ❌ Hủy — xóa plan, quay lại spec
303
+ ```
304
+
305
+ Sau khi người dùng Approve, hãy nhắc họ chạy lệnh: `/evnict-kit:implement`.
@@ -0,0 +1,51 @@
1
+ # Auto Review
2
+ **Command:** `/evnict-kit:review $ARGUMENTS`
3
+
4
+ $ARGUMENTS chứa mô tả từ user.
5
+
6
+ ## Khi nào dùng
7
+ - Trước khi merge code
8
+ - Review code do AI Agent sinh ra
9
+ - Kiểm tra chất lượng trước pull request
10
+
11
+ ## Input
12
+ - Branch (auto-detect current)
13
+ - `/evnict-kit:review` hoặc `/evnict-kit:review --scope=security`
14
+
15
+ ---
16
+
17
+ ## Bước 1: Code Review
18
+ Gọi skill `evnict-kit-code-review`:
19
+ - 9 hạng mục review (Security, Logic, Quality, Tests, Build, Vibe Coding, Database, Documentation, Performance)
20
+ - Tạo review report
21
+
22
+ ## Bước 2: Merge Checklist
23
+ Gọi skill `evnict-kit-merge-checklist`:
24
+ - 9 hạng mục pre-merge check
25
+ - Build, tests, lint, security, secrets, commits, files, docs, migration
26
+
27
+ ## Bước 3: Verdict
28
+ ```markdown
29
+ ## 📋 Review Summary
30
+
31
+ ### Code Review: {APPROVE | REQUEST CHANGES | BLOCK}
32
+ {Summary of issues}
33
+
34
+ ### Merge Checklist: {PASS | FAIL}
35
+ {Summary of checks}
36
+
37
+ ### Final Verdict: {✅ READY TO MERGE | ❌ NEEDS FIXES}
38
+ {Actions required before merge}
39
+ ```
40
+
41
+ ## Bước 4: Nếu BLOCK/FAIL
42
+ 1. Liệt kê issues cần fix
43
+ 2. Fix issues
44
+ 3. Chạy lại `/evnict-kit:review`
45
+
46
+ ---
47
+
48
+ ## Checklist
49
+ - [ ] Code review completed (9 items)
50
+ - [ ] Merge checklist completed (9 items)
51
+ - [ ] Verdict: APPROVE + PASS → Ready to merge
@@ -0,0 +1,51 @@
1
+ # Spec Archive
2
+ **Command:** `/evnict-kit:spec-archive $ARGUMENTS`
3
+
4
+ $ARGUMENTS chứa mô tả từ user.
5
+
6
+ ## Khi nào dùng
7
+ - Tìm spec đã tạo trước đó
8
+ - Archive spec từ .evnict/ vào docs/
9
+ - Liệt kê tất cả specs
10
+
11
+ ## Input
12
+ - Action: list | find | archive | show
13
+ - `/evnict-kit:spec-archive list` → Liệt kê tất cả specs
14
+ - `/evnict-kit:spec-archive find {keyword}` → Tìm spec theo keyword
15
+ - `/evnict-kit:spec-archive archive {slug}` → Archive spec vào docs/
16
+ - `/evnict-kit:spec-archive show {slug}` → Hiển thị spec
17
+
18
+ ---
19
+
20
+ ## Action: LIST
21
+ ```bash
22
+ ls .evnict/specs/
23
+ ```
24
+ Output:
25
+ ```markdown
26
+ ## 📋 Specs
27
+ | # | Slug | Status | Date | Tasks |
28
+ |---|------|--------|------|-------|
29
+ | 1 | {slug} | {draft|confirmed|archived} | {date} | {count} |
30
+ ```
31
+
32
+ ## Action: FIND
33
+ ```bash
34
+ grep -rl "{keyword}" .evnict/specs/ --include="*.md"
35
+ ```
36
+
37
+ ## Action: ARCHIVE
38
+ ```bash
39
+ cp -r .evnict/specs/{slug}/ docs/specs/{slug}/
40
+ ```
41
+
42
+ ## Action: SHOW
43
+ ```bash
44
+ cat .evnict/specs/{slug}/spec.md
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Checklist
50
+ - [ ] Action executed successfully
51
+ - [ ] Output formatted clearly