xonecas.io
64875
Mc

mini-coder / commit d25a740

fix: make skills usage unambiguous in system prompt

Two changes to the system prompt that close rationalization loopholes:

Guidelines bullet:
- 'check the available skills list' → 'scan the skills list below'
- 'If any skill's description/triggers match' → 'If there is even a small
  chance a skill applies' (removes the easy out of claiming nothing matches)
- Added: 'Skills are mandatory when they match — not optional references.'

Skills section:
- Added explicit anti-rationalization line: 'Do NOT rationalize skipping
  skills. If a skill's description overlaps with your task at all, load it.
  When in doubt, load it.'

xonecas2026-03-21 d25a7402b525f937d9c646a2025c22007f5665ab parent 9697999

2 files changed

src/agent/system-prompt.test.ts+1−1
@@ -102,7 +102,7 @@ describe("buildSystemPrompt", () => {
102102 "Inspect code and files primarily through shell commands",
103103 );
104104 expect(prompt).toContain("invoke `mc-edit` via shell");
105- expect(prompt).toContain("check the available skills list below");
105+ expect(prompt).toContain("scan the skills list below");
106106 expect(prompt).toContain("never guess unknown state");
107107 });
108108
src/agent/system-prompt.ts+4−2
@@ -56,7 +56,7 @@ Guidelines:
5656 - Inspect code and files primarily through shell commands. Use temp files for large content to avoid filling your context window.
5757 - For file edits, invoke \`mc-edit\` via shell. Prefer small, targeted edits over full rewrites so diffs stay reviewable.
5858 - Make parallel tool calls when the lookups are independent — this speeds up multi-file investigation.
59-- Before starting work, check the available skills list below. If any skill's description/triggers match your current task, load it with \`readSkill\` and follow its instructions before proceeding.
59+- Before starting work, scan the skills list below. If there is even a small chance a skill applies to your task, load it with \`readSkill\` and follow its instructions before writing code or responding. Skills are mandatory when they match — not optional references.
6060 - Keep it simple: DRY, KISS, YAGNI. Avoid unnecessary complexity.
6161
6262 # File editing with mc-edit
@@ -92,7 +92,9 @@ Usage: mc-edit <path> (--old <text> | --old-file <path>) [--new <text> | --new-f
9292 prompt +=
9393 "\nWhen a skill references relative paths, resolve them against the skill directory (parent of SKILL.md).";
9494 prompt +=
95- '\nFor complex skills that would clutter your context, consider delegating to a subagent via `mc "prompt"` in the shell tool.\n';
95+ '\nFor complex skills that would clutter your context, consider delegating to a subagent via `mc "prompt"` in the shell tool.';
96+ prompt +=
97+ "\nDo NOT rationalize skipping skills. If a skill's description overlaps with your task at all, load it. When in doubt, load it.\n";
9698 for (const skill of skills) {
9799 const compat = skill.compatibility ? ` [${skill.compatibility}]` : "";
98100 prompt += `\n- ${skill.name}: ${skill.description}${compat} (${skill.source}, ${skill.filePath})`;