Commit Graph
217 Commits
Author SHA1 Message Date
Willie 8e51423afb style(update): fix gofmt formatting in update_resolve.go 2026-02-25 07:02:54 +08:00
Willie c6d44075b2 refactor(update): simplify updateAllProjectSkills to accept *updateContext
Replace 8 individual params with the shared updateContext struct,
eliminating the redundant inline construction that was already present.
2026-02-25 07:02:54 +08:00
Willie 9fa4828d17 refactor(update): unify verbose handlers, remove project-mode duplicates
Replace cfg *config.Config with sourcePath string in updateTrackedRepo and
updateRegularSkill. Add projectRoot param for mode-aware audit scanning.
Delete updateSingleProjectSkill and updateProjectTrackedRepo from
update_project.go — project mode now uses the same shared handlers.
2026-02-25 07:02:54 +08:00
Willie fadacb8bff refactor(update): replace third batch loop in updateAllProjectSkills with executeBatchUpdate
All three duplicated 3-phase batch loops (tracked repos → grouped skills →
standalone skills) are now unified through executeBatchUpdate(). This
eliminates the local `target` struct in updateAllProjectSkills and ~160
lines of duplicated orchestration code.
2026-02-25 07:02:54 +08:00
Willie 553c0a8bb7 refactor(update): introduce updateContext and unify quick handlers
Add updateContext struct with mode-aware auditScanFn() and makeInstallOpts().
Unify updateTrackedRepoQuick (add scanFn param) and updateSkillFromMeta
(accept InstallOptions) between global/project modes. Delete
updateProjectTrackedRepoQuick and updateProjectSkillFromMeta.
2026-02-25 07:02:54 +08:00
Willie 0f1d9eb7bf refactor(update): unify resolvedMatch and projectTarget into updateTarget
Single updateTarget type with name + path + isRepo fields replaces
both resolvedMatch (global) and projectTarget (project) local types.
2026-02-25 07:02:54 +08:00
Willie 97128a2651 refactor(update): extract handlers to update_handlers.go
Move verbose/quick update handlers, auditGateAfterPull, diff rendering,
isSecurityError, truncateString. update.go now contains only dispatcher
and arg parsing (~518 lines).
2026-02-25 07:02:54 +08:00
Willie 30d5baf6d9 refactor(update): extract audit rendering to update_audit_render.go
Move updateResult, batchAuditEntry, batchBlockedEntry types and all
display/formatting functions for batch audit results. Pure code move.
2026-02-25 07:02:54 +08:00
Willie 5b5475df28 refactor(update): extract target resolution to update_resolve.go
Move resolvedMatch, resolveByBasename, resolveGroupUpdatable, isGroupDir
to dedicated file. Pure code move, no logic changes.
2026-02-25 07:02:54 +08:00
Willie 37a5e68ecb refactor(install): unify duplicated parseInstallArgs between global and project modes
Delete parseProjectInstallArgs (identical copy) and projectInstallArgs type
from install_project.go. Both modes now share parseInstallArgs. The "no source
→ reject flags" check moved from parser to cmdInstall caller. Project mode
gains --audit-verbose support for free.
2026-02-25 07:02:54 +08:00
Willie 6e15e50e95 refactor(install): extract install handlers to install_handlers.go 2026-02-25 07:02:54 +08:00
Willie 0f7d7d8cf5 refactor(install): extract interactive prompts to install_prompt.go
Move ~360 lines of skill selection UI functions (promptMultiSelect,
promptLargeRepoSelection, fuzzy filtering, etc.) to a dedicated file.
Pure structural move with no behavior changes.
2026-02-25 07:02:54 +08:00
Willie 5b4f1c31cd refactor(install): extract audit rendering to install_audit_render.go
Move ~820 lines of audit-related types, vars, and 30 functions from the
2608-line install.go monolith into a dedicated file. Pure structural move
with no behavior changes — same package, identical signatures.
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 76ef4ff07e feat(log): add interactive TUI with fuzzy filter and detail panel
On TTY, `skillshare log` now launches a bubbletea TUI (same pattern as
`list`) with fuzzy filtering by timestamp/command/status/source/detail,
keyboard navigation, and a colorized detail panel showing structured
args per entry. Operations and audit entries are merged and sorted by
time in the combined view.

