feat(FN-1513): track excluded skill paths and improve skill resolver diagnostics

- Add excludedSkillPaths to SkillSelectionResult to track skills disabled by - patterns
- Update createSkillsOverrideFromSelection to filter out excluded skills
- Produce warning diagnostics for disabled skills that exist but were excluded
- Add tests for excluded paths tracking and deterministic output order
- Update memory documentation with skill resolver diagnostics distinction
- Fix pi-create-kb-agent test to include excludedSkillPaths in selection mock
This commit is contained in:
gsxdsm
2026-04-14 08:56:06 -07:00
parent 6a47491597
commit 2d7da656e4
5 changed files with 222 additions and 18 deletions

View File

@@ -1023,6 +1023,12 @@ The skill selection resolver (`packages/engine/src/skill-resolver.ts`) computes
- `filterActive: false` means no filtering (all discovered skills pass through); `filterActive: true` means filtering is active
- `createSkillsOverrideFromSelection()` returns the `skillsOverride` callback for `DefaultResourceLoader`
- `skillsOverride` is only set when `skillSelection` is provided in `AgentOptions`; omitting it preserves existing behavior
- `SkillSelectionResult` includes `excludedSkillPaths` to track skills explicitly disabled by `-` patterns
- Filtering distinguishes three cases:
1. **Allowed skills**: skills matching `allowedSkillPaths` pass through
2. **Disabled skills**: skills matching `excludedSkillPaths` are filtered out and produce warnings
3. **Missing skills**: configured paths not matching any discovered skill produce warnings
- The `createSkillsOverrideFromSelection` callback filters skills and produces diagnostic messages via `console.error` with `[pi] [skills]` prefix
**Settings format:**
```json