omgkit 1.0.0
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/LICENSE +21 -0
- package/README.md +252 -0
- package/bin/omgkit.js +122 -0
- package/lib/.gitkeep +0 -0
- package/lib/cli.js +513 -0
- package/lib/index.js +35 -0
- package/package.json +52 -0
- package/plugin/.claude-plugin/.gitkeep +0 -0
- package/plugin/.claude-plugin/plugin.json +11 -0
- package/plugin/agents/.gitkeep +0 -0
- package/plugin/agents/api-designer.md +66 -0
- package/plugin/agents/architect.md +81 -0
- package/plugin/agents/brainstormer.md +60 -0
- package/plugin/agents/cicd-manager.md +50 -0
- package/plugin/agents/code-reviewer.md +45 -0
- package/plugin/agents/copywriter.md +48 -0
- package/plugin/agents/database-admin.md +49 -0
- package/plugin/agents/debugger.md +55 -0
- package/plugin/agents/docs-manager.md +52 -0
- package/plugin/agents/fullstack-developer.md +67 -0
- package/plugin/agents/git-manager.md +48 -0
- package/plugin/agents/journal-writer.md +51 -0
- package/plugin/agents/oracle.md +91 -0
- package/plugin/agents/pipeline-architect.md +52 -0
- package/plugin/agents/planner.md +60 -0
- package/plugin/agents/project-manager.md +43 -0
- package/plugin/agents/researcher.md +37 -0
- package/plugin/agents/scout.md +37 -0
- package/plugin/agents/security-auditor.md +53 -0
- package/plugin/agents/sprint-master.md +84 -0
- package/plugin/agents/tester.md +50 -0
- package/plugin/agents/ui-ux-designer.md +61 -0
- package/plugin/agents/vulnerability-scanner.md +53 -0
- package/plugin/commands/context/.gitkeep +0 -0
- package/plugin/commands/context/checkpoint.md +20 -0
- package/plugin/commands/context/index.md +17 -0
- package/plugin/commands/context/load.md +16 -0
- package/plugin/commands/context/mode.md +20 -0
- package/plugin/commands/context/spawn-collect.md +14 -0
- package/plugin/commands/context/spawn.md +20 -0
- package/plugin/commands/design/.gitkeep +0 -0
- package/plugin/commands/design/cro.md +27 -0
- package/plugin/commands/design/enhance.md +16 -0
- package/plugin/commands/design/fast.md +17 -0
- package/plugin/commands/design/good.md +23 -0
- package/plugin/commands/design/screenshot.md +21 -0
- package/plugin/commands/dev/.gitkeep +0 -0
- package/plugin/commands/dev/feature.md +25 -0
- package/plugin/commands/dev/fix-ci.md +23 -0
- package/plugin/commands/dev/fix-fast.md +19 -0
- package/plugin/commands/dev/fix-hard.md +25 -0
- package/plugin/commands/dev/fix-logs.md +21 -0
- package/plugin/commands/dev/fix-test.md +23 -0
- package/plugin/commands/dev/fix.md +22 -0
- package/plugin/commands/dev/review.md +31 -0
- package/plugin/commands/dev/tdd.md +29 -0
- package/plugin/commands/dev/test.md +25 -0
- package/plugin/commands/git/.gitkeep +0 -0
- package/plugin/commands/git/cm.md +13 -0
- package/plugin/commands/git/commit.md +31 -0
- package/plugin/commands/git/cp.md +14 -0
- package/plugin/commands/git/deploy.md +21 -0
- package/plugin/commands/git/pr.md +20 -0
- package/plugin/commands/git/ship.md +29 -0
- package/plugin/commands/omega/.gitkeep +0 -0
- package/plugin/commands/omega/1000x.md +41 -0
- package/plugin/commands/omega/100x.md +39 -0
- package/plugin/commands/omega/10x.md +47 -0
- package/plugin/commands/omega/dimensions.md +26 -0
- package/plugin/commands/omega/principles.md +43 -0
- package/plugin/commands/planning/.gitkeep +0 -0
- package/plugin/commands/planning/ask.md +21 -0
- package/plugin/commands/planning/brainstorm.md +33 -0
- package/plugin/commands/planning/doc.md +28 -0
- package/plugin/commands/planning/execute-plan.md +28 -0
- package/plugin/commands/planning/plan-detailed.md +32 -0
- package/plugin/commands/planning/plan-parallel.md +35 -0
- package/plugin/commands/planning/plan.md +39 -0
- package/plugin/commands/planning/research.md +39 -0
- package/plugin/commands/quality/.gitkeep +0 -0
- package/plugin/commands/quality/api-gen.md +25 -0
- package/plugin/commands/quality/lint.md +15 -0
- package/plugin/commands/quality/optimize.md +23 -0
- package/plugin/commands/quality/refactor.md +22 -0
- package/plugin/commands/quality/security-scan.md +28 -0
- package/plugin/commands/sprint/.gitkeep +0 -0
- package/plugin/commands/sprint/backlog-add.md +21 -0
- package/plugin/commands/sprint/backlog-prioritize.md +18 -0
- package/plugin/commands/sprint/backlog-show.md +25 -0
- package/plugin/commands/sprint/init.md +27 -0
- package/plugin/commands/sprint/sprint-current.md +22 -0
- package/plugin/commands/sprint/sprint-end.md +33 -0
- package/plugin/commands/sprint/sprint-new.md +31 -0
- package/plugin/commands/sprint/sprint-start.md +17 -0
- package/plugin/commands/sprint/team-ask.md +21 -0
- package/plugin/commands/sprint/team-run.md +29 -0
- package/plugin/commands/sprint/team-status.md +23 -0
- package/plugin/commands/sprint/vision-set.md +21 -0
- package/plugin/commands/sprint/vision-show.md +15 -0
- package/plugin/mcp/.gitkeep +0 -0
- package/plugin/mcp/.mcp.json +20 -0
- package/plugin/mcp/README.md +68 -0
- package/plugin/modes/.gitkeep +0 -0
- package/plugin/modes/autonomous.md +48 -0
- package/plugin/modes/brainstorm.md +33 -0
- package/plugin/modes/deep-research.md +41 -0
- package/plugin/modes/default.md +25 -0
- package/plugin/modes/implementation.md +35 -0
- package/plugin/modes/omega.md +38 -0
- package/plugin/modes/orchestration.md +41 -0
- package/plugin/modes/review.md +44 -0
- package/plugin/modes/token-efficient.md +37 -0
- package/plugin/skills/databases/.gitkeep +0 -0
- package/plugin/skills/databases/mongodb/SKILL.md +43 -0
- package/plugin/skills/databases/postgresql/SKILL.md +43 -0
- package/plugin/skills/databases/prisma/SKILL.md +55 -0
- package/plugin/skills/databases/redis/SKILL.md +41 -0
- package/plugin/skills/devops/.gitkeep +0 -0
- package/plugin/skills/devops/aws/SKILL.md +51 -0
- package/plugin/skills/devops/docker/SKILL.md +54 -0
- package/plugin/skills/devops/github-actions/SKILL.md +63 -0
- package/plugin/skills/devops/kubernetes/SKILL.md +64 -0
- package/plugin/skills/frameworks/.gitkeep +0 -0
- package/plugin/skills/frameworks/django/SKILL.md +47 -0
- package/plugin/skills/frameworks/express/SKILL.md +55 -0
- package/plugin/skills/frameworks/fastapi/SKILL.md +58 -0
- package/plugin/skills/frameworks/laravel/SKILL.md +65 -0
- package/plugin/skills/frameworks/nestjs/SKILL.md +67 -0
- package/plugin/skills/frameworks/nextjs/SKILL.md +77 -0
- package/plugin/skills/frameworks/rails/SKILL.md +56 -0
- package/plugin/skills/frameworks/react/SKILL.md +61 -0
- package/plugin/skills/frameworks/spring/SKILL.md +70 -0
- package/plugin/skills/frameworks/vue/SKILL.md +62 -0
- package/plugin/skills/frontend/.gitkeep +0 -0
- package/plugin/skills/frontend/accessibility/SKILL.md +52 -0
- package/plugin/skills/frontend/frontend-design/SKILL.md +47 -0
- package/plugin/skills/frontend/responsive/SKILL.md +46 -0
- package/plugin/skills/frontend/shadcn-ui/SKILL.md +58 -0
- package/plugin/skills/frontend/tailwindcss/SKILL.md +52 -0
- package/plugin/skills/frontend/threejs/SKILL.md +59 -0
- package/plugin/skills/languages/.gitkeep +0 -0
- package/plugin/skills/languages/javascript/SKILL.md +62 -0
- package/plugin/skills/languages/python/SKILL.md +63 -0
- package/plugin/skills/languages/typescript/SKILL.md +66 -0
- package/plugin/skills/methodology/.gitkeep +0 -0
- package/plugin/skills/methodology/brainstorming/SKILL.md +34 -0
- package/plugin/skills/methodology/defense-in-depth/SKILL.md +51 -0
- package/plugin/skills/methodology/dispatching-parallel-agents/SKILL.md +43 -0
- package/plugin/skills/methodology/executing-plans/SKILL.md +34 -0
- package/plugin/skills/methodology/finishing-development-branch/SKILL.md +41 -0
- package/plugin/skills/methodology/receiving-code-review/SKILL.md +41 -0
- package/plugin/skills/methodology/requesting-code-review/SKILL.md +38 -0
- package/plugin/skills/methodology/root-cause-tracing/SKILL.md +53 -0
- package/plugin/skills/methodology/systematic-debugging/SKILL.md +50 -0
- package/plugin/skills/methodology/test-driven-development/SKILL.md +39 -0
- package/plugin/skills/methodology/testing-anti-patterns/SKILL.md +50 -0
- package/plugin/skills/methodology/token-optimization/SKILL.md +51 -0
- package/plugin/skills/methodology/verification-before-completion/SKILL.md +32 -0
- package/plugin/skills/methodology/writing-plans/SKILL.md +34 -0
- package/plugin/skills/omega/.gitkeep +0 -0
- package/plugin/skills/omega/omega-architecture/SKILL.md +59 -0
- package/plugin/skills/omega/omega-coding/SKILL.md +61 -0
- package/plugin/skills/omega/omega-sprint/SKILL.md +64 -0
- package/plugin/skills/omega/omega-testing/SKILL.md +71 -0
- package/plugin/skills/omega/omega-thinking/SKILL.md +54 -0
- package/plugin/skills/security/.gitkeep +0 -0
- package/plugin/skills/security/better-auth/SKILL.md +53 -0
- package/plugin/skills/security/oauth/SKILL.md +50 -0
- package/plugin/skills/security/owasp/SKILL.md +57 -0
- package/plugin/skills/testing/.gitkeep +0 -0
- package/plugin/skills/testing/playwright/SKILL.md +60 -0
- package/plugin/skills/testing/pytest/SKILL.md +58 -0
- package/plugin/skills/testing/vitest/SKILL.md +64 -0
- package/templates/.gitkeep +0 -0
- package/templates/OMEGA.md +80 -0
- package/templates/backlog.yaml +25 -0
- package/templates/config.yaml +44 -0
- package/templates/settings.json +20 -0
- package/templates/vision.yaml +30 -0
package/lib/cli.js
ADDED
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OMGKIT CLI Core Library
|
|
3
|
+
* Exports all CLI functions for testing and reuse
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { existsSync, mkdirSync, cpSync, readFileSync, rmSync, readdirSync, statSync, writeFileSync } from 'fs';
|
|
7
|
+
import { join, dirname } from 'path';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
|
|
10
|
+
// Package root detection
|
|
11
|
+
let PACKAGE_ROOT;
|
|
12
|
+
|
|
13
|
+
export function setPackageRoot(root) {
|
|
14
|
+
PACKAGE_ROOT = root;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getPackageRoot() {
|
|
18
|
+
if (PACKAGE_ROOT) return PACKAGE_ROOT;
|
|
19
|
+
|
|
20
|
+
// Default: find from current file location
|
|
21
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
22
|
+
const __dirname = dirname(__filename);
|
|
23
|
+
PACKAGE_ROOT = join(__dirname, '..');
|
|
24
|
+
return PACKAGE_ROOT;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Colors for terminal output
|
|
28
|
+
export const COLORS = {
|
|
29
|
+
reset: '\x1b[0m',
|
|
30
|
+
bright: '\x1b[1m',
|
|
31
|
+
green: '\x1b[32m',
|
|
32
|
+
yellow: '\x1b[33m',
|
|
33
|
+
blue: '\x1b[34m',
|
|
34
|
+
magenta: '\x1b[35m',
|
|
35
|
+
cyan: '\x1b[36m',
|
|
36
|
+
red: '\x1b[31m'
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// Logger utilities
|
|
40
|
+
export const log = {
|
|
41
|
+
info: (msg) => console.log(`${COLORS.cyan}ℹ${COLORS.reset} ${msg}`),
|
|
42
|
+
success: (msg) => console.log(`${COLORS.green}✓${COLORS.reset} ${msg}`),
|
|
43
|
+
warn: (msg) => console.log(`${COLORS.yellow}⚠${COLORS.reset} ${msg}`),
|
|
44
|
+
error: (msg) => console.log(`${COLORS.red}✗${COLORS.reset} ${msg}`),
|
|
45
|
+
omega: (msg) => console.log(`${COLORS.magenta}🔮${COLORS.reset} ${msg}`)
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// Banner
|
|
49
|
+
export const BANNER = `
|
|
50
|
+
${COLORS.magenta}╔════════════════════════════════════════════════════════════╗
|
|
51
|
+
║ ║
|
|
52
|
+
║ 🔮 OMGKIT - Omega-Level Development Kit ║
|
|
53
|
+
║ ║
|
|
54
|
+
║ 23 Agents • 54 Commands • 43 Skills • 9 Modes ║
|
|
55
|
+
║ "Think Omega. Build Omega. Be Omega." ║
|
|
56
|
+
║ ║
|
|
57
|
+
╚════════════════════════════════════════════════════════════╝${COLORS.reset}
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Get the plugin installation directory
|
|
62
|
+
* @param {string} [homeDir] - Optional home directory override for testing
|
|
63
|
+
* @returns {string} Plugin directory path
|
|
64
|
+
*/
|
|
65
|
+
export function getPluginDir(homeDir) {
|
|
66
|
+
const home = homeDir || process.env.HOME || process.env.USERPROFILE;
|
|
67
|
+
return join(home, '.claude', 'plugins', 'omgkit');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Get package version from package.json
|
|
72
|
+
* @returns {string} Version string
|
|
73
|
+
*/
|
|
74
|
+
export function getVersion() {
|
|
75
|
+
const pkgPath = join(getPackageRoot(), 'package.json');
|
|
76
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
77
|
+
return pkg.version;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Check if plugin is installed
|
|
82
|
+
* @param {string} [homeDir] - Optional home directory override
|
|
83
|
+
* @returns {boolean}
|
|
84
|
+
*/
|
|
85
|
+
export function isPluginInstalled(homeDir) {
|
|
86
|
+
return existsSync(getPluginDir(homeDir));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Check if project is initialized
|
|
91
|
+
* @param {string} [cwd] - Working directory to check
|
|
92
|
+
* @returns {boolean}
|
|
93
|
+
*/
|
|
94
|
+
export function isProjectInitialized(cwd = process.cwd()) {
|
|
95
|
+
return existsSync(join(cwd, '.omgkit'));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Install the OMGKIT plugin
|
|
100
|
+
* @param {Object} options - Installation options
|
|
101
|
+
* @param {string} [options.homeDir] - Home directory override
|
|
102
|
+
* @param {boolean} [options.silent] - Suppress output
|
|
103
|
+
* @returns {Object} Result with success status and details
|
|
104
|
+
*/
|
|
105
|
+
export function installPlugin(options = {}) {
|
|
106
|
+
const { homeDir, silent = false } = options;
|
|
107
|
+
|
|
108
|
+
if (!silent) {
|
|
109
|
+
console.log(BANNER);
|
|
110
|
+
log.omega('Installing OMGKIT plugin...');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const pluginSrc = join(getPackageRoot(), 'plugin');
|
|
114
|
+
const pluginDest = getPluginDir(homeDir);
|
|
115
|
+
|
|
116
|
+
if (!existsSync(pluginSrc)) {
|
|
117
|
+
if (!silent) log.error('Plugin source not found. Package may be corrupted.');
|
|
118
|
+
return { success: false, error: 'SOURCE_NOT_FOUND' };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
mkdirSync(pluginDest, { recursive: true });
|
|
123
|
+
cpSync(pluginSrc, pluginDest, { recursive: true });
|
|
124
|
+
} catch (err) {
|
|
125
|
+
if (!silent) log.error(`Installation failed: ${err.message}`);
|
|
126
|
+
return { success: false, error: err.message };
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (!silent) {
|
|
130
|
+
log.success('Plugin installed successfully!');
|
|
131
|
+
log.info(`Location: ${pluginDest}`);
|
|
132
|
+
console.log(`
|
|
133
|
+
${COLORS.bright}Installed:${COLORS.reset}
|
|
134
|
+
📦 23 Agents
|
|
135
|
+
⚡ 54 Commands
|
|
136
|
+
🧠 43 Skills
|
|
137
|
+
🎭 9 Modes
|
|
138
|
+
|
|
139
|
+
${COLORS.bright}Next steps:${COLORS.reset}
|
|
140
|
+
1. cd your-project
|
|
141
|
+
2. omgkit init
|
|
142
|
+
3. Open Claude Code and type /help
|
|
143
|
+
|
|
144
|
+
${COLORS.magenta}🔮 Think Omega. Build Omega. Be Omega.${COLORS.reset}
|
|
145
|
+
`);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return { success: true, path: pluginDest };
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Initialize OMGKIT in a project directory
|
|
153
|
+
* @param {Object} options - Initialization options
|
|
154
|
+
* @param {string} [options.cwd] - Working directory
|
|
155
|
+
* @param {boolean} [options.silent] - Suppress output
|
|
156
|
+
* @returns {Object} Result with success status and created files
|
|
157
|
+
*/
|
|
158
|
+
export function initProject(options = {}) {
|
|
159
|
+
const { cwd = process.cwd(), silent = false } = options;
|
|
160
|
+
|
|
161
|
+
if (!silent) {
|
|
162
|
+
console.log(BANNER);
|
|
163
|
+
log.omega('Initializing OMGKIT in current project...');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const templatesDir = join(getPackageRoot(), 'templates');
|
|
167
|
+
const createdFiles = [];
|
|
168
|
+
const createdDirs = [];
|
|
169
|
+
|
|
170
|
+
// Create directories
|
|
171
|
+
const dirs = [
|
|
172
|
+
'.omgkit',
|
|
173
|
+
'.omgkit/sprints',
|
|
174
|
+
'.omgkit/plans',
|
|
175
|
+
'.omgkit/docs',
|
|
176
|
+
'.omgkit/logs'
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
dirs.forEach(dir => {
|
|
180
|
+
const fullPath = join(cwd, dir);
|
|
181
|
+
if (!existsSync(fullPath)) {
|
|
182
|
+
mkdirSync(fullPath, { recursive: true });
|
|
183
|
+
createdDirs.push(dir);
|
|
184
|
+
if (!silent) log.success(`Created ${dir}/`);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// Copy templates
|
|
189
|
+
const templates = [
|
|
190
|
+
{ src: 'config.yaml', dest: '.omgkit/config.yaml' },
|
|
191
|
+
{ src: 'OMEGA.md', dest: 'OMEGA.md' },
|
|
192
|
+
{ src: 'vision.yaml', dest: '.omgkit/sprints/vision.yaml' },
|
|
193
|
+
{ src: 'backlog.yaml', dest: '.omgkit/sprints/backlog.yaml' },
|
|
194
|
+
{ src: 'settings.json', dest: '.omgkit/settings.json' }
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
templates.forEach(({ src, dest }) => {
|
|
198
|
+
const srcPath = join(templatesDir, src);
|
|
199
|
+
const destPath = join(cwd, dest);
|
|
200
|
+
|
|
201
|
+
if (existsSync(srcPath) && !existsSync(destPath)) {
|
|
202
|
+
cpSync(srcPath, destPath);
|
|
203
|
+
createdFiles.push(dest);
|
|
204
|
+
if (!silent) log.success(`Created ${dest}`);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
if (!silent) {
|
|
209
|
+
console.log(`
|
|
210
|
+
${COLORS.bright}Project initialized!${COLORS.reset}
|
|
211
|
+
|
|
212
|
+
${COLORS.bright}Next steps in Claude Code:${COLORS.reset}
|
|
213
|
+
/vision:set Set your product vision
|
|
214
|
+
/sprint:new Create a sprint (add --propose for AI suggestions)
|
|
215
|
+
/team:run Start the AI team
|
|
216
|
+
|
|
217
|
+
${COLORS.bright}Quick commands:${COLORS.reset}
|
|
218
|
+
/feature [desc] Build a feature
|
|
219
|
+
/fix [issue] Fix a bug
|
|
220
|
+
/10x [topic] Find 10x improvement
|
|
221
|
+
|
|
222
|
+
${COLORS.magenta}🔮 Your Omega journey begins!${COLORS.reset}
|
|
223
|
+
`);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return { success: true, createdDirs, createdFiles };
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Run doctor diagnostics
|
|
231
|
+
* @param {Object} options - Options
|
|
232
|
+
* @param {string} [options.homeDir] - Home directory override
|
|
233
|
+
* @param {string} [options.cwd] - Working directory
|
|
234
|
+
* @param {boolean} [options.silent] - Suppress output
|
|
235
|
+
* @returns {Object} Diagnostic results
|
|
236
|
+
*/
|
|
237
|
+
export function doctor(options = {}) {
|
|
238
|
+
const { homeDir, cwd = process.cwd(), silent = false } = options;
|
|
239
|
+
|
|
240
|
+
if (!silent) {
|
|
241
|
+
console.log(BANNER);
|
|
242
|
+
log.omega('Checking OMGKIT installation...\n');
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const pluginDir = getPluginDir(homeDir);
|
|
246
|
+
const result = {
|
|
247
|
+
plugin: { installed: false, components: {} },
|
|
248
|
+
project: { initialized: false, files: {} }
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// Check plugin
|
|
252
|
+
if (!silent) console.log(`${COLORS.bright}Plugin Status${COLORS.reset}`);
|
|
253
|
+
|
|
254
|
+
if (existsSync(pluginDir)) {
|
|
255
|
+
result.plugin.installed = true;
|
|
256
|
+
result.plugin.path = pluginDir;
|
|
257
|
+
if (!silent) log.success(`Installed at ${pluginDir}`);
|
|
258
|
+
|
|
259
|
+
const components = [
|
|
260
|
+
{ path: 'commands', name: 'Commands' },
|
|
261
|
+
{ path: 'agents', name: 'Agents' },
|
|
262
|
+
{ path: 'skills', name: 'Skills' },
|
|
263
|
+
{ path: 'modes', name: 'Modes' }
|
|
264
|
+
];
|
|
265
|
+
|
|
266
|
+
components.forEach(({ path, name }) => {
|
|
267
|
+
const fullPath = join(pluginDir, path);
|
|
268
|
+
const exists = existsSync(fullPath);
|
|
269
|
+
result.plugin.components[path] = exists;
|
|
270
|
+
if (!silent) {
|
|
271
|
+
if (exists) {
|
|
272
|
+
log.success(` ${name}: ✓`);
|
|
273
|
+
} else {
|
|
274
|
+
log.warn(` ${name}: Missing`);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
} else {
|
|
279
|
+
if (!silent) {
|
|
280
|
+
log.error('Not installed');
|
|
281
|
+
log.info('Run: omgkit install');
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Check project
|
|
286
|
+
if (!silent) console.log(`\n${COLORS.bright}Project Status${COLORS.reset}`);
|
|
287
|
+
|
|
288
|
+
if (existsSync(join(cwd, '.omgkit'))) {
|
|
289
|
+
result.project.initialized = true;
|
|
290
|
+
result.project.path = cwd;
|
|
291
|
+
if (!silent) log.success(`Initialized at ${cwd}`);
|
|
292
|
+
|
|
293
|
+
const files = [
|
|
294
|
+
'.omgkit/config.yaml',
|
|
295
|
+
'.omgkit/sprints/vision.yaml',
|
|
296
|
+
'OMEGA.md'
|
|
297
|
+
];
|
|
298
|
+
|
|
299
|
+
files.forEach(f => {
|
|
300
|
+
const exists = existsSync(join(cwd, f));
|
|
301
|
+
result.project.files[f] = exists;
|
|
302
|
+
if (!silent) {
|
|
303
|
+
if (exists) {
|
|
304
|
+
log.success(` ${f}: ✓`);
|
|
305
|
+
} else {
|
|
306
|
+
log.warn(` ${f}: Missing`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
} else {
|
|
311
|
+
if (!silent) {
|
|
312
|
+
log.warn('Not initialized');
|
|
313
|
+
log.info('Run: omgkit init');
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return result;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Uninstall the plugin
|
|
322
|
+
* @param {Object} options - Options
|
|
323
|
+
* @param {string} [options.homeDir] - Home directory override
|
|
324
|
+
* @param {boolean} [options.silent] - Suppress output
|
|
325
|
+
* @returns {Object} Result
|
|
326
|
+
*/
|
|
327
|
+
export function uninstallPlugin(options = {}) {
|
|
328
|
+
const { homeDir, silent = false } = options;
|
|
329
|
+
|
|
330
|
+
if (!silent) {
|
|
331
|
+
console.log(BANNER);
|
|
332
|
+
log.omega('Uninstalling OMGKIT plugin...');
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const pluginDir = getPluginDir(homeDir);
|
|
336
|
+
|
|
337
|
+
if (existsSync(pluginDir)) {
|
|
338
|
+
rmSync(pluginDir, { recursive: true, force: true });
|
|
339
|
+
if (!silent) log.success('Plugin uninstalled!');
|
|
340
|
+
return { success: true, removed: true };
|
|
341
|
+
} else {
|
|
342
|
+
if (!silent) log.warn('Plugin not found.');
|
|
343
|
+
return { success: true, removed: false };
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Count files in a directory recursively
|
|
349
|
+
* @param {string} dir - Directory path
|
|
350
|
+
* @param {string} extension - File extension to count
|
|
351
|
+
* @returns {number} File count
|
|
352
|
+
*/
|
|
353
|
+
export function countFiles(dir, extension = '.md') {
|
|
354
|
+
let count = 0;
|
|
355
|
+
try {
|
|
356
|
+
const items = readdirSync(dir);
|
|
357
|
+
for (const item of items) {
|
|
358
|
+
const fullPath = join(dir, item);
|
|
359
|
+
const stat = statSync(fullPath);
|
|
360
|
+
if (stat.isDirectory()) {
|
|
361
|
+
count += countFiles(fullPath, extension);
|
|
362
|
+
} else if (item.endsWith(extension)) {
|
|
363
|
+
count++;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
} catch (e) {
|
|
367
|
+
// Directory doesn't exist
|
|
368
|
+
}
|
|
369
|
+
return count;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* List directory contents recursively (for display)
|
|
374
|
+
* @param {string} dir - Directory to list
|
|
375
|
+
* @param {string} prefix - Prefix for output
|
|
376
|
+
* @returns {string[]} List of entries
|
|
377
|
+
*/
|
|
378
|
+
export function listDir(dir, prefix = '') {
|
|
379
|
+
const entries = [];
|
|
380
|
+
try {
|
|
381
|
+
readdirSync(dir).forEach(f => {
|
|
382
|
+
const fp = join(dir, f);
|
|
383
|
+
if (statSync(fp).isDirectory()) {
|
|
384
|
+
entries.push({ type: 'dir', name: f, prefix });
|
|
385
|
+
entries.push(...listDir(fp, prefix + ' '));
|
|
386
|
+
} else if (f.endsWith('.md')) {
|
|
387
|
+
entries.push({ type: 'file', name: f.replace('.md', ''), prefix });
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
} catch (e) {
|
|
391
|
+
// Directory doesn't exist
|
|
392
|
+
}
|
|
393
|
+
return entries;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* List components (commands, agents, skills, modes)
|
|
398
|
+
* @param {string} type - Component type or 'all'
|
|
399
|
+
* @param {Object} options - Options
|
|
400
|
+
* @returns {Object} Component listings
|
|
401
|
+
*/
|
|
402
|
+
export function listComponents(type, options = {}) {
|
|
403
|
+
const { homeDir, silent = false } = options;
|
|
404
|
+
|
|
405
|
+
if (!silent) console.log(BANNER);
|
|
406
|
+
|
|
407
|
+
const pluginDir = getPluginDir(homeDir);
|
|
408
|
+
|
|
409
|
+
if (!existsSync(pluginDir)) {
|
|
410
|
+
if (!silent) log.error('Plugin not installed. Run: omgkit install');
|
|
411
|
+
return { success: false, error: 'NOT_INSTALLED' };
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const componentTypes = {
|
|
415
|
+
commands: { title: 'Commands', count: 54 },
|
|
416
|
+
agents: { title: 'Agents', count: 23 },
|
|
417
|
+
skills: { title: 'Skills', count: 43 },
|
|
418
|
+
modes: { title: 'Modes', count: 9 }
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
const result = { success: true, components: {} };
|
|
422
|
+
|
|
423
|
+
const typesToList = (!type || type === 'all') ? Object.keys(componentTypes) : [type];
|
|
424
|
+
|
|
425
|
+
typesToList.forEach(key => {
|
|
426
|
+
if (!componentTypes[key]) return;
|
|
427
|
+
|
|
428
|
+
const { title, count } = componentTypes[key];
|
|
429
|
+
const dir = join(pluginDir, key);
|
|
430
|
+
|
|
431
|
+
if (existsSync(dir)) {
|
|
432
|
+
const entries = listDir(dir, ' ');
|
|
433
|
+
const actualCount = countFiles(dir);
|
|
434
|
+
result.components[key] = { entries, count: actualCount };
|
|
435
|
+
|
|
436
|
+
if (!silent) {
|
|
437
|
+
console.log(`\n${COLORS.bright}${title} (${actualCount})${COLORS.reset}`);
|
|
438
|
+
entries.forEach(e => {
|
|
439
|
+
if (e.type === 'dir') {
|
|
440
|
+
console.log(`${e.prefix}📁 ${e.name}/`);
|
|
441
|
+
} else {
|
|
442
|
+
console.log(`${e.prefix}📄 ${e.name}`);
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
return result;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Parse YAML frontmatter from markdown content
|
|
454
|
+
* @param {string} content - Markdown content
|
|
455
|
+
* @returns {Object|null} Parsed frontmatter or null
|
|
456
|
+
*/
|
|
457
|
+
export function parseFrontmatter(content) {
|
|
458
|
+
// Match frontmatter with optional content between ---
|
|
459
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
460
|
+
if (!match) {
|
|
461
|
+
// Also try to match empty frontmatter (just ---)
|
|
462
|
+
if (content.startsWith('---\n---')) {
|
|
463
|
+
return {};
|
|
464
|
+
}
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
const yaml = match[1];
|
|
469
|
+
const result = {};
|
|
470
|
+
|
|
471
|
+
// Simple YAML parser for frontmatter
|
|
472
|
+
yaml.split('\n').forEach(line => {
|
|
473
|
+
const colonIndex = line.indexOf(':');
|
|
474
|
+
if (colonIndex > 0) {
|
|
475
|
+
const key = line.substring(0, colonIndex).trim();
|
|
476
|
+
const value = line.substring(colonIndex + 1).trim();
|
|
477
|
+
result[key] = value;
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
return result;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Validate a plugin file's frontmatter
|
|
486
|
+
* @param {string} filePath - Path to file
|
|
487
|
+
* @param {string[]} requiredFields - Required frontmatter fields
|
|
488
|
+
* @returns {Object} Validation result
|
|
489
|
+
*/
|
|
490
|
+
export function validatePluginFile(filePath, requiredFields = []) {
|
|
491
|
+
const result = { valid: true, errors: [] };
|
|
492
|
+
|
|
493
|
+
if (!existsSync(filePath)) {
|
|
494
|
+
return { valid: false, errors: ['File does not exist'] };
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
const content = readFileSync(filePath, 'utf8');
|
|
498
|
+
const frontmatter = parseFrontmatter(content);
|
|
499
|
+
|
|
500
|
+
if (!frontmatter) {
|
|
501
|
+
return { valid: false, errors: ['No frontmatter found'] };
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
requiredFields.forEach(field => {
|
|
505
|
+
if (!frontmatter[field]) {
|
|
506
|
+
result.valid = false;
|
|
507
|
+
result.errors.push(`Missing required field: ${field}`);
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
result.frontmatter = frontmatter;
|
|
512
|
+
return result;
|
|
513
|
+
}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OMGKIT - Omega-Level Development Kit
|
|
3
|
+
*
|
|
4
|
+
* Main library exports for programmatic usage
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
// Configuration
|
|
9
|
+
setPackageRoot,
|
|
10
|
+
getPackageRoot,
|
|
11
|
+
getPluginDir,
|
|
12
|
+
getVersion,
|
|
13
|
+
|
|
14
|
+
// Status checks
|
|
15
|
+
isPluginInstalled,
|
|
16
|
+
isProjectInitialized,
|
|
17
|
+
|
|
18
|
+
// Core operations
|
|
19
|
+
installPlugin,
|
|
20
|
+
initProject,
|
|
21
|
+
doctor,
|
|
22
|
+
uninstallPlugin,
|
|
23
|
+
listComponents,
|
|
24
|
+
|
|
25
|
+
// Utilities
|
|
26
|
+
countFiles,
|
|
27
|
+
listDir,
|
|
28
|
+
parseFrontmatter,
|
|
29
|
+
validatePluginFile,
|
|
30
|
+
|
|
31
|
+
// Constants
|
|
32
|
+
COLORS,
|
|
33
|
+
BANNER,
|
|
34
|
+
log
|
|
35
|
+
} from './cli.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omgkit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Omega-Level Development Kit - AI Team System for Claude Code. 23 agents, 54 commands, 43 skills, sprint management.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"claude-code",
|
|
7
|
+
"ai",
|
|
8
|
+
"agents",
|
|
9
|
+
"productivity",
|
|
10
|
+
"omega",
|
|
11
|
+
"development",
|
|
12
|
+
"automation",
|
|
13
|
+
"sprint",
|
|
14
|
+
"team",
|
|
15
|
+
"claudekit"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/user/omgkit",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/user/omgkit.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "OMGKIT Team",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "lib/index.js",
|
|
26
|
+
"bin": {
|
|
27
|
+
"omgkit": "./bin/omgkit.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"bin",
|
|
31
|
+
"lib",
|
|
32
|
+
"plugin",
|
|
33
|
+
"templates",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"test:watch": "vitest",
|
|
39
|
+
"test:coverage": "vitest run --coverage",
|
|
40
|
+
"test:unit": "vitest run tests/unit",
|
|
41
|
+
"test:validation": "vitest run tests/validation",
|
|
42
|
+
"test:integration": "vitest run tests/integration",
|
|
43
|
+
"lint": "eslint ."
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=18.0.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
50
|
+
"vitest": "^4.0.16"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omgkit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Omega-Level Development Kit - AI Team System with 23 agents, 54 commands, 43 skills, and sprint management for 10x-1000x productivity",
|
|
5
|
+
"author": "OMGKIT Team",
|
|
6
|
+
"homepage": "https://github.com/user/omgkit",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"omega", "ai-team", "productivity", "claude-code",
|
|
9
|
+
"agents", "sprint", "automation", "claudekit"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-designer
|
|
3
|
+
description: API design, OpenAPI specs, REST best practices. Use for API design.
|
|
4
|
+
tools: Read, Write, Glob
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 🔌 API Designer Agent
|
|
9
|
+
|
|
10
|
+
You design clean, consistent APIs.
|
|
11
|
+
|
|
12
|
+
## Principles
|
|
13
|
+
1. RESTful design
|
|
14
|
+
2. Consistent naming
|
|
15
|
+
3. Proper status codes
|
|
16
|
+
4. Versioning
|
|
17
|
+
|
|
18
|
+
## OpenAPI Example
|
|
19
|
+
```yaml
|
|
20
|
+
openapi: 3.0.0
|
|
21
|
+
info:
|
|
22
|
+
title: API
|
|
23
|
+
version: 1.0.0
|
|
24
|
+
|
|
25
|
+
paths:
|
|
26
|
+
/users:
|
|
27
|
+
get:
|
|
28
|
+
summary: List users
|
|
29
|
+
responses:
|
|
30
|
+
'200':
|
|
31
|
+
description: Success
|
|
32
|
+
content:
|
|
33
|
+
application/json:
|
|
34
|
+
schema:
|
|
35
|
+
type: array
|
|
36
|
+
items:
|
|
37
|
+
$ref: '#/components/schemas/User'
|
|
38
|
+
post:
|
|
39
|
+
summary: Create user
|
|
40
|
+
requestBody:
|
|
41
|
+
content:
|
|
42
|
+
application/json:
|
|
43
|
+
schema:
|
|
44
|
+
$ref: '#/components/schemas/CreateUser'
|
|
45
|
+
responses:
|
|
46
|
+
'201':
|
|
47
|
+
description: Created
|
|
48
|
+
|
|
49
|
+
components:
|
|
50
|
+
schemas:
|
|
51
|
+
User:
|
|
52
|
+
type: object
|
|
53
|
+
properties:
|
|
54
|
+
id:
|
|
55
|
+
type: string
|
|
56
|
+
email:
|
|
57
|
+
type: string
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Status Codes
|
|
61
|
+
- 200 OK
|
|
62
|
+
- 201 Created
|
|
63
|
+
- 400 Bad Request
|
|
64
|
+
- 401 Unauthorized
|
|
65
|
+
- 404 Not Found
|
|
66
|
+
- 500 Server Error
|