@joelbonito/mcp-server 5.2.1 → 5.4.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.
@@ -89,18 +89,20 @@ ${agentList}
89
89
 
90
90
  When the user says "implement Epic X" or "implement Story Y.Z":
91
91
 
92
- 1. Read backlog: \`docs/BACKLOG.md\`
93
- 2. If \`docs/stories/\` doesn't exist, suggest running \`shard_epic.py shard\`
94
- 3. Detect domain Activate appropriate agent
95
- 4. Implement following agent rules
96
- 5. After completion, update progress
92
+ 1. Read \`docs/PROJECT_STATUS.md\` — know which story to open
93
+ 2. Open story file in \`docs/stories/STORY-*.md\` full implementation context
94
+ 3. Validate dependencies (depends_on field must all be done)
95
+ 4. Activate agent indicated in story file's \`agent\` field
96
+ 5. Implement following agent rules
97
+ 6. Run finish_task.py to update backlog + story + PROJECT_STATUS
98
+
99
+ > Backlog is just an index of checkboxes. Never read it for implementation context.
97
100
 
98
101
  ## Post-Define Flow
99
102
 
100
- After \`/define\` or \`/readiness\`:
101
- 1. \`/track\` — Initialize tracking
102
- 2. \`shard_epic.py shard\` Split backlog into story files
103
- 3. Start implementing Story 1.1
103
+ After \`/define\`:
104
+ 1. \`/track\` — Verify progress
105
+ 2. Start implementing (PROJECT_STATUS tells you which story is next)
104
106
  `;
105
107
  return { contents: [{ uri: "inove://system-prompt", text: prompt, mimeType: "text/markdown" }] };
106
108
  });
package/dist/init.d.ts CHANGED
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Bootstrap generator for Inove AI Framework (MCP Mode).
3
+ * CLI entry point for Inove AI Framework.
4
4
  *
5
- * Creates minimal instruction files that bridge /slash and @agent
6
- * patterns to the MCP tools (execute_workflow, activate_agent).
5
+ * Dispatches commands:
6
+ * npx @joelbonito/mcp-server install # Full framework install
7
+ * npx @joelbonito/mcp-server update # Update framework (preserves instruction files)
8
+ * npx @joelbonito/mcp-server init # MCP-only mode (lightweight bootstrap)
7
9
  *
8
- * Usage:
9
- * npx @joelbonito/mcp-server init # generates CLAUDE.md + AGENTS.md
10
- * npx @joelbonito/mcp-server init --claude # only CLAUDE.md
11
- * npx @joelbonito/mcp-server init --codex # only AGENTS.md
10
+ * The MCP server itself runs via `inove-mcp` (dist/index.js).
12
11
  */
13
12
  export {};
package/dist/init.js CHANGED
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Bootstrap generator for Inove AI Framework (MCP Mode).
3
+ * CLI entry point for Inove AI Framework.
4
4
  *
5
- * Creates minimal instruction files that bridge /slash and @agent
6
- * patterns to the MCP tools (execute_workflow, activate_agent).
5
+ * Dispatches commands:
6
+ * npx @joelbonito/mcp-server install # Full framework install
7
+ * npx @joelbonito/mcp-server update # Update framework (preserves instruction files)
8
+ * npx @joelbonito/mcp-server init # MCP-only mode (lightweight bootstrap)
7
9
  *
8
- * Usage:
9
- * npx @joelbonito/mcp-server init # generates CLAUDE.md + AGENTS.md
10
- * npx @joelbonito/mcp-server init --claude # only CLAUDE.md
11
- * npx @joelbonito/mcp-server init --codex # only AGENTS.md
10
+ * The MCP server itself runs via `inove-mcp` (dist/index.js).
12
11
  */
13
12
  import { writeFileSync, existsSync } from "node:fs";
14
13
  import { resolve } from "node:path";
