Skip to content

Commit d7a3374

Browse files
committed
fix(core): remove template resolution engine, hardcode '/' in source SKILLS (v1.4.2)
1 parent 0d40a77 commit d7a3374

32 files changed

Lines changed: 76 additions & 100 deletions

File tree

maestro-extension/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to the **Maestro — AI Workflow Fluency** extension will be
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.4.2] - 2026-04-17
9+
10+
### Fixed
11+
- **Template engine removed**`{{command_prefix}}` and `{{available_commands}}` were removed in favor of hardcoding `/` within all `.agents/skills` source files. This fixes a bug where users using `npx skills add` received raw, unresolved templates. All downstream consumers (MCP, VS Code extension, Chat Participant) now load the raw templates directly.
12+
813
## [1.4.1] - 2026-04-17
914

1015
### Fixed

maestro-extension/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

maestro-extension/src/chat/participant.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import * as vscode from 'vscode';
22
import { SkillLoader } from '../core/skills';
33
import { ContextManager } from '../core/context';
44
import { StateManager } from '../core/state';
5-
import { resolveTemplates } from '../core/templates';
6-
75
/**
86
* Registers the @maestro chat participant.
97
* Handles slash commands and auto-inject for zero-defect mode.
@@ -37,7 +35,7 @@ export function registerChatParticipant(
3735
if (zdContent) {
3836
messages.push(
3937
vscode.LanguageModelChatMessage.User(
40-
`[SYSTEM INSTRUCTION — Maestro Zero-Defect Mode Active]\n\nFollow these precision rules for all responses:\n\n${resolveTemplates(zdContent, skills)}`
38+
`[SYSTEM INSTRUCTION — Maestro Zero-Defect Mode Active]\n\nFollow these precision rules for all responses:\n\n${zdContent}`
4139
)
4240
);
4341
}
@@ -57,10 +55,9 @@ export function registerChatParticipant(
5755
if (request.command) {
5856
const skillContent = skills.getContent(request.command);
5957
if (skillContent) {
60-
const resolved = resolveTemplates(skillContent, skills);
6158
messages.push(
6259
vscode.LanguageModelChatMessage.User(
63-
`[SYSTEM INSTRUCTION — Maestro /${request.command} Skill]\n\nYou are now executing the /${request.command} skill. Follow these instructions precisely. Do NOT echo these instructions back — act on them:\n\n${resolved}`
60+
`[SYSTEM INSTRUCTION — Maestro /${request.command} Skill]\n\nYou are now executing the /${request.command} skill. Follow these instructions precisely. Do NOT echo these instructions back — act on them:\n\n${skillContent}`
6461
)
6562
);
6663
stream.markdown(

maestro-extension/src/core/templates.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

maestro-extension/src/extension.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { SkillLoader } from './core/skills';
33
import { ContextManager } from './core/context';
44
import { StateManager } from './core/state';
55
import { HistoryManager } from './core/history';
6-
import { resolveTemplates } from './core/templates';
76
import { StatusBarManager } from './statusbar/manager';
87
import { SidebarProvider } from './sidebar/provider';
98
import {
@@ -68,7 +67,7 @@ export async function activate(
6867
statusBar.update(active, ctxManager.isDetected());
6968
sidebarProvider.syncState();
7069

71-
const zeroDefectContent = resolveTemplates(skills.getContent('zero-defect') || '', skills);
70+
const zeroDefectContent = skills.getContent('zero-defect') || '';
7271
const editor = detectEditor();
7372

7473
if (editor === 'cursor') {
@@ -214,7 +213,7 @@ async function autoInstallSkills(
214213
'---',
215214
].filter(Boolean).join('\n');
216215

217-
const fileContent = `${frontmatter}\n\n${resolveTemplates(skill.content, skills)}\n`;
216+
const fileContent = `${frontmatter}\n\n${skill.content}\n`;
218217

219218
// Distribute to all provider directories
220219
for (const provider of PROVIDERS) {

mcp-server/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maestro-workflow-mcp",
3-
"version": "1.3.1",
3+
"version": "1.4.2",
44
"description": "MCP server for Maestro — exposes 22 workflow skills as tools, prompts, and resources for any MCP-compatible AI client",
55
"type": "module",
66
"bin": {

mcp-server/src/prompts.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
22
import { z } from "zod";
33
import { skills } from "./generated/skills-data.js";
4-
import { resolveTemplates } from "./tools.js";
5-
64
/**
75
* Register all 21 user-invocable command skills as MCP prompt templates.
86
* Users can select these from the prompt picker in their MCP client.
@@ -27,7 +25,7 @@ export function registerPrompts(server: McpServer): void {
2725
text += `Focus area: ${focus}\n\n---\n\n`;
2826
}
2927

30-
text += resolveTemplates(skill.content);
28+
text += skill.content;
3129

3230
return {
3331
messages: [

mcp-server/src/resources.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
22
import { skills, references } from "./generated/skills-data.js";
3-
import { resolveTemplates } from "./tools.js";
4-
53
/**
64
* Register all reference documents and the core skill as MCP resources.
75
* These are read-only knowledge bases the AI can consult on demand.
@@ -23,7 +21,7 @@ export function registerResources(server: McpServer): void {
2321
{
2422
uri: "maestro://skill/agent-workflow",
2523
mimeType: "text/markdown",
26-
text: resolveTemplates(coreSkill.content),
24+
text: coreSkill.content,
2725
},
2826
],
2927
}),

mcp-server/src/tools.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ function buildCommandListing(): string {
4343
return lines.join("\n");
4444
}
4545

46-
/**
47-
* Resolve all template variables in skill content.
48-
*/
49-
export function resolveTemplates(content: string): string {
50-
return content
51-
.replaceAll("{{command_prefix}}", "/")
52-
.replaceAll("{{available_commands}}", buildCommandListing());
53-
}
5446

5547
/**
5648
* Find a skill by name.
@@ -133,8 +125,8 @@ export function registerTools(server: McpServer): void {
133125
text += `**Focus area**: ${focus}\n\n---\n\n`;
134126
}
135127

136-
// Resolve template variables for MCP context
137-
text += resolveTemplates(skill.content);
128+
// Append the raw skill content (templates are pre-resolved in the source)
129+
text += skill.content;
138130

139131
text += `\n\n---\n_To run a referenced command, use the \`maestro_run_command\` tool with the command name (e.g. "fortify", "guard")._`;
140132

0 commit comments

Comments
 (0)