60 Commits
Author SHA1 Message Date
Willie 7de9fa4fb0 test(e2e): add global sources map ↔ legacy fields interop runbook
Six-step mdproof runbook exercising the v0.19.16 global sources map:

1. Fresh init -g writes sources: map (no legacy source/agents_source/extras_source)
2. Legacy-only config (source: + agents_source:) — ss list still works
3. New sources map (sources.skills + sources.agents) — ss list works
4. Mixed config — sources.skills wins over legacy source
5. ss sync writes to a custom target with sources.skills set
6. ss sync rejects configs that set neither source nor sources.skills

Runs in 0.9s and prevents regressions on either format.

Also: record an mdproof lessons-learned entry for `ss sync --json`
output — it has no top-level `.errors` field; assert `.linked` /
`.details` or rely on exit_code instead.
2026-05-21 15:08:40 +08:00
Willie 60ec8195e4 docs: add v0.19.4 changelog and E2E runbook for local install source preservation
Add changelog entry for v0.19.4 covering the CleanupDiscovery fix (#139)
and  token highlighting. Include E2E runbook that verifies local
source files survive CLI install, API discover, and API batch install.
2026-04-22 17:59:46 +08:00
Willie 8a2196acdb feat(ui): show local agent count in targets and fix agent batch uninstall
Add agentLocalCount to target API and CLI JSON output so the UI can
display how many local (non-source) agents exist per target.

- Add LocalCount to AgentSummary, computed via FindLocalAgents
- Surface agentLocalCount in both CLI target list JSON and server API
- Show local agent counts in target detail summaries (CLI + UI)
- Collect button now appears for targets with local agents and routes
  to CollectPage with scope=agent query param
- CollectPage reads scope from URL and auto-scans on mount
- Fix BatchUninstallPage: agents tab was collapsing individual agent
  names into the repo name via buildApiNames(), causing 'agent not
  found' errors; now sends each agent flatName individually
- Invalidate targets + diff queries after successful collect
2026-04-14 18:03:41 +08:00
Willie 6eb054c3e0 test(e2e): add issue #124 orchestrator install runbook
Covers all three fixes:
- orchestrator children install as independent skills
- root skill selectable via --skill filter
- blob URL trailing SKILL.md resolution (via unit test)

Refs: #124
2026-04-11 01:07:33 +08:00
Willie 22e7028747 docs: update target/filtering docs for agent filters and metadata.targets
- Add --agent-mode, --add-agent-include/exclude flags to target command docs
- Update filtering reference with agent filter examples and storage paths
- Prefer metadata.targets over top-level targets in all examples
- Note agent filter limitations (merge/copy only, requires agents path)
- Update skill-format docs with metadata.targets precedence note
- Update built-in skill references/targets.md with agent filter examples
2026-04-09 03:14:58 +08:00
Willie f5af6c3909 feat(ui): unify skills/agents under /resources route and API
- Rename route /skills → /resources (pages, detail, new)
- Rename API /api/skills → /api/resources with response keys
  skills → resources, skill → resource
- Rename SkillDetailPage → ResourceDetailPage, variable skill → resource
- KindBadge: show full 'Skill'/'Agent' text, remove size prop
- Show 'local' type badge when source type is empty
- Dashboard: remove Sync Mode stat card, use 4-col grid
- Resources: remove redundant Skills/Agents filter chips (tabs handle it)
- Agent audit: add ?kind=agent support to /api/audit endpoint
- Agent sync matrix: include agents in /api/sync-matrix with
  builtin target path fallback and include/exclude filtering
- FilterAgents: new function in internal/sync/filter.go
- Agent sync: apply include/exclude filters before syncing
2026-04-09 01:26:30 +08:00
Willie 081348d39b refactor(collect): unify skills/agents flow with collectPlan + generics
Replace duplicated runCollectSkills/runCollectAgents (~110 lines of 95%
identical code) with a single runCollectPlan function driven by a
collectPlan struct + toCollectResources[T] generic converter.

Key changes:

- Add collectPlan/collectResources types and runCollectPlan unified flow
- Add toCollectResources[T] generic to bridge typed slices into the
  shared pipeline (scan → display → dry-run → confirm → pull → render)
- Replace fragile err.Error() == "already exists in source" string
  matching with ErrAlreadyExists sentinel error + errors.Is()
- Move os.MkdirAll from per-agent PullAgent to PullAgents (call once)
- Add FindLocalAgents/PullAgent/PullAgents to match FindLocalSkills API
- Add target selection, --force/--dry-run/--json support for agent collect
- Add integration tests for agent collect (target filter, dry-run, force,
  JSON, oplog, project mode)
- Update collect.md, agents.md, ui.md docs for agent collect support
2026-04-09 00:36:39 +08:00
Willie 525ae0b9f4 refactor: status always shows both skills and agents
Remove kind filter (agents/--all) from status command — it now defaults
to showing everything, matching diff behavior. Status is a read-only
overview command; users expect the full picture without extra flags.

- Remove parseKindArgWithAll from cmdStatus, hardcode kindAll
- Update help text and usage examples
- Simplify tests: merge agents/all variants into default tests
- Update runbook steps 9-11 → 9-10
2026-04-08 21:40:03 +08:00
Willie eadfcf3d6f refactor: replace positional "all" keyword with --all flag for kind filter
Migrate from "ss list all" syntax to "ss list --all" across all commands
that support kind filtering (list, sync, status, check, audit, backup,
restore, trash).

- Remove "all" as a recognized positional keyword in parseKindArg
- Add extractAllFlag and parseKindArgWithAll helpers
- Update help text, usage examples, and runbook
- Update all integration tests to use --all flag
2026-04-08 21:31:41 +08:00
Willie 5afaf57745 feat(tui): add tab switching between skills/agents in list TUI
- Add Tab/Shift+Tab to cycle All/Skills/Agents tabs with count badges
- Tab bar renders at top with bold+underline cyan active, dim inactive
- Tab acts as pre-filter composing with text filter via AND logic
- Cache tab-filtered items in applyFilter() to avoid per-frame recomputation
- Add tabNoun() method to consolidate noun switches across title/filter bar

Agent install --into support:
- Support --into flag for agent install (CLI, server, project mode)
- Support --into=value syntax in addition to --into value
- Server handler_skills uses recursive AgentKind.Discover() for nested agents
- Fix agent metadata read path: use file basename instead of frontmatter name
- Sync --all flag now includes agent sync (not just extras)

Agent content viewer:
- Agents render full-width without sidebar (single .md file, no tree needed)
- Simplified help text and keyboard handling for agent content view

Agent uninstall fixes:
- Use discovery-based resolution instead of hardcoded name+.md path lookup
- Support matching by Name, FlatName, RelPath, or trimmed RelPath
- Compressed confirmation display (list format, max 20 shown)

UI polish:
- Help bar keys highlighted in dim cyan, descriptions in dim gray
- Align 'No items.' text with list title via PaddingLeft(2)
2026-04-07 21:55:05 +08:00
Willie b93518e3da test(e2e): add agents runbook and fix all 33 runbooks to 361/361 pass
Add comprehensive agents_commands_runbook.md covering all agent CLI
commands: list, sync, status, diff, collect, uninstall, trash, update,
backup, and doctor (30 steps).

Fix 18 previously failing runbooks:
- Add workdir: $HOME to mdproof.json to prevent workspace pollution
  from project mode auto-detection
- Fix jq assertions using positional index to use select(.name == ...)
- Fix extras_flatten legacy agents/ dir conflict (rm in cleanup)
- Fix auto_create_target_dir sed insertion and Will/Would wording
- Fix uninstall_sync_orphan config indentation for migrated format
- Fix universal_target_path grep pattern (name vs global_name)
- Fix uninstall_all_glob registry.yaml filter in verify step
- Fix target_naming grep for actual CLI warning output
- Fix registry_yaml_split anchored grep for top-level skills:
- Fix skillignore_source_discovery stdout suppression and jq filter
- Fix ui_base_path: use pre-built binary, PID files, high ports,
  redirect server log to stderr to keep JSON pure
- Fix extras init redirect to suppress ANSI warnings in JSON steps
2026-04-07 18:07:08 +08:00
Willie fe244e8289 refactor(sync): simplify shouldUseRelative and hoist extras computation
- Use utils.PathHasPrefix/PathsEqual for Windows case-insensitivity
- Eliminate redundant filepath.Clean call
- Hoist shouldUseRelative in syncExtraPerFile (compute once, pass bool)
- Add invariant comment in SyncTargetMergeWithSkills
2026-04-07 17:26:37 +08:00
Willie ccdafd3293 feat(sync): add target_naming config option (flat/standard)
Add per-target target_naming setting that controls how skill directories
are named in sync targets. 'flat' (default) preserves the existing
flattened __ separator behavior. 'standard' uses the SKILL.md name field
directly, following the Agent Skills specification.

Standard mode:
- Validates SKILL.md names match directory basenames
- Detects and skips name collisions with warnings
- Auto-migrates managed entries when switching from flat to standard
- Preserves legacy entries when bare name is already occupied

Also includes:
- Per-target toggle via CLI (--target-naming), TUI (N key), and Web UI
- Collision output redesigned as deduplicated compact summary
- Config inheritance: global target_naming → per-target override
- JSON schema + UI validation for the new field

Closes #110
2026-04-01 00:32:49 +08:00
Willie 7125a251d9 feat(upgrade): auto-detect sudo requirement for CLI upgrade
When the binary is installed in a non-writable directory (e.g. /usr/local/bin),
upgrade now automatically re-executes with sudo instead of failing with a
permission error.

Uses unix.Access() to check directory writability and unix.Exec() to replace
the process with sudo. Skipped on Windows.

Ref: #105
2026-03-29 02:52:46 +08:00
Willie 1ceccb936c fix(e2e): add step_setup cd $HOME to prevent workspace pollution
mdproof runs with cwd=/workspace which has .skillshare/config.yaml,
triggering project mode auto-detection. step_setup ensures every
step runs from the isolated HOME instead.
2026-03-26 23:11:43 +08:00
Willie ebe2851882 test(e2e): add runbooks for registry migration and init skip prompt
- New: registry_source_dir_migration_runbook.md (6 steps, all pass)
- New: init_skip_skill_prompt_runbook.md (4 steps, all pass)
- Updated: registry paths in existing runbooks to use skills/ dir
2026-03-26 23:01:19 +08:00
Willie 7a3b284c3d test(e2e): add extras flatten E2E runbook
9 scenarios covering: flatten sync, flat layout, JSON field, collision
detection + warning, toggle on/off, symlink rejection, prune.
Self-contained steps (each sets up its own state).

Note: designed for ssenv direct execution, not mdproof (HOME
isolation conflict between mdproof and ssenv).

Ref: #97
2026-03-25 21:14:16 +08:00
Willie 14823027b5 test: comprehensive extras source config coverage
Unit tests:
- ResolveExtrasSourceDir 3-level priority + empty fallbacks
- ResolveExtrasSourceType per-extra/extras_source/default
- Config Load() tilde expansion for ExtrasSource and per-extra Source

Server tests:
- GET /api/extras includes source_type
- POST /api/extras with/without source field
- Project mode returns default source_type
- Create backfills extras_source

Integration tests:
- extras_source config, per-extra --source flag
- source_type in JSON, priority chain
- sync/collect/doctor/status with custom source
- sync auto-creates missing source dirs
- init backfills extras_source

E2E runbook (24 steps, mdproof verified):
- All three sync modes with content verification
- Tilde expansion, backward compatibility
2026-03-20 02:36:50 +08:00
Willie 643e3c5c07 fix: auto-create missing target directories with notification (#87)
v0.17.5 blocked sync when target directories didn't exist, which
prevented first-time users on fresh CLI installs from syncing.

Sync now auto-creates missing directories and reports what it did
in CLI output, dry-run preview, and the Web UI. Init also creates
target directories when it detects an installed CLI tool.

Web UI: Sync Preview modal stays open after sync with a success
banner instead of immediately closing, so users can review results.

Closes #87
2026-03-19 03:57:08 +08:00
Willie da7dfd37cc test: add E2E runbook for UI base path reverse proxy
Covers: API routing with prefix, 404 without prefix, bare path redirect,
__BASE_PATH__ injection, SPA fallback, -b flag, env var fallback.

Also fix unused import in SyncPage.tsx (broke tsc).

Ref: #85
2026-03-18 22:35:02 +08:00
Willie 483c98a6d2 test: add root-level .skillignore steps to E2E runbook 2026-03-18 00:19:30 +08:00
Willie c224926650 test: add .skillignore source discovery E2E runbook (#83)
Covers list, status, doctor, sync, targets with .skillignore filtering.
Verifies exact match, wildcard patterns, and non-tracked repo bypass.
2026-03-18 00:19:30 +08:00
Willie 767ad31ec3 fix(collect): skip .git directories when pulling nested skills to source
copyDirectoryWithState did not skip .git/ dirs, causing collect to fail
on git-cloned repos (e.g. obra/superpowers) — filepath.Walk would abort
on .git pack files, leaving only empty directories in source.

Add copyDirectorySkipGit() variant and use it in PullSkill. Existing
copyDirectory (used by copy-mode sync) is unchanged.
2026-03-13 13:37:12 +08:00
Willie 43a64872ab fix(test): enable per-runbook isolation in mdproof config
Use mdproof v0.0.5 per-runbook isolation to give each runbook its own
HOME and TMPDIR, eliminating inter-runbook state leakage that caused
4 of 22 runbooks to fail when run sequentially.

Key changes:
- Add ensure-skillshare-linux-binary.sh to build step (creates ss symlink)
- Use direct binary path in setup/teardown (bypass wrapper overhead)
- Create target dirs (~/.claude, ~/.codex) so --all-targets detects them
- Clean shared /tmp/ paths between runbooks
2026-03-12 16:45:02 +08:00
Willie d756004e56 feat(extras): add extras reference docs, fix diff project mode, improve TUI
- Add references/extras.md covering all 4 subcommands (init, list,
  remove, collect) plus sync extras and diff --extras
- Update SKILL.md with dedicated Extras recipes section and reference link
- Update status.md with diff --extras/--all flags
- Fix sync.md: extras supports project mode (not global only), correct
  source path to include extras/ subdirectory
- Fix diff --extras not working in project mode (diff_project.go was
  missing collectExtrasDiff integration)
- Replace DefaultDelegate with custom diffItemDelegate so Extras
  separator renders as non-selectable group header (matching list TUI)
- Add skipDiffSeparator to prevent cursor landing on separator items
- Add Next Steps hints to extras detail panel in diff TUI
- Group Backup/Trash under "Storage" header in doctor output
- Remove extra leading spaces from doctor extras status lines
2026-03-12 16:45:02 +08:00
Willie 48f1d3767f fix(test): improve extras runbooks with jq assertions, idempotency, and init cleanup
- Replace python3 JSON parsing with native mdproof jq: assertions across
  extras_refactor_json_runbook (7 steps simplified)
- Add cat>> idempotency guards (sed -i cleanup) before YAML appends
- Add ssenv --init default extras cleanup in Step 1 of extras_commands
  and sync_extras runbooks to prevent false failures
- Rename runbook.json → mdproof.json (mdproof only reads mdproof.json)
- Move /tmp cleanup from step_setup to setup (per-runbook, not per-step)
  to avoid breaking cross-step dependencies
- Fix ensure-mdproof.sh to upgrade dev binary to latest release
- Add .mdproof/lessons-learned.md with 5 documented gotchas
- Update cli-e2e-test SKILL.md with assertion types, jq best practices,
  --init extras checklist item, and /mdproof skill collaboration
2026-03-12 16:45:02 +08:00
Willie 09ccd14266 fix(extras): resolve tilde expansion, unify headers, add doctor target warnings
Extras commands had multiple issues with tilde (~) path handling — Go
doesn't expand ~ (that's shell behavior), so paths like ~/.claude/rules
were treated as literal relative paths, creating bogus ~/  directories.

Key fixes:
- Export config.ExpandPath() and call it before os.Stat / sync operations
  in extras_list, sync_extras, extras_collect, and doctor
- Unify extras output headers to match target list style (single "Extras"
  header instead of per-extra headers, fix double-icon bug in list)
- Add per-target reachability warning in doctor for unreachable extras
  targets with expanded path display

Update all 3 E2E runbooks to use extras/<name>/ path layout, add /tmp
cleanup for idempotent re-runs, add migration test step, and create new
comprehensive extras_commands_runbook (18 steps covering init/list/remove/
collect/doctor/tilde/project-mode).

Improve cli-e2e-test skill with 4 new checklist items and 2 rules learned
from test friction (/tmp isolation, symlink write-through, cat>>
idempotency, extras path layout).
2026-03-12 16:45:02 +08:00
Willie 5369595bc1 fix(install): skip target dotdirs during skill discovery
Repos like pbakaus/impeccable commit .claude/skills/ alongside their
source skills, causing discoverSkills to find every skill twice (36
instead of 18). Fix by deriving known target dotdir names (.claude,
.cursor, .skillshare, etc.) from targets.yaml project_path values and
skipping them during filepath.Walk.

Non-target hidden dirs (.curated, .system — used by openai/skills) are
still discovered as before. Injection pattern avoids circular import
between config and install packages.
2026-03-12 16:45:02 +08:00
Willie 70abe44cd0 test: add E2E runbook for extras refactor (JSON purity, copy, project mode)
18-step runbook covering sync --all --json single-object output, copy mode
file verification, project mode extras lifecycle, auto-migration, and mode
validation via shared helpers.
2026-03-12 16:45:02 +08:00
Willie 2769eaa8e8 docs: update changelog, release notes, and E2E runbook for gitlab_hosts
- CHANGELOG/website: add gitlab_hosts config and SKILLSHARE_GITLAB_HOSTS
  env var to New Features section, add HTTPS fallback bug fix
- RELEASE_NOTES: expand with EffectiveGitLabHosts design decisions,
  env var merge semantics, and project-mode isolation
- Runbook: extend gitlab_hosts_config_runbook from 10 to 18 steps
  covering env var merge, persistence safety, server parseOpts isolation,
  and CLI-level env var smoke tests (18/18 PASS verified)
2026-03-12 16:45:02 +08:00
Willie a4d52615f7 feat(config): add gitlab_hosts for custom GitLab domain support
Self-managed GitLab instances on custom domains (e.g., git.company.com)
without "gitlab" in the hostname were parsed with 2-segment owner/repo
split instead of full-path repo. Users can now declare extra GitLab
hostnames in config so the parser treats them like gitlab.com (nested
subgroup support).

- Add `gitlab_hosts` field to both global and project Config structs
- Validate entries at load time (reject scheme, path, port, empty)
- Add `ParseOptions` / `ParseSourceWithOptions` to thread hosts into parser
- Add `isGitLabHost()` helper combining built-in + custom host detection
- Extend `InstallContext` interface with `GitLabHosts()` method
- Update all ParseSource call sites (install, search, update, server)
- Add JSON schemas for both config files
- Add unit tests for config validation and source parsing
- Add E2E runbook for devcontainer verification
- Document in configuration reference and URL formats appendix
2026-03-12 16:45:02 +08:00
Willie e2a8c7da2c fix(install): platform-aware HTTPS fallback to preserve GHE subdir behavior
The initial GitLab subgroup fix treated all multi-segment HTTPS paths as
full repo paths, regressing GHE and generic host subdir installs like
github.mycompany.com/org/repo/path/to/skill.

Add host-based heuristic: hosts containing "gitlab" use full-path-as-repo
behavior; all other hosts retain the original 2-segment owner/repo split
with remainder as subdir. This preserves backward compatibility for GHE,
Gitea, Gogs, and other non-GitLab platforms while correctly handling
GitLab nested subgroups.
2026-03-12 16:45:02 +08:00
Willie bf9eaa5e29 fix(install): support GitLab nested subgroup URLs (#72)
Replace rigid 2-segment HTTPS regex with flexible path parsing that
treats the entire URL path as a repo when no explicit boundary exists.
Use .git suffix as the canonical repo/subdir delimiter, preserving
/-/ (GitLab) and /src/ (Bitbucket) web URL markers.

This fixes install failures for URLs like
onprem.gitlab.internal/org-group/sub1/sub2/project which previously
misinterpreted extra path segments as monorepo subdirectories.
2026-03-12 16:45:02 +08:00
Willie 478b4ee336 refactor(runbook): replace built-in runner with mdproof
The in-tree runbook runner (tools/runbook/, 25 Go files, ~4500 LOC)
has been extracted into the standalone mdproof project and is no
longer needed here.

Removed:
- tools/runbook/ — parser, executor, assertions, reporters, tests
- .devcontainer/bin/runbook — wrapper that built from tools/runbook
- ai_docs/runbook-guide.md — docs describing the old runner
- Makefile build-runbook target

The cli-e2e-test skill, runbook.json, and ensure-mdproof.sh already
reference the external mdproof binary for all E2E test execution.
2026-03-11 04:53:08 +08:00
Willie ebab63a670 feat(runbook): add build lifecycle hook, verify all 17 runbooks
Add a build hook that runs once before all runbooks, enabling
automatic binary rebuild. Lifecycle is now:
  build (once) → [per runbook: setup → steps → teardown]

Build hook uses os/exec directly (not session executor), outputs
to stderr, and aborts immediately on failure.

Fix all 17 runbooks to pass in devcontainer:
- Adapt to session executor's set -eo pipefail (use cmd || EXIT=$?
  pattern for expected non-zero exits)
- Replace embedded ```bash in heredocs with printf to avoid
  confusing the runbook parser
- Fix negated assertion gotchas (Not FAIL, No such file)
- Remove fragile verify code blocks (multi-block merge issues)
- Fix step number collision (7b → 8, renumber subsequent)
- Use -s flag for batch installs instead of repeated --force
- Add (?m) flag for multi-line regex assertions
2026-03-11 04:53:08 +08:00
Willie 2657974fbe feat(runbook): lifecycle hooks via --setup/--teardown and runbook.json
Add setup and teardown commands that run before/after each runbook.
Config file (runbook.json) provides persistent defaults; CLI flags
override. Setup env vars persist to all steps via session executor.
Setup failure skips all steps; teardown failure is informational only.

Removed Step 0 from atomgit runbook — init is now in runbook.json.
2026-03-11 04:53:08 +08:00
Willie ba4f7c9c4d docs(runbook): migrate all 16 runbooks to typed assertion syntax
Convert Expected blocks from natural language descriptions to
matchable assertions: exit_code: N, regex: <pattern>, jq: <expr>,
Not <text>, and plain substring matches. All runbooks now parse
correctly with the assertion engine.
2026-03-11 04:53:08 +08:00
Willie 81326ae09e docs(runbook): integrate runbook CLI into e2e skill and update atomgit runbook
SKILL.md now instructs AI to use bin/runbook --report json for
structured test execution. atomgit_install_runbook.md rewritten with
typed assertions (exit_code:, regex:, Not) as proof-of-concept.
2026-03-11 04:53:08 +08:00
Willie d707fc619b fix(cli): suppress stderr progress messages in --json mode
JSON mode stdout was already pure JSON, but stderr still emitted
progress lines (e.g. "Discovering skills...", "Found N local skill(s)")
which broke `2>&1 | jq .` pipelines. Remove the else-branch stderr
writes so --json mode is fully silent except for stdout JSON output.
2026-03-06 02:15:36 +08:00
Willie 9b849172ff docs: add sync extras documentation across website, skill, and README
Document the new `sync extras` subcommand and `--all` flag:
- sync.md: add Sync Extras section with config, modes, flowchart, example
- configuration.md: add `extras` field reference with schema table
- file-structure.md: show extras source directories alongside skills
- quick-reference.md: add sync extras and sync --all entries
- SKILL.md + references/sync.md: add extras recipes for AI callers
- README.md: add v0.16.10 to Recent Updates
2026-03-04 12:16:32 +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 ac20153948 docs: add pre-commit E2E runbook and update cli-e2e-test skill
- Add ai_docs/tests/precommit_audit_hook_runbook.md (9-step E2E test
  for skillshare audit -p as pre-commit hook)
- Fix cli-e2e-test SKILL.md: clarify init -p has separate flag set from
  global init; add audit rule ID vs pattern name guidance; add project
  mode init example to container templates; add two new checklist items
- Update CHANGELOG.md with pre-commit hook, audit TUI filter, O(N)
  cross-skill rewrite, and SARIF line-0 fix entries
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 8a820bbe5e docs: add symlinked directory sync E2E runbook
Covers 13 test scenarios for dotfiles manager symlink support:
symlinked source/target, chained symlinks, merge/copy modes,
status/diff/list/collect through symlinks, and idempotency.
2026-03-02 10:05:57 +08:00
Willie 4c70b7d0af perf(gitignore): batch read/write for install reconcile and uninstall
UpdateGitIgnore/RemoveFromGitIgnore were called per-skill inside loops,
re-reading the entire .gitignore each time. With large files (100K+ lines
in project mode), this caused O(N×M) complexity and process hangs.

- Add UpdateGitIgnoreBatch and RemoveFromGitIgnoreBatch (single read/write)
- ReconcileProjectSkills: collect entries during walk, batch-update once
- uninstall (global + project): batch-remove after loop, not per-iteration
- Fix spinner WithRemoveWhenDone in StartSpinnerWithSteps
- Add E2E runbook for gitignore batch performance validation
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 631b3ef292 docs: add AtomGit and Gitee to supported platform listings
- Add AtomGit/Gitee HTTPS examples in url-formats.md
- Add AtomGit/Gitee column to Platform Support table
- Update intro.md and comparison.md platform lists
- Add AtomGit install E2E runbook (geo-restriction noted)
2026-02-26 22:27:23 +08:00
Willie 5e283e2111 feat(install): add Azure DevOps URL parsing support
Azure DevOps uses 4-segment paths (org/project/_git/repo) which the
existing 3-segment gitHTTPSPattern misparses. Add dedicated patterns
for modern HTTPS (dev.azure.com), legacy HTTPS (visualstudio.com),
and SSH v3 (ssh.dev.azure.com) formats. Also add ado: shorthand
(e.g. ado:org/project/repo) for quick installs.

Includes TrackName support (org-proj-repo format), 16 new test cases,
and url-formats.md documentation with platform support table update.
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 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