jeo-code 0.12.10 → 0.12.11

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.
@@ -117,9 +117,9 @@ export function buildSkillTask(skill: SkillDoc, intent: string, invokedAs?: stri
117
117
  : "Carry out this skill's workflow now. If it needs a concrete target you weren't given, make a reasonable assumption or ask the user via done."),
118
118
  ].join("\n");
119
119
  }
120
- export function skillsPromptSection(skills: SkillDoc[] = SKILLS): string {
120
+ export function skillsPromptSection(skills: SkillDoc[] = SKILLS, currentTask?: string): string {
121
121
  const bundleSkills: SkillDoc[] = [];
122
- const configuredSkills: SkillDoc[] = [];
122
+ let configuredSkills: SkillDoc[] = [];
123
123
 
124
124
  const bundleNames = new Set(BUILTIN_SKILL_NAMES);
125
125
  for (const s of skills) {
@@ -130,6 +130,20 @@ export function skillsPromptSection(skills: SkillDoc[] = SKILLS): string {
130
130
  }
131
131
  }
132
132
 
133
+ // When a task is provided and skills exceed budget, sort configured skills by relevance
134
+ if (currentTask && currentTask.trim().length > 0 && configuredSkills.length > 5) {
135
+ const qTokens = new Set(
136
+ currentTask.toLowerCase().match(/[a-z0-9._-]{3,}/g) ?? []
137
+ );
138
+ configuredSkills = [...configuredSkills].sort((a, b) => {
139
+ const aScore = (a.name.toLowerCase().split(/[._-]/).some(t => qTokens.has(t)) ? 10 : 0) +
140
+ (qTokens.has(a.name.toLowerCase()) ? 20 : 0);
141
+ const bScore = (b.name.toLowerCase().split(/[._-]/).some(t => qTokens.has(t)) ? 10 : 0) +
142
+ (qTokens.has(b.name.toLowerCase()) ? 20 : 0);
143
+ return bScore - aScore;
144
+ });
145
+ }
146
+
133
147
  const lines: string[] = [];
134
148
  let used = 0;
135
149
 
@@ -295,15 +309,18 @@ export function skillDirs(cwd: string = process.cwd()): string[] {
295
309
  path.join(userHome, ".claude", "skills"),
296
310
  path.join(home, "agent", "skills"),
297
311
  path.join(userHome, ".agents", "skills"),
312
+ path.join(userHome, ".agent-skills"),
298
313
  userSkillsDir(),
299
314
  path.join(cwd, ".claude", "skills"),
300
315
  path.join(cwd, ".agents", "skills"),
316
+ path.join(cwd, ".agent-skills"),
301
317
  path.join(cwd, ".jeo", "skills"),
302
318
  path.join(cwd, ".jeo", "agent", "skills"),
303
319
  ...configured,
304
320
  ];
305
321
  }
306
322
 
323
+
307
324
  /** A frontmatter `name:` usable as a skill identity: one bare token, no spaces. */
308
325
  function sanitizeSkillName(raw: string | undefined): string | undefined {
309
326
  const m = (raw ?? "").trim();