Commit Graph
164 Commits
Author SHA1 Message Date
Willie 02aa2b2a45 feat(cli): add --json output to 8 commands (Phase 1+2)
Add structured JSON output support for agent and CI/CD consumption:

Phase 1 (mutating): sync, install, update, uninstall, collect
Phase 2 (read-only): target list, status, diff

Key design decisions:
- Per-command JSON schema (no universal envelope)
- Shared helper: writeJSON() with recursive nil slice→[] conversion
- --json implies --force for mutating commands (skip prompts)
- TUI/spinners suppressed; progress goes to stderr, JSON to stdout
- 10 integration tests covering valid JSON, dry-run, nil slices

Also includes post-review cleanup:
- ensureEmptySlices now recurses into nested structs/slices
- Unified mode resolution via getTargetMode() (removed 4 duplicates)
- sync --json now creates backups (behavioral parity with non-JSON)
- targetList no longer double-parses --json flag
2026-03-06 02:15:36 +08:00
Willie 2af44f1d3f chore(skills): strengthen built-in skill descriptions and content
Improve all 5 active skills with pushy descriptions for better
triggering accuracy, following devcontainer as the gold standard.

- changelog: add trigger scenarios (release notes, version prep)
- cli-e2e-test: add trigger scenarios (runbook, E2E validation)
- codebase-audit: add 3 new audit dimensions (handler split, oplog
  coverage, web API consistency) and trigger scenarios
- implement-feature: add project patterns reference (handler split,
  dual-mode, TUI, web API, oplog) and trigger scenarios
- update-docs: expand scope to all 7 doc categories with code-to-doc
  mapping guide and trigger scenarios

Also remove empty .skillshare/skills/frontend/ directory.
2026-03-05 02:13:21 +08:00
Willie 671e3c5215 test(integration): add sync extras E2E tests
Cover sync extras merge mode, copy mode, no-extras-configured,
orphan pruning, --all flag, and missing source directory scenarios.
2026-03-04 12:16:32 +08:00
Willie f6c5e1d2c8 feat(tui): add persistent TUI toggle via skillshare tui [on|off]
Allow users to globally disable interactive TUI without adding --no-tui
to every command. The setting is stored in config.yaml as `tui: false`.

Priority: --no-tui flag > config tui field > default (true).

- Add Config.TUI *bool field + IsTUIEnabled() helper
- Add centralized shouldLaunchTUI() replacing 9 scattered TTY checks
- Add `skillshare tui` command (show/on/off)
- Update JSON schema with tui boolean property
- Clean up unused golang.org/x/term imports (4 files)
2026-03-04 12:16:32 +08:00
Willie ef5a36ce60 feat(audit): change default dedupe mode from legacy to global
Duplicate findings (same pattern+file+line+snippet) are noise.
Global deduplication is now the default for all profiles.
Use --dedupe legacy to opt back into the old behavior.
2026-03-03 16:08:11 +08:00
Willie 07f70abf02 fix(audit): let profile presets set threshold when config has no explicit block_threshold
config.Load() normalized empty block_threshold to "CRITICAL", preventing
ResolvePolicy from applying profile-based thresholds (e.g. strict → HIGH).

Change: normalizeAuditBlockThreshold("") now returns "" instead of "CRITICAL".
All downstream callers (install, update, server) already use
audit.NormalizeThreshold() which handles empty → CRITICAL independently.

Also adds 4 integration tests for --profile, --dedupe, and config-based
profile resolution. Includes gofmt formatting fixes.
2026-03-03 16:08:11 +08:00
Willie 34ecba48ee test: stabilize make test under updated audit rules 2026-03-03 16:08:11 +08:00
Willie 1caba253c6 fix(audit): prevent severity-only merge from wiping rules and enable --pattern from ignoring ID-level disables
P1: mergeYAMLRules Phase 2 used full-object replacement for overlays
without Enabled set, causing severity-only entries ({id, severity}) to
wipe regex/pattern/message from the base rule. compileRules then failed
with "empty regex". Now uses field-level merge: only entries with Regex
do full replacement; otherwise Enabled and Severity are patched
individually.

