add-skill-kit 3.2.2 → 3.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.
- package/bin/lib/commands/install.js +67 -45
- package/lib/agent-cli/README.md +21 -0
- package/lib/agent-cli/bin/ag-smart.js +158 -0
- package/lib/agent-cli/lib/audit.js +154 -0
- package/lib/agent-cli/lib/audit.test.js +100 -0
- package/lib/agent-cli/lib/auto-learn.js +319 -0
- package/lib/agent-cli/lib/auto_preview.py +148 -0
- package/lib/agent-cli/lib/backup.js +138 -0
- package/lib/agent-cli/lib/backup.test.js +78 -0
- package/lib/agent-cli/lib/checklist.py +222 -0
- package/lib/agent-cli/lib/cognitive-lesson.js +476 -0
- package/lib/agent-cli/lib/completion.js +149 -0
- package/lib/agent-cli/lib/config.js +35 -0
- package/lib/agent-cli/lib/eslint-fix.js +238 -0
- package/lib/agent-cli/lib/evolution-signal.js +215 -0
- package/lib/agent-cli/lib/export.js +86 -0
- package/lib/agent-cli/lib/export.test.js +65 -0
- package/lib/agent-cli/lib/fix.js +337 -0
- package/lib/agent-cli/lib/fix.test.js +80 -0
- package/lib/agent-cli/lib/gemini-export.js +83 -0
- package/lib/agent-cli/lib/generate-registry.js +42 -0
- package/lib/agent-cli/lib/hooks/install-hooks.js +152 -0
- package/lib/agent-cli/lib/hooks/lint-learn.js +172 -0
- package/lib/agent-cli/lib/ignore.js +116 -0
- package/lib/agent-cli/lib/ignore.test.js +58 -0
- package/lib/agent-cli/lib/init.js +124 -0
- package/lib/agent-cli/lib/learn.js +255 -0
- package/lib/agent-cli/lib/learn.test.js +70 -0
- package/lib/agent-cli/lib/migrate-to-v4.js +322 -0
- package/lib/agent-cli/lib/proposals.js +199 -0
- package/lib/agent-cli/lib/proposals.test.js +56 -0
- package/lib/agent-cli/lib/recall.js +820 -0
- package/lib/agent-cli/lib/recall.test.js +107 -0
- package/lib/agent-cli/lib/selfevolution-bridge.js +167 -0
- package/lib/agent-cli/lib/session_manager.py +120 -0
- package/lib/agent-cli/lib/settings.js +203 -0
- package/lib/agent-cli/lib/skill-learn.js +296 -0
- package/lib/agent-cli/lib/stats.js +132 -0
- package/lib/agent-cli/lib/stats.test.js +94 -0
- package/lib/agent-cli/lib/types.js +33 -0
- package/lib/agent-cli/lib/ui/audit-ui.js +146 -0
- package/lib/agent-cli/lib/ui/backup-ui.js +107 -0
- package/lib/agent-cli/lib/ui/clack-helpers.js +317 -0
- package/lib/agent-cli/lib/ui/common.js +83 -0
- package/lib/agent-cli/lib/ui/completion-ui.js +126 -0
- package/lib/agent-cli/lib/ui/custom-select.js +69 -0
- package/lib/agent-cli/lib/ui/dashboard-ui.js +123 -0
- package/lib/agent-cli/lib/ui/evolution-signals-ui.js +107 -0
- package/lib/agent-cli/lib/ui/export-ui.js +94 -0
- package/lib/agent-cli/lib/ui/fix-all-ui.js +191 -0
- package/lib/agent-cli/lib/ui/help-ui.js +49 -0
- package/lib/agent-cli/lib/ui/index.js +169 -0
- package/lib/agent-cli/lib/ui/init-ui.js +56 -0
- package/lib/agent-cli/lib/ui/knowledge-ui.js +55 -0
- package/lib/agent-cli/lib/ui/learn-ui.js +706 -0
- package/lib/agent-cli/lib/ui/lessons-ui.js +148 -0
- package/lib/agent-cli/lib/ui/pretty.js +145 -0
- package/lib/agent-cli/lib/ui/proposals-ui.js +99 -0
- package/lib/agent-cli/lib/ui/recall-ui.js +342 -0
- package/lib/agent-cli/lib/ui/routing-demo.js +79 -0
- package/lib/agent-cli/lib/ui/routing-ui.js +325 -0
- package/lib/agent-cli/lib/ui/settings-ui.js +381 -0
- package/lib/agent-cli/lib/ui/stats-ui.js +123 -0
- package/lib/agent-cli/lib/ui/watch-ui.js +236 -0
- package/lib/agent-cli/lib/verify_all.py +327 -0
- package/lib/agent-cli/lib/watcher.js +181 -0
- package/lib/agent-cli/lib/watcher.test.js +85 -0
- package/lib/agent-cli/package.json +51 -0
- package/lib/agentskillskit-cli/README.md +21 -0
- package/lib/agentskillskit-cli/ag-smart.js +158 -0
- package/lib/agentskillskit-cli/package.json +51 -0
- package/package.json +11 -6
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Smart Watcher - Real-Time File Monitoring
|
|
4
|
+
*
|
|
5
|
+
* Watches for file changes and runs recall automatically.
|
|
6
|
+
* Features:
|
|
7
|
+
* - Debounced file change detection
|
|
8
|
+
* - Pattern frequency tracking
|
|
9
|
+
* - Live feedback on violations
|
|
10
|
+
*
|
|
11
|
+
* Usage: ag-smart watch [directory]
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import fs from "fs";
|
|
15
|
+
import path from "path";
|
|
16
|
+
import { scanFile, loadKnowledge, saveKnowledge } from "./recall.js";
|
|
17
|
+
import { VERSION } from "./config.js";
|
|
18
|
+
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// CONFIGURATION
|
|
21
|
+
// ============================================================================
|
|
22
|
+
|
|
23
|
+
const WATCH_EXTENSIONS = [".js", ".ts", ".tsx", ".jsx", ".mjs"];
|
|
24
|
+
const DEBOUNCE_MS = 300;
|
|
25
|
+
const SKIP_DIRS = ["node_modules", ".git", "dist", "build", ".next", "coverage"];
|
|
26
|
+
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// WATCHER
|
|
29
|
+
// ============================================================================
|
|
30
|
+
|
|
31
|
+
class SmartWatcher {
|
|
32
|
+
constructor(rootDir) {
|
|
33
|
+
this.rootDir = path.resolve(rootDir);
|
|
34
|
+
this.db = loadKnowledge();
|
|
35
|
+
this.debounceTimers = new Map();
|
|
36
|
+
this.sessionStats = {
|
|
37
|
+
filesChecked: 0,
|
|
38
|
+
violationsFound: 0,
|
|
39
|
+
startTime: Date.now()
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Start watching
|
|
45
|
+
*/
|
|
46
|
+
start() {
|
|
47
|
+
console.log(`\n👁️ Smart Watcher v${VERSION}`);
|
|
48
|
+
console.log(`📂 Watching: ${this.rootDir}`);
|
|
49
|
+
console.log(`📚 Loaded ${this.db.lessons.length} pattern(s) from memory`);
|
|
50
|
+
console.log("─".repeat(50));
|
|
51
|
+
console.log("Watching for changes... (Ctrl+C to stop)\n");
|
|
52
|
+
|
|
53
|
+
this.watch(this.rootDir);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Recursively watch directories
|
|
58
|
+
*/
|
|
59
|
+
watch(dir) {
|
|
60
|
+
try {
|
|
61
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
62
|
+
|
|
63
|
+
// Watch current directory
|
|
64
|
+
fs.watch(dir, { persistent: true }, (eventType, filename) => {
|
|
65
|
+
if (filename && eventType === "change") {
|
|
66
|
+
this.handleChange(path.join(dir, filename));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Recurse into subdirs
|
|
71
|
+
for (const entry of entries) {
|
|
72
|
+
if (entry.isDirectory() && !SKIP_DIRS.includes(entry.name)) {
|
|
73
|
+
this.watch(path.join(dir, entry.name));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
} catch (error) {
|
|
77
|
+
// Ignore permission errors
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Handle file change with debouncing
|
|
83
|
+
*/
|
|
84
|
+
handleChange(filePath) {
|
|
85
|
+
const ext = path.extname(filePath);
|
|
86
|
+
if (!WATCH_EXTENSIONS.includes(ext)) return;
|
|
87
|
+
if (!fs.existsSync(filePath)) return;
|
|
88
|
+
|
|
89
|
+
// Debounce
|
|
90
|
+
if (this.debounceTimers.has(filePath)) {
|
|
91
|
+
clearTimeout(this.debounceTimers.get(filePath));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
this.debounceTimers.set(filePath, setTimeout(() => {
|
|
95
|
+
this.checkFile(filePath);
|
|
96
|
+
this.debounceTimers.delete(filePath);
|
|
97
|
+
}, DEBOUNCE_MS));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Check a file against memory
|
|
102
|
+
*/
|
|
103
|
+
checkFile(filePath) {
|
|
104
|
+
const relativePath = path.relative(this.rootDir, filePath);
|
|
105
|
+
const result = scanFile(filePath, this.db, true);
|
|
106
|
+
|
|
107
|
+
this.sessionStats.filesChecked++;
|
|
108
|
+
|
|
109
|
+
if (result.violations.length === 0) {
|
|
110
|
+
console.log(`✅ ${relativePath}`);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
console.log(`\n⚠️ ${relativePath}`);
|
|
115
|
+
|
|
116
|
+
result.violations.forEach(({ lesson, matches }) => {
|
|
117
|
+
this.sessionStats.violationsFound += matches.length;
|
|
118
|
+
|
|
119
|
+
const icon = lesson.severity === "ERROR" ? "❌" : "⚠️";
|
|
120
|
+
console.log(` ${icon} [${lesson.id}] ${lesson.message}`);
|
|
121
|
+
|
|
122
|
+
matches.slice(0, 3).forEach(m => {
|
|
123
|
+
console.log(` L${m.line}: ${m.content}`);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
if (matches.length > 3) {
|
|
127
|
+
console.log(` ... and ${matches.length - 3} more`);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
console.log("");
|
|
132
|
+
|
|
133
|
+
// Save updated stats
|
|
134
|
+
saveKnowledge(this.db);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Print session summary
|
|
139
|
+
*/
|
|
140
|
+
printSummary() {
|
|
141
|
+
const duration = Math.round((Date.now() - this.sessionStats.startTime) / 1000);
|
|
142
|
+
console.log("\n" + "─".repeat(50));
|
|
143
|
+
console.log("📊 Session Summary:");
|
|
144
|
+
console.log(` ⏱️ Duration: ${duration}s`);
|
|
145
|
+
console.log(` 📄 Files checked: ${this.sessionStats.filesChecked}`);
|
|
146
|
+
console.log(` ⚠️ Violations found: ${this.sessionStats.violationsFound}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// ============================================================================
|
|
151
|
+
// CLI
|
|
152
|
+
// ============================================================================
|
|
153
|
+
|
|
154
|
+
const args = process.argv.slice(2);
|
|
155
|
+
const targetDir = args[0] || process.cwd();
|
|
156
|
+
|
|
157
|
+
if (args.includes("--help")) {
|
|
158
|
+
console.log(`
|
|
159
|
+
👁️ Smart Watcher - Real-Time Monitor
|
|
160
|
+
|
|
161
|
+
Usage:
|
|
162
|
+
ag-smart watch [directory]
|
|
163
|
+
|
|
164
|
+
Options:
|
|
165
|
+
--help Show this help
|
|
166
|
+
|
|
167
|
+
The watcher monitors file changes and checks them against
|
|
168
|
+
learned patterns in real-time.
|
|
169
|
+
`);
|
|
170
|
+
process.exit(0);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const watcher = new SmartWatcher(targetDir);
|
|
174
|
+
|
|
175
|
+
// Handle graceful shutdown
|
|
176
|
+
process.on("SIGINT", () => {
|
|
177
|
+
watcher.printSummary();
|
|
178
|
+
process.exit(0);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
watcher.start();
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tests for watcher.js functionality
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect } from "vitest";
|
|
5
|
+
import path from "path";
|
|
6
|
+
|
|
7
|
+
describe("Watcher - Extension Filtering", () => {
|
|
8
|
+
const WATCH_EXTENSIONS = [".js", ".ts", ".tsx", ".jsx", ".mjs"];
|
|
9
|
+
|
|
10
|
+
it("includes JavaScript files", () => {
|
|
11
|
+
const file = "app.js";
|
|
12
|
+
const ext = path.extname(file);
|
|
13
|
+
expect(WATCH_EXTENSIONS.includes(ext)).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it("includes TypeScript files", () => {
|
|
17
|
+
const file = "app.tsx";
|
|
18
|
+
const ext = path.extname(file);
|
|
19
|
+
expect(WATCH_EXTENSIONS.includes(ext)).toBe(true);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("excludes CSS files", () => {
|
|
23
|
+
const file = "styles.css";
|
|
24
|
+
const ext = path.extname(file);
|
|
25
|
+
expect(WATCH_EXTENSIONS.includes(ext)).toBe(false);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("excludes markdown files", () => {
|
|
29
|
+
const file = "README.md";
|
|
30
|
+
const ext = path.extname(file);
|
|
31
|
+
expect(WATCH_EXTENSIONS.includes(ext)).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe("Watcher - Directory Filtering", () => {
|
|
36
|
+
const SKIP_DIRS = ["node_modules", ".git", "dist", "build", ".next", "coverage"];
|
|
37
|
+
|
|
38
|
+
it("skips node_modules", () => {
|
|
39
|
+
expect(SKIP_DIRS.includes("node_modules")).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("skips .git directory", () => {
|
|
43
|
+
expect(SKIP_DIRS.includes(".git")).toBe(true);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("skips dist directory", () => {
|
|
47
|
+
expect(SKIP_DIRS.includes("dist")).toBe(true);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("allows src directory", () => {
|
|
51
|
+
expect(SKIP_DIRS.includes("src")).toBe(false);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("allows lib directory", () => {
|
|
55
|
+
expect(SKIP_DIRS.includes("lib")).toBe(false);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe("Watcher - Session Stats", () => {
|
|
60
|
+
it("initializes session stats correctly", () => {
|
|
61
|
+
const sessionStats = {
|
|
62
|
+
filesChecked: 0,
|
|
63
|
+
violationsFound: 0,
|
|
64
|
+
startTime: Date.now()
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
expect(sessionStats.filesChecked).toBe(0);
|
|
68
|
+
expect(sessionStats.violationsFound).toBe(0);
|
|
69
|
+
expect(typeof sessionStats.startTime).toBe("number");
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("increments file count correctly", () => {
|
|
73
|
+
const sessionStats = { filesChecked: 0 };
|
|
74
|
+
sessionStats.filesChecked++;
|
|
75
|
+
sessionStats.filesChecked++;
|
|
76
|
+
expect(sessionStats.filesChecked).toBe(2);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("calculates duration correctly", () => {
|
|
80
|
+
const startTime = Date.now() - 5000; // 5 seconds ago
|
|
81
|
+
const duration = Math.round((Date.now() - startTime) / 1000);
|
|
82
|
+
expect(duration).toBeGreaterThanOrEqual(4);
|
|
83
|
+
expect(duration).toBeLessThanOrEqual(6);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentskillskit-cli",
|
|
3
|
+
"version": "3.2.1",
|
|
4
|
+
"description": "CLI for Agent Skill Kit",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/config.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"agent": "bin/ag-smart.js",
|
|
9
|
+
"ag-smart": "bin/ag-smart.js",
|
|
10
|
+
"agent-skills-kit": "bin/ag-smart.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"test:watch": "vitest"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@clack/core": "^0.5.0",
|
|
18
|
+
"@clack/prompts": "^0.11.0",
|
|
19
|
+
"boxen": "^8.0.1",
|
|
20
|
+
"clipboardy": "^5.1.0",
|
|
21
|
+
"js-yaml": "^4.1.0",
|
|
22
|
+
"ora": "^9.1.0",
|
|
23
|
+
"picocolors": "^1.1.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"vitest": "^1.6.0"
|
|
27
|
+
},
|
|
28
|
+
"author": "Agent Skill Kit Authors",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/agentskillkit/agent-skills.git",
|
|
33
|
+
"directory": "packages/cli"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"agent",
|
|
37
|
+
"ai",
|
|
38
|
+
"skills",
|
|
39
|
+
"cli",
|
|
40
|
+
"tooling",
|
|
41
|
+
"antigravity"
|
|
42
|
+
],
|
|
43
|
+
"files": [
|
|
44
|
+
"bin",
|
|
45
|
+
"lib",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Agent Skill Kit CLI
|
|
2
|
+
|
|
3
|
+
The intelligent CLI engine for Agent Skill Kit, featuring:
|
|
4
|
+
- **Routing Engine**: Semantic routing validation
|
|
5
|
+
- **Audit System**: Skill usage auditing and metrics
|
|
6
|
+
- **Interactive Mode**: Smart interactive agent interface
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
This package is typically managed by the `add-skill-kit` installer.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Global install (managed by installer)
|
|
14
|
+
npm install -g @agentskillskit/cli
|
|
15
|
+
|
|
16
|
+
# Usage
|
|
17
|
+
agent
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Documentation
|
|
21
|
+
See the main [Agent Skill Kit](https://github.com/agentskillskit/agent-skills) repository.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Smart Agent CLI - ESM Version (Production-Ready)
|
|
4
|
+
*
|
|
5
|
+
* The main interface for humans to interact with the Smart Agent Skills system.
|
|
6
|
+
*
|
|
7
|
+
* Commands:
|
|
8
|
+
* learn Add new lessons to memory
|
|
9
|
+
* recall Check files against memory
|
|
10
|
+
* audit Full compliance audit
|
|
11
|
+
* watch Real-time file monitoring
|
|
12
|
+
* stats Knowledge base statistics
|
|
13
|
+
* install-hooks Install git pre-commit hook
|
|
14
|
+
* lint-learn Auto-learn from ESLint output
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { spawn } from "child_process";
|
|
18
|
+
import path from "path";
|
|
19
|
+
import { fileURLToPath } from "url";
|
|
20
|
+
import { VERSION } from "../lib/config.js";
|
|
21
|
+
|
|
22
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const ARGS = process.argv.slice(2);
|
|
24
|
+
const COMMAND = ARGS[0];
|
|
25
|
+
const SCRIPTS_DIR = path.join(__dirname, "..", "lib");
|
|
26
|
+
const HOOKS_DIR = path.join(SCRIPTS_DIR, "hooks");
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Run a script with given arguments
|
|
30
|
+
* @param {string} script - Script filename (relative to lib/)
|
|
31
|
+
* @param {string[]} args - Arguments to pass
|
|
32
|
+
* @param {string} baseDir - Base directory for script
|
|
33
|
+
*/
|
|
34
|
+
function run(script, args = [], baseDir = SCRIPTS_DIR) {
|
|
35
|
+
const scriptPath = path.join(baseDir, script);
|
|
36
|
+
const child = spawn("node", [scriptPath, ...args], {
|
|
37
|
+
stdio: "inherit",
|
|
38
|
+
shell: true
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
child.on("close", (code) => {
|
|
42
|
+
process.exit(code || 0);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
child.on("error", (err) => {
|
|
46
|
+
console.error(`❌ Failed to run ${script}:`, err.message);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function printHelp() {
|
|
52
|
+
console.log(`
|
|
53
|
+
🤖 Agent Skill Kit CLI v${VERSION}
|
|
54
|
+
|
|
55
|
+
Usage: ag-smart <command> [options]
|
|
56
|
+
|
|
57
|
+
${"─".repeat(50)}
|
|
58
|
+
|
|
59
|
+
📚 CORE COMMANDS:
|
|
60
|
+
|
|
61
|
+
learn Teach a new lesson to the memory
|
|
62
|
+
ag-smart learn --add --pattern "var " --message "Use let/const"
|
|
63
|
+
ag-smart learn --list
|
|
64
|
+
ag-smart learn --remove LEARN-001
|
|
65
|
+
|
|
66
|
+
recall Check file(s) against learned patterns
|
|
67
|
+
ag-smart recall src/app.js
|
|
68
|
+
ag-smart recall ./src
|
|
69
|
+
|
|
70
|
+
audit Run full compliance audit
|
|
71
|
+
ag-smart audit [directory]
|
|
72
|
+
|
|
73
|
+
${"─".repeat(50)}
|
|
74
|
+
|
|
75
|
+
🚀 PRODUCTION FEATURES:
|
|
76
|
+
|
|
77
|
+
watch Real-time file monitoring
|
|
78
|
+
ag-smart watch [directory]
|
|
79
|
+
|
|
80
|
+
stats Knowledge base statistics
|
|
81
|
+
ag-smart stats
|
|
82
|
+
|
|
83
|
+
install-hooks Install git pre-commit hook
|
|
84
|
+
ag-smart install-hooks
|
|
85
|
+
ag-smart install-hooks --remove
|
|
86
|
+
|
|
87
|
+
lint-learn Auto-learn from ESLint JSON output
|
|
88
|
+
npx eslint . --format json | ag-smart lint-learn
|
|
89
|
+
|
|
90
|
+
fix 🆕 Auto-fix violations
|
|
91
|
+
ag-smart fix <file|dir> [--mode safe|aggressive]
|
|
92
|
+
|
|
93
|
+
sync-skills 🆕 Sync hot patterns to SKILL.md
|
|
94
|
+
ag-smart sync-skills
|
|
95
|
+
|
|
96
|
+
${"─".repeat(50)}
|
|
97
|
+
|
|
98
|
+
📖 HELP:
|
|
99
|
+
|
|
100
|
+
help, --help Show this help message
|
|
101
|
+
--version Show version number
|
|
102
|
+
|
|
103
|
+
💡 Docs: https://github.com/agentskillkit/agent-skills
|
|
104
|
+
`);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Command routing
|
|
108
|
+
switch (COMMAND) {
|
|
109
|
+
// Core commands (v2 versions)
|
|
110
|
+
case "learn":
|
|
111
|
+
run("learn.js", ARGS.slice(1));
|
|
112
|
+
break;
|
|
113
|
+
case "recall":
|
|
114
|
+
run("recall.js", ARGS.slice(1));
|
|
115
|
+
break;
|
|
116
|
+
case "audit":
|
|
117
|
+
run("audit.js", ARGS.slice(1));
|
|
118
|
+
break;
|
|
119
|
+
|
|
120
|
+
// Production features
|
|
121
|
+
case "watch":
|
|
122
|
+
run("watcher.js", ARGS.slice(1));
|
|
123
|
+
break;
|
|
124
|
+
case "stats":
|
|
125
|
+
run("stats.js", ARGS.slice(1));
|
|
126
|
+
break;
|
|
127
|
+
case "install-hooks":
|
|
128
|
+
run("install-hooks.js", ARGS.slice(1), HOOKS_DIR);
|
|
129
|
+
break;
|
|
130
|
+
case "lint-learn":
|
|
131
|
+
run("lint-learn.js", ARGS.slice(1), HOOKS_DIR);
|
|
132
|
+
break;
|
|
133
|
+
case "fix":
|
|
134
|
+
run("fix.js", ARGS.slice(1));
|
|
135
|
+
break;
|
|
136
|
+
case "sync-skills":
|
|
137
|
+
run("skill-learn.js", ARGS.slice(1));
|
|
138
|
+
break;
|
|
139
|
+
|
|
140
|
+
// Meta
|
|
141
|
+
case "--version":
|
|
142
|
+
case "-v":
|
|
143
|
+
console.log(VERSION);
|
|
144
|
+
break;
|
|
145
|
+
case "help":
|
|
146
|
+
case "--help":
|
|
147
|
+
case "-h":
|
|
148
|
+
printHelp();
|
|
149
|
+
break;
|
|
150
|
+
case undefined:
|
|
151
|
+
// No command = show interactive Clack menu
|
|
152
|
+
import("../lib/ui/index.js").then(m => m.showMainMenu()).catch(console.error);
|
|
153
|
+
break;
|
|
154
|
+
default:
|
|
155
|
+
console.log(`❌ Unknown command: ${COMMAND}`);
|
|
156
|
+
console.log(" Run 'ag-smart help' for available commands.\n");
|
|
157
|
+
process.exit(1);
|
|
158
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentskillskit-cli",
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"description": "CLI for Agent Skill Kit",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/config.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"agent": "bin/ag-smart.js",
|
|
9
|
+
"ag-smart": "bin/ag-smart.js",
|
|
10
|
+
"agent-skills-kit": "bin/ag-smart.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"test:watch": "vitest"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@clack/core": "^0.5.0",
|
|
18
|
+
"@clack/prompts": "^0.11.0",
|
|
19
|
+
"boxen": "^8.0.1",
|
|
20
|
+
"clipboardy": "^5.1.0",
|
|
21
|
+
"js-yaml": "^4.1.0",
|
|
22
|
+
"ora": "^9.1.0",
|
|
23
|
+
"picocolors": "^1.1.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"vitest": "^1.6.0"
|
|
27
|
+
},
|
|
28
|
+
"author": "Agent Skill Kit Authors",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/agentskillkit/agent-skills.git",
|
|
33
|
+
"directory": "packages/cli"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"agent",
|
|
37
|
+
"ai",
|
|
38
|
+
"skills",
|
|
39
|
+
"cli",
|
|
40
|
+
"tooling",
|
|
41
|
+
"antigravity"
|
|
42
|
+
],
|
|
43
|
+
"files": [
|
|
44
|
+
"bin",
|
|
45
|
+
"lib",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
}
|
|
51
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "add-skill-kit",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "agentskillkit <agentskillkit@gmail.com>",
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
16
16
|
"bin": {
|
|
17
|
-
"kit": "./bin/cli.js"
|
|
17
|
+
"kit": "./bin/cli.js",
|
|
18
|
+
"agent": "./lib/agent-cli/bin/ag-smart.js"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
21
|
"bin/",
|
|
22
|
+
"lib/",
|
|
21
23
|
"specs/",
|
|
22
24
|
"README.md",
|
|
23
25
|
"LICENSE"
|
|
@@ -50,18 +52,21 @@
|
|
|
50
52
|
"access": "public"
|
|
51
53
|
},
|
|
52
54
|
"dependencies": {
|
|
53
|
-
"@clack/
|
|
55
|
+
"@clack/core": "^0.5.0",
|
|
56
|
+
"@clack/prompts": "^0.11.0",
|
|
54
57
|
"boxen": "^8.0.1",
|
|
55
58
|
"chalk": "^5.4.1",
|
|
59
|
+
"clipboardy": "^5.1.0",
|
|
56
60
|
"gradient-string": "^2.0.2",
|
|
61
|
+
"js-yaml": "^4.1.0",
|
|
57
62
|
"kleur": "^4.1.5",
|
|
58
|
-
"ora": "^
|
|
63
|
+
"ora": "^9.1.0",
|
|
64
|
+
"picocolors": "^1.1.1",
|
|
59
65
|
"prompts": "^2.4.2"
|
|
60
66
|
},
|
|
61
67
|
"devDependencies": {
|
|
62
|
-
"agentskillskit-cli": "^3.2.0",
|
|
63
68
|
"eslint": "^8.57.0",
|
|
64
69
|
"prettier": "^3.2.5",
|
|
65
70
|
"vitest": "^1.6.0"
|
|
66
71
|
}
|
|
67
|
-
}
|
|
72
|
+
}
|