Background
On 2026-04-19, two // biome-ignore lint/complexity/noExcessiveCognitiveComplexity suppressions were added to packages/core/src/skills/loader.ts to unblock the PR pipeline:
loadSkillsFromDir (line ~192, complexity score 19, max 15)
parseMapping (line ~118, complexity score 23, max 15)
The suppressions were a stopgap to unblock husky pre-push (which runs pnpm lint). Multiple agents had to bypass hooks or push from temp worktrees on the same day because of these warnings.
Why this matters
The suppressions hide growing complexity. New conditionals added to either function will silently push complexity even higher while lint stays green.
Suggested refactors
loadSkillsFromDir: split into loadSingleSkill(dir, file, source) plus a top-level that does readdir + Promise.all.
parseMapping: rewrite as token + state machine, or swap in a tiny YAML subset parser (must respect ≤80MB install budget — js-yaml is too large; consider yaml-mini or hand-rolled).
Acceptance
- Both
biome-ignore lines removed
pnpm lint passes with no complexity warnings on loader.ts
- All existing skill-loader tests pass; add tests for any new helpers
- No new deps >50KB without justification
Trigger
Pick up when next touching skills loader (e.g., when PR #86 starter library is unblocked, or when adding a new skill source).
Background
On 2026-04-19, two
// biome-ignore lint/complexity/noExcessiveCognitiveComplexitysuppressions were added topackages/core/src/skills/loader.tsto unblock the PR pipeline:loadSkillsFromDir(line ~192, complexity score 19, max 15)parseMapping(line ~118, complexity score 23, max 15)The suppressions were a stopgap to unblock husky
pre-push(which runspnpm lint). Multiple agents had to bypass hooks or push from temp worktrees on the same day because of these warnings.Why this matters
The suppressions hide growing complexity. New conditionals added to either function will silently push complexity even higher while lint stays green.
Suggested refactors
loadSkillsFromDir: split intoloadSingleSkill(dir, file, source)plus a top-level that doesreaddir+Promise.all.parseMapping: rewrite as token + state machine, or swap in a tiny YAML subset parser (must respect ≤80MB install budget —js-yamlis too large; consideryaml-minior hand-rolled).Acceptance
biome-ignorelines removedpnpm lintpasses with no complexity warnings onloader.tsTrigger
Pick up when next touching skills loader (e.g., when PR #86 starter library is unblocked, or when adding a new skill source).