P2: TogglePattern enable only removed pattern-level disable entries,
leaving ID-level {id: "x", enabled: false} untouched — both builtin
and custom rules. Now clearDisableForPattern matches by builtin ID set
OR by r.Pattern == pattern, covering custom rules in the same group.
2026-03-03 16:08:11 +08:00
Willie dbe759ecfe feat(audit): add CLI rules subcommand, severity override, reset, and redesign Web UI
- Add `audit rules` CLI subcommand with list, enable, disable, severity,
  and reset commands for managing audit rules without editing YAML
- Add SetSeverity/SetPatternSeverity/ResetRules mutations in audit package
- Redesign TUI with severity tabs, two-level pattern→rule navigation,
  inline severity picker (1-5 keys), and reset-all support
- Add compiled rules API endpoints (GET /api/audit/compiled, PATCH toggle)
- Redesign AuditRulesPage with severity-colored stripes, stat cards,
  expand/collapse, toggle switches, and dark-mode-aware CSS variables
- Redesign LogPage with status-colored row stripes, reusable PillButton,
  improved stats cards with left border stripes, default 10 entries/page
- Remove system-writes audit pattern (noisy, low value)
- Fix dark mode contrast across both pages by replacing hardcoded
  design.ts colors with var(--color-*) CSS variable references
2026-03-03 16:08:11 +08:00
Willie 1676d7d064 fix(audit): suppress pterm cursor codes leaking into structured stdout
pterm's cursor package writes hide/show ANSI codes (\x1b[?25l/h)
directly to os.Stdout, bypassing WithWriter(). The previous fix
(SetProgressWriter to stderr) was insufficient because pterm still
created progress bar objects that triggered cursor.Hide()/Show().

Add SuppressProgressToStderr() which both redirects ProgressWriter
and forces isProgressTTY() to return false, preventing pterm
components from being instantiated at all. Extract assertNoANSI
test helper and cover all three structured formats (JSON, SARIF,
Markdown).

Also update pre-commit E2E runbook with steps 10-11 (framework
integration tests) and add pre-commit-hook recipe to sidebar.
2026-03-03 16:08:11 +08:00
Willie 89c3586da6 feat(audit): add markdown output format and improve terminal layout
- Add --format markdown for self-contained audit reports (GitHub Issues/PRs)
- Simplify pterm box rendering: replace DefaultBox with separator-line style
- Remove unused SkillBox, SummaryBox, SkillDisplay, wrapText helpers
- Color Box titles cyan (consistent with HeaderBox)
- Add breathing room: blank lines around progress bar and after summary
- Show "skillshare audit (project)" header title in project mode
- Append elapsed time to cross-skill synthetic results to fix slice mismatch
2026-03-02 23:01:30 +08:00
Willie 11668b8f0a feat(audit): add --format flag with sarif/json/text + deprecate --json
- Add --format <text|json|sarif> flag to audit command
- Deprecate --json in favor of --format json (with stderr warning)
- SARIF output uses ToSARIF() from internal/audit/sarif.go
- Suppress UI (spinners, progress bars) for all structured outputs
- Update auditPath/auditSkillByName to accept format string
- Update help text with new flag and examples
- Add 3 integration tests: FormatSARIF, FormatJSON, JSONDeprecation
2026-03-02 23:01:30 +08:00
Willie 38f8f1c796 fix(symlink): resolve symlinked source/target dirs across all Walk callsites
filepath.Walk/WalkDir silently skip symlinked root directories because
os.Lstat sees the root as a non-directory symlink and never enters it.
This affected update, uninstall, reconcile, and server handlers when
the source directory was a symlink (common with dotfiles managers).

