Summary line now shows only consistent metrics:
- scanned/passed/blocked/with findings (all agent-level)
- total finding count (clearly labeled)
Removed low/info severity counts that were confusing because they
counted findings while adjacent numbers counted agents.
Cross-skill analysis is a synthetic result, not an actual scanned
resource. Separating it fixes the mismatch between summary counts
(e.g. '4 warnings') and visible card count (was showing 5 cards).
Now shown as a distinct 'Cross-resource analysis' section.
SSE scan results are written to query cache on completion. Navigating
away and back shows cached results instead of requiring a re-scan.
Cache expires after 5 minutes (staleTimes.audit). Per-kind cache keys
ensure skills and agents results are independent.
Replace the button-style tabs (filled bg, border-2) in AuditPage with
the underline+icon+badge style used by ResourcesPage, TrashPage, and
BatchUninstallPage for visual consistency across tabbed pages.
- Use nav with role=tablist and aria-selected for accessibility
- Add Puzzle/Bot icons matching ResourcesPage tabs
- Show count badge only when data is available (tab.count != null)
- Apply ss-resource-tab class for shared underline transition style
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
Tab bar switches between skills and agents audit scans. Each tab
caches results independently. API calls include ?kind parameter.
Display text dynamized for skill/agent context.
Two-tab TUI following list_tui.go pattern. Tab/Shift+Tab cycles
between Skills and Agents tabs. Initial tab matches CLI argument.
Secondary kind scanned lazily when TUI launches via auditTUIContext.
Also adds agentsSourcePath param to auditInstalled/auditFiltered
and launchAuditTUIWithTabs helper for dual-kind scanning.
- Add resolveAuditSource() helper that returns source dir and result kind
based on ?kind query param (agents → agentsSource(), default → skills)
- Update handleAuditAll() to use resolveAuditSource() and set Kind on
all results after processAuditResults()
- Update handleAuditStream() with the same pattern for SSE endpoint
- Update toAuditResponse() to propagate result.Kind into response JSON
Thread kind parameter through auditInstalled, auditFiltered, and
auditSkillByName. All output text now uses Noun() for correct
skill(s)/agent(s) display. Set Result.Kind on all scan results.
Also update audit_project.go callers to pass kindSkills.
- audit.Result gains a Kind string field ("skill"|"agent", set by caller)
so callers can tag results for display without touching the scan engine
- resourceKindFilter gets Noun(count) and SingularNoun() helpers to produce
correct singular/plural display nouns per resource type
- audit command switches from parseKindArgWithAll to parseKindArg, dropping
the --all flag and its two help-text lines; agents subcommand is the way
to target agents explicitly
FilterAgents matched against FlatName which includes .md (e.g.
"tutor.md"), so user patterns like "tutor" or "team-*" silently
matched nothing. Strip the .md suffix before pattern comparison so
agent filters behave consistently with skill filters.
Add FilterAgents unit tests (include, exclude, combined, nested,
glob, invalid pattern) and integration tests for both filter paths:
- include/exclude config patterns (4 tests)
- .agentignore disabled state (3 tests: explicit, glob, nested)
- Add agent-mode batch uninstall handler with kind-based routing
in handler_uninstall.go (skill/agent dispatch)
- Add Skills/Agents tab navigation to BatchUninstallPage and TrashPage
with per-tab filtering and scoped empty states
- Extract SourceBadge component to replace duplicated getTypeLabel /
skillTypeLabel helpers across ResourcesPage, ResourceDetailPage,
BatchUninstallPage, and AnalyzePage
- Add kind field to BatchUninstallRequest API type
- Capitalize badge labels for consistency (tracked → Tracked, etc.)
Without the explicit -g flag, cmdSyncExtras falls back to auto-detection
which picks project mode when cwd contains .skillshare/config.yaml,
causing 'sync --all -g' to display project extras messages instead of
global ones. Mirrors the project-mode path that already passes -p.
- Fix sync matrix using wrong builtin agent targets in project mode
(DefaultAgentTargets → branch on IsProjectMode)
- Fix sync matrix not skipping filters for agent symlink mode,
matching the existing skill symlink behavior
- Remove double-defensive slice copies in handleListTargets since
targetsummary.Builder already clones Include/Exclude
- Extract shared findAgent() to deduplicate discovery logic between
resolveAgentResource and resolveAgentRelPathWithStatus
- Update test URLs from /api/skills to /api/resources and response
keys from skills/skill to resources/resource to match the route
rename from the resources refactor
Backend:
- PATCH /api/targets/:name accepts agent_include/agent_exclude fields
- POST /api/sync-matrix/preview returns agent entries with kind=agent
- GET /api/overview returns agentsSource and extrasSource paths
- Fix ResolveProjectTargets to resolve Agents sub-key (path + filters)
- Add agent filter CLI flags: --add-agent-include, --add-agent-exclude,
--remove-agent-include, --remove-agent-exclude, --agent-mode
- Unify target list JSON/TUI to show agent info and filters
Frontend:
- FilterStudioPage: kind-driven single-context view (?kind=skill|agent)
- KindBadge: use design system tokens (ss-badge + wobble in playful)
- TargetsPage: link to Filter Studio with ?kind= param
- ResourceDetailPage: capitalize type labels (Local, GitHub)
- ResourcesPage: sync activeTab from URL searchParams on navigation
- DashboardPage: show agents/extras source dirs, link skills card
with ?tab=skills for reliable tab switching
- API client: extend updateTarget and previewSyncMatrix for agent filters
Tests:
- Agent include/exclude round-trip persistence
- Invalid agent pattern returns 400
- Preview with agent entries and kind field
- No agent entries for targets without agent path
- CLI target agent filter integration tests
- Promote agents from nested dashed box to equal-level section panels
with same visual treatment as skills (bg panel, label, controls)
- Move StatusBadge from card header into per-section labels
- Add agent mode dropdown (PATCH /api/targets/{name} now accepts agent_mode)
- Unify agent filter text to match skills pattern (All N agents / N/M agents)
- Add agentPath to available targets API and Add Target flow
- Convert inline Add Target form to DialogShell modal (max-h-[60vh])
- Add Agents Path input for custom targets and selected target preview
- Show both Skills/Agents paths in picker rows for supported targets
TestSyncAgents_MergeMode_NestedSameBasename_IsStable compared raw
symlink targets against t.TempDir() paths without EvalSymlinks, causing
false failures on macOS where /var is a symlink to /private/var.
Add agent auto backup to syncAgentsGlobal and syncAgentsProject so that
agent targets are backed up before destructive sync operations, matching
the existing auto backup behavior for skills.
Previously only 'skillshare sync' (skills path) and 'target remove'
had auto backup for agents (added in 693f75cc). The agent-only sync
paths ('skillshare sync agents' and 'skillshare sync agents -p') had
no auto backup at all.
Extract resolveAgentBackupPath() in restore_tui.go to replace 3 identical
inline agent path resolution blocks (~30 lines removed). The new helper
delegates to the canonical resolveAgentTargetPath() with builtin fallback.
Add agent directory backup before sync (backupTargetsBeforeSync) and
before target removal (backupTargets) so agent data is preserved alongside
skill backups. Extract resolveGlobalAgentBackupContextFromCfg to avoid
redundant config.Load() when config is already available.
Split status word from detail in displayTargetStatus. Only the status
word (merged/drift/linked) gets color, detail text uses dim. Reduces
the "wall of green" effect in doctor output.
status.md:
- Fix synced→merged for agents, add [merge] mode prefix
- Remove synced from status table
- Update project mode example
doctor.md:
- Update example outputs with sub-item format (target name header + skills/agents indented)
- Add agents source to environment checks table
- Update targets section description
- Single-line extras format
- Remove leading spaces from output examples
Agents always use merge mode (symlink-per-file). Add [merge] prefix to
agent sub-item detail in status and doctor for consistency with skills.
Also refactor doctor displayTargetStatus to use sub-item format
(target name as header, skills/agents as indented sub-items).
Combine "source exists" and "targets reachable" into one line:
✓ rules: 4 files, 1/1 targets OK
Only show target details when there are unreachable targets.
Move agent target checks from standalone "Checking environment" output
into the "Checking targets" section as indented sub-items under each
target, matching the unified layout from status.
Also fix project mode doctor using wrong agents source path
(was falling back to global instead of project .skillshare/agents/).
- Update example output to show new layout (agents as sub-items)
- Remove outdated agents/--all flags from options table
- Fix --json note: now supported in both global and project mode
- Add agents section to JSON output example
- Rewrite project mode example with new format
- Remove fictional "Remote Skills" section
The agents_source field was already implemented but had no
documentation, unlike extras_source which was fully documented.
- Add agents_source to Full Example in configuration.md
- Add dedicated agents_source field reference section
- Add Custom Source Directory section to understand/agents.md
- Note agents_source in Skills vs Agents comparison table
Restructure status command output for both -g and -p modes:
- Remove "(project)" suffix from all section headers (logo already shows it)
- Merge agents source info into Source section alongside skills
- Show agents as sub-items under each target instead of a separate section
- Remove standalone printAgentStatus/printProjectAgentStatus (dead code)
- Simplify cmdStatus: remove kind parameter since status always shows all
- JSON output unchanged (backward compatible)
- Switch delegate to single-line mode (showDesc: false) with ▌ prefix bar
- Merge description info into Title() for both target and extra items
- Add ─ Targets (N) ── and ─ Extras (N) ── group headers with counts
- Add spacer row between Targets and Extras sections
- Skip separator on initial selection and filter reset
- Update status test to reflect always-show-both behavior
Remove kind filter (agents/--all) from status command — it now defaults
to showing everything, matching diff behavior. Status is a read-only
overview command; users expect the full picture without extra flags.
- Remove parseKindArgWithAll from cmdStatus, hardcode kindAll
- Update help text and usage examples
- Simplify tests: merge agents/all variants into default tests
- Update runbook steps 9-11 → 9-10
Migrate from "ss list all" syntax to "ss list --all" across all commands
that support kind filtering (list, sync, status, check, audit, backup,
restore, trash).
- Remove "all" as a recognized positional keyword in parseKindArg
- Add extractAllFlag and parseKindArgWithAll helpers
- Update help text, usage examples, and runbook
- Update all integration tests to use --all flag
- Accept trashBase parameter in cmdUninstallAgents instead of
hardcoding AgentTrashDir(), enabling correct project vs global
trash routing from all call sites
- Use displayName (not internal t.Name) when trashing agents
- Sort list by RelPath instead of Name so grouped skills stay together
- Update printUsage to reflect agent support across commands
(list, sync, check, update, diff, collect, trash, audit)
Align agent target naming with the skills-style __ flattening so nested agents do not collide by basename in flat agent directories. Add unit and project-mode integration coverage to verify repeated syncs stay stable and no longer report false updates.
Extract resolveProjectPath() helper to centralize ~ expansion and
relative-to-project-root resolution. Fixes extras sync and agent
target path resolution in project mode when paths are relative.
Add integration tests for sync --all agents/extras overlap detection
in both global and project modes.
In the All (resources) tab:
- Show [S] prefix for skills and [A] prefix for agents
- Group items by kind: skills first, agents second
- Each kind block preserves original repo grouping with
kind-prefixed headers (e.g. 'Skills · standalone')
In Skills/Agents tabs: no prefix shown (context is clear).
Detail panel now shows 'Skill' or 'Agent' kind label in the
status bits alongside remote/local/tracked.
Spinner message is now tab-aware: 'Loading resources/skills/agents'.
Implementation uses a shared *listTab pointer between the model
and delegate so the delegate reads current tab state without
needing SetDelegate() on every tab switch.
Three bugs introduced during centralized metadata migration:
1. Batch agent installs via UI wrote metadata to skills/.metadata.json
instead of agents/.metadata.json because handleInstallBatch hard-coded
SourceDir to s.cfg.Source. Override SourceDir with agentsSource() when
body.Kind is agent.
2. CheckAgents used LoadMetadataOrNew which silently converts parse
failures into an empty store, making all tracked agents appear local
and suppressing drift/update diagnostics. Switch to LoadMetadata and
surface corruption as status=error with the parse error message.
3. findMetaEntry only climbed 3 parent directories when searching for
.metadata.json, but --into supports arbitrary nesting depth. Raise
the ceiling to 10 (root sentinel still terminates early).
Replace .skillshare-meta.json sidecar writes with centralized
.metadata.json store writes across all test files. Use
install.MetadataFileName constant instead of hardcoded strings.
Updated: audit_test, doctor_test, gitignore_project_test,
install_online_test, list_project_test, sync_symlinked_dir_test,
uninstall_project_test, uninstall_test, uninstall_trash_test,
audit_output_online_test, audit_scan_skill_test, analyzer_metadata_test
- registry.schema.json: describe .metadata.json store format (version,
entries map with full field set) instead of old registry.yaml format
- Red team scripts: add write_store_meta helper, replace sidecar writes
with centralized store writes in phase3 (integrity) and phase5 (advanced)
Production code no longer reads or writes .skillshare-meta.json sidecars:
- InstallAgentFromDiscovery: write to centralized store via WriteMetaToStore
- agent_check.go: read from centralized store passed as parameter
- handler_skills.go: read agents from s.agentsStore
- audit.go: readMetaFileHashes reads from parent .metadata.json
- analyzer_metadata.go: extract findMetaEntry to deduplicate walk logic
- uninstall_agents.go: remove entry from centralized store on uninstall
- batchUpdateAgents: pass store to reinstallAgent, remove dead field
- Replace LoadMetadata+nil guard with LoadMetadataOrNew across 6 files
- Remove MetadataEntry.Name (json:"-", never set in production) and
FullName() method (only used in one test)
- Add LoadMetadataOrNew() helper to replace 8+ instances of the
LoadMetadata + nil guard boilerplate