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,167 @@
1
+ import { readFileSync, existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import yaml from 'js-yaml';
4
+
5
+ export function loadConfig(cwd = process.cwd()) {
6
+ const configPath = join(cwd, '.evnict', 'config.yaml');
7
+ if (!existsSync(configPath)) return null;
8
+ try {
9
+ const raw = yaml.load(readFileSync(configPath, 'utf8'));
10
+ return normalizeConfig(raw);
11
+ } catch (e) {
12
+ console.warn(`⚠️ Lỗi đọc config.yaml: ${e.message}`);
13
+ return null;
14
+ }
15
+ }
16
+
17
+ /**
18
+ * Normalize config — hỗ trợ cả v0.1.3 (object) và v0.1.4 (array) format cho repos.
19
+ * v0.1.3: repos: { backend: {folder, tech}, frontend: {folder, tech} }
20
+ * v0.1.4: repos: [ {folder, type, tech}, ... ]
21
+ */
22
+ export function normalizeConfig(config) {
23
+ if (!config || !config.repos) return config;
24
+
25
+ // Already v0.1.4 array format
26
+ if (Array.isArray(config.repos)) return config;
27
+
28
+ // v0.1.3 object format → convert to array
29
+ const repos = [];
30
+ if (config.repos.backend) {
31
+ repos.push({
32
+ folder: config.repos.backend.folder,
33
+ type: 'backend',
34
+ tech: config.repos.backend.tech || 'springboot',
35
+ });
36
+ }
37
+ if (config.repos.frontend) {
38
+ repos.push({
39
+ folder: config.repos.frontend.folder,
40
+ type: 'frontend',
41
+ tech: config.repos.frontend.tech || 'angular',
42
+ });
43
+ }
44
+ // Preserve database at top level (not in repos array)
45
+ const database = config.repos.database || config.database;
46
+ config.repos = repos;
47
+ if (database) config.database = database;
48
+ return config;
49
+ }
50
+
51
+ export function mergeWithConfig(cliOptions, cwd = process.cwd()) {
52
+ const config = loadConfig(cwd);
53
+ if (!config) return cliOptions;
54
+
55
+ // Extract first backend/frontend from repos array for backward compat
56
+ const beRepo = config.repos?.find(r => r.type === 'backend');
57
+ const feRepo = config.repos?.find(r => r.type === 'frontend');
58
+
59
+ return {
60
+ name: cliOptions.name || config.project?.name,
61
+ be: cliOptions.be || beRepo?.folder,
62
+ fe: cliOptions.fe || feRepo?.folder,
63
+ tool: cliOptions.tool || config.ai_tool || 'antigravity',
64
+ techBe: cliOptions.techBe || beRepo?.tech || 'springboot',
65
+ techFe: cliOptions.techFe || feRepo?.tech || 'angular',
66
+ db: cliOptions.db || config.database?.type || 'oracle',
67
+ ...cliOptions,
68
+ };
69
+ }
70
+
71
+ export const TECH_LABELS = {
72
+ springboot: 'Java Spring Boot',
73
+ aspnet: 'ASP.NET Core',
74
+ javaee: 'Java EE',
75
+ angular: 'Angular',
76
+ 'react-web': 'React (Web)',
77
+ 'react-mobile': 'React Native (Mobile)',
78
+ 'nextjs': 'Next.js',
79
+ 'nodejs': 'Node.js',
80
+ oracle: 'Oracle Database',
81
+ sqlserver: 'SQL Server',
82
+ };
83
+
84
+ /**
85
+ * Auto-detect suggested type based on tech stack
86
+ */
87
+ export const TECH_TYPE_HINTS = {
88
+ springboot: 'backend',
89
+ aspnet: 'backend',
90
+ javaee: 'backend',
91
+ nodejs: 'backend',
92
+ angular: 'frontend',
93
+ 'react-web': 'frontend',
94
+ 'react-mobile': 'frontend',
95
+ 'nextjs': 'frontend',
96
+ };
97
+
98
+ /**
99
+ * Tool-specific directory and file mapping
100
+ * Mỗi AI tool có cách tổ chức riêng — v0.2.1 Multi-Tool Support
101
+ */
102
+ export const TOOL_MAP = {
103
+ antigravity: {
104
+ agentDir: '.agent',
105
+ contextFile: 'AGENTS.md',
106
+ rulesDir: '.agent/rules',
107
+ skillsDir: '.agent/skills',
108
+ workflowsDir: '.agent/workflows',
109
+ contextDir: '.agent/context',
110
+ ruleExt: '.md',
111
+ deployMode: 'flat', // flat files in dirs
112
+ },
113
+ claude: {
114
+ agentDir: '.claude',
115
+ contextFile: 'CLAUDE.md',
116
+ rulesDir: null, // Rules gộp TRONG CLAUDE.md, không tách file
117
+ skillsDir: null, // Skills = commands
118
+ workflowsDir: '.claude/commands', // Everything is a command
119
+ contextDir: null,
120
+ ruleExt: '.md',
121
+ deployMode: 'mega-file', // 1 big CLAUDE.md + commands/
122
+ },
123
+ cursor: {
124
+ agentDir: '.cursor',
125
+ contextFile: '.cursorrules',
126
+ rulesDir: '.cursor/rules',
127
+ skillsDir: null, // Cursor không có native skills
128
+ workflowsDir: null, // Cursor không có native workflows
129
+ contextDir: null,
130
+ ruleExt: '.mdc', // Cursor uses .mdc extension!
131
+ deployMode: 'rules-only', // Only rules + context
132
+ },
133
+ copilot: {
134
+ agentDir: '.github',
135
+ contextFile: '.github/copilot-instructions.md',
136
+ rulesDir: null, // Rules gộp trong instructions.md
137
+ skillsDir: null,
138
+ workflowsDir: null,
139
+ contextDir: null,
140
+ ruleExt: null,
141
+ deployMode: 'single-file', // Everything in 1 file
142
+ },
143
+ codex: {
144
+ agentDir: '.agent',
145
+ contextFile: 'AGENTS.md',
146
+ rulesDir: '.agent/rules',
147
+ skillsDir: '.agent/skills',
148
+ workflowsDir: '.agent/workflows',
149
+ contextDir: '.agent/context',
150
+ ruleExt: '.md',
151
+ deployMode: 'flat', // Same as antigravity
152
+ },
153
+ };
154
+
155
+ /**
156
+ * Tools that have templates ready — v0.2.1: ALL 5 tools supported
157
+ */
158
+ export const SUPPORTED_TOOLS = ['antigravity', 'claude', 'cursor', 'copilot', 'codex'];
159
+
160
+ export function getToolMap(tool) {
161
+ const map = TOOL_MAP[tool];
162
+ if (!map) {
163
+ console.error(`❌ Tool "${tool}" chưa hỗ trợ. Chọn: ${Object.keys(TOOL_MAP).join('|')}`);
164
+ process.exit(1);
165
+ }
166
+ return map;
167
+ }
@@ -0,0 +1,53 @@
1
+ import { mkdirSync, writeFileSync, readFileSync, existsSync, readdirSync } from 'node:fs';
2
+ import { join, dirname } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+ export const PACKAGE_ROOT = join(__dirname, '../..');
8
+ export const TEMPLATES_DIR = join(PACKAGE_ROOT, 'templates');
9
+
10
+ export function ensureDir(dir, cwd = '') {
11
+ if (!existsSync(dir)) {
12
+ mkdirSync(dir, { recursive: true });
13
+ const display = cwd ? dir.replace(cwd, '.') : dir;
14
+ console.log(` 📁 ${display}`);
15
+ return true;
16
+ }
17
+ return false;
18
+ }
19
+
20
+ export function writeFile(filePath, content, { overwrite = false, cwd = '', silent = false } = {}) {
21
+ if (existsSync(filePath) && !overwrite) {
22
+ if (!silent) {
23
+ const display = cwd ? filePath.replace(cwd, '.') : filePath;
24
+ console.log(` ⏭️ Skip: ${display} (exists)`);
25
+ }
26
+ return false;
27
+ }
28
+ const dir = dirname(filePath);
29
+ if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
30
+ writeFileSync(filePath, content, 'utf8');
31
+ if (!silent) {
32
+ const display = cwd ? filePath.replace(cwd, '.') : filePath;
33
+ console.log(` ✅ ${display}`);
34
+ }
35
+ return true;
36
+ }
37
+
38
+ export function copyTemplateDir(srcDir, destDir, cwd = '') {
39
+ if (!existsSync(srcDir)) return 0;
40
+ let count = 0;
41
+ const entries = readdirSync(srcDir, { withFileTypes: true });
42
+ for (const entry of entries) {
43
+ const srcPath = join(srcDir, entry.name);
44
+ const destPath = join(destDir, entry.name);
45
+ if (entry.isDirectory()) {
46
+ ensureDir(destPath, cwd);
47
+ count += copyTemplateDir(srcPath, destPath, cwd);
48
+ } else {
49
+ if (writeFile(destPath, readFileSync(srcPath, 'utf8'), { cwd })) count++;
50
+ }
51
+ }
52
+ return count;
53
+ }
@@ -0,0 +1,196 @@
1
+ # EVNICT-KIT — Hướng Dẫn Sử Dụng
2
+ > File này được tạo bởi evnict-kit v0.2.1
3
+ > Đọc file này để biết dùng workflow nào cho công việc nào
4
+
5
+ ---
6
+
7
+ ## 📋 Danh sách Workflows theo Case Công Việc
8
+
9
+ ### 🚀 Lần đầu setup dự án
10
+ | Bước | Lệnh | Mô tả |
11
+ |------|-------|-------|
12
+ | 1 | `evnict-kit init` | Chạy ở terminal workspace, tạo cấu trúc |
13
+ | 2 | `/evnict-kit:init-rules` | Mở Agent trong project, Agent đọc code → điền rules |
14
+ | 3 | `/evnict-kit:init-context` | Agent sinh file AGENTS.md từ rules |
15
+ | 4 | `/evnict-kit:init-check` | Agent sinh demo code để verify conventions |
16
+ | 5 | `/evnict-kit:init-wiki` | Setup wiki repo (nếu chưa có) |
17
+ | 6 | `/evnict-kit:wiki-scan-project` | Scan code hiện có → nạp wiki |
18
+
19
+ ---
20
+
21
+ ### 🔧 Phát triển Feature LỚN (cần cả BE + FE + DB)
22
+ | Bước | Lệnh | Mô tả |
23
+ |------|-------|-------|
24
+ | 1 | `/evnict-kit:feature-large "mô tả"` | Brainstorm → Spec → Clarify |
25
+ | 2 | `/evnict-kit:plan` | Sinh plan + task files chi tiết |
26
+ | 3 | `/evnict-kit:implement` | TDD per subtask (STOP-AND-ASK) |
27
+ | 4 | `/evnict-kit:handoff` | Chuyển giao cho FE/BE Agent |
28
+ | 5 | `/evnict-kit:review` | Auto review trước merge |
29
+ | 6 | `/evnict-kit:wiki-archive-feature` | Nạp tri thức vào wiki |
30
+
31
+ ---
32
+
33
+ ### 🔨 Phát triển Feature NHỎ (sửa UI, thêm field)
34
+ | Bước | Lệnh | Mô tả |
35
+ |------|-------|-------|
36
+ | 1 | `/evnict-kit:feature-small "mô tả"` | Query wiki → plan nhanh |
37
+ | 2 | `/evnict-kit:implement` | TDD implement |
38
+ | 3 | `/evnict-kit:wiki-archive-feature` | Nạp wiki (nếu > 20 dòng) |
39
+
40
+ ---
41
+
42
+ ### 🐛 Sửa Bug
43
+ | Bước | Lệnh | Mô tả |
44
+ |------|-------|-------|
45
+ | 1 | `/evnict-kit:bug-fix "mô tả bug"` | Query wiki → classify → TDD fix |
46
+ | 2 | `/evnict-kit:wiki-archive-feature` | Nạp wiki (tùy chọn) |
47
+
48
+ ---
49
+
50
+ ### 🔒 Kiểm tra / Fix ATTT
51
+ | Bước | Lệnh | Mô tả |
52
+ |------|-------|-------|
53
+ | 1 | `/evnict-kit:attt --scan` | Quét toàn bộ project |
54
+ | 2 | `/evnict-kit:attt "module"` | Check module cụ thể |
55
+ | 3 | Wiki tự động push | ATTT fix luôn nạp wiki |
56
+
57
+ ---
58
+
59
+ ### 📚 Wiki — Quản lý Tri thức
60
+ | Lệnh | Khi nào |
61
+ |-------|---------|
62
+ | `/evnict-kit:wiki-query "từ khóa"` | Tìm thông tin trước khi làm task |
63
+ | `/evnict-kit:wiki-archive-feature` | Nạp tri thức sau khi xong feature |
64
+ | `/evnict-kit:wiki-scan-project` | Scan code → nạp wiki (lần đầu) |
65
+ | `/evnict-kit:init-wiki` | Setup wiki repo |
66
+
67
+ ---
68
+
69
+ ### 🤝 Handoff — Trao đổi giữa BE↔FE
70
+ | Lệnh | Khi nào |
71
+ |-------|---------|
72
+ | `/evnict-kit:handoff` | BE xong API → chuyển cho FE |
73
+ | Đọc `handoff.md` | FE mở project → đọc yêu cầu từ BE |
74
+
75
+ ---
76
+
77
+ ### 👀 Review + Merge
78
+ | Lệnh | Khi nào |
79
+ |-------|---------|
80
+ | `/evnict-kit:review` | Trước khi merge PR |
81
+ | `/evnict-kit:finish-branch` | Merge/PR/cleanup branch (tham khảo skill) |
82
+
83
+ ---
84
+
85
+ ### 👋 Onboard Member Mới
86
+ | Lệnh | Khi nào |
87
+ |-------|---------|
88
+ | `/evnict-kit:wiki-query "overview"` | Tìm hiểu project |
89
+ | Đọc `AGENTS.md` | Context file tổng quan |
90
+ | Đọc `GETTING-STARTED.md` | File này! |
91
+
92
+ ---
93
+
94
+ ## 📂 Cấu trúc thư mục Agent
95
+ ```
96
+ .agent/
97
+ ├── rules/ ← 5 files: quy tắc chung, security, BE, FE, project
98
+ ├── skills/ ← 22 folders: kỹ năng cho Agent
99
+ ├── workflows/ ← 17 files: quy trình cho từng loại công việc
100
+ └── context/ ← Context bổ sung
101
+ AGENTS.md ← Context file chính (Agent đọc đầu tiên)
102
+ Instruct-Agent-AI.md ← Hướng dẫn init rules/context
103
+ GETTING-STARTED.md ← File này — hướng dẫn sử dụng
104
+ ```
105
+
106
+ ---
107
+
108
+ ## ⚡ Quick Tips
109
+ - Mọi lệnh `/evnict-kit:xxx` gõ trong Agent chat, không phải terminal
110
+ - Agent tự biết đọc workflow file khi nhận lệnh
111
+ - Tri thức wiki dùng chung giữa BE+FE (qua symlink)
112
+ - Handoff dùng file `.evnict/handoff/handoff.md` — mở để xem yêu cầu từ Agent khác
113
+ - Sau mỗi feature → nhớ nạp wiki (Agent sẽ gợi ý)
114
+
115
+ ---
116
+
117
+ ## ❓ Workflow thường dùng — Quick Ref
118
+
119
+ ### Luồng phát triển đầy đủ (Feature Large)
120
+ ```
121
+ feature-large → plan → implement → handoff → review → wiki-archive-feature
122
+ ```
123
+
124
+ ### Luồng phát triển nhanh (Feature Small)
125
+ ```
126
+ feature-small → implement → wiki-archive-feature (optional)
127
+ ```
128
+
129
+ ### Luồng sửa lỗi
130
+ ```
131
+ bug-fix → implement fix → wiki-archive-feature (optional)
132
+ ```
133
+
134
+ ### Luồng ATTT
135
+ ```
136
+ attt --scan → fix issues → re-scan → wiki (auto)
137
+ ```
138
+
139
+ ### Luồng setup ban đầu
140
+ ```
141
+ evnict-kit init → init-rules → init-context → init-check → init-wiki → wiki-scan-project
142
+ ```
143
+
144
+ ---
145
+
146
+ ## 🔄 Handoff — Trao đổi giữa BE↔FE Agents
147
+
148
+ ### BE Agent xong → chuyển cho FE
149
+ 1. Chạy `/evnict-kit:handoff` trong project BE
150
+ 2. Agent tự sinh entry mới trong `.evnict/handoff/handoff.md`
151
+ 3. Entry có status 🔴 Chờ xử lý
152
+ 4. Chuyển sang FE project → Agent đọc `handoff.md` → implement
153
+
154
+ ### FE Agent xong → báo lại BE
155
+ 1. FE Agent update status entry → 🟢 Đã xử lý
156
+ 2. Điền "Kết quả xử lý" trong entry
157
+
158
+ ### Theo dõi trạng thái
159
+ - 🔴 Chờ xử lý — chưa ai xử lý
160
+ - 🟡 Đang xử lý — đang được Agent xử lý
161
+ - 🟢 Đã xử lý — hoàn thành
162
+
163
+ ---
164
+
165
+ ## 📚 Wiki — Best Practices
166
+
167
+ ### Khi nào nạp wiki?
168
+ - ✅ Sau khi xong feature lớn → `/evnict-kit:wiki-archive-feature`
169
+ - ✅ Sau khi fix bug quan trọng → option A trong bug-fix
170
+ - ✅ ATTT fix → tự động nạp (bắt buộc)
171
+ - ✅ Lần đầu setup → `/evnict-kit:wiki-scan-project`
172
+
173
+ ### Khi nào truy vấn wiki?
174
+ - 🔍 Trước khi bắt đầu feature mới
175
+ - 🔍 Khi cần hiểu business rule
176
+ - 🔍 Khi fix bug → tìm context
177
+ - 🔍 Khi onboard member mới
178
+
179
+ ---
180
+
181
+ ## 🆘 Khi gặp vấn đề
182
+ | Vấn đề | Giải pháp |
183
+ |--------|-----------|
184
+ | Agent không hiểu lệnh | Kiểm tra file workflow trong `.agent/workflows/` |
185
+ | Wiki không truy cập được | Check symlink: `ls -la {project_name}-wiki/` |
186
+ | Handoff không thấy | Check `.evnict/handoff/handoff.md` |
187
+ | Muốn thêm project | Chạy `evnict-kit add <folder>` ở terminal workspace |
188
+ | Wiki trống sau init | Chạy `/evnict-kit:wiki-scan-project` |
189
+ | Ingest lỗi | Chạy `/evnict-kit:init-wiki` rồi thử lại |
190
+
191
+ ---
192
+
193
+ ## 📌 Phiên bản
194
+ - **evnict-kit:** v0.2.1
195
+ - **Ngày tạo:** {{DATE}}
196
+ - **Project:** {{PROJECT_NAME}}