Also refactors the 979-line log.go into three focused files:
- log.go (303) — entry, dispatch, help
- log_format.go (495) — data→string conversion, logArg* helpers
- log_render.go (189) — TTY/non-TTY terminal output

Other changes:
- --no-tui flag to skip TUI and print plain text
- Shared applyTUIFilterStyle() for cyan filter cursor in both TUIs
- Update website docs and built-in skill references
2026-02-25 07:02:54 +08:00
Willie cff3fc45e8 feat(list): add skill actions (audit/update/uninstall) to TUI
Allow users to trigger audit, update, or uninstall directly from
the interactive list TUI via Shift-key shortcuts (A/U/X), avoiding
the need to exit and manually type commands.
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 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 bcc88ba1b0 fix(update): wire git clone progress into batch update progress bar
Grouped skills batch path calls UpdateSkillsFromRepo which clones the
repo via DiscoverFromGitWithProgress — but OnProgress was nil so the
progress bar froze during clone then jumped on completion.

Wire OnProgress callback to forward git transfer lines into the
progress bar title, and add a 50ms render delay in the inner per-skill
loop so pterm can flush each step to the terminal. Both guarded by
IsTTY() to avoid overhead in CI/pipe contexts.
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
Willie 53b4ba40a4 refactor(doctor): replace per-target mode hint with universal symlink compat notice
Remove hardcoded preferredModeHintTargets list that only suggested copy
mode for specific targets (cursor, antigravity, copilot, opencode).
Instead, show a generic symlink compatibility hint whenever any target
uses merge or symlink mode — guiding users to switch to copy mode if
their tool cannot read symlinked skills.
2026-02-25 07:02:54 +08:00
Willie 389257817a refactor(ui): overhaul CLI visual language and unify operation paths
standardized the command-line interface to ensure professional visual
consistency, accurate path reporting, and synchronized audit logic across
all modes.

Visual and UX Enhancements:
- Adaptive Skill Cards: Redesigned the bulky summary box into a compact card
  that correctly reports relative installation paths and handles missing
  descriptions with fallback messaging.
- Connected Hierarchical Trees: Implemented a standardized tree layout
  (StepStart, StepContinue, StepResult) for all single-item tasks, integrating
  success status and execution duration as final nodes.
- Intelligent Audit UI: Optimized 'Audit Findings' headers to perfectly align
  with risk results, ensuring no empty sections appear on CLEAN results.
- Ephemeral Progress Tracking: Configured spinners to auto-indent within the
  hierarchical structure and disappear completely upon completion to maintain
  clean terminal logs.

Logic and Reliability Fixes:
- Path Parity: Fixed a bug where the '--into' flag was not accurately
  reflected in the UI cards during installation.
- Audit Completeness: Restored missing security scans for certain Git-based
  installation paths.
- Code Parity: Unified recursive discovery and display logic between Global
  and Project update modes.

Validation:
- Successfully verified with 'make check' (all 150+ unit and integration
  tests passing).
2026-02-25 07:02:54 +08:00
Willie 34bfa0cd55 fix: enable recursive skill discovery for project-mode update --all
Refactor updateAllProjectSkills to use filepath.Walk, ensuring nested
skills (e.g. 'frontend/react-best-practices') are correctly discovered
and updated.

Changes:
- Discovery: Implement recursive scanning for both tracked repos and
  regular skills with metadata.
- Logic: Unified target collection ensures consistent counting and
  execution between single and batch update paths.
- Test: Sync TestSkillshareWrapper_ProjectModeRedirectsFromWorkspaceRoot
  to match the updated redirection message.
- Validation: Verified with 'make check' (all unit and integration
  tests passing).
2026-02-25 07:02:54 +08:00
Willie 4c0579172f feat: add progress bar to batch update and show current skill name
Batch update (>1 target) now always uses a progress bar with the
current skill name displayed, replacing per-item spinners that
produced excessive output. Audit results are collected during the
batch and summarised after the progress bar completes.

