* fix(project): refuse to re-init a project that lost its config.yaml
Every project-mode command auto-initializes when .skillshare/config.yaml
is missing. That is right for a repository with no project directory at
all, and for the shared skills repo produced by 'init -p --config local',
which gitignores config.yaml so each developer regenerates their own.
It was wrong for the case in between. A .skillshare/ that already held
skills or agents, whose config.yaml was simply gone, was re-initialized
into an empty config. Every configured target was dropped, the target
symlinks were left behind pointing at a project the config no longer
described, and the command exited 0. Nothing said anything had happened.
Add ensureProjectConfig, which replaces the open-coded auto-init at every
project command entry point. It initializes as before when there is no
project directory, and when config.yaml is gitignored, so both intentional
cases keep working untouched. When the directory holds skills or agents
and its config is neither present nor gitignored, it now returns an error
pointing at version control or an explicit 'skillshare init -p' instead of
writing over the project.
The gitignore check is treated as inconclusive on error, so a repository
that cannot be inspected is guarded rather than overwritten.
* feat(project): support a visible skillshare/ project directory
Project mode is identified only by .skillshare/config.yaml, and trash,
backups, logs and audit-rules.yaml anchor to that same hidden directory.
The sources option (#153) made project content relocatable, but the
marker and operational state stay hidden, so repositories that treat
skills as reviewable content still carry a hidden directory whose only
job is to hold config.yaml.
Resolve the project directory through a new leaf package that checks
.skillshare/config.yaml first and skillshare/config.yaml second, and
derive every config, state, source-default and gitignore path from the
result. The hidden name wins whenever both exist, so an existing project
never moves and no migration is needed. The package imports nothing else
internal because internal/audit cannot import internal/config without a
cycle.
Add init -p --visible to create the visible layout. Default init -p
behaviour and output are unchanged.
Two ambiguities the visible name introduces:
- The global config directory is also called skillshare
(<config-home>/skillshare), so the two places that infer scope from a
config path now exclude the global location by full path rather than
by directory name. TestLogDir_Global asserted a fixture path without
declaring a config home, which hid this; it now sets XDG_CONFIG_HOME.
- An unrelated directory named skillshare/ must not be adopted as a
partially initialized project, so the visible name is only claimed
when it carries a marker of its own: a skills/ or agents/ directory,
or a .gitignore that ignores config.yaml.
The missing-config guard added in the previous commit is generalized to
resolve through the new package, so it covers both layouts. The
gitignored-config marker matters there too. A repository shared by
'init -p --visible --config local' before any skill was committed clones
with nothing but that .gitignore, because git drops the empty skills/
and agents/ directories; recognizing it keeps the repair pointed at the
visible directory instead of writing a hidden one beside it.
Refs #256
* fix(project): reconcile visible directory support with main
Consolidate the missing-config guard and regression tests already merged in #260. Preserve both directory layouts and document and test resyncing target links after a rename. Follow-up for #258.
---------
Co-authored-by: Willie <egg358358@gmail.com>
- Fix UI batch uninstall not removing nested skill registry entries:
handler used flat names (__) but registry stores path names (/),
now tracks exact RelPath from discovered skills for matching
- Add stale entry pruning to ReconcileGlobalSkills and
ReconcileProjectSkills using a live set built during disk walk,
so skills deleted from source are removed from registry
- Trigger registry reconcile after sync in both UI handler (via defer
for early-return safety) and CLI (global + project mode), writing
warnings to stderr to avoid corrupting --json output
- UI: fix BatchUninstallPage search treating plain text as exact-match
glob (now substring search when no * or ? present), display nested
skill paths with / instead of __ in confirm and result dialogs
- UI: hide redundant 'X repo(s) and Y skill(s) already up to date'
line on UpdatePage when everything is already current
- Fix test isolation: set XDG_CONFIG_HOME in server test helpers to
prevent host agents dir leaking into test results, skip chmod-based
oplog test when running as root
- Add README badge for Awesome Codex CLI
f.Write return values were silently discarded. On I/O failures (e.g.
ENOSPC), the function would continue and rename an incomplete temp file
over the original log, causing silent data corruption.
Enable selecting and deleting log entries directly from the interactive
TUI without exiting. Uses space-toggle multi-select with two-step
confirmation (d → y) to prevent accidental deletion.
Backend: oplog.DeleteEntries() matches entries by content (timestamp,
command, status, duration) rather than index, since Read() and
readAllEntries() use opposite sort orders. Atomic rewrite via tmp+rename.
TUI keys: space (toggle), a (select all/none), d (delete), y/n (confirm).
Entries grouped by source file (operations vs audit) before deletion.
Async reload after delete reuses the original loadFn to preserve filters.
- Report "partial" status for sync/install/update/uninstall when some
items succeed and others fail
- Instrument 6 new commands: check, diff, trash, init, upgrade, and
all mutating commands now log to operations.log
- Auto-truncation via WriteWithLimit with configurable log.max_entries
(default 1000) and 20% hysteresis to avoid truncating every write
- Stats engine: computeLogStats with per-command breakdown
- CLI --stats flag with colored output and ✓ok/total ratios
- TUI stats panel (toggle with 's'): bar charts, status distribution,
last operation timestamp
- TUI stats footer: compact always-visible summary line
- TUI detail panel: j/k scrolling for long entries, proportional
list/detail layout (40%/60%)
- Web API: GET /api/log/stats endpoint
- Updated website docs for log command
Replace bufio.Scanner with json.NewDecoder which has no fixed line
length limit. Fixes "token too long" crash when audit results produce
JSONL entries exceeding the 64KB scanner default.
Separate backups/trash into XDG_DATA_HOME and logs into XDG_STATE_HOME
instead of keeping everything under XDG_CONFIG_HOME. Add automatic
migration at startup to move existing data to the new locations.
Fix Windows path resolution: DataDir() and StateDir() now fall back to
%AppData% on Windows (matching BaseDir()), preventing incorrect use of
~/.local/share and ~/.local/state paths.
Add MigrateWindowsLegacyDir() to move pre-v0.13.0 data from
~\.config\skillshare\ to %AppData%\skillshare\ on Windows.
Update doctor, oplog, backup, trash, and all tests/docs accordingly.
- Add --cmd, --status, --since, --json flags to CLI log command
- Auto-skip irrelevant log section when --cmd narrows to one file
- Add blank line separator between log entries for readability
- API returns totalAll and commands for smarter frontend filtering
- Custom HandSelect dropdown matching hand-drawn design system
- Empty state distinguishes "no matching entries" from "no entries"
- Update website docs and built-in skill reference with new flags
Add oplog package (internal/oplog) that records every mutating command
(install, uninstall, sync, push, pull, collect, backup, restore, update,
audit) as a JSONL entry with timestamp, status, duration, and args.
- CLI: `skillshare log` with --audit, --tail, --clear, --project flags
- API: GET/DELETE /api/log endpoints with type and limit params
- Web UI: LogPage with ops/audit tabs, table view, clear and refresh
- Instrumentation across 12 command handlers (CLI + server)