Extract ResolveSymlink() from sync.go into internal/utils/path.go and
apply it at every filepath.Walk/WalkDir callsite on source/target dirs.

Also add containment guards to resolveGroupSkills (uninstall) and
resolveGroupUpdatable (update) to reject group directories that are
symlinks pointing outside the source tree.
2026-03-02 10:05:57 +08:00
Willie d1370c0f98 fix(sync): preserve external symlinks in merge/copy mode conversions
When a target directory is an external symlink (e.g., dotfiles manager
pointing ~/.claude/skills/ elsewhere), sync previously deleted it
unconditionally during symlink→merge/copy mode conversion. This also
affected DiscoverSourceSkills which failed to traverse symlinked source
directories because filepath.Walk uses Lstat on root.

Changes:
- Add resolveWalkRoot() helper; use in both Discover functions so
  filepath.Walk enters symlinked source directories
- Add isSymlinkToSource() to distinguish source-pointing symlinks
  (symlink mode residue, safe to remove) from external symlinks
- Pass explicit sourcePath to SyncTargetMergeWithSkills and
  SyncTargetCopyWithSkills for reliable symlink origin detection
- Fix FindLocalSkills to use utils.ResolveLinkTarget (handles relative
  symlinks correctly) and follow external symlinks for scanning
- Fix CheckStatusMerge to follow external symlinks instead of returning
  StatusConflict
- Add 17 unit tests and 6 integration tests covering symlinked source,
  target, both, chained symlinks, idempotency, prune, and pull
2026-03-02 10:05:57 +08:00
Willie 13744f89a8 refactor: consolidate duplicated utilities and simplify diff API
- Extract shared applyDetailScroll into tui_helpers.go (was duplicated
  across diff_tui.go, log_tui.go, audit_tui.go)
- Create utils.FileHash and utils.FileHashFormatted, replacing private
  copies in install/meta.go and audit/audit.go
- Export install.MetaFileName constant, use from diff_file.go
- Replace double SHA-256 in fileContentsEqual with streaming byte compare
  for early-exit efficiency
- Add 1MB size cap to generateUnifiedDiff to prevent performance issues
- Move noTUI into diffRenderOpts struct, simplifying function signatures
2026-03-02 02:23:50 +08:00
Willie ada539603e refactor(diff): address code review findings
- Remove dead field diffTUIModel.results (never read)
- Replace hand-rolled countOccurrences with strings.Count
- Skip latestMtime() walk for merge mode (symlinks make it misleading)
- Fix ensureFiles() nil cache miss (return non-nil empty slice)
- Cache sorted items + categories in TUI model (avoid per-render recompute)
2026-03-02 02:23:50 +08:00
Willie 6a904545f4 test(diff): add integration tests for file stat, patch, new labels, summary 2026-03-02 02:23:50 +08:00
Willie 6fea949988 feat(diff): redesign labels with git-style symbols and add statistics summary 2026-03-02 02:23:50 +08:00
Willie 995eb114d5 feat(restore): add unified Backup Restore TUI
Interactive two-phase TUI: target picker → version list with left-right
split panel layout. Includes detail panel with skill diffs, descriptions,
and target state. Wires no-args restore to TUI dispatch with --no-tui
fallback.
2026-03-02 02:23:50 +08:00
Willie 71dea4ee14 feat(backup): add version listing and follow top-level symlinks
Add ListBackupVersions() and ListTargetsWithBackups() for TUI timestamp
selection. Fix merge-mode targets producing empty backups by following
top-level symlinks in copyDirFollowTopSymlinks().
2026-03-02 02:23:50 +08:00
Willie b2af4f4929 feat(trash): add interactive TUI for trash list
Add bubbletea-based TUI with multi-select, fuzzy filter, and inline
restore/delete/empty operations. Follows the same dispatch pattern as
list and log: JSON → TUI (TTY + items + !--no-tui) → plain text.
2026-03-02 02:23:50 +08:00
Willie 00f8f38dd8 fix(check): pass custom targets to unknown-target validation in project mode
Follow-up to PR #58: check_project.go now extracts custom target names
from project config and passes them to findUnknownSkillTargets, matching
the global-mode fix. Also surfaces config load errors as warnings instead
of silently ignoring them. Adds integration tests for check and doctor
(global + project mode) verifying no false "unknown target" warnings.
2026-02-28 18:48:51 +08:00
Willie 6ca6f58cf6 fix(test): adapt online audit parity test for skip-unchanged optimisation
The skip-unchanged optimisation (ec81fc1) causes update --all to skip
skills whose metadata already matches the repo state, producing no
InstallResult and therefore no audit output.  The test now invalidates
one skill's metadata between install and update, forcing a re-install
that exercises the audit code path.
2026-02-28 03:44:02 +08:00
Willie 5d9a77372d feat(init): label universal as shared agent directory and add coexistence docs
- Change universal description from "(recommended)" to "(shared agent directory)"
  in detect, checklist, and discover flows
