@joelbonito/mcp-server 5.1.7 → 5.2.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/dist/core/resources.js +71 -0
- package/dist/core/tools.js +36 -0
- package/package.json +1 -1
package/dist/core/resources.js
CHANGED
|
@@ -33,6 +33,77 @@ export function registerResources(server, cache) {
|
|
|
33
33
|
}
|
|
34
34
|
return { contents: [{ uri: uri.href, text: skill.raw, mimeType: "text/markdown" }] };
|
|
35
35
|
});
|
|
36
|
+
// Static: condensed system prompt with operational rules
|
|
37
|
+
server.resource("system-prompt", "inove://system-prompt", { mimeType: "text/markdown", description: "Condensed operational rules (Socratic Gate, routing, clean code). Inject into system prompt for full framework behavior." }, () => {
|
|
38
|
+
const agentList = [...cache.agents.values()]
|
|
39
|
+
.map((a) => `| \`${a.meta.name}\` | ${a.meta.description} | ${a.meta.skills.join(", ")} |`)
|
|
40
|
+
.join("\n");
|
|
41
|
+
const workflowList = [...cache.workflows.entries()]
|
|
42
|
+
.map(([name, w]) => `| \`/${name}\` | ${w.meta.description} |`)
|
|
43
|
+
.join("\n");
|
|
44
|
+
const prompt = `# Inove AI Framework — Operational Rules
|
|
45
|
+
|
|
46
|
+
> Injected via MCP. These rules govern how you operate with the framework.
|
|
47
|
+
|
|
48
|
+
## Routing Protocol
|
|
49
|
+
|
|
50
|
+
When the user asks for help, detect the domain from their request and activate the appropriate agent using the \`activate_agent\` tool. Use \`route_task\` if unsure which agent to pick.
|
|
51
|
+
|
|
52
|
+
## Socratic Gate (MANDATORY)
|
|
53
|
+
|
|
54
|
+
For ALL requests involving code, STOP and ASK first:
|
|
55
|
+
|
|
56
|
+
| Request Type | Strategy | Action |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| New Feature / Build | Deep Discovery | ASK minimum 3 strategic questions |
|
|
59
|
+
| Edit / Bug Fix | Diagnosis | Present DIAGNOSIS + PROPOSAL → wait for approval → only then edit |
|
|
60
|
+
| Vague / Simple | Clarification | Ask Purpose, Users and Scope |
|
|
61
|
+
|
|
62
|
+
**Never assume.** If 1% is undefined, ASK.
|
|
63
|
+
|
|
64
|
+
## Clean Code (Global)
|
|
65
|
+
|
|
66
|
+
- Concise, self-documenting code
|
|
67
|
+
- No over-engineering
|
|
68
|
+
- Tests mandatory (Unit > Integration > E2E)
|
|
69
|
+
- Comments in English, variables/functions in English
|
|
70
|
+
- Respond in user's language
|
|
71
|
+
|
|
72
|
+
## Workflow Invocation
|
|
73
|
+
|
|
74
|
+
Use the \`execute_workflow\` tool to run slash commands. Available workflows:
|
|
75
|
+
|
|
76
|
+
| Command | Description |
|
|
77
|
+
|---|---|
|
|
78
|
+
${workflowList}
|
|
79
|
+
|
|
80
|
+
## Agent Activation
|
|
81
|
+
|
|
82
|
+
Use the \`activate_agent\` tool to load an agent's persona, rules and skills. Available agents:
|
|
83
|
+
|
|
84
|
+
| Agent | Description | Skills |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
${agentList}
|
|
87
|
+
|
|
88
|
+
## Backlog Integration
|
|
89
|
+
|
|
90
|
+
When the user says "implement Epic X" or "implement Story Y.Z":
|
|
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
|
|
97
|
+
|
|
98
|
+
## Post-Define Flow
|
|
99
|
+
|
|
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
|
|
104
|
+
`;
|
|
105
|
+
return { contents: [{ uri: "inove://system-prompt", text: prompt, mimeType: "text/markdown" }] };
|
|
106
|
+
});
|
|
36
107
|
// Template: individual workflow
|
|
37
108
|
server.resource("workflow", new ResourceTemplate("inove://workflows/{name}", { list: undefined }), { mimeType: "text/markdown", description: "Full content of a specific workflow" }, (uri, { name }) => {
|
|
38
109
|
const workflow = cache.workflows.get(name);
|
package/dist/core/tools.js
CHANGED
|
@@ -56,6 +56,42 @@ export function registerTools(server, cache) {
|
|
|
56
56
|
const result = routeTask(request, cache);
|
|
57
57
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
58
58
|
});
|
|
59
|
+
// execute_workflow — simulates /slash invocation for MCP clients
|
|
60
|
+
server.tool("execute_workflow", "Execute a framework workflow (slash command). Returns the full workflow instructions for the AI to follow. Use this instead of typing /define, /debug, etc.", {
|
|
61
|
+
name: z.string().min(1).max(100).describe("Workflow name without slash (e.g. 'define', 'debug', 'create')"),
|
|
62
|
+
arguments: z.string().max(10000).optional().describe("Arguments to pass to the workflow (e.g. 'App de gestao de tarefas')"),
|
|
63
|
+
}, ({ name, arguments: args }) => {
|
|
64
|
+
const workflow = cache.workflows.get(name);
|
|
65
|
+
if (!workflow) {
|
|
66
|
+
const available = [...cache.workflows.keys()].join(", ");
|
|
67
|
+
return { content: [{ type: "text", text: `Workflow "${name}" not found. Available: ${available}` }], isError: true };
|
|
68
|
+
}
|
|
69
|
+
const header = `# Executing /${name}${args ? ` ${args}` : ""}\n\n> Follow the instructions below to execute this workflow.\n\n---\n\n`;
|
|
70
|
+
const footer = args ? `\n\n---\n\n## Arguments Provided\n\n\`\`\`\n${args}\n\`\`\`\n\nApply the workflow above using these arguments.` : "";
|
|
71
|
+
return { content: [{ type: "text", text: header + workflow.raw + footer }] };
|
|
72
|
+
});
|
|
73
|
+
// activate_agent — loads agent persona, rules and skills for MCP clients
|
|
74
|
+
server.tool("activate_agent", "Activate a specialist agent. Returns the agent's full persona, rules and loaded skills. Use this to adopt agent behavior (e.g. @frontend-specialist, @debugger).", {
|
|
75
|
+
name: z.string().min(1).max(100).describe("Agent name (e.g. 'frontend-specialist', 'debugger', 'security-auditor')"),
|
|
76
|
+
}, ({ name }) => {
|
|
77
|
+
const agent = cache.agents.get(name);
|
|
78
|
+
if (!agent) {
|
|
79
|
+
const available = [...cache.agents.keys()].join(", ");
|
|
80
|
+
return { content: [{ type: "text", text: `Agent "${name}" not found. Available: ${available}` }], isError: true };
|
|
81
|
+
}
|
|
82
|
+
// Load all skills referenced by the agent
|
|
83
|
+
const skillContents = agent.meta.skills
|
|
84
|
+
.map((skillName) => {
|
|
85
|
+
const skill = cache.skills.get(skillName);
|
|
86
|
+
if (!skill)
|
|
87
|
+
return null;
|
|
88
|
+
return `\n---\n\n## Skill: ${skillName}\n\n${skill.raw}`;
|
|
89
|
+
})
|
|
90
|
+
.filter(Boolean)
|
|
91
|
+
.join("\n");
|
|
92
|
+
const header = `# Agent Activated: @${name}\n\n> You are now operating as **${name}**. Follow the persona, rules and skills below.\n> Loaded ${agent.meta.skills.length} skill(s): ${agent.meta.skills.join(", ")}\n\n---\n\n`;
|
|
93
|
+
return { content: [{ type: "text", text: header + agent.raw + skillContents }] };
|
|
94
|
+
});
|
|
59
95
|
// search_content
|
|
60
96
|
server.tool("search_content", "Full-text search across all framework content (agents, skills, workflows)", {
|
|
61
97
|
query: z.string().min(1).max(5000).describe("Search query"),
|
package/package.json
CHANGED