Commit Graph
1613 Commits
Author SHA1 Message Date
Willie 8b579ef7be docs: add @aestilog to contributors
Submitted the proposal (#153) for custom project source directories
that shipped in v0.19.15.
2026-05-20 19:09:27 +08:00
Willie aba6f0c787 docs(proposal): mark #153 as shipped in v0.19.15
Adds Status block documenting what actually shipped (sources map only,
no source shorthand) and resolves the two Open Questions (external
gitignore: leave to repo; init -p --source flag: deferred).
2026-05-20 19:06:56 +08:00
Willie 9aee526ba3 chore: release v0.19.15 v0.19.15 2026-05-20 18:52:12 +08:00
Willie 1809fd491d docs(changelog): add v0.19.15 entry for custom sources feature 2026-05-20 18:42:03 +08:00
Willie b1907cd611 docs: document custom project source directories
- Add 'Custom Source Directories' section to project-skills.md covering
  the sources map, common layouts, and constraints (no target alias,
  external paths skip gitignore, .skillshare/ for ops dirs, init seeds
  default paths).
- Add troubleshooting entries for the two new error classes: malformed
  project config (fail-closed) and source/target path overlap.
2026-05-20 18:39:16 +08:00
Willie 906ede81e0 test: add integration coverage for fail-closed and source/target overlap
- 3 malformed-config tests verify uninstall/new/check abort instead of
  silently using the default .skillshare path
- 1 overlap test verifies sync rejects sources.skills aliasing a
  target path
- Fix pre-existing TestUninstall_AllProject fixture which used
  malformed targets: {} (map, not list) — now caught by fail-closed
  load
2026-05-20 18:34:45 +08:00
Willie 8731554456 fix: fail closed on config load error in agents check
Project-mode 'check agents' previously fell back to .skillshare/agents
when LoadProject failed. With custom sources.agents this could scan
the wrong directory and report green while the configured source is
unchecked. Now returns the load error instead.
2026-05-20 18:28:32 +08:00
Willie bb3745b8f5 fix: reject source/target path overlap and fail closed in check
ValidateProjectConfig now resolves each target's skills/agents path
and rejects configs where a source aliases or nests with any target
path. Without this guard, sources.skills: .claude/skills with a
claude target makes sync --force delete the source.

check -p now returns an error on LoadProject failure instead of
falling back to .skillshare/skills.
2026-05-20 18:24:41 +08:00
Willie 4f908a171e fix: fail closed on config load error in enable/disable/new commands
Project-mode disable/enable and new previously fell back to default
.skillshare/{skills,agents} when LoadProject failed. With custom
sources this could write .skillignore/.agentignore or create new
skills in the wrong directory. Now both paths return an error
instead of silently using the default path.
2026-05-20 18:02:58 +08:00
Willie 49abc19eef fix: fail closed on config load error in destructive uninstall commands
Project uninstall previously fell back to default .skillshare/skills
when config was malformed. With custom sources this could trash skills
from the wrong directory. Now both skill and agent uninstall paths
return an error instead of silently using the default path.
2026-05-20 17:09:24 +08:00
Willie 9a30a90366 fix: handle sources.skills: .skillshare producing invalid ./ gitignore pattern
Apply the same rel=="." guard to the skillshareDir branch of
ProjectGitignoreTarget, so sourcePath==.skillshare returns empty
prefix instead of dot.
2026-05-20 16:57:13 +08:00
Willie 14402dc6a5 fix: handle sources.skills: . producing invalid ./ gitignore pattern
When sourcePath equals projectRoot, filepath.Rel returns ".",
causing callers to write "./<name>/" patterns that git ignores.
Return empty entryPrefix so callers produce "/<name>" instead,
which is a valid root-anchored gitignore pattern.
2026-05-20 16:49:52 +08:00
Willie 5b7ca8ba3d fix: trash before gitignore cleanup and skip gitignore for external sources
Reorder handleUninstallRepo to move repo to trash before removing the
.gitignore entry, preventing accidental exposure of tracked content
when trashing fails.

ProjectGitignoreTarget now returns empty strings for source paths
outside projectRoot, since parent-relative patterns (../) are invalid
in .gitignore. All six callers guard on empty gitignoreDir and skip
gitignore management for external sources.
2026-05-20 16:34:02 +08:00
Willie 0c010c55f4 fix: wire custom sources into server reload and gitignore paths
reloadConfig now updates s.cfg.Source and s.cfg.AgentsSource from the
refreshed ProjectConfig so project UI handlers see the latest source
directories after a config edit.

Add ProjectGitignoreTarget helper that computes the correct .gitignore
directory and entry prefix based on whether the source path is inside
.skillshare/ or a custom location. All gitignore write and remove
operations (reconcile, install, uninstall, server handlers) now use
this helper instead of hardcoded 'skills/' prefix.

Fix nil projectCfg panics in three server tests that simulate project
mode by setting projectRoot without projectCfg.
2026-05-20 16:12:02 +08:00
Willie 68d5eadc0b feat: support custom project source directories via sources map
Add ProjectSources struct to ProjectConfig with optional skills, agents,
and extras fields. When set, project-mode commands resolve source paths
from these values instead of hardcoded .skillshare/{skills,agents,extras}/.

Config example:
  sources:
    skills: ./docs/skills
    agents: ./docs/agents

Three EffectiveXxxSource(projectRoot) methods provide the central
resolution logic with fallback to defaults. The projectRuntime gateway
and server layer route through these methods, so most commands get
custom source support automatically.

Closes #153
2026-05-20 15:42:53 +08:00
wangyuhao 38317a1999 proposal: custom project source directories 2026-05-20 15:05:31 +08:00
Willie 3b9cb44be6 chore: release v0.19.14 v0.19.14 2026-05-20 14:07:51 +08:00
Willie 9a57ca4308 fix(audit): handle uppercase URI schemes in dangling-link check
isExternalOrAnchor passed the raw scheme to isURLScheme which only
accepted lowercase letters, causing uppercase schemes like VSCode://
to be misidentified as dangling links.
2026-05-20 13:56:08 +08:00
Willie 3345fd677e refactor: unify gemini and antigravity targets under antigravity
- Update antigravity global path to shared ~/.gemini/skills
- Update antigravity project path from .agent to .agents
- Add aliases: gemini, gemini-cli, antigravity-cli
- Remove standalone gemini target (now an alias)
- Update testutil.CreateTarget to match new path
2026-05-20 13:44:40 +08:00
kostaandCodex ba7191fbf8 Reduce audit false positives
Tighten publisher claim extraction, skip custom URI schemes in dangling-link checks, avoid treating bracket placeholders as markdown links, and allow common documentation domains for external-link noise reduction.

Co-authored-by: Codex <noreply@openai.com>
2026-05-20 13:10:23 +08:00
kostaandCodex ddeb8e0355 Treat Swift files as audit-scannable
Co-authored-by: Codex <noreply@openai.com>
2026-05-19 09:55:22 +08:00
Willie 3ca4d099a7 chore: release v0.19.13 v0.19.13 2026-05-17 22:35:17 +08:00
Willie 1c22cc7e7b fix(test): align agent install test with new name resolution priority
The tracked repo name resolution was changed to prefer source.Name
over TrackName() in a656e30b, but this integration test still used
TrackName() to compute the expected directory path.
2026-05-17 22:25:58 +08:00
Jason Blackburn a656e30b7e 158: retain custom name and non-default branch for tracked skills 2026-05-17 14:03:22 +08:00
Willie 15243a324b docs: update README latest note to v0.19.12 2026-05-15 00:07:41 +08:00
Willie 9307fc521c chore: release v0.19.12 v0.19.12 2026-05-14 23:43:43 +08:00
Willie 821178cb91 chore: release v0.19.11 v0.19.11 2026-05-14 13:28:11 +08:00
Willie 3b2f062cf0 docs: add v0.19.11 changelog, preserve_tilde_on_save docs, fix CI test
- Add changelog entry for v0.19.11 (preserve_tilde_on_save, backups gitignore)
- Document preserve_tilde_on_save in configuration reference, cross-machine sync, FAQ
- Fix TestFoldHomePath/unrelated-abs: use /opt/unrelated/foo instead of /tmp/foo (CI sets HOME=/tmp)
- Add iFwu to README contributors
2026-05-14 13:22:23 +08:00
iFwu 5403595120 feat(config): preserve ~ in saved config paths (opt-in)
Add PreserveTildeOnSave config flag (default false). When enabled, the
Save path folds $HOME prefixes back to ~ when serializing the in-memory
Config to YAML so the on-disk config stays portable across machines
(e.g. when shared via dotfiles).

The in-memory Config is left untouched; cloneForSave() produces a
shallow copy with path fields rewritten. Mirrors the existing
expandPath() calls performed in Load():
  - cfg.Source, cfg.ExtrasSource
  - cfg.Targets[*].Path / Skills.Path / Agents.Path
  - cfg.Extras[*].Source and Extras[*].Targets[*].Path

Adds:
  - utils.FoldHomePath() helper with unit tests (exact-home, child,
    sibling-non-home, unrelated-abs, relative, Windows case-insensitive)
  - 3 Save-path tests covering default-off, fold-on, and Load→Save
    idempotency.

Default off keeps the change backward compatible: existing users see no
behavior difference. Users who share their config via dotfiles can opt
in with:

    preserve_tilde_on_save: true
2026-05-14 13:09:56 +08:00
Willie fb821b7328 fix(project): add backups/ to .skillshare/.gitignore managed dirs
Project mode agent backup (sync --agents, backup -p) creates
.skillshare/backups/ but it was not gitignored — backup artifacts
could be accidentally committed.

Agent backup was added in 95c46ca8 (2026-04-06), after the gitignore
fix in 90c096b8 (2026-03-16) which only covered logs/ and trash/.
2026-05-13 03:49:40 +08:00
Willie 56fafb53e0 fix: preserve update metadata keys for symlinked sources v0.19.10 2026-05-12 21:10:08 +08:00
Willie 56007efa5c chore: fix lint error 2026-05-11 23:46:43 +08:00
Willie 9a7271c1ae fix: address PR #151 review feedback
- Project mode JSON sync now includes context_cost (was nil)
- Server handler respects symlink mode (skips include/exclude filters)
- checkBudget reports all targets exceeding threshold (not just worst)
- Budget warnings include target name in CLI and UI output
- ConfigPage indentation restored to original 2-space style
v0.19.9
2026-05-11 21:34:38 +08:00
Willie 786af85ae4 feat(ui): add i18n for context cost section on Sync page
All 11 locales: en, zh-TW, zh-CN, ja, ko, de, es, fr, pt-BR, id, fa.
2026-05-11 21:34:38 +08:00
Willie 1acfd4b9fe docs: add --quiet flag to sync flags table and context_cost to JSON example
Also documents context_budget config block in configuration reference
with field types, defaults, and cross-link to sync docs.
2026-05-11 21:34:38 +08:00
Willie 5bf9f839e2 docs: add v0.19.9 changelog entry
Context budget warnings (issue #150), --quiet flag, Web UI context
cost display, and HTTP protocol install fix.
2026-05-11 21:34:38 +08:00
Willie 06d2f9fefa refactor(ui): remove redundant context budget card from ConfigPage
The assistant panel already shows field documentation via JSON schema.
A static reference card is redundant and breaks the page's interaction
pattern of cursor-driven contextual help.
2026-05-11 21:34:38 +08:00
Willie 98688ac316 fix: add context_budget to JSON schema for config validation
Both global and project schemas now recognize context_budget,
resolving the 'Unknown field' warning in the Config page.
2026-05-11 21:34:38 +08:00
Willie 402fe38340 refactor: simplify budget warning code after review
- Define budgetTypeAlwaysLoaded/budgetTypeOnDemand constants
- Add showDetails param to printBudgetWarning; analyze reuses it
- Hoist buildAnalyzeEntries call to avoid duplicate computation
- Remove WHAT-comments that restate function names
2026-05-11 21:34:38 +08:00
Willie b1c29c5c9d docs: document context budget warnings and --quiet flag 2026-05-11 21:34:38 +08:00
Willie 60ed5eb857 feat(ui): add context budget reference to Config page 2026-05-11 21:34:38 +08:00
Willie 1ea07afeea feat(ui): display context cost and budget warnings on Sync page 2026-05-11 21:34:38 +08:00
Willie 9510476c45 feat(server): include context_cost in sync API response
Self-contained token estimation (chars/4) since buildAnalyzeEntries
is in main package. Returns grouped counts and budget violations.
2026-05-11 21:34:38 +08:00
Willie f173b1d456 test(sync): add integration tests for token summary and budget warnings
DiscoverSourceSkillsWithStats did not set collectContext=true, so
DescChars/BodyChars were always 0 when sync called buildAnalyzeEntries.
Add DiscoverSourceSkillsWithStatsAndContext that enables both ignore
stats and context collection in a single walk, and use it in sync.go
and sync_project.go.
2026-05-11 21:34:38 +08:00
Willie 76a242c019 feat(analyze): show budget warning when thresholds exceeded
Reuses checkBudget from sync_budget.go. No top-offender list
since analyze already shows the full per-skill breakdown.
2026-05-11 21:34:38 +08:00
Willie 87c355c76d feat(sync): add context_cost to JSON output
Always included in --json mode regardless of --quiet flag.
Contains grouped token counts and budget violation warnings.
2026-05-11 21:34:38 +08:00
Willie cfc7502774 feat(sync): wire up token summary and budget warnings in sync CLI
Add --quiet/-q flag to suppress token summary and budget warnings.
Both global and project sync paths call buildAnalyzeEntries after
SyncSummary to display context cost and budget violations.
2026-05-11 21:34:38 +08:00
Willie 8af9a89774 feat(sync): add printTokenSummary and printBudgetWarning 2026-05-11 21:34:38 +08:00
Willie 1d29686962 feat(sync): add core budget functions with unit tests 2026-05-11 21:34:38 +08:00
Willie a945b3c0c5 feat(config): add ContextBudgetConfig for token budget warnings 2026-05-11 21:34:38 +08:00