- Add FAQ section on using universal alongside npx skills: merge vs copy mode
  differences, name collision caveats, lock file visibility
- Add universal info admonition to supported-targets page
- Add E2E runbook for universal target path verification
- Update CHANGELOG and release notes for v0.16.4
2026-02-28 03:44:02 +08:00
Willie 8997196593 fix(init): correct universal target path and auto-include in init
The universal target pointed to ~/.config/agents/skills (wrong) instead
of ~/.agents/skills, causing `npx skills list` to miss synced skills.

Also auto-recommend universal as a target whenever any CLI is detected
during `init` and `init --discover`, since ~/.agents/ won't exist on
disk until skillshare creates it.

Closes #54
2026-02-28 03:44:02 +08:00
Willie 217af0782c fix(install): respect quiet mode for tracked config dry-run 2026-02-27 05:39:49 +08:00
Willie cfbcaaff9e fix(uninstall): fix stale summary, skip message, and pluralization UX
After pre-flight filters out dirty tracked repos, recalculate summary
so spinner and confirm prompt use correct noun type. Print skip count
when repos are skipped. Replace all "(s)" patterns with pluralS() for
natural English output ("2 groups" not "2 group(s)"). Add isMixed()
method to avoid magic string comparison on noun().
2026-02-27 05:39:49 +08:00
Willie 87abb6e049 feat(install): replace spinner with tree-style progress and summary output
Switch config install and search install UI from plain spinner to
TreeSpinner with StepResult summary showing installed/skipped/failed
counts and elapsed time. Add git clone progress callback to spinners
so users see real-time cloning status.

- Add Quiet field to InstallOptions for suppressing per-skill output
- Add Skipped field to ConfigInstallResult for accurate summary
- Update integration test assertion to match new summary format
2026-02-27 05:39:49 +08:00
Willie 0a28fcdbdb fix(search): preserve canonical repo source in grouped installs
Use a repo-root source in grouped search installs by normalizing from CloneURL instead of carrying subdir Raw values. This prevents malformed metadata sources (for example duplicated subdir paths) and keeps provider-agnostic behavior for GitHub/GitLab/Bitbucket/Azure and SSH URLs.

Also centralize discovery source formatting for metadata so whole-repo SSH installs use //subdir syntax consistently.

Add regression coverage:
- cmd unit tests for grouped clone source normalization across providers
- install unit tests for discovery source formatting (including SSH)
- integration test in tests/integration that verifies grouped install metadata source round-trips through ParseSource.
2026-02-27 05:39:49 +08:00
Willie f29b4ac1b8 fix(sync): dereference directory symlinks in copy mode and update changelog
Copy mode now resolves directory symlinks to concrete directories,
preventing broken symlinks in targets that use file copying (e.g.,
Windsurf). DirChecksum follows symlinks for consistent hash comparison.
DirMaxMtime disables mtime fast-path for symlink-containing skills to
avoid stale cache hits. Cycle detection prevents infinite recursion.

