Commit Graph
174 Commits
Author SHA1 Message Date
Willie d97e5a7c33 refactor(extras): consolidate duplicate logic and fix sync --all --json output
- Move checkExtrasSyncStatus to sync.CheckSyncStatus (shared)
- Add sync.EffectiveMode helper to replace inline mode defaults
- Add config.ValidateExtraMode to centralize mode validation
- Fix sync --all --json outputting two separate JSON objects
  by merging extras into the skills JSON output
- Fix swallowed JSON decode error in handleExtrasSync
- Remove dead symlink check in CollectExtraFiles (filepath.Walk
  follows symlinks so the check was unreachable)
- Fix integration test extras paths to use extras/<name>/ layout
2026-03-12 16:45:02 +08:00
Willie f6264fc954 test: add integration tests for collect, status, diff, doctor, migration 2026-03-12 16:45:02 +08:00
Willie f4e54a1810 test: add integration tests for extras init, list, remove, sync 2026-03-12 16:45:02 +08:00
Willie f115ab5e0e fix(tui): show skill name and group in list detail panel
The detail panel header was rendered on L00 (same row as the list title),
making the skill name invisible. Push content to L01 with a leading newline
and use colorSkillPath for consistent group/name coloring matching the left
panel. Compress status/date/targets into a single metadata line to save
vertical space. Show full source URL and synced targets in Quick Facts.

Also suppress devcontainer stderr redirect message in --json/--format modes
and fix audit summary field name (analyzerCount → activeAnalyzers).
2026-03-06 23:10:48 +08:00
Willie 7223ac52f4 fix(sync): preserve non-json dry-run output stream
Keep sync dry-run diagnostics on stdout by default to avoid non-JSON behavior regressions. Introduce sync.DiagOutput so JSON mode can silence diagnostics via io.Discard at command entry and restore after execution. Update search JSON integration assertion to match fully silent progress behavior.
2026-03-06 02:15:36 +08:00
Willie 6ad930f71d perf(cli): parallelize git dirty checks in status --json
Extract buildTrackedRepoJSON() that runs git.IsDirty concurrently via
goroutines + WaitGroup instead of sequential subprocess spawns per repo.
Also deduplicates the tracked-repo JSON loop between global and project
status paths, and optimizes skill counting to a single pass with a map.
2026-03-06 02:15:36 +08:00
Willie 4b09d2ee3d fix(cli): redirect JSON-mode UI to /dev/null and add status --project --json
suppressUIToStderr was redirecting UI to stderr, but in environments
where stdout and stderr share the same terminal (e.g. docker exec),
all the spinner/progress/header output was still visible alongside
the JSON. Replace with suppressUIToDevnull which opens os.DevNull
for both os.Stdout and ui.ProgressWriter, producing zero visible
noise in --json mode.

Also add status --json support for project mode, reusing the same
JSON schema as global mode (source, skill_count, tracked_repos,
targets, audit, version).
2026-03-06 02:15:36 +08:00
Willie b5430e094b fix(cli): suppress UI output in --json mode for install, diff, uninstall
install --json: logo, spinners, and step output leaked to stdout,
corrupting machine-parseable JSON. Add suppressUIToStderr() around the
entire install flow, restoring stdout before writing JSON.

diff --project --json: spinner and progress display polluted stdout.
Skip spinner and progress creation in JSON mode, matching the existing
cmdDiffGlobal pattern.

uninstall --json: five error paths (discovery failure, no skills found,
glob detection, validation, preflight) returned plain-text errors instead
of JSON error envelopes. Wrap each with writeJSONError().

Add 8 integration tests (5 new failure cases + 3 confirming existing
behavior) with an assertPureJSON helper that validates stdout contains
only valid JSON with no leading/trailing noise.
2026-03-06 02:15:36 +08:00
Willie 18cd0ecc94 fix(cli): preserve non-zero exit code for --json error paths
writeJSONError now returns a jsonSilentError sentinel that main()
recognises — it exits with code 1 without printing plain-text output
to stdout. This fixes a regression where --json errors (config load
failure, missing source dir, discovery failure) returned exit 0.

All writeJSONError call sites changed from the broken pattern:
  writeJSONError(err); return nil   // exit 0, wrong
to:
  return writeJSONError(err)        // exit 1, correct

Also applied the same fix to update.go error paths which had the
older pattern of writeJSONError(err) followed by return err (which
would print both JSON and plain text).

Added regression tests for sync and install error paths verifying
both non-zero exit code and valid JSON error output on stdout.
2026-03-06 02:15:36 +08:00
Willie 6b4a8782bd fix(cli): ensure --json mode outputs pure JSON to stdout
Address code review feedback from PR #67:

- Move all dry-run diagnostic messages (internal/sync) from stdout to
  stderr so they don't pollute JSON output
- Suppress UI output (spinners, headers, warnings) in uninstall --json
  mode by adding jsonOutput guards across all phases
- Return nil after writeJSONError to prevent dual output (JSON + plain
  text error) in install and sync commands
- Handle json.MarshalIndent error in writeJSONError with stderr fallback
- Merge duplicated discovery logic (JSON vs non-JSON branches) in sync,
  sync_project, diff, and collect using nullable spinner pattern
- Remove checkRepoDirty alias in status.go, call isRepoDirty directly
- Remove extractJSON test workaround — tests now assert stdout is valid
  JSON directly, enforcing the clean-stdout contract
2026-03-06 02:15:36 +08:00
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