@lovehlmmm/primekit 1.0.2 → 1.0.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/{AGENTS.md → agnt.md} +0 -20
- package/cli/dist/commands/init.d.ts +2 -1
- package/cli/dist/commands/init.js +33 -7
- package/cli/dist/index.js +9 -6
- package/package.json +2 -3
package/{AGENTS.md → agnt.md}
RENAMED
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
# PRIMEKIT INTEGRATION INSTRUCTIONS
|
|
2
|
-
> Active AI Coding Suite: PrimeKit (Universal Architecture)
|
|
3
|
-
|
|
4
|
-
## Available Core Skills
|
|
5
|
-
PrimeKit skills are located in `.primekit/skills/`. Read the corresponding `SKILL.md` before executing workflows:
|
|
6
|
-
|
|
7
|
-
1. **explore** (`.primekit/skills/explore/SKILL.md`): Codebase Scout.
|
|
8
|
-
2. **clarify** (`.primekit/skills/clarify/SKILL.md`): Requirement Clarifier.
|
|
9
|
-
3. **plan** (`.primekit/skills/plan/SKILL.md`): Implementation Planner.
|
|
10
|
-
4. **implement** (`.primekit/skills/implement/SKILL.md`): Focused Coder.
|
|
11
|
-
5. **debug** (`.primekit/skills/debug/SKILL.md`): Root Cause Analyzer.
|
|
12
|
-
6. **test** (`.primekit/skills/test/SKILL.md`): Test Execution & Verification.
|
|
13
|
-
7. **review** (`.primekit/skills/review/SKILL.md`): Diff Inspector.
|
|
14
|
-
8. **handoff** (`.primekit/skills/handoff/SKILL.md`): Session Continuity.
|
|
15
|
-
|
|
16
|
-
## Router Rules
|
|
17
|
-
- Small/single edits -> Direct to `implement`.
|
|
18
|
-
- Complex tasks (>2 files) -> Follow `explore` -> `plan` -> `implement` -> `test` -> `review` -> `handoff`.
|
|
19
|
-
|
|
20
|
-
|
|
21
1
|
# AGENT SPECIFICATION: PRIMEKIT (AI CODING SUITE GENERATOR)
|
|
22
2
|
> **Phiên bản Prompt Tối ưu hóa**: 1.0
|
|
23
3
|
> **Mục tiêu**: Hướng dẫn AI Agent tự thiết kế, xây dựng và đóng gói bộ công cụ AI Coding "PrimeKit" (lấy cảm hứng từ PrimeKit) hoàn chỉnh, chạy thực tế, có CLI, bộ skill và framework đánh giá.
|
|
@@ -3,6 +3,7 @@ export interface InitOptions {
|
|
|
3
3
|
dryRun?: boolean;
|
|
4
4
|
assistant?: string;
|
|
5
5
|
force?: boolean;
|
|
6
|
+
global?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function copyFolderRecursive(src: string, dest: string, dryRun: boolean, manifestFiles
|
|
8
|
+
export declare function copyFolderRecursive(src: string, dest: string, dryRun: boolean, manifestFiles?: ManifestFileEntry[]): void;
|
|
8
9
|
export declare function runInit(projectRoot?: string, options?: InitOptions): void;
|
|
@@ -30,23 +30,49 @@ function copyFolderRecursive(src, dest, dryRun, manifestFiles) {
|
|
|
30
30
|
if (!dryRun) {
|
|
31
31
|
fs_1.default.copyFileSync(srcPath, destPath);
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
if (manifestFiles) {
|
|
34
|
+
const sha256 = dryRun ? '' : (0, manifest_1.calculateSHA256)(destPath);
|
|
35
|
+
manifestFiles.push({
|
|
36
|
+
path: path_1.default.relative(process.cwd(), destPath).replace(/\\/g, '/'),
|
|
37
|
+
sha256,
|
|
38
|
+
updatedAt: new Date().toISOString()
|
|
39
|
+
});
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
function runInit(projectRoot = process.cwd(), options = {}) {
|
|
43
45
|
const dryRun = !!options.dryRun;
|
|
44
46
|
const assistant = options.assistant || 'all';
|
|
47
|
+
const isGlobal = !!options.global;
|
|
48
|
+
const userHome = process.env.USERPROFILE || process.env.HOME || 'C:\\Users\\TuanNguyenAnh';
|
|
49
|
+
const sourceSkillsDir = path_1.default.join(__dirname, '..', '..', '..', 'skills');
|
|
50
|
+
if (isGlobal) {
|
|
51
|
+
console.log(`[PrimeKit Init --global] Installing PrimeKit Skills Globally to System AI Assistants...`);
|
|
52
|
+
if (dryRun)
|
|
53
|
+
console.log(`[DRY-RUN MODE] No files will be modified.`);
|
|
54
|
+
const globalTargets = [
|
|
55
|
+
path_1.default.join(userHome, '.gemini', 'config', 'skills'),
|
|
56
|
+
path_1.default.join(userHome, '.claude', 'skills'),
|
|
57
|
+
path_1.default.join(userHome, '.cursor', 'rules')
|
|
58
|
+
];
|
|
59
|
+
let installedCount = 0;
|
|
60
|
+
for (const targetDir of globalTargets) {
|
|
61
|
+
const parentDir = path_1.default.dirname(targetDir);
|
|
62
|
+
if (fs_1.default.existsSync(parentDir) || targetDir.includes('.gemini')) {
|
|
63
|
+
console.log(`- Installing global skills to: ${targetDir}`);
|
|
64
|
+
copyFolderRecursive(sourceSkillsDir, targetDir, dryRun);
|
|
65
|
+
installedCount++;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
console.log(`🎉 PrimeKit Global Initialization complete! (${installedCount} assistant targets updated).`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
// Local Project Scope
|
|
45
72
|
console.log(`[PrimeKit Init] Initializing PrimeKit in ${projectRoot}...`);
|
|
46
73
|
if (dryRun) {
|
|
47
74
|
console.log(`[DRY-RUN MODE] No files will be modified.`);
|
|
48
75
|
}
|
|
49
|
-
const sourceSkillsDir = path_1.default.join(__dirname, '..', '..', '..', 'skills');
|
|
50
76
|
const targetSkillsDir = path_1.default.join(projectRoot, '.primekit', 'skills');
|
|
51
77
|
const manifestFiles = [];
|
|
52
78
|
// Copy skills
|
package/cli/dist/index.js
CHANGED
|
@@ -9,13 +9,13 @@ const uninstall_1 = require("./commands/uninstall");
|
|
|
9
9
|
const import_1 = require("./commands/import");
|
|
10
10
|
function printHelp() {
|
|
11
11
|
console.log(`
|
|
12
|
-
PrimeKit CLI v1.0.
|
|
12
|
+
PrimeKit CLI v1.0.2 - Universal AI Coding Tool Suite Management
|
|
13
13
|
|
|
14
14
|
USAGE:
|
|
15
15
|
$ primekit <command> [options]
|
|
16
16
|
|
|
17
17
|
COMMANDS:
|
|
18
|
-
init Initialize PrimeKit in the
|
|
18
|
+
init Initialize PrimeKit in the workspace (or globally with --global).
|
|
19
19
|
list List installed skills, adapters, and tracked components.
|
|
20
20
|
doctor Diagnose health, SHA256 integrity, and adapter integration.
|
|
21
21
|
update Safely update PrimeKit skills and CLI components.
|
|
@@ -23,14 +23,16 @@ COMMANDS:
|
|
|
23
23
|
uninstall Cleanly remove PrimeKit assets from the workspace.
|
|
24
24
|
|
|
25
25
|
OPTIONS:
|
|
26
|
+
--global, -g Install skills globally to system AI Assistant configs (~/.gemini, ~/.claude, etc.).
|
|
26
27
|
--dry-run Simulate changes without modifying files.
|
|
27
28
|
--assistant Specify target assistant (claude, cursor, codex, all).
|
|
28
29
|
--help, -h Display help message.
|
|
29
30
|
|
|
30
31
|
EXAMPLES:
|
|
31
|
-
$ primekit
|
|
32
|
-
$ primekit
|
|
33
|
-
$
|
|
32
|
+
$ primekit init
|
|
33
|
+
$ primekit init --global
|
|
34
|
+
$ pk init -g
|
|
35
|
+
$ pk import predict
|
|
34
36
|
`);
|
|
35
37
|
}
|
|
36
38
|
function main() {
|
|
@@ -41,12 +43,13 @@ function main() {
|
|
|
41
43
|
return;
|
|
42
44
|
}
|
|
43
45
|
const isDryRun = args.includes('--dry-run');
|
|
46
|
+
const isGlobal = args.includes('--global') || args.includes('-g');
|
|
44
47
|
const isAll = args.includes('--all');
|
|
45
48
|
const assistantIdx = args.indexOf('--assistant');
|
|
46
49
|
const assistant = assistantIdx !== -1 && args[assistantIdx + 1] ? args[assistantIdx + 1] : 'all';
|
|
47
50
|
switch (command) {
|
|
48
51
|
case 'init':
|
|
49
|
-
(0, init_1.runInit)(process.cwd(), { dryRun: isDryRun, assistant });
|
|
52
|
+
(0, init_1.runInit)(process.cwd(), { dryRun: isDryRun, assistant, global: isGlobal });
|
|
50
53
|
break;
|
|
51
54
|
case 'list':
|
|
52
55
|
(0, list_1.runList)(process.cwd());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovehlmmm/primekit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Universal AI Coding Tool Suite Generator inspired by AgentKit",
|
|
5
5
|
"main": "cli/dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"skills",
|
|
13
13
|
"docs",
|
|
14
14
|
"README.md",
|
|
15
|
-
"agnt.md"
|
|
16
|
-
"AGENTS.md"
|
|
15
|
+
"agnt.md"
|
|
17
16
|
],
|
|
18
17
|
"publishConfig": {
|
|
19
18
|
"access": "public"
|