Agents are individual .md files discovered by resource.AgentKind{}.Discover(),
but audit was using collectInstalledSkillPaths() which calls
sync.DiscoverSourceSkillsLite() — designed for skill directories. Then
ParallelScan() called ScanSkill() which expects directories, not files.
Changes:
- Add IsFile flag to audit.SkillInput; when set, ParallelScan uses
ScanFile/ScanFileForProject instead of ScanSkill variants
- Add collectInstalledAgentPaths() using resource.AgentKind{}.Discover()
and resource.ActiveAgents() for proper agent file discovery
- Add toAgentAuditInputs() helper that sets IsFile=true
- Branch on kindAgents in auditInstalled(), auditFiltered(), and
launchAuditTUIWithTabs() to use agent-specific discovery and inputs
- Add discoverAuditAgents() in server handler and update
resolveAuditSource() to return isAgents flag
- Update handleAuditAll, handleAuditStream to use agent-aware discovery
and build SkillInput with IsFile=true for agents
- Make DefaultRegistry() a singleton (stateless analyzers, safe to share)
- Consolidate duplicate ANSI regex into ui.StripANSI(); broaden pattern
to match all CSI sequences ([a-zA-Z] terminator, not just 'm')
- Extract shared policyProfileLabel/policyDedupeLabel/policyAnalyzersLabel
helpers; unify formatPolicyLine and formatPolicyLineFromPolicy
- Remove redundant applyPolicyToSummary calls inside auditInstalled and
auditFiltered (cmdAudit already applies it centrally)
- Fix double isMarkdown check in scanSkillImpl walk loop
- Convert variadic ...*Registry to regular *Registry parameter across
scanSkillImpl, ParallelScan, scanSkillPath, and scanPathTarget
- Pre-compute registry.Has() before walk loop to avoid per-file O(n) scan
- Add bubbletea TUI for multi-skill audit results (side-by-side layout
with skill list + detail panel, severity sorting, fuzzy filter)
- Add progress bar during parallel scan via onDone callback
- Add --quiet/-q flag to suppress clean skill lines
- Add --yes/-y flag to skip large-scan confirmation prompt (>1000 skills)
- Add --no-tui flag to force plain text output
- Scale parallel workers to NumCPU (bounded 2–32) instead of fixed 8
- Use file cache in content-integrity check to avoid redundant disk reads
- Replace line splitting with streaming scan (avoid full []string alloc)
- Remove snippet truncation (preserve full trimmed line)
- Differentiate LOW (bright blue) and INFO (medium gray) severity colors
- Centralize log TUI color styles into `lc` struct
- Export DisplayWidth and add BoxWithMinWidth/HeaderBoxWithMinWidth for
aligned header + summary box widths
- Update docs with TUI controls, new flags, and CI/CD auto-skip behavior
Deduplicate bounded-concurrency worker pool that was repeated in
auditInstalled(), auditFiltered(), and handleAuditAll(). The new
audit.ParallelScan() centralises the pattern with index-aligned
results, reducing ~90 lines to a single reusable function.