Commit Graph
522 Commits
Author SHA1 Message Date
Willie 2c3003e04f feat(website): complete website revamp — Diátaxis IA, blog, recipes, quickstarts
Restructure the entire documentation site following the Diátaxis framework
(Learn / How-to / Understand / Reference) with new content across 110 files.

## Information Architecture (M1)
- Move all docs to Diátaxis directory structure (learn/, how-to/, understand/, reference/)
- Add client-redirects plugin for old URL compatibility
- Rewrite sidebar, navbar, and footer to match new IA
- Update all internal cross-references

## Homepage + Quickstarts (M2)
- Add scenario entry cards to homepage with hand-drawn design
- 5 quickstart pages: Claude Code, GitHub Copilot (with copy mode recommendation),
  Codex, Multiple Tools, Dev Containers, Playground

## Blog + Changelog (M3)
- Enable Docusaurus blog plugin with authors.yml
- 5 blog posts: 5-min tutorial, managing 50+ skills, skillshare vs vercel/skills
  comparison, team sharing patterns, write your first skill
- Static /changelog page from CHANGELOG.md

## Recipes + Philosophy (M4)
- 5 recipe pages: CI/CD validation, enterprise skills, project setup,
  cross-machine sync, team onboarding
- 3 philosophy pages: why-local-first, security-first, sync-modes-explained

## Content Polish
- Cross-validate all content against CLI source (19 inaccuracies fixed)
- Lowercase "skillshare" throughout (avoid brand conflict with Skillshare Inc.)
- Add registry.yaml to file structure and Key Paths docs
- Highlight multi-platform git support (GitHub, GitLab, Bitbucket, Gitea,
  Azure DevOps, AtomGit, Codeberg)
- Standardize brew install command
- Add AsciinemaPlayer component (cast recordings pending)
2026-02-26 04:52:29 +08:00
Willie efa3a34599 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 01:07:15 +08:00
Willie 01d133bb13 feat(build): add Windows ARM64 cross-compile script
For testing on UTM Windows VMs. Scans common shared folder
locations and presents interactive picker when multiple found.

  make build-windows SHARED=~/Downloads
  mise run build:windows ~/Downloads
2026-02-26 00:38:30 +08:00
Willie afa7dfd568 fix(upgrade): contain brew output in tree spinners, fix GitHub release tree structure
Homebrew path: replace direct stdout pipe with TreeSpinner + bytes.Buffer
so brew output no longer breaks the tree layout. Captured output is only
shown on failure for debugging.

GitHub release path: switch download/UI-asset spinners from StartSpinner
to StartTreeSpinner with correct isLast flags, add tree-line prefix to
confirmation prompt, use StepEnd for cancel.

Add TreeSpinner.Warn() and TreeLine() helper to internal/ui.
Add devcontainer test-brew-upgrade script to simulate Homebrew path.
2026-02-25 21:33:14 +08:00
Willie 153464afd1 tweak(install): increase desc truncation to 100 chars, use visible ellipsis v0.16.1 2026-02-25 19:39:28 +08:00
Willie c8535663eb feat(audit): colorize severity counts, risk label, and finding details
- Summary line: CRITICAL/HIGH/MEDIUM/LOW/INFO colored by severity
- Risk label: colored by severity (e.g. red for CRITICAL)
- Finding groups: severity-colored prefix, locations on separate
  indented gray line (maxLocs reduced from 5 to 3)
- Add visual gap between summary block and finding details
2026-02-25 19:39:28 +08:00
Willie 910b8d6dc4 feat(install): inline tree output and unified filter for install TUI
- Replace SkillBox with inline tree steps (Desc, License, Location)
  for single-skill and tracked-repo install output
- Add custom application-level filter to dir picker and skill select
  TUIs, replacing bubbles built-in filter for consistency with
  list/search/log TUI pattern
- Add renderSkillMeta/renderTrackedRepoMeta/truncateDesc helpers
2026-02-25 19:39:28 +08:00
Willie 70b40fab52 fix(ui): show output before blocking work in check/update
Move Header + StepStart before filesystem scan and metadata reads so
users see immediate feedback instead of a frozen terminal.

- check: Header printed before GetTrackedRepos/GetUpdatableSkills
- check filtered: Header printed before resolve phase
- Add spinners during blocking scan/resolve phases
- Unify tree structure: Repo/Skill use StepContinue (not StepStart)
- Add "(tracked)" label to tracked repo in update output
2026-02-25 19:39:28 +08:00
Willie 9b3d0d0b23 feat(install): show skill description in SkillBox
Enrich the single-skill install SkillBox with the SKILL.md frontmatter
description field, giving users useful context instead of repeating the
skill name. License line appended when present.