Also adds UpdateTitle to install's progress bar loop so large
batch installs show which skill is being processed.
2026-02-25 07:02:54 +08:00
Willie c60d101f42 fix: clarify tracked audit block messaging
Clarify audit blocking output for tracked repository installs and updates.

Changes:
- update tracked install audit block errors to state findings were detected in tracked repository
- update tracked update audit block and rollback messages with tracked repository context
- when tracked install is blocked by audit, show spinner state as Blocked by security audit instead of Failed to clone
- enhance blocked audit summary rendering to append in tracked repository when the error context indicates a tracked repo
- add unit test coverage for tracked repository context in blocked audit rendering

Verification:
- go test ./cmd/skillshare ./internal/install -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY=/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare go test ./tests/integration -run TestInstall_Track_BlocksCritical -count=1
2026-02-25 07:02:54 +08:00
Willie 792d236485 feat: optimize tracked subdir installs and devcontainer isolation
Implement remaining Issue 46 optimizations and developer experience fixes.

Install and update optimization:
- optimize install --track for subdirectory sources by attempting sparse checkout first while preserving git metadata
- fallback to existing tracked clone strategy on sparse capability or sparse path errors
- clean sparse created destination before fallback clone to avoid destination already exists failures
- improve tracked install spinner wording for subdir sources
- add tracked subdir unit tests for sparse success and sparse to full clone fallback

Progress user experience:
- normalize git progress lines by stripping volatile transfer rate suffix
- dedupe and throttle spinner and tree spinner update frequency to reduce tty flicker
- add unit tests for spinner progress normalization and throttling behavior

GitHub API messaging:
- improve rate limit guidance to suggest setting token env vars or using gh auth login

Devcontainer isolation:
- make ssenv enter command mode run from isolated environment cwd
- fix setup global init detection to use skillshare status global mode
- add auto mode hint in devcontainer wrapper when workspace project config takes precedence

E2E and tests:
- expand Issue 46 runbook with install, install track, update, no token fallback, sparse paths, and isolation checks
- update compact warning output test expectations to match current grouped warning rendering

Verification:
- go test internal install package
- go test internal install sparse and tracked subdir tests
- go test internal ui package
- go test cmd skillshare package
- go build skillshare binary and run integration TestInstall_Subdir
- run tracked subdir tests inside devcontainer
2026-02-25 07:02:54 +08:00
Willie b014f8c6dc feat: optimize large-repo install and update flows
Implement Issue #46 across install/update paths to reduce perceived hangs and improve subdir installation performance on large repositories.

Main changes:
- Add git progress streaming primitives in internal/install/git_progress.go.
  - runGitCommandWithProgress supports stderr streaming callbacks in TTY mode.
  - scanGitProgress handles both CR and LF progress delimiters.
- Thread InstallOptions.OnProgress through clone/pull/discovery/install/update paths.
  - Keep non-TTY behavior quiet to avoid noisy logs.
  - Add TreeSpinner.Update for live message updates.
- Add progress-aware git update APIs in internal/git/info.go:
  - PullWithProgress and ForcePullWithProgress (keep PullWithEnv/ForcePullWithEnv for compatibility).
- Introduce shared GitHub client utilities in internal/github/client.go.
  - Centralize token lookup, request construction, and rate-limit handling.
  - Refactor internal/search/search.go to use shared client while preserving compatibility aliases.
- Add GitHub/GHE API subdir fast path in internal/install/github_download.go.
  - github.com => api.github.com
  - github-like enterprise hosts => https://<host>/api/v3
  - On API failure, emit warning and fallback to git-based flows.
- Add sparse checkout fallback for non-GitHub subdir sources in internal/install/sparse_checkout.go.
  - Use filter+no-checkout+depth=1 then sparse-checkout set + checkout.
- Extend discovery/install metadata plumbing.
  - DiscoveryResult now includes CommitHash and Warnings.
  - install/discover subdir paths preserve warnings and commit hashes from API/sparse/full-clone flows.
