YeonGyu-Kim 29155ec7bc refactor: wave 1 - extract leaf modules, rename catch-all files, split index.ts hooks
- Split 25+ index.ts files into hook.ts + extracted modules
- Rename all catch-all utils.ts/helpers.ts to domain-specific names
- Split src/tools/lsp/ into ~15 focused modules
- Split src/tools/delegate-task/ into ~18 focused modules
- Separate shared types from implementation
- 155 files changed, 60+ new files created
- All typecheck clean, 61 tests pass
2026-02-08 13:57:26 +09:00

38 lines
1.3 KiB
TypeScript

import type { AvailableSkill } from "../../agents/dynamic-agent-prompt-builder"
function formatSkillNames(skills: AvailableSkill[], limit: number): string {
if (skills.length === 0) return "(none)"
const shown = skills.slice(0, limit).map((s) => s.name)
const remaining = skills.length - shown.length
const suffix = remaining > 0 ? ` (+${remaining} more)` : ""
return shown.join(", ") + suffix
}
export function buildReminderMessage(availableSkills: AvailableSkill[]): string {
const builtinSkills = availableSkills.filter((s) => s.location === "plugin")
const customSkills = availableSkills.filter((s) => s.location !== "plugin")
const builtinText = formatSkillNames(builtinSkills, 8)
const customText = formatSkillNames(customSkills, 8)
const exampleSkillName = customSkills[0]?.name ?? builtinSkills[0]?.name
const loadSkills = exampleSkillName ? `["${exampleSkillName}"]` : "[]"
const lines = [
"",
"[Category+Skill Reminder]",
"",
`**Built-in**: ${builtinText}`,
`**⚡ YOUR SKILLS (PRIORITY)**: ${customText}`,
"",
"> User-installed skills OVERRIDE built-in defaults. ALWAYS prefer YOUR SKILLS when domain matches.",
"",
"```typescript",
`task(category=\"visual-engineering\", load_skills=${loadSkills}, run_in_background=true)`,
"```",
"",
]
return lines.join("\n")
}