- Add Description field to SkillInfo struct
- Use ParseFrontmatterFields to read description + license in one pass
- Extract buildSkillBoxDesc helper for the two single-skill call sites
2026-02-25 19:39:28 +08:00
Willie 11be808c99 fix(ui): eliminate spinner flicker during install clone
pterm's animation goroutine and UpdateText() race on the same terminal
line — the former appends a timer suffix "(Ns)" while the latter does
not, causing per-frame length differences that manifest as flicker.

Two fixes:
- Disable ShowTimer (our Success/Warn already print elapsed time)
- Pad normalizeGitProgressMessage output to 40 chars so short messages
  overwrite residual characters from previous longer messages
2026-02-25 19:39:28 +08:00
Willie b6517c9e93 feat(tui): unify filter, status line, and spinner across all TUIs
- Extract renderTUIFilterBar() shared by list, log, and search TUIs
- Extract renderPageInfoFromPaginator() for shared page info rendering
- Replace built-in bubbles filter with custom textinput filter in log
  and search TUIs (matches list_tui pattern: / enter, esc clear, enter lock)
- search_tui: filter mode suppresses action keys (space/a/enter/s) to
  avoid accidental checkbox toggles while typing
- Align status line left (remove extra indentation) across all TUIs
- Add ←→ page hint to all TUI help lines
- Unify pterm spinner to braille dot pattern (⣾⣽⣻⢿⡿⣟⣯⣷) with cyan
  style, matching bubbletea spinner.Dot used in list_tui
2026-02-25 19:39:28 +08:00
Willie 6d7ced4d76 fix(oplog): use json.Decoder to handle arbitrarily large JSONL lines
Replace bufio.Scanner with json.NewDecoder which has no fixed line
length limit. Fixes "token too long" crash when audit results produce
JSONL entries exceeding the 64KB scanner default.
2026-02-25 19:39:28 +08:00
Willie 07c2aa6938 feat(list): async TUI loading, status line improvements, parallel metadata
- Move data loading inside TUI with bubbles/spinner to eliminate
  blank screen after entering alt screen
- Thousand separators in status line (108,749 skills)
- Page info in status line (Page 2 of 4,729) replacing raw "1/4944"
- Fix "(showing 1,000)" appearing with empty filter text
- Parallel ReadMeta with bounded worker pool (64 workers)
- Parallel git dirty checks in uninstall (8 workers)
- Use DiscoverSourceSkillsLite for uninstall --all discovery
2026-02-25 19:39:28 +08:00
Willie 7079a705f3 feat(sync): add DiscoverSourceSkillsLite and ParseFrontmatterFields
DiscoverSourceSkillsLite skips frontmatter parsing during directory
walk and collects tracked repos in a single pass — significantly
faster for large skill collections.

ParseFrontmatterFields extracts specific YAML fields from SKILL.md
without parsing the full document, used by the TUI detail panel.
2026-02-25 19:39:28 +08:00
Willie 752aeb0254 chore: update readme 2026-02-25 07:35:42 +08:00
Willie ed709efb57 fix(ci): update redteam-signal to match handler split
v0.16.0 moved update rollback logic from update.go to
update_handlers.go and changed the error message format.
Update the mutation target file and perl regex pattern so
the signal test finds the expected 2 mutation points.
v0.16.0
2026-02-25 07:06:26 +08:00
Willie aeddeb9dfe fix(install): show [dry-run] message for single-skill git install paths
handleGitInstall has two single-skill paths (subdir and non-subdir)
that always printed "✓ Installed: <name>" even in dry-run mode.
Branch on opts.DryRun to show "[dry-run] Would install: <name>" instead,
matching the multi-skill path behavior.

Fixes failing CI tests: TestInstall_Auth_HTTPSPublicWithToken,
TestInstall_RemoteGitHubSubdir_DryRun.
2026-02-25 07:02:54 +08:00
Willie 3e3cf76666 docs: add v0.16.0 changelog and update README for release
Add CHANGELOG entry covering performance (tree hash check, sparse checkout,
parallel checking), interactive bubbletea TUI, registry separation, CLI
visual overhaul, and project-mode skills. Link performance items to #46.

Update README: add v0.16.0 to Recent Updates, add AI-Assisted Development
section with project-mode skills table, add ssenv isolated testing guide.
2026-02-25 07:02:54 +08:00
Willie 071aa70857 docs: add missing flags to update and uninstall options tables
update.md: add --audit-verbose, --project/-p, --global/-g
uninstall.md: add --project/-p, --global/-g