- Preserve compatibility and UX expectations.
  - Keep existing action strings (for tests/UI stability).
  - Keep legacy discover/pull APIs as wrappers around new progress-aware variants.
- Improve --track download efficiency.
  - Track clone now attempts --filter=blob:none --depth 1 --single-branch first.
  - Falls back to full clone only on remote capability mismatch, not on auth/not-found errors.

CLI wiring:
- cmd/skillshare/install.go
  - TTY handlers now pass progress callbacks and use with-progress discover APIs.
  - Subdir handler shows API-vs-clone stage messages and renders discovery fallback warnings.
- cmd/skillshare/update.go and cmd/skillshare/update_project.go
  - Use PullWithProgress/ForcePullWithProgress for tracked repos.
  - Ensure reinstall/update install flows forward progress callbacks.

Tests added/updated:
- internal/install/git_progress_test.go
- internal/install/github_download_test.go
- internal/install/sparse_checkout_test.go
- internal/install/tracked_clone_test.go
- internal/install/source_test.go (GitHubOwner/GitHubRepo coverage)
- internal/git/info_test.go (PullWithProgress/ForcePullWithProgress)
- tests/integration/install_subdir_optimization_test.go
- tests/integration/install_online_test.go (GitHub API subdir case)

Validation performed:
- go test ./internal/install -count=1
- go test ./internal/git -run 'Test.*Pull.*' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Subdir|TestUpdate_' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Track_|TestUpdate_TrackedRepo' -count=1
- go test -tags online ./tests/integration -run TestInstall_GitHubSubdirViaAPI -count=1
- make lint
- make test
2026-02-25 07:02:54 +08:00
Willie a05d3448f2 fix(sync): match targets by shared path and track local dirs in prune
MatchesTargetName now falls back to path comparison when name-based
matching fails, so targets sharing the same project_path (e.g. codex
and universal both using .agents/skills) correctly match in
FilterSkillsByTarget.

PruneOrphanLinks records user-created directories in LocalDirs instead
of emitting misleading "unknown directory" warnings, and syncMergeMode
counts them toward the local skill total.
2026-02-25 07:02:54 +08:00
Willie b91a6fc1c5 refactor(ui): replace HeaderBox with lightweight headers in update command
Single-item paths (tracked repo, regular skill) now use StepStart/StepContinue
for a flowing style consistent with install. Batch paths use ui.Header for a
simple one-line title. HeaderBox is retained only for audit and log commands
where a bordered report frame is appropriate.
2026-02-24 01:47:38 +08:00
Willie 70502ecd44 refactor(ui): compact audit findings display with grouping and risk score
- Rewrite renderInstallWarnings with summary-first layout: counts + threshold status on top
- Group duplicate findings by (severity, message), show "× N" with locations
- Strip redundant "audit " prefix under Audit Findings section
- Show compact top-5 groups by default, full list with --audit-verbose
- Add renderAuditRiskOnly for batch mode (just risk score)
- Wire update single-item/batch paths (global + project) to shared renderers
- Remove renderUpdateAuditResult (all callers migrated)
- Update test assertions for new output format
2026-02-24 01:47:38 +08:00
Willie a15f87fe0e feat(ui): add SectionLabel("Next Steps") to all remaining single-item handlers
Replace fmt.Println() separators with ui.SectionLabel("Next Steps") in
single-item handlers across update, update_project, install (config-based),
install_project, uninstall, uninstall_project, and trash restore. This
completes the unified SectionLabel pattern across all command output paths.
2026-02-24 01:47:38 +08:00
Willie d150f74da4 refactor(ui): use SectionLabel unconditionally in batch result display
Remove the useSections (len > 10) gate from all batch result display
functions across install, update, update_project, uninstall, and
uninstall_project. SectionLabel is now always shown regardless of
result count, ensuring consistent visual structure for small batches
(e.g. --skill selecting 1 item from a multi-skill repo).
2026-02-24 01:47:38 +08:00
Willie 7de15b0566 feat(install): add SectionLabel and structured audit-blocked output for single-item handlers
Add ui.SectionLabel("Next Steps") before next-steps info in all 4 single-item
install handlers (tracked repo, git discovery, git subdir, direct) to align
with the batch install / update / uninstall UI pattern.

