@fro.bot/systematic 1.17.1 → 1.17.3
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/index.js
CHANGED
|
@@ -348,11 +348,14 @@ function discoverSkillFiles(dir, limit = 10) {
|
|
|
348
348
|
}
|
|
349
349
|
function createSkillTool(options) {
|
|
350
350
|
const { bundledSkillsDir, disabledSkills } = options;
|
|
351
|
-
const
|
|
352
|
-
return findSkillsInDir(bundledSkillsDir).filter((s) => !disabledSkills.includes(s.name)).map((skillInfo) => loadSkill(skillInfo)).filter((s) => s !== null).
|
|
351
|
+
const getAllSkills = () => {
|
|
352
|
+
return findSkillsInDir(bundledSkillsDir).filter((s) => !disabledSkills.includes(s.name)).map((skillInfo) => loadSkill(skillInfo)).filter((s) => s !== null).sort((a, b) => a.name.localeCompare(b.name));
|
|
353
|
+
};
|
|
354
|
+
const getDiscoverableSkills = () => {
|
|
355
|
+
return getAllSkills().filter((s) => s.disableModelInvocation !== true);
|
|
353
356
|
};
|
|
354
357
|
const buildDescription = () => {
|
|
355
|
-
const skills =
|
|
358
|
+
const skills = getDiscoverableSkills();
|
|
356
359
|
if (skills.length === 0) {
|
|
357
360
|
return "Load a skill to get detailed instructions for a specific task. No skills are currently available.";
|
|
358
361
|
}
|
|
@@ -380,7 +383,7 @@ function createSkillTool(options) {
|
|
|
380
383
|
`);
|
|
381
384
|
};
|
|
382
385
|
const buildParameterHint = () => {
|
|
383
|
-
const skills =
|
|
386
|
+
const skills = getDiscoverableSkills();
|
|
384
387
|
const examples = skills.slice(0, 3).map((s) => `'systematic:${s.name}'`).join(", ");
|
|
385
388
|
const hint = examples.length > 0 ? ` (e.g., ${examples}, ...)` : "";
|
|
386
389
|
return `The name of the skill from available_skills${hint}`;
|
|
@@ -405,10 +408,10 @@ function createSkillTool(options) {
|
|
|
405
408
|
async execute(args, context) {
|
|
406
409
|
const requestedName = args.name;
|
|
407
410
|
const normalizedName = requestedName.startsWith("systematic:") ? requestedName.slice("systematic:".length) : requestedName;
|
|
408
|
-
const skills =
|
|
411
|
+
const skills = getAllSkills();
|
|
409
412
|
const matchedSkill = skills.find((s) => s.name === normalizedName);
|
|
410
413
|
if (!matchedSkill) {
|
|
411
|
-
const availableSystematic =
|
|
414
|
+
const availableSystematic = getDiscoverableSkills().map((s) => s.prefixedName);
|
|
412
415
|
throw new Error(`Skill "${requestedName}" not found. Available systematic skills: ${availableSystematic.join(", ")}`);
|
|
413
416
|
}
|
|
414
417
|
const body = extractSkillBody(matchedSkill.wrappedTemplate);
|
package/package.json
CHANGED
|
@@ -24,6 +24,9 @@ Use the `systematic_skill` tool for Systematic bundled skills. Use the native `s
|
|
|
24
24
|
```dot
|
|
25
25
|
digraph skill_flow {
|
|
26
26
|
"User message received" [shape=doublecircle];
|
|
27
|
+
"About to enter Plan mode?" [shape=doublecircle];
|
|
28
|
+
"Already brainstormed?" [shape=diamond];
|
|
29
|
+
"Invoke brainstorming skill" [shape=box];
|
|
27
30
|
"Might any skill apply?" [shape=diamond];
|
|
28
31
|
"Invoke `systematic_skill` tool" [shape=box];
|
|
29
32
|
"Announce: 'Using [skill] to [purpose]'" [shape=box];
|
|
@@ -32,6 +35,11 @@ digraph skill_flow {
|
|
|
32
35
|
"Follow skill exactly" [shape=box];
|
|
33
36
|
"Respond (including clarifications)" [shape=doublecircle];
|
|
34
37
|
|
|
38
|
+
"About to enter Plan mode?" -> "Already brainstormed?";
|
|
39
|
+
"Already brainstormed?" -> "Invoke brainstorming skill" [label="no"];
|
|
40
|
+
"Already brainstormed?" -> "Might any skill apply?" [label="yes"];
|
|
41
|
+
"Invoke brainstorming skill" -> "Might any skill apply?";
|
|
42
|
+
|
|
35
43
|
"User message received" -> "Might any skill apply?";
|
|
36
44
|
"Might any skill apply?" -> "Invoke `systematic_skill` tool" [label="yes, even 1%"];
|
|
37
45
|
"Might any skill apply?" -> "Respond (including clarifications)" [label="definitely not"];
|
|
@@ -86,9 +94,4 @@ Instructions say WHAT, not HOW. "Add X" or "Fix Y" doesn't mean skip workflows.
|
|
|
86
94
|
|
|
87
95
|
## Skill Resolution
|
|
88
96
|
|
|
89
|
-
Skills are resolved in priority order:
|
|
90
|
-
1. **Project skills**: `.opencode/skills/` in current project
|
|
91
|
-
2. **User skills**: `~/.config/opencode/skills/`
|
|
92
|
-
3. **Bundled skills**: Provided by systematic plugin
|
|
93
|
-
|
|
94
97
|
Systematic bundled skills are listed in the `systematic_skill` tool description. Use the native `skill` tool for skills outside the Systematic plugin.
|