mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
2deea47aaa53ceefa18e123de70b05746f237032
201
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fb43038179 |
test(sync): skip the uninspectable-target case on Windows
Windows reports a path under a regular file as not-exist rather than
ENOTDIR, so ClearExtraTarget correctly treats it as missing and the
test's error case cannot occur there. This failed the Windows CI job
since
|
||
|
|
18d6b11347 |
test: test each rule once, in the package that owns it
Many integration and handler tests re-checked rules that internal/ packages already test, duplicated each other, or ran no product code at all (a few re-implemented the logic inline, two could never fail). They slowed the suite without catching anything new. Delete those, keeping tests for CLI wiring, JSON output, exit codes, project/global mode and cmd-only logic. Move the agents/extras overlap check into sync.AgentTargetPaths so the CLI and the server share one implementation and it is covered by unit tests instead of seven integration tests. |
||
|
|
0127a150db |
fix(extras): only treat an actual link as linking to the source
ResolveLinkTarget falls back to EvalSymlinks, which also resolves a real directory. A real directory reached through a symlinked ancestor of the source then counted as a link to it, so --remove-target --prune failed with "not a symlink" instead of keeping the directory. LinksTo now requires the path itself to be a symlink or junction. Refs #491 |
||
|
|
e5dcaa5f64 |
fix(extras): keep a target in config when it cannot be inspected
ClearExtraTarget treated every Lstat failure on a symlink-mode target as "nothing there", so a permission or I/O error made the CLI drop the target from the config and report nothing pruned. Only a missing target is now forgotten; other errors are returned so the config is kept for a retry. Refs #491 |
||
|
|
44e8bd5927 |
fix(extras): recognize junctions as links to the extra's source
On Windows without Developer Mode, directory links fall back to junctions, which os.Readlink can fail to read. LinksTo then treated a skillshare-made target as foreign, so --remove-target --prune dropped the config entry and left the junction behind. It now uses utils.ResolveLinkTarget, which falls back to EvalSymlinks, and compares with utils.PathsEqual. Refs #491 |
||
|
|
36113be45e |
fix(extras): prune a symlink target only when it links to the source
The CLI's `--remove-target --prune` removed a symlink-mode target no matter where it pointed, while the dashboard removed it only when it still linked to the extra's source folder. A user who repointed that link at their own folder could lose it from the CLI. Both now go through one shared sync.ClearExtraTarget, so the safer rule applies everywhere; the CLI warns and leaves anything that is not a link to the source instead of failing. Refs #491 |
||
|
|
b90bf2086f |
Merge pull request #493 from runkids/runkids/extras-sync-api
refactor(extras): pass targets to sync and filter them in one discovery function |
||
|
|
d61b25bcf2 |
refactor(extras): apply target filters in one discovery function
The extras diff, list, status and remove-target commands and the server's list and diff handlers each discovered an extra's source and then filtered it with ExtraTargetFiles. A new view that forgot the filter step would silently show the wrong file count or status. DiscoverExtraTargetFiles now discovers and filters in one call and returns the unmatched-include warnings that sync reports. Every caller, including sync itself, uses it, and ExtraTargetFiles is gone. No behavior change. Refs #487 |
||
|
|
7a4103b9a8 |
refactor(extras): validate every mode change and share special extra names
cmdExtrasMode only ran ValidateExtraConfig behind a growing list of conditions, so each new restriction needed another clause. For a plain folder extra the full check adds only the mode-name and flatten+symlink rules, which sync already rejects, so validating unconditionally cannot refuse a config that syncs today. The agents and memory extra names were string literals in sync, the server handlers, the memory store, and the CLI. They now live in internal/config, and the rename guard moves to ValidateExtraRename so a future CLI rename reuses it instead of copying the check. Refs #489 |
||
|
|
5c50cc4b2b |
refactor(sync): pass extra targets instead of long argument lists
syncExtraDir took ten positional arguments, three of them bools, and CollectExtraFiles took nine. Every new target field meant changing each signature and every call site, and swapped bools compiled silently. Both now take the target as config.ExtraTargetConfig plus an ExtraSyncOptions for dry run, force and project root; SyncExtraTarget takes the same options. The SyncExtra wrapper only served tests, so it is gone and the tests call syncExtraDir directly. No behavior change. Refs #486 |
||
|
|
7740ee8798 |
fix(extras): relink symlinks to a missing source and accept negated includes
- Pointing a symlink-mode extra at a new source after its old folder was moved or deleted left the target broken: the old link no longer resolved, so it was not recognised as ours, and the next sync skipped it as pointing elsewhere. The link text is now compared with the old source as well. - A negated include such as "!draft.md" only narrows earlier rules, so on its own it never matches and was always reported as matching no file. Negations are no longer checked for matches. Refs #435 |
||
|
|
a9ae5349a2 |
feat(extras): choose which files each target syncs, and edit targets in place
A directory extra used to sync every file to every target, so a tool that only wanted a few docs got the whole folder. Each target can now set gitignore-style include/exclude patterns, matched on the path inside the source. Merge targets prune links to files that stop matching; copy targets keep earlier copies, since nothing records which copied files are ours. Filters are rejected for symlink mode and single-file extras, and sync warns when an include matches nothing. The dashboard previously forced users to delete and re-add a target or an extra to change it. Edit target now changes the folder, file name, mode, flatten and filters with a live preview; Edit extra renames an extra or points it at another source folder. A moved target or source drops the links left at the old place and syncs right away. CLI: --include/--exclude on extras init, and --add-include, --add-exclude, --remove-include, --remove-exclude on extras <name>. Refs #435 |
||
|
|
81e0824396 |
fix(sync): skip unmatched include notices when the source is incomplete
When a followed source link cannot be read, the skill list is partial and pruning is already skipped. Reporting a filter as unmatched in that state told users the target gets no skills and sent them to edit a filter that may be fine. |
||
|
|
47be5105f5 |
fix(sync): link each target's unmatched filter and ignore blank includes
Two global targets with the same unmatched filter were merged into one notice whose Edit filter link opened only the first target, leaving the other unfixed. Only a project's targets share a filter, so other targets now keep their own notice and link. A target whose includes were an unmatched pattern plus a blank entry was not marked as getting no skills, because the check counted the raw list while filtering drops blanks. It now counts the effective patterns. |
||
|
|
5d5b0f3efb |
feat(sync): explain include filters that select no skill
The dashboard showed the CLI's raw line, "api-server@claude: include pattern "*review*" matches no skill in the source", once per target. It named a config field, did not say the target ends up with no skills, and gave no way to fix it. Sync now returns these as structured entries; the Sync page groups a project's targets into one localized notice that says what happens and links to where the filter is edited. The CLI line also says the filter adds nothing to the target. |
||
|
|
c9b649143d |
refactor: return slash repo paths and simplify --into repo lookup
GetTrackedRepos returned OS-native paths, so every caller that compared them with slash paths (RepoRelPath, dashboard repoPath, metadata keys) had to convert first. Two callers in install_queries already did, and this branch added four more. It now returns slash paths on every OS, matching GetMissingTrackedRepos; filepath.Join and filepath.Base accept them on Windows, and `update org/_repo` now also matches by full path there. The per-call-site conversions are gone. Smaller cleanups in the same code: - repoOf takes the slash relPath and looks up prefixes by substring, so the walk no longer splits and joins per directory; - repo .skillignore matchers are keyed by the same slash rel path, so isSkillIgnored no longer needs walkRoot; - batch uninstall uses utils.IsTrackedRepoDir instead of a literal "_"; - the dashboard uses repoOf where it spelled out isInRepo && folderOf; - the new tests reuse postBatchUninstall and share one --into sandbox. |
||
|
|
4dd62d4ce5 |
fix: treat tracked repos installed with --into as repos
`install --track --into org` clones to org/_repo, but skill discovery only marked a skill as in-repo when the first path segment started with "_". Everything downstream also assumed the repo name was that first segment. Skills of such a repo were therefore treated as loose skills: no source in the dashboard, not grouped under the repo, a skill count of 0 in `status`, and an install hint that pointed at the wrong name. Discovery now records each skill's tracked repo root (RepoRelPath). A first-segment "_" folder still counts as before; a deeper one counts only when the walk saw it as a git clone, so a plain org/_drafts folder stays a folder. The repo's .skillignore is looked up by the same root. Consumers move from "first segment" to that root: - the API exposes it as repoPath, and the dashboard groups, updates and uninstalls repos by it; - `list` and `status` use it for repo names and counts; - batch uninstall accepts a nested repo name, so the dashboard can still remove an --into repo now that its skills are in-repo; - repo names sent to the dashboard by check and update-all use slash paths, so they match repoPath on Windows too; - the install hint suggests `skillshare update org/_repo`. Fixes #470 |
||
|
|
920b18510a |
fix(doctor): count only folders with SKILL.md as hand-kept skills
An empty or cache folder in claude's skills folder was reported as a skill OpenCode loads, and any same-named path in OpenCode's folder hid a real one. OpenCode loads only folders with SKILL.md, so check for it on both sides. Refs #458 |
||
|
|
3ec60a3732 |
fix(doctor): count skills kept by hand in another target's folder
The leak check compared only source skills, so a skill the user keeps in ~/.claude/skills (which merge mode preserves) passed as harmless, although OpenCode loads it. Read the writer's folder too and count entries sync did not put there and OpenCode's own folder lacks. The wording no longer says these skills are left out by filters, and the suggestion asks to sync them to opencode, which fits both causes. Refs #458 |
||
|
|
20807579a1 |
refactor(doctor): keep OpenCode's one-skill-per-name fact in targets.yaml
The rule that OpenCode loads one skill per name lived in a Go map while its other facts (also_scans, disabled_by_env) live in targets.yaml. Move it there as one_skill_per_name so a newly verified runtime needs only a data change. Also fold doctor's two cross-target warning branches into one, so the leak and generic messages cannot drift apart, and reuse cmp.Or for the symlink-mode check. Refs #458 |
||
|
|
03cde2b098 |
fix(doctor): keep the overlap warning for symlink-mode writers
A symlink-mode target folder is the source itself, so it also exposes skills that .skillignore hides. Doctor, sync, and the dashboard pass discovery results without those skills, so a symlink-mode claude target looked harmless to OpenCode even when OpenCode loaded an ignored skill through it. Treat that pairing as unknown and keep the previous warning, unless OpenCode links the source as well. Refs #458 |
||
|
|
834f88efb9 |
fix(doctor): compare resolved skills when judging OpenCode overlap
OpenCode loads skill files concurrently, so which copy of a name wins is not fixed; its own folder does not reliably win. A source skill synced to both folders is harmless anyway because both copies have the same content. Count only source skills in OpenCode's folder, so a local skill there no longer marks a same-named skill from another folder as already present. The comparison used each target's filtered selection, which skips the target_naming: standard validation and collision handling sync applies. When two skills named dev collide in OpenCode's standard folder, sync writes neither there, yet a claude target filtered to one of them still delivered it to OpenCode and no warning appeared. Use the resolved skills that sync writes instead. Refs #458 |
||
|
|
d055f9c22a |
fix(doctor): warn about OpenCode overlap only when skills leak
OpenCode reads .claude/skills and .agents/skills first and its own skills folder last, keeping the last skill of each name. A skill synced to both opencode and claude therefore loads once, yet doctor and the sync summary warned on every setup with both targets, with no way to silence it. The real effect is different: skills kept out of opencode by targets: or include/exclude still reach it through another target's folder. For opencode, count only those skills, name them in doctor, and point at OpenCode's OPENCODE_DISABLE_CLAUDE_CODE_SKILLS and OPENCODE_DISABLE_EXTERNAL_SKILLS. Other runtimes keep the old check until their rule for same-named skills is verified. Refs #458 |
||
|
|
ede7f29aea |
fix(extras): read written blocks back and keep user lines in block-created files
Two gaps found by the fifth Codex review of #451: - A source line that reads as a block marker, such as an unfenced end marker, was copied into the body, so the freshly written target parsed as damaged and every later sync, collect and detach failed. The block is now parsed back before writing, and a source whose block would not read back as itself is refused. - When a block had created the target and the user then added lines outside it, switching to symlink or copy kept the "created" record, so restoring the link later removed the file and the user's lines with it. Those lines are now recorded as the restore point. Refs #436 |
||
|
|
15dc6f47e3 |
fix(extras): guard block targets against source links, open fences and sibling reordering
Four gaps found by the fourth Codex review of #451: - The check that refuses a target linked to another extra's source ran for import only, so a prepend or append target linked that way had its block written straight into that source. It now runs for every mode that edits the target in place. - Switching a target with a damaged block to symlink or copy recorded the damaged block as the user's restore point, so detaching later brought it back. Recording the restore point now fails on a damaged block. - Appending to a file that ends inside an open code fence put the begin marker inside that fence, so the next sync missed the block and appended another. Such an append is refused. Separately, a block body with an unclosed fence now ends at the end marker whose body matches the block's hash, even when the user's own code follows. - A second prepend block counted its sibling above it as misplacing it, so each sync moved one ahead of the other. Placement now ignores other managed blocks on the same side. Refs #436 |
||
|
|
876e165f25 |
fix(extras): refuse damaged blocks and plan block defaults without the leaving files
Five gaps found by the third Codex review of #451: - Switching a target with a damaged block (a deleted end marker) to import ignored the parse error and added the @ line, so the tool read the stale block as well. The switch now fails until the block is repaired. - Detaching such a target reported success without touching the file, so Assign dropped the connection and left the block with nothing configured to remove it. Detach now returns the error. - PlanAssign decided whether a non-import target could take several files, and Assign chose each new file's mode, from the extras before the files being detached were gone. Removing the only block holder while adding two files therefore passed the plan, then gave both new files a link, the second replacing the first. The plan now detaches first and Assign applies the modes the plan validated. - When the last block left a file it had created but the user had since added lines to, the created record stayed, so a later link attach and restore deleted the user's file. The attach record is cleared once no managed block or import line remains. - A source with a fence that never closes swallowed the block's own end marker on the next parse, so a freshly written target read as damaged. An open block's end marker now ends it when the fence never closes. Refs #436 |
||
|
|
c88b7ff341 |
fix(extras): drop the old representation when a target enters or leaves a block mode
The mode picker stores the new mode before syncing, so the block and import handlers saw the previous mode's output as the user's content: copy → prepend kept the whole copied source beside the new block, import → prepend kept the @ line, and prepend → import kept the block. The tool then read the instructions twice, and detaching removed only the new representation. Entering a block mode now rebuilds a leftover copy from the attach-time base (backing up an edited copy as a mode-switch drift, as import does) and drops this extra's @ line; entering import mode drops this extra's block, keeping a hand-edited one as a drift backup. Refs #436 |
||
|
|
899b52a78e |
fix(extras): keep block edits and placement straight across mode changes
Four gaps in the managed-block modes, found by Codex review of #451: - Switching a block target to symlink or copy recorded the restore point from the file as it stood, block included, so restoring the target later brought back instructions the user had removed. The restore point now strips this extra's block, as it already stripped its import line. - Detaching a target whose block had been edited by hand dropped the edit outright. The edited file is now kept as a drift backup first, as an edited copy or link is. - Fences were only tracked outside a block, so a source that quoted a marker in a fenced example produced a target that read as damaged on the next sync. Fences are tracked inside the block body too. - Changing a synced target between prepend and append left the block where the old mode had put it, since body and hash still matched. A block in the other mode's place is moved. Refs #436 |
||
|
|
05ff8c675a |
feat(extras): prepend and append modes for single-file extras
Tools without an @import directive (codex, gemini, cursor) could only take a shared instruction file as a symlink or copy, which replaces the target's own file. Teams that want one shared AGENTS.md plus the user's own notes in the same file had no way to express that. prepend and append write the source into the target file as a managed block fenced by skillshare:extra markers that carry the source path and a content hash. Sync inserts the block once and then rewrites it in place, status reports modified when the block body no longer matches its hash, Collect copies the edited body back to the source, Reapply rewrites the block from the source, and restore removes only the block. Lines outside the block, and markers inside code fences, are never touched. Several managed blocks (and an import line) may share one target file; the connection validator only rejects a file when a replacing mode (symlink, copy, merge) is involved. Refs #436 |
||
|
|
2ef704a77b |
fix(sync): isolate extension modules and condense diagnostics
Keep bundled CommonJS converters working inside ESM projects. Show concise sync failures with expandable original diagnostics and clarify that the last-sync card covers skills and agents only. |
||
|
|
5e02ef7ef0 |
refactor(sync): select a target's skills through SelectTargetSkills
Status, doctor, diff, the dashboard's target and diff handlers and analyze each repeated FilterSkills followed by FilterSkillsByTarget, and only some dropped disabled skills first. Routing them through SelectTargetSkills keeps their answers identical to sync and mcp serve when a selection rule changes. The callers that did not drop disabled skills get discoveries without them, so their output does not change. |
||
|
|
cc7d802411 |
feat(mcp): serve skills over MCP with the SEP-2640 Skills extension
Agents on a disposable VM, in a hosted assistant or behind an MCP gateway can reach an MCP endpoint but not the folder skills sync to, so they got tools and none of the user's skills (#428). `skillshare mcp serve` is a read-only server for the skills skillshare already manages. It declares io.modelcontextprotocol/skills and implements skills/list, skills/get and resources/read: one entry per skill, its URI from the source path, the full frontmatter, and every file with a sha256 digest and size. --target applies that target's selection, and the source is reread at most every 5 seconds so install, update, enable and disable show up without a restart; unchanged files keep their digest. stdio is the default; --http serves Streamable HTTP and needs SKILLSHARE_MCP_TOKEN off loopback. Skills the extension cannot carry are skipped with a warning instead of being published incomplete: a name that breaks the Agent Skills rules or differs from its directory, more than 512 files or 16 MiB, or a nested skill that is not served. --check lists them without serving. The naming rules moved to internal/skillpkg so sync and the server share them. Few clients support the extension yet, so the server also offers list_skills and read_skill tools. A client that declares the extension does not see them, so it never gets each skill twice. sync.SelectTargetSkills is the one place that turns discovered skills into a target's selection (enabled, include/exclude, frontmatter targets). Refs: #428 |
||
|
|
8e9ef1c806 |
test(sync): make the tests pass on Windows and run them in CI
Ten tests assumed POSIX behaviour: - Five asserted os.ModeSymlink, but Windows links with a junction; check utils.IsLinkMode instead. - Two used `/abs/...` as an absolute path, which has no volume on Windows; give the fixtures one. - Windows has no permission bits to preserve, so the 0600 check is skipped there. - Reading a file as a directory reports not-exist on Windows, which prune ignores, so that prune-error test is skipped there. - A single-file extension relies on the shebang and the executable bit, so ListExtensions finds only directory extensions on Windows, as the extras docs describe. Add ./internal/sync and ./internal/trash to the windows-test package list so they stay green. Refs #344 |
||
|
|
d97f6d88b7 |
fix(trash): keep junctions as junctions when moving across volumes
When the skills source and the trash live on different volumes, the cross-device fallback in moveLink and copyDir recreated a Windows junction with os.Symlink. That needs Developer Mode or elevation, which the junction was chosen to avoid, so `unlink` and `trash restore` could fail after `link` had succeeded. Recreate a junction as a junction through a shared helper, and keep the original link in place when creation fails. CreateJunction moves from internal/sync to internal/utils so trash can reuse it. Refs #420 |
||
|
|
98300a2eec |
fix(install): recognize gitdir files as checkouts
Followed worktrees and submodules were discovered as tracked repos but bypassed guards that required a .git directory. Widen IsGitRepo to accept a directory or regular gitdir file and reuse it in discovery and reconciliation. All existing callers classify checkouts or run Git commands; none requires the directory layout, so a separate predicate would retain inconsistent decisions. Exercise actual followed worktrees in CLI and dashboard update fixtures, including project mode and force retries, and document that they receive the same checkout guards. |
||
|
|
df7a6ad73d |
fix(sourcewalk): preserve inventory on followed traversal failures
Discovery callbacks may ignore filesystem errors after a followed target passes its availability probe. Record these failures in the shared Follow policy before dispatching callbacks so sync and reconciliation preserve entries missing from an incomplete inventory. Keep ordinary vanished-child races tolerated, while treating loss of the target itself as unavailable. Cover both walkers and merge/copy pruning, and document read failures in the English and translated configuration guidance. |
||
|
|
3b898f3730 | Merge branch 'main' into runkids/274-follow-source-links | ||
|
|
8879d445ab |
fix(status): require a source fingerprint for extension outputs (#416)
Extension outputs were matched to an agent by stem alone. A plain copy that sync tracked before the target enabled an extension (reviewer.md) passed for the converted output, so status, doctor, diff and the Sync tab reported the target in sync while the next sync would write reviewer.toml and prune the copy. Only a transform records a source fingerprint, so an output without one is no longer counted as converted. Outputs written before fingerprints existed (before 0.24.5) show as pending until the next sync, which is what they were already reported as before #392. Refs #415 |
||
|
|
d6162baba0 |
fix(sourcewalk): resolve junction chains and compare canonical roots
canonicalPath relied on filepath.EvalSymlinks, which since Go 1.23 leaves a Windows junction component in place. A link whose target is itself a junction, or sits below one, was followed as the unresolved junction: the walk saw no descendants while the inventory counted as complete, so target entries from that link could be pruned, and a sync target spelled through a junction could evade the overlap guard. Every existing path component is now resolved hop by hop, and a target that still ends in a link marks the link unavailable instead of being followed. The policy also kept the source root as spelled, so a relative global source was discovered but never resolved for writes or audit. Root, first-level and Resolve comparisons now use the same canonical absolute form. Copy and checksum roots get the same one-hop resolution so a followed junction that is itself a skill no longer trips the cycle guard. |
||
|
|
c9e532a66f |
fix(source-links): use the server's follow snapshot for collect and keep Windows link text logical
The project dashboard builds a synthetic global config without follow_source_links, so the collect handler read a zero policy and a forced collect could replace a followed source link with the target copy. The per-instance snapshot already knows the project setting. On Windows the absolute link fallback (junctions, or symlinks without Developer Mode) canonicalized the source root even with the key off. A source root that is itself a directory symlink then no longer matched the logical path that status, prune and merge ownership compare against, so every sync reported a conflict or recreated every link. Store the logical path as main did; only relative links need the canonical root. |
||
|
|
72ed5ba0fb |
fix(diff): compare extension agent outputs and apply target filters (#414)
* fix(diff): compare extension agent outputs and apply target filters #392 taught status and doctor to recognise converted extension outputs, but diff (CLI) and the Sync tab (/api/diff) still compared the target directory's *.md files against the source name. A target whose extension renames the output (codex -> .toml) therefore listed every agent as pending after a sync. Both diff paths now use the same manifest-based check as status, and report tracked outputs whose source is gone as prune items. They also apply the target's include/exclude and the agents' frontmatter targets, so an agent that sync would skip is no longer shown as pending. Refs #391 * chore(release): request 0.24.6 The pending feat commits would make Release Please propose 0.25.0. This batch is meant to ship as the 0.24.6 patch, so ask for that version. Release-As: 0.24.6 |
||
|
|
6bc41d29ec |
fix(sync): preserve logical identity of followed source links
Keep the canonical skills source root and logical relative tail when creating or reformatting project links, including Windows relative links and junction fallback. Shared agent and extra links retain full canonicalization, and global Unix link text stays unchanged. Allow group walks outside the source only for an enabled first-level link validated by Follow.Resolve, remapping children to logical paths and metadata keys while retaining nested-link guards and root-skipping semantics. Resolve copy and checksum operation roots before walking to avoid false cycles, and preserve followed source links during forced collect with per-item warnings. Regression coverage verifies second-sync ownership, status, prune, unlink, format changes, linked-root copying, group guards, and forced collect preservation. Linux build, vet, sync and command tests, sourcewalk ratchet, server collect tests, context validation, and Windows cross-build passed; Windows runtime was not verified. No new raw-walk allowance was needed. |
||
|
|
89fc4fbdf1 |
feat(sourcewalk): follow first-level source links when enabled
Users link a checkout directly under the skills source (e.g. skills/_dev-skills -> ~/code/dev-skills) and expect it to behave like any other first-level entry. sourcewalk resolved only the root, so these links were invisible to discovery, sync, update, and the dashboard. follow_source_links (global and project config, default false) enables a per-operation sourcewalk.Follow policy. Walk, WalkDir, and ReadDir report a followed link under its own name as a directory and descend into its target, so names, RelPath, FlatName, SourcePath, tracked-repo detection, and metadata keys stay logical. Only entries directly under the source root are followed. The policy is built from config and passed explicitly to every discovery caller in the CLI, server, and reconcile, so counts agree; the server keeps a per-instance snapshot refreshed on config load and save instead of a process-global flag. A link is skipped, with one warning per operation, when its target is missing or unreadable, is the source or a parent of it, or overlaps an active skills target. A missing or unreadable target marks the operation incomplete: sync then skips pruning and copy-orphan deletion, and reconcile keeps metadata, so an unmounted drive or a re-clone in progress cannot erase target entries or install records. A link to an existing file is not a directory link and stays an ordinary entry; treating it as incomplete would disable pruning for anyone sharing a file such as .skillignore. doctor keeps raw link identity: with the key off it still says the link is not followed and names follow_source_links: true; with it on it reports followed links and skipped links with the reason. The raw-walk allowlist gains entries for the policy path in Walk and WalkDir: the source root walk with a policy, and the walk of a validated link target whose paths are remapped to the logical link path. Both live in sourcewalk itself, the package that owns source traversal. Refs #274 |
||
|
|
c43bb763f9 |
fix(status): count one extension output per agent
Two agents that flatten to the same name matched the same manifest entry and were both counted, so status could report 2/2 with one output on disk. Each manifest key now satisfies one agent. Refs Codex review on #392. |
||
|
|
51a3be1ca6 |
fix(status): report drift when an extension agent's source changed
Counting an extension output as synced from its output hash alone missed the common case: the user edits the agent in the source and runs status to see whether a sync is due. The output still matched the manifest, so status, doctor and the dashboard reported no drift although the next sync would regenerate it. Sync now records a SHA-256 of the source each output was converted from in the manifest (sources), and status counts an output only when both the output and that fingerprint are current. Outputs recorded by earlier releases have no fingerprint and count as current until the next sync records one, so upgrading does not show the 0/N the report was about. Refs #391, Codex review on #392. |
||
|
|
f403ea5a6f |
fix(status): count extension-converted agents as synced
An agent target with an extension writes each agent under output_ext (reviewer.toml) with transformed content, and the manifest tracks that output name. status, doctor and the dashboard's Sync tab counted synced agents by looking for the source name and comparing with the source content, so every converted agent was missing: status showed 0/N with drift, doctor said the same, and the Sync tab kept them pending after a successful sync. For an extension target, count an agent as synced when the manifest tracks an output with the same stem and that file still matches its recorded hash. Matching by stem avoids loading the extension spec in status paths. doctor keeps reporting leftover broken links for these targets. Refs #391 |
||
|
|
881d08e52e |
fix(sync): skip nested target dotdirs when discovering source skills
Installing a repo whose root is a skill copies the whole repo into the source, including any .claude/skills/ the author keeps for their own development. Install discovery already skips target dotdirs, but the source walk used by sync, check, and the dashboard only skipped .git, so those dev-only skills surfaced as nested skills and were synced to every target. Share the skip set through sourcewalk and apply it in both source walks. Only dotdirs nested below the source root are skipped: host-style paths directly under the root (.cursor/skills/*) stay visible because they drive target inference. |
||
|
|
8c60f51b9f |
feat(source): add the sourcewalk walker and sourcefs write boundary for proposal 274 (#385)
Implements rollout steps 1 and 2 of proposals/274-skillfollow.md. Nothing follows a link or parses .skillfollow yet. Step 1: doctor reports first-level symlinks and junctions in the skills source as info, in text and JSON, without following them. Step 2a: internal/sourcewalk owns traversal of the skills source. Thirteen raw walks move onto it with identical behavior, and a go/parser ratchet fails the tests on any new unclassified walk. Step 2b: internal/sourcefs wraps an os.Root opened at the skills source and refuses any write whose path has a link component. The six write sites the proposal found in review move onto it, including the cross-device copy fallback, and a second ratchet covers raw os write calls. The only behavior change is that an explicit path crossing a link inside the source is refused instead of written through. Refs #274 Release-As: 0.24.3 |
||
|
|
d78e7ce09a |
feat(cli): redesign init and give every command one output style (#360)
* fix(install): omit the empty audit section in dry-run A dry-run skips the security audit, yet the single-skill path still printed the "Audit Findings" heading with nothing under it, which reads as if the audit ran and found an empty result. * feat(init): ask first, confirm a summary, then write The old init asked nine questions in three input styles and wrote files as it went, so cancelling midway left a half-built setup, and detection created tool folders even under --dry-run. Connecting a second machine to an existing repo was only offered at the very end, and the built-in skill defaulted to "no", which read as "not recommended" (#200). init now collects every answer into a plan, shows a summary with Yes / Change settings / Cancel, and writes nothing until confirmed. Esc cancels cleanly. A "Connect my existing skillshare repo" path checks the repo before writing, detects its layout, prefers the repo version of same-name skills and keeps local-only ones for the next push. The built-in skill is installed by default, and the first sync runs at the end so the tools work right away. Prompts use one inline huh-based component with theme colors. Without a terminal (CI, scripts, AI agents) init now applies the same defaults as pressing Enter and prints each decision with the flag that changes it, instead of silently doing less; init -p and --discover add the detected tools. Output that is not a terminal is plain text. BREAKING CHANGE: non-interactive `init` now enables git, installs the built-in skill and selects every detected tool; pass --no-git, --no-skill, --no-targets or --no-copy for the previous minimal setup. Piped or redirected output no longer contains ANSI colors; use --json where offered for machine-readable output. Refs #200 * docs(init): show the new init flow and the connect-a-repo path The getting-started page still described the old four-question wizard with a screenshot of it, the second-machine guide never mentioned the new "Connect my existing skillshare repo" choice, and the recipe told users to run pull and sync after init even though init now does both. Replace the screenshot with ones from the new flow, describe the questions, summary and cancel behavior, and explain what connecting a repo does before and after confirmation. The devcontainer example gains --no-git because init without a terminal now turns git on by default. Refs #200 * feat(devcontainer): seed fake tools and a repo with ssenv --seed Trying init by hand needed several manual steps to fake installed AI tools and a skills repo to connect. `ssenv create --seed` (and `ssnew --seed`) now creates claude/codex/cursor directories with a few skills and a local bare repo at ~/remote/skills.git, so both init paths can be tried at once. Refs #200 * fix(ui): skip the logo on 16-color terminals and hide the cursor while it plays `docker exec -it` sets only TERM=xterm, which reads as 16 colors: the logo was mapped onto the terminal's own palette and its fade-in collapsed into a few flickering cells. Below 256 colors the banner now prints only its text, and the devcontainer sets COLORTERM=truecolor. The visible cursor also jumped along the logo's left edge while frames redrew in place. It is hidden during the animation and restored on exit, including Ctrl+C. Refs #200 * style(ui): color the question mark in prompts The uncolored "?" before each question read like a stray character. It now uses the accent color of the "›" cursor. Refs #200 * fix(init): name the root git scope by what it versions "everything" suggested plugins, MCP servers and hooks were versioned too, but they live in config.yaml, which the root scope gitignores. The option and summary now say "skills, agents, extras" and note that those settings stay in each machine's config.yaml. Refs #200 * feat(init): show --discover in the new init style --discover still printed the old header, "agent(s)" counts and "+ name" lists next to the new prompt. Global and project discover now share init's answered rows (Tools, Config) and a Next line, and call the targets "AI tools" as init's banner does. Refs #200 * feat(init): replace the pixel logo with a SKILLSHARE wordmark The half-block logo looked stretched on terminals with tall line height and turned to mush when shrunk to fit. init now opens with a three-line pixel wordmark, SKILL in blue and SHARE in gold, that lights up from left to right, followed by the version and tagline on one dim line. The generated logo data and its generator script are gone. Without a terminal, without color, below 256 colors or on a narrow terminal, the banner still prints a plain "skillshare vX" line. Refs #200 * refactor(init): label the chosen tools "Targets" init called them "Tools" while the rest of the CLI, the config file and the `target` command call them targets. The answered rows and the summary now say "Targets", the same label the other commands will use. Sentences that describe what was detected ("Found 3 AI tools") stay as they are. The docs tables, the First Sync steps and both init screenshots are updated to match. Refs #200 * feat(cli): ask yes/no questions with the inline prompt uninstall, trash empty, extras remove, target add, collect, update, upgrade and audit each printed their own "[y/N]:" line and parsed the answer by hand, while init already used the inline Yes/No prompt. They now share it: esc answers no, and a declined question prints one dim "Cancelled. Nothing was …" line, as init's cancel now does too. Without a terminal the prompt reads one line from stdin instead, so piped answers such as `echo y | skillshare uninstall x` keep working. It reads byte by byte so a second question still gets its own answer. Refs #200 * feat(sync): report each target on one aligned row Sync printed a ruled header, a "Backing up" block and a "name: merged (43 linked, 0 local, 0 updated, 0 pruned)" line per target, so the counts that changed were hard to find among zeros. It now follows the init style: one row per target with only the non-zero counts, a single Backup row, and a closing line with the duration. `sync --all` names its Skills, Agents and Extras blocks and no longer explains how to set up extras when none are configured. The non-TTY text changes with it; `--json` stays the stable interface for scripts. Tests match rows through the new AssertRowContains helper. Refs #200 * feat(status): show targets as one table Status printed each target as a header with indented skills and agents lines full of bracketed modes and zero counts, and the audit policy as four lines of uppercase labels. Comparing targets meant reading every block. Each target is now one row with a skills and an agents column, a single line names the modes in use, and audit and version take one line each. Global and project mode share the renderer, so project paths read relative to the project root. Refs #200 * feat(install): report each step on one aligned row Install printed a logo, a box-drawn tree, "Next Steps" bullets and a separate "Audit Findings" block, so the result was hard to find. It now uses the same rows as sync and status: Source, Audit and Install with the destination folded to ~, then a closing line and a Next block. Spinners write through a gate that Stop closes before clearing the line. pterm's render goroutine checks IsActive and then writes, so a fast step such as install --dry-run left "Copying files..." stuck in front of the next line. Refs #200 * feat(uninstall): confirm against one line and point at undo Uninstall opened with a boxed header and Name/Path lines, and closed with the trash folder path and a "Next Steps" bullet. Now one line names the target, its folder and what it holds; the result is a single "Uninstall x → trash, kept 7 days" row; and Next offers sync, the trash restore command that undoes it, and the reinstall command when the skill came from a remote source. A batch run with --force or --dry-run no longer lists the targets twice, since there is no question for the list to support. Mixed batches are counted as items, not targets, which already names the AI tools. Refs #200 * feat(update): report each skill or repo on one Update row Update opened with an "Updating" header, the full source path and a "0 tracked repo(s), 1 skill(s)" line, then printed a Changes box and two success lines before "Next Steps". A single update is now an Update row (source or commit count, time), the commits it pulled in dim text, the Audit row, and Next. A batch ends with the audit result and one closing line that leaves out zero counts. Progress bars now clear themselves when they stop, like spinners, so a finished batch no longer leaves "[3/3] ... 100% Done" behind. Refs #200 * feat(check): list what needs attention and close with one line Check opened with a header, the full source path and an item count, counted skills with updates without naming them, and ended with two "Run ..." hints. It now prints one row per repo, skill or agent that needs attention (behind, update available, stale, failed), a closing line that leaves out zero counts, and the update command under Next. A single-name check is one row, like update. Refs #200 * feat(push,pull): report commit, push and pull as aligned rows Push and pull opened with a header and closed with "Push complete" or "Pull complete", so they never said what they committed, where they pushed, or what a pull brought in. Push now prints a Commit row (file count and message) and a Push row naming the upstream branch, never the remote URL since it can carry credentials. Pull prints a Pull row with the commit and file counts and the commits themselves, as update does for a tracked repository, before the sync output. Dry runs list the changed files as ~ + - instead of raw porcelain codes, and error hints are dim notes instead of info lines. Refs #200 * feat(upgrade): report the CLI and the skill on one row each Upgrade opened with the logo and printed a tree of steps per part (current version, latest version, status) ending in "Already up to date ✓". Each part is now one row, such as "✓ CLI v0.22.0 → v0.23.0 · 3.1s" or "✓ Skill v0.23.0, already up to date", with spinners that clear. Sync is offered under Next only when the skill changed, and the star request is a dim line at the end. Refs #200 * feat(new): report the created skill on one row New printed a "New Skill Created" header, the full path, and numbered "Next steps" that told the user to edit the file and run sync. It now prints "✓ Created ~/…/SKILL.md", the folders a pattern added, and sync under Next. A dry run shows the same row, a Preview section with the template, and the dry-run line. Refs #200 * feat(trash): list items and restores as aligned rows The plain trash list printed each item as an info line with its size and age in parentheses under a "Trash" header, and restore printed two success/info lines plus a "Next Steps" label. The list is now rows of name, size and age with one closing count, and restore is one row naming where the item went back, with sync under Next. An item trashed under a minute ago reads "just now" instead of "just now ago". Refs #200 * feat(collect): list local items and results as aligned rows Collect opened with a header, listed local items as "[target] path" list items under a second header, then printed a third header before the per-item results and a metric summary line. It now lists each local item as a row (name, target, path), asks the inline confirm, prints one row per result and closes with "Collected N skills" plus sync and, when the source is a git repository, commit under Next. Refs #200 * feat(hooks): show hooks and their changes as aligned rows Hooks printed "Hooks source: <path>" as an info line, statuses through the fixed-width Status helper, and results as sentences ending in "Run 'skillshare hooks sync' when ready." Hooks and Agent file changes are now rows, with conflicts marked as failures and inactive outputs as warnings, saves and applies close with one line, and the next command sits under Next. The list's "Pending sync" section no longer shows entries that are already in place. Refs #200 * feat(mcp): show servers, changes and checks as aligned rows MCP printed "MCP source: <path>" as an info line, plan changes through the fixed-width Status helper, results as sentences that named the next command inline, and check summaries as "2 server(s) checked: 1 error(s)". Changes and parked servers are now rows with conflicts marked as failures, saves and applies close with one line and Next, and check marks each server with its findings beneath and closes with "Checked 2 servers: 1 error". The Status helper had no callers left and is removed. Refs #200 * feat(plugin): show packages, plans and results as aligned rows Plugin text output was raw "name · target · id · state" lines with "Warning:", "Includes:" and "Revision:" prefixes, and the list walked a map so packages came out in a different order each run. Packages, discovered candidates, planned changes and results are now rows sorted by name, marked by state (registered, not installed, pending, blocked, failed), with details as dim notes and the dry-run line after a preview. JSON output is unchanged. Refs #200 * feat(audit): replace header and summary boxes with rows Audit framed its context in a header box (mode, path, block rule, policy), numbered batch results "[1/2]", printed per-skill verdicts as "→ Aggregate risk / Block decision" lines, and closed with a Summary box that listed every count including zeros. The context is now one title line with a dim note, flagged skills are aligned rows with their highest severity, the summary leaves out zero counts, and the run closes with one line saying whether anything was blocked and by which severity, followed by the command to see the first blocked skill's findings. The progress bar no longer writes its final frame when stdout is not a terminal; that frame had no newline and ran into the next line. Refs #200 * feat(audit): show audit rules as aligned rows The rules list was a fixed-width table framed by 90-character dividers with a "(N rules: N enabled, N disabled)" footer, and rule changes were sentences like "Set severity for X → HIGH". Rules are now rows keyed by ID with a colored severity and the pattern dimmed, disabled rules dim as a whole, the list closes with a count that names disabled rules only when there are some, and each change is one row. Refs #200 * feat(search): drop the logo and tree, show results as rows Search opened with the ASCII logo, drew its progress as a ├─/└─ tree, listed results under a column header with dividers, and ended installs with "Run 'skillshare sync' to distribute to all targets". Results are now aligned rows with the source, stars or risk, and the description and tags beneath; a single install reports the same Install row as `skillshare install`; batch installs list only failures before one Done line; and sync and audit sit under Next. Login and rate-limit problems name the command that fixes them. Non-terminal output no longer prints a "name: installing..." line per skill. Refs #200 * feat(backup): show backups and restores as rows with one closing line Backup and restore opened with headers, announced dry runs with a warning before doing anything, summarized with an operation box, and followed a backup with a "Recent backups" list. Targets now back up in name order as rows with folded paths, runs close with one Done line (and Next restore), listings are rows keyed by timestamp or path with a total, and dry runs end with the shared dry-run line. Cleanup reports how many backups remain instead of a separate "Current" line. Refs #200 * feat(help): one line per command, subcommands in each command's help The top-level help opened with the ASCII logo and listed about 70 lines across ten uppercase sections plus 15 examples, so it did not fit a screen, yet it left out analyze and the common options. It now lists each command once in six groups with the common options, and points to `<command> --help` for subcommands. The mcp, plugin, hooks and extras pages use the same layout and keep all their content. A mistyped command prints one error with the closest command instead of the whole help, a lone option such as --no-tui shows the help, and `skillshare version` prints one line. Refs #200 * feat(extras): show extras and their changes as rows with Next Extras printed a header, "→ name" lines with ad-hoc colored marks (including ✗ for targets that were only waiting for a sync), and ended each change with a sentence naming the next command. The list now shows each extra as a bold name over aligned target rows (! for drift or not synced) and closes with a count and, when something is pending, Next sync extras. Init, collect, add/remove target, mode and source changes close with one Done line, details become notes, and dry-run collect ends with the shared dry-run line. Refs #200 * feat(target): show targets as sections and rows with Next Target info and the plain list printed "Key:" lines at two indent levels, with "(none)" for every unset filter, and remove printed "Backing up" / "Unlinking" headers with one line per step. Info now shows the name over Skills and Agents sections with aligned rows, the list gives each target one row per resource with details dimmed, and empty filters are left out. Remove reports one row per target (plus its backups) and closes with a Done count; dry runs say what would happen per target and end with the shared dry-run line. Skills on/off, add and mode/naming/filter changes close with Done and Next. Refs #200 * feat(doctor): report checks as aligned rows and end with Next Doctor opened with the ASCII logo, split its report under divider headers, mixed ✓/→/! lines with full paths and "(s)" counts, listed targets in random map order, and ended with a bare warning count that left the fix to scattered "Run:" hints. Checks now print as aligned rows under bold sections (Environment, Targets, Extras, MCP/hooks/ plugins, Storage, Version), paths fold to ~, targets are sorted with one row per resource, and the report closes with a Done line plus up to three Next commands collected from the checks (sync, sync agents, sync hooks, upgrade, ...). The --json output is unchanged. Refs #200 * feat(hub): drop the logo and report hub changes with Done hub index opened with the ASCII logo and a tree of spinner steps, then repeated the result as "→ Mode / Skills / Output" lines with the full path. It now shows one spinner that clears itself and a Done line naming the folded output path, skill count and duration, with the index contents as a note. hub list shows aligned rows with the default and built-in hubs marked in dim text instead of a "*" column, and the add, remove and default commands close with a Done line. Refs #200 * test(install): match the shared dry-run line in online tests The online-tagged install tests still looked for the old "dry-run" banner, which install no longer prints since the restyle. They are skipped by default, so the mismatch only showed under -tags online. Refs #200 * fix(target): align remove rows on target names only The label column was sized for "<name>-agents" so an agents backup could fit, which left a wide gap on every row when no agents were backed up. The agents backup row now uses the target name too and says "agents backed up", so the column fits the names. Refs #200 * fix(update): list each item in a batch dry run A batch dry run only said "Would update N skills". Off a terminal the names leaked out through the progress bar's title lines, but on a terminal those lines clear, so the dry run never said which skills or repos it would touch. It now prints one Update row per item, as the single-item dry run does. Refs #200 * fix(ui): keep the progress bar silent off a terminal Off a terminal the bar printed "Title (0/N)", every title change and every phase header as permanent lines, which a terminal shows only as a frame that clears itself. Audit left a stale "Scanning skills (0/7)" line, and scripts saw different content than a terminal. The bar now prints nothing off a terminal, like the spinner. Refs #200 * fix(audit): avoid a double blank line before Summary The audit header ends with a blank line and Summary added its own, so a clean scan with no result rows showed two blank lines in a row. The Summary title no longer adds one; the result rows add it when present. Refs #200 * fix(mcp): drop the blank line above "Saved the MCP source" A save with no backup or migration notes printed a blank line with nothing above it, so mcp add and mcp edit opened on an empty line. Refs #200 * fix(doctor): stop repeating the extra's name in its findings Extras findings printed "rules rules → /home/me/.claude/rules: 1 file(s) out of sync": the row label already names the extra, the path was not folded to ~, and the count used "file(s)". The rows now start at the arrow, fold the path and pluralize the count. JSON details keep the extra's name so each line still stands alone. Refs #200 * fix(doctor): show integrity issues as rows under Integrity Tampered skills and missing hashes printed as free "! Skill integrity: N skill(s) ..." lines after the verified row, breaking the aligned Environment rows. They now sit under a single Integrity row, which turns to ! when any skill has an issue. Refs #200 * fix(doctor): pluralize the Skillignore and Trash rows The rows read "1 patterns, 1 skills ignored" and "1 item(s) (50 B), oldest <1 day". They now read "1 pattern, 1 skill ignored" and "1 item, 50 B · oldest under a day". The JSON messages keep their wording, since scripts may match on them. Refs #200 * docs: show the restyled output of batch 3 commands The reference pages still showed the old output of upgrade, new, trash, collect, audit, search, backup, restore, extras, hub, target and doctor: divider headers, arrow-prefixed lines and "(s)" plurals. The examples now match what the commands print, in all five locales, and the doctor check table uses the new row labels. Refs #200 * feat(trash): let trash empty skip its confirmation with --force Scripts had no way to empty the trash: off a terminal the confirmation reads stdin and cancels on EOF. --force (-f) skips it, as it does for uninstall and extras remove. Refs #200 * fix(doctor): show source, link and target problems as rows Missing sources, unsupported links, folders without SKILL.md, unknown skill targets, bad include/exclude patterns and broken symlinks printed as free "✗ Source not found: …" lines between the aligned rows. They now use the row of the check they belong to, and broken symlinks or a missing source add a Next suggestion. Refs #200 * fix(ui): leave out durations that would read 0.0s Fast commands ended with "· 0.0s", which says nothing. Every result line now formats its time through ui.Took, which init already used for its steps: durations under 0.05s are left out. Refs #200 * fix(ui): print dev builds without a v prefix Version labels were built as "v" + version everywhere, so a dev build printed "vdev". VersionLabel adds the prefix only when the version starts with a digit, and the logo, help header, version command and upgrade output share it. Refs #200 * fix: pluralize category and drop "just now ago" The checklist status bar appended "s" to its item name and printed "categorys". The trash TUI formatted ages with its own helper that added "ago" after "just now". plural now handles consonant + y, and the trash TUI uses the shared timeAgo, which makes formatAge unused. Refs #200 * fix(target): drop the parenthesized counts in the plain list The plain target list printed "merged (43 shared, 0 local)" while target info and doctor print "merged · 43 shared" with zero counts left out. The sync summary now returns both forms from one scan, so the TUI and --json keep their existing text and the plain list matches the other commands. Refs #200 * test(backup): make the agents backup test back something up The test only synced agents, which become symlinks into the source and are skipped by backup, so it passed without any backup being written. It now adds a target-local agent and checks that the file lands in the backup. Refs #200 * refactor(cli): render every command's --help with printHelp About forty help pages were hand-aligned raw strings with "Usage:", "Options:" and "Examples:" headings, while hooks, mcp, plugin, extras and the top-level help already used printHelp. They now share it, so headings, option order (short flag first) and alignment match across commands. Examples align on their own column so long commands no longer push option descriptions to the right, and "--help, -h" rows are dropped as on the converted pages. Refs #200 * feat(enable): print enable and disable results as rows enable/disable still used the old "Disabled: x (added to .skillignore)" line plus a "Run skillshare sync" sentence. They now print one row per pattern, a Next hint after a change, and the dry-run closing line, like the other restyled commands. Refs #200 * fix(sync): pluralize the leftover cleanup note Project sync printed "Cleaned 1 leftover skill(s)". The note now uses the singular or plural noun, and the sync docs show it as the dim note it is instead of an arrow line. Refs #200 * fix(cli): drop the arrow info lines left in install, update and sync These commands were restyled, but about fifty messages still went through ui.Info, which prints a leading arrow, and several said "skill(s)" or "item(s)". Hints now print as dim notes, empty results ("No agents found") as closing lines, follow-up commands as Next, and counts use the singular or plural noun. Refs #200 * fix(cli): tidy small leftovers found in the recorded output doctor printed "0 minutes ago" for a fresh backup and an ASCII arrow in the Update row, unlike trash and upgrade, which say "just now" and "v1.2.0 → v1.3.0". The "bring the Targets up to date" hint capitalized a word mid-sentence, and search --list showed hub sources under the home directory as a cut-off absolute path instead of folding it to ~. JSON messages keep their wording. Refs #200 * fix(search): fit a home-folded source path in the list Folding the home directory to ~ was not enough: a typical local hub path such as ~/.config/skillshare/skills/frontend/react is 42 characters, so the 40-character cap still cut it. Fifty characters next to the 24-character name column stays within 80 columns. Refs #200 * feat(list): print the plain list with rows and a closing count The --no-tui list still used the old header with a divider and an arrow on every skill, so it looked unlike every other restyled command. Skills now line up in one column under their group, tracked repos use the ✓ / ! marks, and the list closes with a count split by tracked, remote and local (zero counts left out). Project mode keeps its scope as a dim "· project" after the title. Global and project had copied the same plain-output code; both now call printSkillList. The loading spinner clears itself instead of leaving a "Loaded N skills" line. Refs #200 * fix(cli): show help for subcommand --help instead of running it target add/remove/list, trash list/empty and hub list/remove passed --help through as an argument, so they ran the command, failed on a target or hub named "--help", or rejected the flag. tui on --help even switched the TUI on. Each now prints its command's help page. The tui status and toggle lines also move to the row and Done style. Refs #200 * feat(diff): print differences as rows and close with next steps The plain diff still printed a Summary line, divider headers, arrow hints and per-target "scanning" lines when output was not a terminal. Each group of targets now lists one row per kind of change ("New a, b"), targets in sync share a single ✓ row, extras use the same rows, and diff closes with a count and up to three commands. The suggested sync command follows what differs: sync, sync agents, sync extras or sync --all. Agents no longer show as "New 1 skill", because rows name the change rather than counting skills. "skillshare diff all", listed in the help, failed with "target 'all' not found"; it now diffs everything, the same as no argument. Refs #200 * test: sync the install warning summary and gofmt two status tests The "6 findings" wording changed in an earlier commit, but the unit test under cmd/ still expected "6 finding(s)": scripts/test.sh and make check only run ./internal and ./tests, so the cmd tests never ran. Two status tests also had comment alignment gofmt rejects, which fails make check's fmt-check. Refs #200 * test: run the cmd unit tests in scripts/test.sh CI runs go test ./cmd/skillshare/... ./internal/..., but the local runner behind make test and make check only ran ./internal/..., so a stale assertion in cmd/skillshare passed locally and would only fail in CI. Refs #200 * feat(cli): restyle commit and analyze output commit and analyze were the last git and inspection commands still printing the old header and table layouts. They now use the same rows, Done line, and Next hints as push and pull, so a commit reads like the commit row of push, and analyze shows each target group as a bold name with aligned token rows instead of a boxed table. Refs #200 * feat(log): show entries as rows and fold the log path The plain log view still opened each section with a boxed header that printed the absolute log path, then a TIME | CMD | STATUS table. Entries now read like every other command: a status mark, the command, when it ran and how long it took, with details indented beneath. The log path is folded to ~ and moves to a dim footnote. log --stats drops its divider and ends with one summary line. It and the TUI stats panel said "just now ago" for a fresh entry; both now use timeAgo, which already handles that case. Refs #200 * feat(cli): restyle completion, ui and leftover arrow lines completion --install, ui start/stop and a few notices still printed arrow info lines with absolute paths. They now end with a Done line, fold paths to ~, and give config-file lines their own bold heading so the lines to paste read apart from the hints. The empty extras TUI now says the same thing as extras list. Refs #200 * feat(init): report git changes on an existing setup as rows init --remote and init --git-root on an existing setup still printed arrow lines with absolute paths and spinner results in a different voice. They now print aligned Git, Remote, Pull and Git root rows like a fresh init, end a dry run with the shared Dry run line, and give the choices after a remote check as Next commands. A source repo the user created before init had no fallback identity, so on a machine without git config the follow-up commit failed and dumped git's whole "Please tell me who you are" message. The existing repo now gets the same local fallback a new one does. Refs #200 * feat(doctor): warn when a newer built-in skill is published status already compared the skillshare skill with the published one, but doctor only printed the local version, so a run meant to find problems called an old skill healthy. doctor now fetches the published version alongside the CLI update check and suggests upgrade --skill. Both commands share a semver comparison. status compared with !=, so a skill ahead of main (a dev build) was reported as having an update. Refs #200 * fix(cli): count batch audit warnings in words and clear progress spinners The batch install and update audit summary still printed "2 skill(s)" and "warning(s)" after the rest of the output switched to "1 skill" / "2 skills". uninstall and agent update also left "Found N skills" and "Check complete" behind, progress messages the restyle clears. Refs #200 * fix(cli): say so when diff or analyze has no targets With no targets configured, diff reported "No differences" and analyze printed only its "Add -v" hint, both reading like a healthy result. They now say no targets are configured and suggest target add, as target list does. Refs #200 * fix(diff): align values across target sections Each target section sized its labels on its own, so a section with "Local only" started its values two columns later than one with only "New", and the list read ragged. All sections now share one width. Refs #200 * fix(doctor): count built-in skill warnings in the summary The skill rows (not found, missing version, newer version available) were marked as warnings and counted by --json, but never reached the text summary, so doctor could print "! Skill not found" and close with "All checks passed". The all-good integration test only passed because of this; it now installs the built-in skill it needs. Refs #200 * fix(init): stop writing a git identity into existing repos On a repo the user created, init stored skillshare@local in the repo config so its one commit would work. That setting outranks --global, so the advice we printed never took effect and later pushes went out as skillshare@local. The commit now gets the fallback through env vars only. The note for repos init creates names the repo-level command that actually overrides it. Dry runs also wrote .gitignore into existing repos while closing with "nothing was written", and warned about --no-git when it was not passed; both now only describe what would happen. Refs #200 * fix(cli): tell "no targets" apart from "nothing reaches them" diff and analyze said "No targets configured" and suggested adding one whenever there was nothing to show, including when targets exist but have skills turned off or no skill is meant for them. Refs #200 * fix(log): drop the trailing separator on instant entries Entries with no recorded duration ended in a dangling " · ". Also removes the formatRelativeTime alias the stats restyle left unused; its test now covers formatDurationShort directly. Refs #200 * docs: match tui, project list and log examples to the real output The tui and project list examples used label widths the CLI does not print, and the plain log example claimed to show non-TTY output, which joins each entry's details on one line. Refs #200 * perf(version): cache the published skill version for a day doctor and status asked GitHub for the latest skill version on every run, adding up to 3 s when offline. They now reuse the answer for 24 hours, the same interval the CLI update check caches for. upgrade --skill still fetches fresh and records what it got. Refs #200 * perf(server): reuse the cached skill version on the dashboard The version endpoint fetched the published skill version on every call, like doctor and status did, so it now shares their 24-hour cache. It also treated any difference as an update, offering a "newer" skill to anyone running a local build ahead of main. Refs #200 * test(redteam): match the restyled update --diff heading update --diff now titles its file list "Files changed" in sentence case, like every other section, so the check for the list looked for the old "Files Changed" box title and failed although the list was there. Refs #200 * test(cli): keep /tmp fixtures unfolded where HOME is /tmp scripts/test.sh now runs the cmd unit tests, so the docker sandbox runs them too, with HOME=/tmp. shortenPath then folds the /tmp fixtures in four tests to ~ and their exact-path checks fail. The tests now point the cached home elsewhere while they run. Refs #200 * fix(init): find skills/ in a repo that holds nothing else The check for a skills/ folder ran only when the repo root had no skill folders, but it counted skills/ itself as one, so it never ran. A repo with only skills/ became the source as a whole, one level too high. Refs #200 * fix(init): keep the skills git scope for a custom source With a remote that has no skills yet, init defaulted to versioning the whole skillshare folder. For a --source outside that folder it holds none of the user's skills, so the commit and every later push carried nothing while init reported the remote as linked. Refs #200 * test(sync): check only the Agents section for updated agents The restyle turned the old "0 updated" check on the agent summary into "no 'updated' anywhere", which also covered the Skills section. On macOS the first project sync reports the skill as updated there, so the test failed on something it was never meant to check. Refs #200 |
||
|
|
6e176ddb0c |
feat(extras): share Markdown memory across agents (#349)
* feat(extras): add shared Markdown memory management Store user-managed notes in extras/memory for global and project scopes. Add CLI operations, a nested dashboard browser, versioned edits, and backup-backed deletion and recovery. Connect selected agents with reviewed, marked reading guidance while preserving existing instruction files and routes. Add explicit INDEX linking, conflict draft comparison, and copy-content previews. Document the workflow in five website locales with English screenshots and translate dashboard copy across all eleven locales. Native automatic memory remains separate from this shared file overlay. Validation: make check; 22 UI tests; TypeScript and ESLint; production UI build; six isolated CLI E2E steps; five-locale website build; explicit Claude-write/fresh-Codex-read smoke test. * feat(memory): support dashboard note moves and redesign browser Add version-checked rename and folder moves without replacing existing notes. Back up the old path and preserve content and permissions while refreshing selection, search, index warnings, and backup links. Integrate the two-pane Memory browser and compact agent controls. Refresh all English screenshots and document move/link/history behavior in five locales. Validation: make check, scoped UI tests, TypeScript, ESLint, UI production build, five-locale website build, locale parity, and visible Chrome workflow checks. * fix(memory): recheck reviewed files before committing changes Preserve external edits detected after note backup or draft preparation, and create new notes exclusively. Revalidate each guidance file before writing, report stale partial failures, and correct the built-in move/rename documentation. * fix(memory): repair initialization and preserve note recovery scope Detect missing starter files before dashboard note creation and refresh the index after initialization. Honor requested backup paths, include external project memory sources in recovery scope, and log initialization failures after partial mutations. * fix(memory): protect guidance creates and match Windows history paths Create new reviewed instruction files exclusively to preserve competing writes. Match Windows history links with native backup paths while keeping POSIX names and backup API paths intact. * fix(memory): require configured extra for external backup access Keep project backup scope inside the repository unless a valid memory folder extra enables its external source. Cover listing, version preview and restore denial without changing configured-source recovery. * fix(memory): lock backup scope validation through restore Validate project memory backup access under the restore write lock so concurrent extra deletion cannot revoke access between validation and writing. Hold read locks across scoped backup reads as well. |