You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1dfb5dc
Browse filesBrowse the repository at this point in the historyBrowse files
SKILL.md registry (skills.js, dependency-free) + 3 bundled skills (code-review, focused-fix, test-writing). The agent self-selects via a use_skill tool (name+description in the system prompt, body fetched on demand); /skills lists them. Gated on atompp.ai.skills.enabled.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
"You are Atom++'s built-in autonomous coding agent. You accomplish the user's goal in their",
21
21
'workspace using the provided tools. Rules:',
22
22
'- Be DECISIVE and FAST. Read only the file you are changing (plus at most 1 other if truly needed), then ACT. Do NOT write long multi-point plans — at most ONE short sentence before each tool call.',
@@ -29,6 +29,7 @@ const SYSTEM = [
29
29
'- Paths are relative to the workspace root.',
30
30
'- For a multi-step goal, call update_plan FIRST with a short checklist (3-8 short items, all "pending"), then call it again to set an item "in_progress" when you start it and "done" when finished. Skip the plan for trivial single-step goals.',
31
31
'- If the goal truly depends on a decision only the user can make (tech stack, scope, where to create files, must-have features), call ask_user ONCE with concise multiple-choice questions (a short header + 2-4 concrete options each) INSTEAD of writing the questions as prose. Then act on their answers and do not ask again. Do NOT ask about things you can reasonably decide yourself — prefer a sensible default and proceed.',
32
+
'- You have SKILLS — short expert playbooks for common task types, listed under "Available skills" below with a name and a one-line description. When the user\'s goal clearly matches a skill\'s description (e.g. reviewing a diff, fixing one reported bug, writing tests), call use_skill with that exact name FIRST, before other tools, and follow the steps it returns. Pick at most one; if nothing clearly fits, just proceed normally. Do not mention skills to the user.',
32
33
'- When the goal is finished, end with a one-line summary starting with "Done:" and STOP (no more tools).',
33
34
'- After you finish, your work is verified automatically: editor diagnostics for the files you changed (plus a verify command, if the user configured one) are checked. If problems are found you will get them back as a follow-up message — fix the ones you introduced, then finish again with "Done:". If a reported problem is clearly pre-existing and unrelated to the goal, do not chase it: note it in one line and finish.'
34
35
].join('\n');
@@ -42,12 +43,21 @@ const TOOLS = [
42
43
{name: 'write_file',description: 'Create a new file (or fully overwrite a short one) with the COMPLETE content. For edits to existing files, prefer edit_file. Applied immediately; the user reviews it with Keep/Undo.',input_schema: {type: 'object',properties: {path: {type: 'string'},content: {type: 'string'}},required: ['path','content']}},
43
44
{name: 'run_command',description: 'Run a shell command in the workspace root. Requires approval. Pass background:true for commands that do not exit on their own (servers, watchers) so the agent is not blocked — it returns immediately and you read progress later with read_command_output.',input_schema: {type: 'object',properties: {command: {type: 'string'},explanation: {type: 'string'},background: {type: 'boolean',description: 'true = start it and keep working without waiting (dev servers, watchers, tail -f). Returns immediately with an id; poll read_command_output for its output/status.'}},required: ['command']}},
44
45
{name: 'read_command_output',description: 'Read recent output + status of a command started with run_command background:true. Returns a status header ([running on :3000] / [exited 0] / [stopped]) followed by the latest output lines. Poll this to wait for a server to become ready before testing against it.',input_schema: {type: 'object',properties: {id: {type: 'string',description: 'the id returned by a background run_command'},lines: {type: 'number',description: 'max recent output lines to return (default 80, max 400)'}},required: ['id']}},
45
-
{name: 'ask_user',description: 'Ask the user one or more multiple-choice questions when the goal genuinely depends on a decision only they can make (tech stack, scope, where to put files, must-have features). The user picks by CLICKING — do NOT write questions as prose. Ask ONCE up front with all your questions, then proceed with the answers and never re-ask. Prefer sensible defaults over asking; only ask when a wrong guess would waste real work.',input_schema: {type: 'object',properties: {questions: {type: 'array',items: {type: 'object',properties: {header: {type: 'string',description: 'a 1-3 word tag for the question'},question: {type: 'string'},multiSelect: {type: 'boolean',description: 'true if several options can be picked at once'},options: {type: 'array',items: {type: 'object',properties: {label: {type: 'string'},description: {type: 'string'}},required: ['label']}}},required: ['question','options']}}},required: ['questions']}}
46
+
{name: 'ask_user',description: 'Ask the user one or more multiple-choice questions when the goal genuinely depends on a decision only they can make (tech stack, scope, where to put files, must-have features). The user picks by CLICKING — do NOT write questions as prose. Ask ONCE up front with all your questions, then proceed with the answers and never re-ask. Prefer sensible defaults over asking; only ask when a wrong guess would waste real work.',input_schema: {type: 'object',properties: {questions: {type: 'array',items: {type: 'object',properties: {header: {type: 'string',description: 'a 1-3 word tag for the question'},question: {type: 'string'},multiSelect: {type: 'boolean',description: 'true if several options can be picked at once'},options: {type: 'array',items: {type: 'object',properties: {label: {type: 'string'},description: {type: 'string'}},required: ['label']}}},required: ['question','options']}}},required: ['questions']}},
47
+
{name: 'use_skill',description: 'Load an expert playbook (SKILL.md) for a task type, chosen from the "Available skills" list in your system prompt. Returns the skill\'s step-by-step instructions as the tool result — then follow them. Read-only and instant (no approval). Call it once, early, when the goal matches a skill\'s description.',input_schema: {type: 'object',properties: {name: {type: 'string',description: 'the exact skill name from the Available skills list'}},required: ['name']}}
46
48
];
47
49
48
50
// Rough token estimates (chars/4) for the static prompt segments, so the context popover can break
49
51
// down "what's filling the window" — system + tools are sent on every request, the rest is messages.
@@ -343,6 +353,17 @@ async function runTool(tu, ctx) {
343
353
if(res.notes){lines.push('- Additional notes from the user: '+res.notes);}
344
354
return'The user answered your questions (these are their recorded decisions — honor them and do NOT ask again):\n'+lines.join('\n')+'\n\nProceed with the work using these answers.';
345
355
}
356
+
if(tu.name==='use_skill'){
357
+
constname=String(input.name||'').trim();
358
+
if(!ctx.skills){return'ERROR: skills are not available in this session. Proceed without one.';}
return'ERROR: no skill named "'+name+'". Available skills: '+avail+'. Pick one exactly, or proceed without a skill.';
363
+
}
364
+
ctx.post({type: 'agentTool',icon: 'sparkle',text: '🧩 using skill: '+name});// quiet chip — only on success (🧩 is the marker; 'sparkle' falls back cleanly)
365
+
returnbody;// SKILL.md body → tool_result, steers the next turns
366
+
}
346
367
return'ERROR: unknown tool '+tu.name;
347
368
}catch(e){
348
369
return'ERROR: '+((e&&e.message)||e);
@@ -362,6 +383,9 @@ async function runAgent(ctx) {
362
383
constroot=workspaceRoot();
363
384
if(!root){ctx.post({type: 'agentError',message: 'Open a folder first — the agent works on your workspace.'});ctx.post({type: 'agentDone',reason: 'error'});return;}
364
385
ctx.root=root;
386
+
// M6.5 implicit skills: build the system prompt ONCE per run — append the tiny name+description menu.
case'continueAgent': if(!abort){constg=lastAgentGoal;dbg('continue',{transcriptMsgs: agentMessages.length});awaitagentFlow('Continue from where you left off and finish the task. Pick up exactly where you stopped — do not restart or repeat work that is already done.');lastAgentGoal=g;}break;
0 commit comments