Both sets of flags exist in source (printUpdateHelp, printUninstallHelp)
but were missing from the docs options tables.
2026-02-25 07:02:54 +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 04b3808ada docs(e2e): improve cli-e2e-test skill and add registry runbook
- Add flag validation step and quality checklist to runbook generation
- Add retrospective step after test execution for continuous improvement
- Document --init interaction, registry.yaml assertion rules, common flag mistakes
- Distinguish runbook bugs from real bugs in FAIL analysis
- Fix stale config.yaml skill assertions in uninstall_all_glob runbook
- Add registry_yaml_split runbook (7-step E2E for the registry.yaml refactor)
2026-02-25 07:02:54 +08:00
Willie 81315cdf71 style: fix gofmt alignment in checklist_tui.go 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 0c28f0cd07 chore(schemas): move skills to registry.schema.json
Remove skills property from config and project-config schemas.
Add new registry.schema.json for registry.yaml validation.
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 4152282753 refactor(config): remove Skills field from Config and ProjectConfig structs
Migration now uses raw YAML parsing (temporary struct) to extract
skills[] from old config files, independent of the main struct.
2026-02-25 07:02:54 +08:00
Willie 2cb6cc3159 refactor: update all callers to pass Registry to reconcile functions
- install_context: read skills from Registry instead of Config
- project_runtime: load Registry on init
- install/search: pass Registry to ReconcileGlobalSkills
- uninstall: load/save Registry for skill removal
- server: hold registry field, reload on config refresh
2026-02-25 07:02:54 +08:00
Willie 74e232c254 refactor(config): reconcile writes to Registry instead of Config 2026-02-25 07:02:54 +08:00
Willie b7bb8afa26 feat(config): add silent auto-migration from config.yaml skills[] to registry.yaml 2026-02-25 07:02:54 +08:00
Willie e779ed8109 feat(config): add Registry struct with Load/Save for registry.yaml
Introduce a separate Registry type to hold skill entries (installed/tracked
skills) independently from config.yaml. This keeps config.yaml focused on
user-managed settings while registry.yaml tracks skill metadata.

Registry reuses the existing SkillEntry struct and follows the same
patterns as Config (schema comment, yaml.Marshal, validation on load).
2026-02-25 07:02:54 +08:00
Willie 29e97fcb4b feat(ui): migrate to TanStack Query and virtualize SkillsPage
Replace custom useApi hook with @tanstack/react-query across all 14
pages and InstallForm. Add react-virtuoso VirtuosoGrid to SkillsPage
for handling 46K+ skills without freezing the browser.

Key changes:
- Add queryClient with shared defaults (staleTime, gcTime, retry)
- Add centralized queryKeys factory for prefix-based invalidation
- Wire QueryClientProvider + ReactQueryDevtools in App.tsx
- Migrate AppContext to useQuery (shares cache with DashboardPage)
- Migrate all pages: useApi → useQuery, handlers → invalidateQueries
- SkillsPage grid view: VirtuosoGrid with useWindowScroll, overscan,
  ScrollSeekPlaceholder, and React.memo on card components
- Add resolve.dedupe for React to prevent duplicate instance in dev
- Add vendor-tanstack-query manual chunk for build splitting
- Delete unused useApi.ts hook
2026-02-25 07:02:54 +08:00
Willie e873a730e2 fix(backup): use os.Lstat in ValidateRestore to detect symlink targets
os.Stat resolves symlinks so ModeSymlink was never set, causing
symlink targets pointing to non-empty dirs to wrongly require --force.
2026-02-25 07:02:54 +08:00
Willie c81e7d7459 docs(backup): fix cleanup size cap from 100 MB to 500 MB
The actual default in internal/backup/cleanup.go is MaxSizeMB: 500.
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 a50639b0b6 feat(ui): enhance restore modal with validation preview and conflict warnings
Modal now calls /api/restore/validate on open to show backup size,
symlink status, and file conflicts before confirming. Button text
dynamically changes to "Restore (overwrite)" when conflicts exist.
Removes hardcoded force:true — only sends force when user acknowledges.
2026-02-25 07:02:54 +08:00
Willie a5ba6e48f3 feat(ssenv): add ssrm shortcut for force-deleting environments
ssrm <name> is equivalent to ssenv delete <name> --force.
Added to shortcuts wrapper, ssenv shortcuts help, and help page.
2026-02-25 07:02:54 +08:00
Willie 0af62f5aaa feat(ui): add validateRestore API type and function 2026-02-25 07:02:54 +08:00
Willie aa10c6ee22 feat(api): add POST /api/restore/validate endpoint for pre-restore checks
Returns validation result with conflict details (existing files),
backup size, and symlink state so the UI can show informed restore
confirmation instead of blindly using force:true.
2026-02-25 07:02:54 +08:00
Willie cfe709f254 feat(list-tui): expand detail panel with word-wrapped description and license
Grow the detail panel from 12 to 16 reserved lines so more metadata is
visible. Description now word-wraps to terminal width (up to 3 lines
with trailing "..." when truncated) and is followed by a blank line for
visual separation. Also display the license field from SKILL.md
frontmatter when present.
2026-02-25 07:02:54 +08:00
Willie 1926725fd8 fix(ssenv): use PROMPT_COMMAND for PS1 and create .claude/.codex dirs
Replace static PS1 prepend with a dynamic PROMPT_COMMAND hook to prevent
prompt duplication when ssenv-shortcuts.sh is sourced multiple times.
The hook also auto-clears the prefix when SSENV_ACTIVE is unset (reset/delete).