Intercept audit.ErrBlocked in single-item handlers and display structured output
(SectionLabel + StepFail + detail lines) instead of dumping the raw error. The
returned error is now a short one-liner so main.go prints a clean summary.
2026-02-24 01:47:38 +08:00
Willie 81a43a0e44 fix(ux): keep filter text after selection in MultiSelect prompts
Add survey.WithKeepFilter(true) to all 4 MultiSelect prompts so the
filter input is preserved after pressing space to toggle an option.
2026-02-24 01:47:38 +08:00
Willie 25f86173bd feat(ui): add Audit Findings section label for single-skill install/update
Adds visual separation before audit findings in single-skill output,
matching the SectionLabel pattern used in batch mode.
2026-02-24 01:47:38 +08:00
Willie 95ad57705e feat(update): add section labels and improve project batch output
- Global update: use SectionLabel for Summary/Next Steps when >10 skills
- Project batch update: add HeaderBox, track skipped count, show
  summary box with updated/skipped/security-failed/total counts
2026-02-24 01:47:38 +08:00
Willie 93aa257292 feat(uninstall): add --all flag to remove all skills from source
Support bulk uninstall via 'skillshare uninstall --all' in both global
and project modes. Uses glob-based discovery to find all skills and
tracked repos, with --dry-run preview and --force to skip confirmation.

- Parse --all with mutual exclusion vs skill names and --group
- Global: discover skills + tracked repos from source directory
- Project: discover from .skillshare/skills/ directory
- Prune orphan symlinks from targets after removal
- Integration tests for --all, --all --dry-run, and conflict errors
- Update uninstall docs with --all examples
- Add AI runbook for uninstall --all glob testing
2026-02-24 01:47:38 +08:00
Willie a0c859a155 feat(install): compress batch output for --audit-verbose and dry-run skill list
Large repos (900+ skills) produced overwhelming output in three areas:

1. Dry-run skill list: 4 loops replaced with printSkillListCompact()
   - ≤20: show all (unchanged); >20: first 10 + "... and N more"

2. --audit-verbose batch warnings (displayInstallResults):
   - ≤20 skills with warnings: full verbose (unchanged)
   - >20: compact summary + HIGH/CRITICAL findings only from top 20
     skills; LOW/MEDIUM/INFO summarized as "also: LOW=N"

3. --audit-verbose blocked failures:
   - ≤20 blocked: full message (unchanged)
   - >20: first 20 verbose, rest compact