Also updates CHANGELOG v0.16.3 with previously missing entries:
hub risk badge colors, batch failure output, repo-grouped cloning.
2026-02-27 05:39:49 +08:00
Willie 5186d86a3f fix(log): --stats --cmd audit now reads audit.log instead of operations.log
runLogStats() only checked the --audit flag to pick the log file,
ignoring filter.Cmd. This caused `log --stats --cmd audit` to read
operations.log and report "No log entries" even when audit data existed.

Align with runLog() by also checking f.Cmd == "audit".
2026-02-26 22:27:23 +08:00
Willie ace94c8756 feat(diff): rewrite output with action-oriented labels and overall summary
Replace cryptic internal terminology (+/~/- source only, local copy, etc.)
with action-oriented messages that tell users what to do next (→ sync will
add, ⚠ local copies, ← collect will import). Add overall summary line at
top ("N targets need sync, N fully synced"). Show conditional hints that
only mention --force when local copies actually exist. Use full command
names (skillshare sync) in hints.
2026-02-26 22:27:23 +08:00
Willie 0afab5cb7b fix(sync): resolve race condition for targets sharing the same path
Multiple targets (e.g. universal/amp/kimi/replit) share ~/.config/agents/skills.
Parallel sync caused concurrent goroutines to race on os.Symlink for the same
destination, producing "file exists" errors.

Fix: group entries by resolved target path so same-path targets run sequentially
within one goroutine. Different-path targets remain fully parallel.

Also addresses PR #52 review feedback:
- audit: replace O(N²) findElapsed with O(1) index-aligned elapsed slice
- test-brew-upgrade: explicit go check + mktemp -d (replaces || true and /tmp)

Add 6 integration tests covering shared-path race condition, idempotency,
--force mode, mixed paths, filters, and output verification.
2026-02-26 22:27:23 +08:00
Willie 0e2e18dca0 feat(diff): group targets with identical diff results
When multiple targets produce the same diff output (e.g. all missing
the same skills), they are now merged into a single block with a
combined header like "claude, agents" instead of repeating the full
list for each target. Fully synced targets are also consolidated
into one line (e.g. "codex, copilot: fully synced").

Refactored show*Diff → collect*Diff to separate data collection
from rendering, enabling cross-target fingerprint grouping via
renderGroupedDiffs().
2026-02-26 22:27:23 +08:00
Willie 179d02ba0d perf(sync): mtime fast-path for copy mode + diff UX improvements
Copy mode previously computed DirChecksum (Walk + ReadFile + SHA256)
for every skill on every sync, even when nothing changed. Add mtime-
based short-circuit: if source dir max mtime matches the manifest
record, skip checksum entirely.

Changes:
- Add DirMaxMtime() — Walk + lstat only, no file reads
- Extend Manifest with Mtimes map (omitempty, backward-compatible)
- SyncTargetCopyWithSkills: mtime fast-path with target validity check
- diff: two-phase scan-then-display with spinner (no more interleaved
  spinner + diff output), discovery spinner for both global/project
- Clearer diff reasons: "missing" → "source only",
  "missing (deleted from target)" → "deleted from target"
- Server handleDiff: same mtime fast-path for copy mode
- Prune cleans up orphan mtime entries
2026-02-26 22:27:23 +08:00
Willie 2f6dd42695 perf(sync): cache discovery + add progress UI for sync operations
DiscoverSourceSkills was called 1+2N times (N = number of targets),
each doing a full filepath.Walk + SKILL.md frontmatter parsing.
Now discovered once and passed to all targets via WithSkills variants.