Add .claude and .codex to ensure_layout() so new environments include
these directories by default.
2026-02-25 07:02:54 +08:00
Willie 7fb201da84 refactor(init): replace survey with bubbletea checklist and inline prompts
Remove all survey/v2 dependency (7 call sites) and fuzzy direct usage:
- search.go: survey.Input → bufio.NewReader for simple text prompts
- init.go: survey.Select → inline numbered prompt for sync mode
- init.go: survey.MultiSelect → checklist TUI for target/agent selection
- init_project.go: survey.MultiSelect → checklist TUI for project targets
- install_prompt.go: survey.Select → checklist TUI for orchestrator mode
- install_prompt.go: delete dead promptSearchSelect function
- install_prompt.go: fuzzy → strings.Contains for filterSkillsByName

Add generic checklist_tui.go supporting both multi-select and single-select,
reusing the existing bubbletea/bubbles styling. Sync mode uses a simple
inline prompt (no alt-screen) for smoother init flow, with a copy-mode
hint when non-copy is selected. TUI selections now print confirmation
after exit so users see what they chose.
2026-02-25 07:02:54 +08:00
Willie fc2df38913 feat(check): match single-skill output style with update command
Single-skill check now shows the same tree-structured header (Source,
Items, Skill name, Source URL) and uses a spinner + StepResult instead
of a progress bar, consistent with how `update` renders single targets.
2026-02-25 07:02:54 +08:00
Willie ce8608a6b1 fix(check): normalize leading slash in subdir for tree hash comparison
The // subdir syntax (e.g., repo//skills/foo) stores meta.Subdir with
a leading "/". git rev-parse and ls-tree paths never have leading
slashes, causing tree hash lookups to fail silently.

Strip leading "/" in getSubdirTreeHash(), resolveSkillStatuses(), and
handler_check.go. Add LeadingSlash unit test and E2E runbook.
2026-02-25 07:02:54 +08:00
Willie 6958cfc575 docs(faq): add Q&A for "unknown target" warning
Explains the common `unknown target "*"` warning from `check`/`doctor`,
why wildcard syntax is unsupported, and the correct way to target all CLIs.
2026-02-25 07:02:54 +08:00
Willie 82587e9d9f fix(check): show skill count instead of URL count in progress bar
Progress bar total was `len(repoInputs) + len(urlInputs)` which showed
"2/2" for 46K skills from 2 URLs — meaningless to users. Now uses actual
skill count so the bar shows "46321/46321" instead.
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 9743fa00ac refactor(tui): replace survey Select with bubbletea multi-select in search
Replace the single-select survey.Select prompt in `search` with a
bubbletea-based multi-select TUI, enabling batch installation of
search results. The new TUI supports space/a toggle, `s` for search
again, `/` filter, and esc to cancel — consistent with the existing
skill select TUI pattern from install.

Add batchInstallFromSearch() for sequential multi-skill installation
with per-skill error reporting.
2026-02-25 07:02:54 +08:00
Willie f7bfb56c50 refactor(tui): replace survey MultiSelect with bubbletea skill select TUI
- Replace promptMultiSelect's survey.MultiSelect with a full bubbletea
  TUI (space toggle, a select-all, enter confirm, / filter, esc cancel)
- Unify TUI styling across all screens: brand yellow (#D4D93C) for
  active item border+text, bright white for normal items
- Fix infinite loop when selecting (root) group in dir picker
- Compact single-line items with SetHeight(1) + SetSpacing(0)
- Pre-compute location strings and maintain selCount counter for
  better toggle performance with large skill sets
- Remove inline ANSI from Title() to prevent filter highlighting corruption
- List TUI: single-line items with [tracked]/[local] badges, no description
2026-02-25 07:02:54 +08:00
Willie e6ca4f16f8 refactor(update): unify batch header UI with check command style
Replace redundant "Updating N skill(s)" header + separator with the
same tree layout used by check: Header → StepStart("Source") →
StepContinue("Items") with repo/skill counts. Removes duplicate
"Updating" label that overlapped with the progress bar title.
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