New helpers: printSkillListCompact, renderInstallWarningsHighCriticalOnly,
sortResultsByHighCritical, countSkillsWithWarnings, hasHighCriticalWarnings.
2026-02-24 01:47:38 +08:00
Willie 3721d69b54 fix: prune orphaned real directories in merge mode via manifest (#45)
- Extend .skillshare-manifest.json tracking from copy mode to merge mode.
- Update PruneOrphanLinks to prioritize manifest records over naming patterns.
- Ensure SyncTargetMerge writes to manifest for all linked/updated skills.
- Add integration tests for uninstall + sync orphan directory cleanup.
- Maintain backward compatibility for targets without existing manifests.
2026-02-24 01:47:38 +08:00
Willie 7e1b29a5a7 refactor(devcontainer): dedupe ssenv shortcut setup and unify mode prompt 2026-02-24 01:47:38 +08:00
Willie 06c14b6a9d feat(init): add --mode flag and per-target compatibility hints
Closes #42

Some AI CLIs (Cursor, Antigravity, Copilot, OpenCode) skip symlinks
when scanning skill directories, causing symlinked skills to be
silently ignored during auto-discovery.

Changes:
- `init --mode <merge|copy|symlink>` / `-m`: set default sync mode at
  init time (global and project); interactive prompt when TTY detected
- `init --discover --mode`: applies mode only to newly added targets,
  leaving existing targets unchanged
- Per-target mode hint after `sync` and `doctor`: suggests `copy` for
  known compatibility-sensitive targets (cursor → antigravity →
  copilot → opencode); suppressed when only claude/codex configured
- Neutral decision matrix in sync-modes.md for constraint-based choice
- By-target override examples in target.md, sync.md, first-sync.md
- Integration tests for mode flag, discover+mode, hint presence/absence
2026-02-24 01:47:38 +08:00
Willie cd5902c590 feat: unify update audit threshold gate and docs 2026-02-23 04:18:01 +08:00
Willie 3ad814d3ba fix: add audit gate to install --track and tracked repo updates
InstallTrackedRepo and updateTrackedRepo had no security audit,
allowing --track to bypass all supply-chain checks. This adds
auditTrackedRepo (removes repo on block for fresh installs) and
auditTrackedRepoUpdate (git reset rollback for updates), plus
input validation, testable removeAll, and hardened error handling
across audit/install/uninstall paths.
2026-02-23 04:18:01 +08:00
Willie 52dcdc8280 refactor: deduplicate auditGateAfterPull via scan function parameter
Merge auditGateAfterPull and auditGateAfterPullProject into a single
function by accepting an auditScanFunc callback. Callers pass either
audit.ScanSkill directly or a closure capturing projectRoot for
project-mode scans. Removes ~50 lines of duplicated security logic.

Addresses PR #43 review feedback (code duplication in audit gate).
2026-02-23 04:18:01 +08:00
Willie 41c80f32f5 fix: harden error handling in security-critical audit paths
- Check rollback (ResetHard) errors instead of ignoring them; report
  accurate status ("rolled back" vs "malicious content may remain")
- Add audit.ErrBlocked sentinel error; refactor isSecurityError to use
  errors.Is instead of fragile string matching
- Replace fmt.Scanln with bufio.NewReader for robust input reading
- Propagate walk/hash errors in ComputeFileHashes instead of silently
  skipping, ensuring complete integrity baselines

Addresses PR #43 review items from Gemini Code Assist.
2026-02-23 04:18:01 +08:00
Willie 2171dc4db0 feat: add --diff and audit visibility for regular skill updates
Regular skills (non-git, metadata-based) now support --diff flag using
hash-based file comparison, display audit results after update, and
properly enforce the audit gate by not passing Force to inner Install.
2026-02-23 04:18:01 +08:00
Willie a03e5a8e20 test: add isSecurityError unit test and server audit gate rollback failure tests
- cmd/skillshare/update_test.go: table-driven test covering all
  isSecurityError keywords (security audit, post-update audit,
  rolled back, rollback failed) and negative cases
- internal/server/handler_update_test.go: three tests for
  auditGateTrackedRepo: rollback failure warning on HIGH findings,
  rollback failure warning on scan error, and clean repo returns nil
2026-02-23 04:18:01 +08:00
Willie 5ce6507799 fix: server rollback error reporting and isSecurityError classification
- handler_update.go: check git.ResetHard return value; if rollback
  fails, append explicit warning to blocked message instead of
  silently claiming rolled back
- update.go: add "post-update audit" to isSecurityError keywords
  so install.Install audit failures are correctly classified as
  security blocks in batch exit code
2026-02-23 04:18:01 +08:00
Willie ea33edd917 fix: uninstall group directory now removes member skills from config.yaml
When a group directory (e.g. `fix-review`) was uninstalled as a whole,
only the directory name was checked against config entries. But skills
in the manifest use FullName format (`group/skill`), so the exact match
never hit. Now uses prefix matching to also remove member skill entries.
2026-02-23 04:18:01 +08:00
Willie a0bfe9958a fix: batch update error propagation, skip-audit passthrough, and security hardening (#39)
- P1: Batch/all update now returns non-zero when repos are blocked by
  security audit (fail-closed for CI pipelines)
- P2: Pass --skip-audit to regular skill update via InstallOptions
- P2: Add path containment check in content integrity to prevent
  directory traversal via crafted file_hashes keys
- P3: Switch git diff parsing to NUL-delimited (-z) for safe handling
  of special filenames
2026-02-23 04:18:01 +08:00