Changes:
- Add SyncTargetMergeWithSkills, PruneOrphanLinksWithSkills (PruneOptions struct)
- Add SyncTargetCopyWithSkills with onProgress callback, PruneOrphanCopiesWithSkills
- Discovery spinner + per-target reporting + summary line in CLI
- Copy mode shows per-skill spinner progress during slow checksum+copy
- Collision report uses dim gray text to avoid confusion with sync results
- Server handlers (handleSync, handlePull) use single discovery pass
- Fix pre-existing TestLog_StatsOutput assertion ("Success rate" → "OK:")
2026-02-26 22:27:23 +08:00
Willie 5f1521c3fd feat(log): comprehensive log improvements — partial status, instrumentation, retention, stats
- Report "partial" status for sync/install/update/uninstall when some
  items succeed and others fail
- Instrument 6 new commands: check, diff, trash, init, upgrade, and
  all mutating commands now log to operations.log
- Auto-truncation via WriteWithLimit with configurable log.max_entries
  (default 1000) and 20% hysteresis to avoid truncating every write
- Stats engine: computeLogStats with per-command breakdown
- CLI --stats flag with colored output and ✓ok/total ratios
- TUI stats panel (toggle with 's'): bar charts, status distribution,
  last operation timestamp
- TUI stats footer: compact always-visible summary line
- TUI detail panel: j/k scrolling for long entries, proportional
  list/detail layout (40%/60%)
- Web API: GET /api/log/stats endpoint
- Updated website docs for log command
2026-02-26 22:27:23 +08:00
Willie 02b663ec58 feat(update): add --prune for stale skills, stale detection in check, refactor update handlers
- update --prune: detect skills deleted upstream and move them to trash
  (batch + single-target paths), clean registry entries after prune
- update without --prune: warn about stale skills with suggestion
- check: report "stale" status for skills whose subdir no longer exists
  in the remote repo (previously misreported as update_available)
- Refactor updateTrackedRepo, updateRegularSkill, updateTrackedRepoQuick,
  updateSkillFromMeta to accept *updateContext instead of 7-10 individual
  params; delete dead updateSkillOrRepo function
- Add integration tests for prune (standalone, nested, all-stale,
  registry cleanup) and project-mode prune
- Update website docs for update --prune and check stale status
2026-02-26 22:27:23 +08:00
Willie cfa6d4017b fix(docs,test): add replit badge and project-mode integration tests
Add missing replit badge + id anchor in supported-targets.md.
Add project-mode integration tests for audit, check, diff, and log
commands to close gaps found in codebase audit.
2026-02-25 07:02:54 +08:00
Willie 49dd344987 test(integration): read registry.yaml instead of config.yaml for skill assertions
Skills are now stored in registry.yaml, not config.yaml. Update 10
integration tests to read from the correct file:

- install_group_test.go: 3 tests read registry.yaml after install
- uninstall_test.go: 3 tests read registry.yaml after uninstall
- uninstall_project_test.go: 4 tests write skills to registry.yaml
  (project uninstall doesn't trigger config migration) and verify
  registry contents after uninstall
2026-02-25 07:02:54 +08:00
Willie e064b456f7 test(integration): check registry.yaml instead of config.yaml for installed skills 2026-02-25 07:02:54 +08:00
Willie fd9bee5bb4 test(restore): add 6 integration tests for restore flows
Cover: latest backup round-trip, specific timestamp selection,
target not in backup, dry-run with force, force overwrite on
non-empty target, and no-force failure on non-empty target.
2026-02-25 07:02:54 +08:00
Willie 117b319050 feat(check): per-skill tree hash comparison for precise update detection
Previously `skillshare check` compared repo-level commit hashes, causing
all skills from a registry repo to show "update_available" whenever any
commit was pushed — even if the individual skill's files were unchanged.

Now each skill records its git tree hash (subdir-level SHA) at install
time. During check, a three-tier comparison is used:

1. Fast path: commit hash matches → up_to_date (zero extra cost)
2. Tree hash path: blobless fetch (~150KB) + batch ls-tree → per-skill
   comparison; unchanged subdirs stay up_to_date
3. Fallback: no tree hash (old installs) → commit comparison (unchanged)

Also fixes pterm progress bar printing twice when it auto-stops at 100%.
2026-02-25 07:02:54 +08:00
Willie 7287e6bf81 fix(install): resolve infinite loop in directory picker for large repos
groupSkillsByDirectory() used filepath.Dir() which always returned the
same parent regardless of recursion depth. Add a prefix parameter so
each level strips already-navigated directories before grouping.

Also fix stale assertion in TestCheck_RegularSkill_ShowsMeta to match
the summarized local-skill output introduced in 37f3425.
2026-02-25 07:02:54 +08:00
Willie a0ebbde1de refactor(ui): use raw bytes in backup API and extract shared formatSize
Return sizeBytes (int64) instead of sizeMB (float64) from backup API
so the frontend controls display formatting. CLI backup commands now
use the existing formatBytes() helper for human-friendly output.

Extract duplicate formatSize() from CollectPage and TrashPage into
shared ui/src/lib/format.ts utility.
2026-02-25 07:02:54 +08:00
Willie 1fb5219cd2 feat(list): add interactive TUI with search, filter, sort, and detail panel
Replace basic text output with bubbletea-based interactive TUI for the
list command. Falls back to plain text with --no-tui or non-TTY output.

- Bubbletea TUI: fuzzy filtering, keyboard navigation, detail panel
- Detail panel: description (SKILL.md), disk path, files, synced targets
- Search: `skillshare list <pattern>` filters by name/path/source
- Filter: `--type git|local` to filter by installation type
- Sort: `--sort name|date|type` with mode-specific defaults
- JSON: `--json` for CI/scripting consumption
- Pager: less/more wrapper for --no-tui plain text output
- 29 integration tests covering all new functionality
2026-02-25 07:02:54 +08:00
Willie f8205a27a8 refactor(install): prefer sparse checkout over GitHub API for subdir install
Swap fast path order: sparse checkout is now fast path 1 (works for all
hosts including file://), GitHub Contents API is fast path 2 (fallback
when sparse is unavailable or fails). Also reset subdirPath on sparse
failure to ensure proper fallback chain.

Fix red team helpers to inject -g flag after subcommand, preventing
.skillshare/ auto-detection from hijacking global-mode tests.

Add blocked section assertions to TestUpdate_BatchAll_FailsOnMalicious.
2026-02-25 07:02:54 +08:00
Willie c321db5d9c test(audit): add E2E runbook and online test for batch audit output
Add audit_output_antigravity_runbook.md covering install --all and
update --all audit output verification against sickn33/antigravity-
awesome-skills (7 steps, all passing).

Fix audit_output_online_test.go: batch install exits 0 when some
skills succeed (blocked count is a warning, not an error), so
AssertFailure should be AssertSuccess.
2026-02-25 07:02:54 +08:00
Willie 3012061649 fix(update): use caller-provided dest paths in batch update to prevent path duplication
UpdateSkillsFromRepo was using filepath.Join(sourceDir, meta.Subdir) to
derive the local destination, but meta.Subdir is the repo-internal path
(e.g. "skills/foo") which may differ from the local install path ("foo/").
This created leaked copies at sourceDir/skills/foo/ alongside the correct
sourceDir/foo/, doubling the skill count on subsequent scans.

Change skillTargets from []string to map[string]string where key is the
repo subdir (for discovery lookup) and value is the local absolute path
(provided by the caller who already knows where the skill is installed).
2026-02-25 07:02:54 +08:00
Willie 3bfad952e5 refactor(sync): remove symlink compat hint from sync output
Doctor is the right place for diagnostic hints. Sync runs frequently
and the repeated notice would be noisy.
2026-02-25 07:02:54 +08:00