anchi-kit 1.1.3 → 1.1.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.
- package/README.md +1 -1
- package/docs/ROADMAP.md +2 -1
- package/package.json +1 -1
- package/src/commands/init.js +35 -41
- package/src/lib/profiles.js +92 -81
package/README.md
CHANGED
package/docs/ROADMAP.md
CHANGED
|
@@ -100,12 +100,13 @@ Official release of Anchi Kit v1.0.0 với Dynamic Orchestration v2.0.
|
|
|
100
100
|
## 📊 Version Summary
|
|
101
101
|
|
|
102
102
|
| Version | Status | Highlights |
|
|
103
|
-
| ------- | ----------- | ------------------------------------------------------------- |
|
|
103
|
+
| ------- | ----------- | ------------------------------------------------------------- | --- |
|
|
104
104
|
| v1.0.0 | ✅ Released | 22 commands, 21 agents, 55 skills, Dynamic Orchestration v2.0 |
|
|
105
105
|
| v1.1.0 | ✅ Released | Team Support, Hive Mind (Git Sync) |
|
|
106
106
|
| v1.1.1 | ✅ Released | Secure Install, IDE Auto-Detect, Policy Assurance |
|
|
107
107
|
| v1.1.2 | ✅ Released | Fix: npm register conflict resolution |
|
|
108
108
|
| v1.1.3 | ✅ Released | Fix: Missing source files in package |
|
|
109
|
+
| v1.1.4 | ✅ Released | UX Refinement: Capability-Driven Installation | |
|
|
109
110
|
| v1.2+ | 🔮 Future | Voice commands, VS Code extension, Multi-repo |
|
|
110
111
|
|
|
111
112
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anchi-kit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "The Ultimate AI-Native Toolkit for Cursor & Gemini. Installs into any existing project. Includes commands, agents, skills, and architecture presets.",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
package/src/commands/init.js
CHANGED
|
@@ -8,7 +8,7 @@ const fs = require('fs');
|
|
|
8
8
|
const path = require('path');
|
|
9
9
|
const readline = require('readline');
|
|
10
10
|
|
|
11
|
-
const {
|
|
11
|
+
const { getCapabilities, resolveCapabilities, getInstallEstimate } = require('../lib/profiles');
|
|
12
12
|
const { getSkillPackList, resolveSkillPacks } = require('../lib/skillPacks');
|
|
13
13
|
const { detectTechStack, suggestSkills, formatDetectedStack } = require('../lib/detector');
|
|
14
14
|
const { calculateInstallSize, getComponentPaths, formatSize } = require('../lib/sizeCalculator');
|
|
@@ -180,50 +180,44 @@ async function init() {
|
|
|
180
180
|
log.success(` 💡 Suggested skills: ${suggestedSkills.join(', ')}`);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
// Step 2:
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
value:
|
|
183
|
+
// Step 2: Select Capabilities (Professional UX)
|
|
184
|
+
const { getCapabilities, resolveCapabilities, getInstallEstimate } = require('../lib/profiles');
|
|
185
|
+
const capabilities = getCapabilities();
|
|
186
|
+
|
|
187
|
+
const capOptions = capabilities.map(c => ({
|
|
188
|
+
label: `${c.label} - ${colors.gray}${c.description}${colors.reset}`,
|
|
189
|
+
value: c.key,
|
|
190
|
+
default: c.default
|
|
190
191
|
}));
|
|
191
192
|
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
if (selectedProfile !== 'minimal' && selectedProfile !== 'fullstack') {
|
|
199
|
-
const customize = await ask(`\n${colors.yellow}Customize thêm? (y/N): ${colors.reset}`);
|
|
193
|
+
const selectedKeys = await askMultiSelect('What capabilities do you need?', capOptions);
|
|
194
|
+
|
|
195
|
+
if (selectedKeys.includes('custom')) {
|
|
196
|
+
// Fallback logic if needed, but for now we trust the multiselect
|
|
197
|
+
}
|
|
200
198
|
|
|
201
|
-
|
|
202
|
-
// Skill packs
|
|
203
|
-
const packs = getSkillPackList();
|
|
204
|
-
const packOptions = packs.map(p => ({
|
|
205
|
-
label: `${p.name} (${p.skillCount} skills)`,
|
|
206
|
-
value: p.key,
|
|
207
|
-
default: false,
|
|
208
|
-
}));
|
|
199
|
+
const finalConfig = resolveCapabilities(selectedKeys);
|
|
209
200
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
201
|
+
// Step 3: Customize (Optional Add-ons)
|
|
202
|
+
const customize = await ask(`\n${colors.yellow}Advanced options? (y/N): ${colors.reset}`);
|
|
203
|
+
|
|
204
|
+
if (customize.toLowerCase() === 'y') {
|
|
205
|
+
const packs = getSkillPackList();
|
|
206
|
+
const packOptions = packs.map(p => ({
|
|
207
|
+
label: `${p.name} (${p.skillCount} skills)`,
|
|
208
|
+
value: p.key,
|
|
209
|
+
default: false,
|
|
210
|
+
}));
|
|
211
|
+
|
|
212
|
+
const selectedPacks = await askMultiSelect('Add extra skill packs:', packOptions);
|
|
213
|
+
if (selectedPacks.length > 0) {
|
|
214
|
+
const extraSkills = resolveSkillPacks(selectedPacks);
|
|
215
|
+
finalConfig.skills = [...new Set([...finalConfig.skills, ...extraSkills])];
|
|
216
|
+
}
|
|
221
217
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
finalConfig.includeDocs = includeDocs.toLowerCase() === 'y';
|
|
226
|
-
}
|
|
218
|
+
if (!finalConfig.includePresets) {
|
|
219
|
+
const inc = await ask(`Include architecture presets? (y/N): `);
|
|
220
|
+
finalConfig.includePresets = inc.toLowerCase() === 'y';
|
|
227
221
|
}
|
|
228
222
|
}
|
|
229
223
|
|
|
@@ -402,7 +396,7 @@ async function init() {
|
|
|
402
396
|
registerProject(targetPath, {
|
|
403
397
|
name: path.basename(targetPath),
|
|
404
398
|
tech_stack: Object.keys(detected).filter(k => detected[k]),
|
|
405
|
-
architecture:
|
|
399
|
+
architecture: selectedKeys.join('+'),
|
|
406
400
|
installed_at: new Date().toISOString(),
|
|
407
401
|
env: installName
|
|
408
402
|
});
|
package/src/lib/profiles.js
CHANGED
|
@@ -1,100 +1,111 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
//
|
|
2
|
+
// Capability-Driven Installation
|
|
3
3
|
// =============================================================================
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const CAPABILITIES = [
|
|
6
|
+
{
|
|
7
|
+
key: 'coding',
|
|
8
|
+
label: '⚡ Coding Assistant',
|
|
9
|
+
description: 'Daily coding, debugging, refactoring & tests',
|
|
10
|
+
default: true,
|
|
11
|
+
agents: ['fullstack-developer', 'debugger', 'code-reviewer'],
|
|
12
|
+
skills: ['frontend-development', 'backend-development', 'debugging', 'testing'],
|
|
13
|
+
commands: ['start', 'do', 'fix', 'test', 'clean']
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
description: '
|
|
19
|
-
|
|
20
|
-
agents: ['planner', '
|
|
21
|
-
skills: ['
|
|
22
|
-
|
|
23
|
-
includeDocs: false,
|
|
15
|
+
{
|
|
16
|
+
key: 'architect',
|
|
17
|
+
label: '🏗️ System Architect',
|
|
18
|
+
description: 'Planning, DDD, Documentation & Research',
|
|
19
|
+
default: false,
|
|
20
|
+
agents: ['planner', 'architect', 'researcher', 'docs-manager'],
|
|
21
|
+
skills: ['planning', 'ddd-modular-monolith', 'writing-docs', 'research'],
|
|
22
|
+
commands: ['plan', 'design-domain', 'generate']
|
|
24
23
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
description: '
|
|
29
|
-
|
|
30
|
-
agents: ['
|
|
31
|
-
skills: ['
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
{
|
|
25
|
+
key: 'team',
|
|
26
|
+
label: '👥 Team Collaboration',
|
|
27
|
+
description: 'Hive Mind sync, Git hooks & Team guidelines',
|
|
28
|
+
default: false,
|
|
29
|
+
agents: ['git-manager', 'project-manager'],
|
|
30
|
+
skills: ['git-workflow', 'team-processes'],
|
|
31
|
+
commands: ['team', 'sync', 'status'],
|
|
32
|
+
includePresets: true // Often needed for team standards
|
|
34
33
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
description: '
|
|
39
|
-
|
|
40
|
-
agents: ['
|
|
41
|
-
skills: ['
|
|
42
|
-
|
|
43
|
-
includeDocs: true,
|
|
34
|
+
{
|
|
35
|
+
key: 'design',
|
|
36
|
+
label: '🎨 UX/UI Design',
|
|
37
|
+
description: 'Design systems, prototyping & frontend patterns',
|
|
38
|
+
default: false,
|
|
39
|
+
agents: ['ui-ux-designer', 'design-system-architect'],
|
|
40
|
+
skills: ['ui-styling', 'frontend-design', 'aesthetic'],
|
|
41
|
+
commands: ['design-ui', 'demo']
|
|
44
42
|
},
|
|
43
|
+
{
|
|
44
|
+
key: 'security',
|
|
45
|
+
label: '🛡️ Quality & Security',
|
|
46
|
+
description: 'Audit logs, security polices & compliance',
|
|
47
|
+
default: false,
|
|
48
|
+
agents: ['auditor', 'security-guard'],
|
|
49
|
+
skills: ['security-audit', 'code-analysis'],
|
|
50
|
+
commands: ['audit', 'scout'],
|
|
51
|
+
includeDocs: true // Security policies usually need docs
|
|
52
|
+
}
|
|
53
|
+
];
|
|
45
54
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
commands: ['start', 'plan', 'cook', 'fix', 'review', 'scout', 'summary'],
|
|
50
|
-
agents: ['planner', 'code-reviewer', 'project-manager', 'docs-manager', 'git-manager'],
|
|
51
|
-
skills: ['code-review', 'planning', 'debugging'],
|
|
52
|
-
includePresets: false,
|
|
53
|
-
includeDocs: true,
|
|
54
|
-
},
|
|
55
|
+
function getCapabilities() {
|
|
56
|
+
return CAPABILITIES;
|
|
57
|
+
}
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
};
|
|
59
|
+
function resolveCapabilities(selectedKeys) {
|
|
60
|
+
const config = {
|
|
61
|
+
commands: new Set(['start', 'help']), // Always include core
|
|
62
|
+
agents: new Set(),
|
|
63
|
+
skills: new Set(),
|
|
64
|
+
includePresets: false,
|
|
65
|
+
includeDocs: false
|
|
66
|
+
};
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
selectedKeys.forEach(key => {
|
|
69
|
+
const cap = CAPABILITIES.find(c => c.key === key);
|
|
70
|
+
if (cap) {
|
|
71
|
+
cap.commands.forEach(c => config.commands.add(c));
|
|
72
|
+
cap.agents.forEach(a => config.agents.add(a));
|
|
73
|
+
cap.skills.forEach(s => config.skills.add(s));
|
|
74
|
+
if (cap.includePresets) config.includePresets = true;
|
|
75
|
+
if (cap.includeDocs) config.includeDocs = true;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
70
78
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
return {
|
|
80
|
+
commands: Array.from(config.commands),
|
|
81
|
+
agents: Array.from(config.agents),
|
|
82
|
+
skills: Array.from(config.skills),
|
|
83
|
+
includePresets: config.includePresets,
|
|
84
|
+
includeDocs: config.includeDocs
|
|
85
|
+
};
|
|
77
86
|
}
|
|
78
87
|
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
function getInstallEstimate(selectedKeys) {
|
|
89
|
+
// Rough estimate logic
|
|
90
|
+
let files = 10;
|
|
91
|
+
let sizeKB = 50;
|
|
92
|
+
|
|
93
|
+
selectedKeys.forEach(key => {
|
|
94
|
+
if (key === 'coding') { files += 20; sizeKB += 200; }
|
|
95
|
+
if (key === 'architect') { files += 15; sizeKB += 150; }
|
|
96
|
+
if (key === 'team') { files += 10; sizeKB += 50; }
|
|
97
|
+
if (key === 'design') { files += 15; sizeKB += 150; }
|
|
98
|
+
if (key === 'security') { files += 5; sizeKB += 20; }
|
|
99
|
+
});
|
|
82
100
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
ui_ux: { files: 25, size: '~250KB' },
|
|
87
|
-
architect: { files: 50, size: '~500KB' },
|
|
88
|
-
lead: { files: 40, size: '~400KB' },
|
|
89
|
-
fullstack: { files: 400, size: '~5MB' },
|
|
101
|
+
return {
|
|
102
|
+
files: `~${files}`,
|
|
103
|
+
size: `~${Math.ceil(sizeKB)}KB`
|
|
90
104
|
};
|
|
91
|
-
|
|
92
|
-
return estimates[profileKey] || { files: '?', size: '?' };
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
module.exports = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
getProfileEstimate,
|
|
108
|
+
getCapabilities,
|
|
109
|
+
resolveCapabilities,
|
|
110
|
+
getInstallEstimate
|
|
100
111
|
};
|