14
+ // ---------------------------------------------------------------------------
15
+ // MCP-only init (lightweight bootstrap)
16
+ // ---------------------------------------------------------------------------
15
17
  const WORKFLOWS = [
16
18
  "define", "debug", "create", "brainstorm", "enhance", "deploy",
17
19
  "test", "track", "status", "log", "finish", "orchestrate", "plan",
@@ -69,61 +71,76 @@ For ALL requests involving code, STOP and ASK first:
69
71
  - Code comments and variables in English
70
72
  - Respond in the user's language
71
73
  `;
72
- const CLAUDE_MD = `# Inove AI Framework (MCP Mode)
73
-
74
- > This project uses the Inove AI Framework via MCP server (\`@joelbonito/mcp-server\`).
75
- > No local framework files needed — all agents, skills and workflows are served via MCP.
76
-
77
- ${SHARED_RULES}`;
78
- const AGENTS_MD = `# Inove AI Framework (MCP Mode)
79
-
80
- > This project uses the Inove AI Framework via MCP server (\`@joelbonito/mcp-server\`).
81
- > No local framework files needed — all agents, skills and workflows are served via MCP.
82
-
83
- ${SHARED_RULES}`;
84
- function main() {
85
- const args = process.argv.slice(2);
86
- // Remove "init" if passed as first arg (from bin dispatch)
87
- if (args[0] === "init")
88
- args.shift();
74
+ function mcpInit(args) {
89
75
  const claudeOnly = args.includes("--claude");
90
76
  const codexOnly = args.includes("--codex");
91
77
  const both = !claudeOnly && !codexOnly;
92
78
  const cwd = process.cwd();
93
79
  let created = 0;
94
- if (both || claudeOnly) {
95
- const path = resolve(cwd, "CLAUDE.md");
96
- if (existsSync(path)) {
97
- console.log(`⚠️ CLAUDE.md already existsskipping (use --force to overwrite is not supported, merge manually)`);
98
- }
99
- else {
100
- writeFileSync(path, CLAUDE_MD, "utf-8");
101
- console.log(`✅ Created CLAUDE.md`);
102
- created++;
103
- }
104
- }
105
- if (both || codexOnly) {
106
- const path = resolve(cwd, "AGENTS.md");
80
+ const header = `# Inove AI Framework (MCP Mode)
81
+
82
+ > This project uses the Inove AI Framework via MCP server (\`@joelbonito/mcp-server\`).
83
+ > No local framework files needed all agents, skills and workflows are served via MCP.
84
+ `;
85
+ const files = [
86
+ { name: "CLAUDE.md", condition: both || claudeOnly },
87
+ { name: "AGENTS.md", condition: both || codexOnly },
88
+ { name: "GEMINI.md", condition: both },
89
+ ];
90
+ for (const { name, condition } of files) {
91
+ if (!condition)
92
+ continue;
93
+ const path = resolve(cwd, name);
107
94
  if (existsSync(path)) {
108
- console.log(`⚠️ AGENTS.md already exists — skipping`);
95
+ console.log(` ${name} already exists — skipping`);
109
96
  }
110
97
  else {
111
- writeFileSync(path, AGENTS_MD, "utf-8");
112
- console.log(`✅ Created AGENTS.md`);
98
+ writeFileSync(path, header + SHARED_RULES, "utf-8");
99
+ console.log(` Created ${name}`);
113
100
  created++;
114
101
  }
115
102
  }
116
103
  if (created > 0) {
117
- console.log(`\n🚀 Inove AI Framework (MCP Mode) initialized!`);
118
- console.log(` Now you can use /slash commands and @agent mentions.`);
119
- console.log(`\n Make sure the MCP server is configured:`);
120
- console.log(` • Claude Code: claude mcp add inove-ai -- npx -y @joelbonito/mcp-server`);
121
- console.log(` • Codex CLI: codex mcp add inove-ai -- npx -y @joelbonito/mcp-server`);
122
- console.log(` • Cursor: .cursor/mcp.json`);
104
+ console.log(`\nInove AI Framework (MCP Mode) initialized!`);
105
+ console.log(`Now you can use /slash commands and @agent mentions.\n`);
106
+ console.log(`Make sure the MCP server is configured:`);
107
+ console.log(` claude mcp add inove-ai -- npx -y @joelbonito/mcp-server`);
108
+ console.log(` codex mcp add inove-ai -- npx -y @joelbonito/mcp-server`);
123
109
  }
124
110
  else {
125
111
  console.log(`\nNothing to create — files already exist.`);
126
112
  }
127
113
  }
128
- main();
114
+ // ---------------------------------------------------------------------------
115
+ // Main dispatcher
116
+ // ---------------------------------------------------------------------------
117
+ async function main() {
118
+ const args = process.argv.slice(2);
119
+ const command = args[0];
120
+ switch (command) {
121
+ case "install":
122
+ case "update": {
123
+ // Dynamic import to avoid loading registry.ts for non-install commands
124
+ const { installFramework } = await import("./install.js");
125
+ installFramework(process.cwd(), command === "update");
126
+ break;
127
+ }
128
+ case "init":
129
+ mcpInit(args.slice(1));
130
+ break;
131
+ default:
132
+ console.log(`Inove AI Framework CLI\n`);
133
+ console.log(`Usage:`);
134
+ console.log(` npx @joelbonito/mcp-server install Full framework install (agents, skills, workflows, scripts)`);
135
+ console.log(` npx @joelbonito/mcp-server update Update framework (preserves CLAUDE.md, AGENTS.md, GEMINI.md)`);
136
+ console.log(` npx @joelbonito/mcp-server init MCP-only mode (lightweight bootstrap files)`);
137
+ console.log(``);
138
+ console.log(`The MCP server runs automatically when configured in your AI tool.`);
139
+ process.exit(command ? 1 : 0);
140
+ }
141
+ }
142
+ main().catch((err) => {
143
+ console.error("Error:", err.message);
144
+ process.exit(1);
145
+ });
129
146
  //# sourceMappingURL=init.js.map
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Full framework installer for Inove AI Framework.
4
+ *
5
+ * Extracts the embedded content from registry.ts and writes it to disk,
6
+ * creating the full .agents/ structure, instruction files, and symlinks.
7
+ *
8
+ * Usage:
9
+ * npx @joelbonito/mcp-server install # Full install
10
+ * npx @joelbonito/mcp-server update # Update (preserves CLAUDE.md, AGENTS.md, GEMINI.md)
11
+ */
12
+ export declare function installFramework(cwd: string, isUpdate: boolean): void;
@@ -0,0 +1,186 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Full framework installer for Inove AI Framework.
4
+ *
5
+ * Extracts the embedded content from registry.ts and writes it to disk,
6
+ * creating the full .agents/ structure, instruction files, and symlinks.
7
+ *
8
+ * Usage:
9
+ * npx @joelbonito/mcp-server install # Full install
10
+ * npx @joelbonito/mcp-server update # Update (preserves CLAUDE.md, AGENTS.md, GEMINI.md)
11
+ */
12
+ import { writeFileSync, mkdirSync, existsSync, symlinkSync, readlinkSync, unlinkSync, lstatSync } from "node:fs";
13
+ import { resolve, join, dirname } from "node:path";
14
+ import { EMBEDDED_AGENTS, EMBEDDED_SKILLS, EMBEDDED_WORKFLOWS, EMBEDDED_ARCHITECTURE, EMBEDDED_INSTRUCTIONS, EMBEDDED_SCRIPTS, EMBEDDED_CONFIG, EMBEDDED_ROOT_FILES, EMBEDDED_SQUAD_TEMPLATES, } from "./registry.js";
15
+ // ---------------------------------------------------------------------------
16
+ // Helpers
17
+ // ---------------------------------------------------------------------------
18
+ function ensureDir(dir) {
19
+ mkdirSync(dir, { recursive: true });
20
+ }
21
+ function writeFile(path, content) {
22
+ ensureDir(dirname(path));
23
+ writeFileSync(path, content, "utf-8");
24
+ }
25
+ function ensureSymlink(target, linkPath) {
26
+ ensureDir(dirname(linkPath));
27
+ if (lstatSync(linkPath, { throwIfNoEntry: false })?.isSymbolicLink()) {
28
+ const current = readlinkSync(linkPath);
29
+ if (current === target)
30
+ return; // already correct
31
+ unlinkSync(linkPath);
32
+ }
33
+ else if (existsSync(linkPath)) {
34
+ return; // real directory exists, don't replace
35
+ }
36
+ symlinkSync(target, linkPath);
37
+ }
38
+ // ---------------------------------------------------------------------------
39
+ // Install logic
40
+ // ---------------------------------------------------------------------------
41
+ export function installFramework(cwd, isUpdate) {
42
+ const agentsDir = resolve(cwd, ".agents");
43
+ let created = 0;
44
+ let updated = 0;
45
+ let skipped = 0;
46
+ function writeIfNeeded(path, content, preserve) {
47
+ if (preserve && existsSync(path)) {
48
+ skipped++;
49
+ return;
50
+ }
51
+ const existed = existsSync(path);
52
+ writeFile(path, content);
53
+ if (existed)
54
+ updated++;
55
+ else
56
+ created++;
57
+ }
58
+ console.log(`\n${isUpdate ? "Updating" : "Installing"} Inove AI Framework...`);
59
+ console.log(`Target: ${cwd}\n`);
60
+ // --- 1. Agents ---
61
+ console.log("[1/8] Agents");
62
+ for (const [name, content] of Object.entries(EMBEDDED_AGENTS)) {
63
+ writeIfNeeded(join(agentsDir, "agents", `${name}.md`), content, false);
64
+ }
65
+ console.log(` ${Object.keys(EMBEDDED_AGENTS).length} agents`);
66
+ // --- 2. Skills (SKILL.md + sub-files + scripts) ---
67
+ console.log("[2/8] Skills");
68
+ for (const [name, data] of Object.entries(EMBEDDED_SKILLS)) {
69
+ const skillDir = join(agentsDir, "skills", name);
70
+ writeIfNeeded(join(skillDir, "SKILL.md"), data.skill, false);
71
+ for (const [subName, subContent] of Object.entries(data.subFiles)) {
72
+ writeIfNeeded(join(skillDir, subName), subContent, false);
73
+ }
74
+ if (data.scripts && Object.keys(data.scripts).length > 0) {
75
+ for (const [scriptName, scriptContent] of Object.entries(data.scripts)) {
76
+ writeIfNeeded(join(skillDir, "scripts", scriptName), scriptContent, false);
77
+ }
78
+ }
79
+ }
80
+ console.log(` ${Object.keys(EMBEDDED_SKILLS).length} skills`);
81
+ // --- 3. Workflows ---
82
+ console.log("[3/8] Workflows");
83
+ for (const [name, content] of Object.entries(EMBEDDED_WORKFLOWS)) {
84
+ writeIfNeeded(join(agentsDir, "workflows", `${name}.md`), content, false);
85
+ }
86
+ console.log(` ${Object.keys(EMBEDDED_WORKFLOWS).length} workflows`);
87
+ // --- 4. Scripts ---
88
+ console.log("[4/8] Scripts");
89
+ for (const [name, content] of Object.entries(EMBEDDED_SCRIPTS)) {
90
+ writeIfNeeded(join(agentsDir, "scripts", name), content, false);
91
+ }
92
+ console.log(` ${Object.keys(EMBEDDED_SCRIPTS).length} scripts`);
93
+ // --- 5. Core docs ---
94
+ console.log("[5/8] Core docs");
95
+ writeIfNeeded(join(agentsDir, "ARCHITECTURE.md"), EMBEDDED_ARCHITECTURE, false);
96
+ writeIfNeeded(join(agentsDir, "INSTRUCTIONS.md"), EMBEDDED_INSTRUCTIONS, false);
97
+ console.log(" ARCHITECTURE.md, INSTRUCTIONS.md");
98
+ // --- 6. Config ---
99
+ console.log("[6/8] Config");
100
+ for (const [name, content] of Object.entries(EMBEDDED_CONFIG)) {
101
+ writeIfNeeded(join(agentsDir, "config", name), content, false);
102
+ }
103
+ console.log(` ${Object.keys(EMBEDDED_CONFIG).length} config files`);
104
+ // --- 7. Root instruction files (preserve on update) ---
105
+ console.log("[7/8] Instruction files");
106
+ for (const [name, content] of Object.entries(EMBEDDED_ROOT_FILES)) {
107
+ const preserve = isUpdate; // on update, don't overwrite user's custom files
108
+ writeIfNeeded(resolve(cwd, name), content, preserve);
109
+ if (preserve && existsSync(resolve(cwd, name))) {
110
+ console.log(` ${name} — preserved (user custom)`);
111
+ }
112
+ else {
113
+ console.log(` ${name}`);
114
+ }
115
+ }
116
+ // --- 8. Symlinks + Squad templates ---
117
+ console.log("[8/8] Symlinks & squad templates");
118
+ // .claude/ symlinks
119
+ ensureSymlink(join("..", ".agents", "agents"), resolve(cwd, ".claude", "agents"));
120
+ ensureSymlink(join("..", ".agents", "skills"), resolve(cwd, ".claude", "skills"));
121
+ console.log(" .claude/agents -> .agents/agents");
122
+ console.log(" .claude/skills -> .agents/skills");
123
+ // .claude/project_instructions.md (pointer file)
124
+ const pointerContent = `# Claude Code Project Instructions\n\n> This file points Claude Code to the master instructions.\n> Do NOT duplicate content here.\n\nSee [CLAUDE.md](../CLAUDE.md) for all project instructions.\n`;
125
+ writeIfNeeded(resolve(cwd, ".claude", "project_instructions.md"), pointerContent, isUpdate);
126
+ // .codex/ symlinks (optional)
127
+ ensureSymlink(join("..", ".agents", "agents"), resolve(cwd, ".codex", "agents"));
128
+ ensureSymlink(join("..", ".agents", "skills"), resolve(cwd, ".codex", "skills"));
129
+ ensureSymlink(join("..", ".agents", "workflows"), resolve(cwd, ".codex", "prompts"));
130
+ console.log(" .codex/agents -> .agents/agents");
131
+ console.log(" .codex/skills -> .agents/skills");
132
+ console.log(" .codex/prompts -> .agents/workflows");
133
+ // Squad templates
134
+ ensureDir(resolve(cwd, "squads", ".templates"));
135
+ for (const [relPath, content] of Object.entries(EMBEDDED_SQUAD_TEMPLATES)) {
136
+ writeIfNeeded(resolve(cwd, "squads", ".templates", relPath), content, false);
137
+ }
138
+ // squads/README.md
139
+ const squadsReadme = `# Squads\n\nSquads are reusable packages of agents + skills + workflows for specific domains.\n\nUse \`/squad create <name>\` to create a new squad from templates in \`.templates/\`.\n`;
140
+ writeIfNeeded(resolve(cwd, "squads", "README.md"), squadsReadme, isUpdate);
141
+ console.log(` ${Object.keys(EMBEDDED_SQUAD_TEMPLATES).length} squad template files`);
142
+ // --- Summary ---
143
+ console.log("\n" + "=".repeat(50));
144
+ console.log(`Inove AI Framework ${isUpdate ? "updated" : "installed"}!`);
145
+ console.log(` Created: ${created}`);
146
+ console.log(` Updated: ${updated}`);
147
+ console.log(` Preserved: ${skipped}`);
148
+ console.log("=".repeat(50));
149
+ console.log(`
150
+ Next steps:
151
+ 1. Configure MCP server (for enhanced AI integration):
152
+ claude mcp add inove-ai -- npx -y @joelbonito/mcp-server
153
+ codex mcp add inove-ai -- npx -y @joelbonito/mcp-server
154
+
155
+ 2. Validate installation:
156
+ python3 .agents/scripts/validate_installation.py
157
+
158
+ 3. Start working:
159
+ /define <your project description>
160
+ `);
161
+ }
162
+ // ---------------------------------------------------------------------------
163
+ // CLI
164
+ // ---------------------------------------------------------------------------
165
+ function main() {
166
+ const args = process.argv.slice(2);
167
+ const command = args[0];
168
+ if (command === "install") {
169
+ installFramework(process.cwd(), false);
170
+ }
171
+ else if (command === "update") {
172
+ if (!existsSync(resolve(process.cwd(), ".agents"))) {
173
+ console.error("No .agents/ directory found. Use 'install' first.");
174
+ process.exit(1);
175
+ }
176
+ installFramework(process.cwd(), true);
177
+ }
178
+ else {
179
+ console.log("Usage:");
180
+ console.log(" npx @joelbonito/mcp-server install # Full install");
181
+ console.log(" npx @joelbonito/mcp-server update # Update (preserves instruction files)");
182
+ process.exit(1);
183
+ }
184
+ }
185
+ main();
186
+ //# sourceMappingURL=install.js.map
@@ -3,7 +3,12 @@ export declare const EMBEDDED_SKILLS: Record<string, {
3
3
  skill: string;
4
4
  subFiles: Record<string, string>;
5
5
  hasScripts: boolean;
6
+ scripts: Record<string, string>;
6
7
  }>;
7
8
  export declare const EMBEDDED_WORKFLOWS: Record<string, string>;
8
9
  export declare const EMBEDDED_ARCHITECTURE: string;
9
10
  export declare const EMBEDDED_INSTRUCTIONS: string;
11
+ export declare const EMBEDDED_SCRIPTS: Record<string, string>;
12
+ export declare const EMBEDDED_CONFIG: Record<string, string>;
13
+ export declare const EMBEDDED_ROOT_FILES: Record<string, string>;
14
+ export declare const EMBEDDED_SQUAD_TEMPLATES: Record<string, string>;