1070 Commits
Author SHA1 Message Date
Willie b6475acb6e docs: add Hermes Agent to v0.17.5 changelog v0.17.5 2026-03-19 03:57:08 +08:00
Willie c57391ea39 feat: add Hermes Agent (Nous Research) target support
Hermes Agent is a CLI tool by Nous Research with skills support.
Paths: ~/.hermes/skills (global), .hermes/skills (project).
Ref: https://hermes-agent.nousresearch.com/docs/reference/optional-skills-catalog

Also updates target count from 55+ to 56+ across docs and homepage.
2026-03-19 03:57:08 +08:00
Willie 94269a032e docs: add Web UI New Skill Wizard to v0.17.5 changelog
Add dashboard wizard entry (+ New Skill button, step-by-step flow,
two new API endpoints) to both CHANGELOG.md and website changelog.
2026-03-18 22:35:02 +08:00
Willie 948adf9a11 docs: add web UI wizard to new and ui command pages
- ui.md: add "New Skill" page to dashboard pages table, add
  GET /api/skills/templates and POST /api/skills to REST API table
- new.md: add "Web UI Wizard" section with step-by-step description
2026-03-18 22:35:02 +08:00
Willie d9acaf23f3 fix(ui): remove plus icon from NewSkillPage header 2026-03-18 22:35:02 +08:00
Willie bc4658ea8e fix(ui): use bold border only for active card selection
Drop blue background — selected state is just border-pencil (thick
dark border) + shadow-md, unselected stays border-muted (light).
Clean and minimal.
2026-03-18 22:35:02 +08:00
Willie 02009b8168 fix(ui): use blue accent for active card selection in wizard
Previous border-pencil + bg-paper-warm was nearly invisible against
the light theme. Switch to border-blue + bg-info-light to match
the dashboard's established selected-state convention (TargetsPage,
CollectPage, AuditPage).
2026-03-18 22:35:02 +08:00
Willie 2eb6a79670 fix: address code review findings from simplify pass
- Add cleanup (os.RemoveAll) on scaffold dir creation failure
- Use skill.ValidNameRe in isValidSkillName (remove duplicate regex)
- Derive canAdvance from nameError instead of re-calling validateName
- Remove redundant total param from ProgressBar (derive from steps.length)
- Fix popstate handler to read event.state.step directly
- Use Plus icon for PageHeader (icon prop is required)
2026-03-18 22:35:02 +08:00
Willie 0e2b3237a1 fix(ui): remove icon from NewSkillPage header
Sub-pages with backTo arrow don't use title icons — matches
FilterStudioPage and AuditRulesPage convention.
2026-03-18 22:35:02 +08:00
Willie 1d03eead66 fix(ui): remove subtitle from NewSkillPage header
Pages with backTo arrow should be single-line (title only),
matching SkillDetailPage convention. The subtitle caused an
inconsistent two-line header layout.
2026-03-18 22:35:02 +08:00
Willie 7b3844bd2d fix(ui): align NewSkillPage layout with dashboard conventions
- Add space-y-5 to root container (matches all other pages)
- Remove redundant mt-6/mt-8 margins
- Redesign scaffold step from cramped inline checkboxes to
  card grid with folder icons (matches pattern/category style)
- Remove unused Checkbox import
2026-03-18 22:35:02 +08:00
Willie 0ed219bff7 fix(ui): normalize scaffoldDirs in getTemplates response
Go's omitempty serializes nil slices as absent, causing
undefined.length crash in the pattern card grid. Normalize
to empty array in the API client layer.
2026-03-18 22:35:02 +08:00
Willie bca6c641c5 fix(ui): use spec-compliant mode label in new skill wizard
Change subtitle from generic text to "Creating in: Global/Project"
to match the spec's mode badge requirement.
2026-03-18 22:35:02 +08:00
Willie fa6ad43f4a feat(ui): wire up NewSkillPage routing and add entry button
Add /skills/new route (before /:name to avoid param conflict),
lazy-import NewSkillPage, and add "+ New Skill" button to SkillsPage
header. Clean up unused imports and variables in NewSkillPage.
2026-03-18 22:35:02 +08:00
Willie 87bc3d35c4 feat(ui): add NewSkillPage wizard for creating skills from templates
Multi-step wizard with: name validation (regex + duplicate check),
pattern selection from API, optional category, scaffold dir checkboxes,
and confirmation summary. Uses browser history for back-navigation.
2026-03-18 22:35:02 +08:00
Willie d6be8057ed feat(ui): add API client types and methods for skill creation
Add SkillPattern, SkillCategory, TemplatesResponse, CreateSkillRequest,
and CreateSkillResponse types. Wire up getTemplates() and createSkill()
API methods. Add 'templates' query key for caching.
2026-03-18 22:35:02 +08:00
Willie 7b6cb70a0b test(server): add tests for create skill and templates endpoints 2026-03-18 22:35:02 +08:00
Willie 60b416651f feat(server): add POST /api/skills endpoint for skill creation
Handles skill creation from the web UI with full validation:
- Name validation (ValidNameRe)
- Pattern validation (must exist in Patterns list)
- ScaffoldDirs validation (must be allowed by the chosen pattern)
- Conflict detection (409 if skill already exists)

Creates SKILL.md from the template engine and optional scaffold
directories with .gitkeep files. Returns 201 with skill metadata
and list of created files. Logs to ops log as "create-skill".
2026-03-18 22:35:02 +08:00
Willie 6e23f11be7 feat(server): add GET /api/skills/templates endpoint
Expose skill design patterns and categories via API for the upcoming
web UI skill creation wizard. Returns the full Patterns and Categories
lists from internal/skill/.

Route registered before GET /api/skills/{name} to avoid path conflict.
2026-03-18 22:35:02 +08:00
Willie 22efeea924 refactor: extract skill templates to internal/skill package
Move pattern/category definitions and template generation logic from
cmd/skillshare/new_templates.go to internal/skill/ so both the CLI and
the web UI server can import them. The CLI file becomes thin wrappers
with type aliases to keep new_tui.go and new.go unchanged.
2026-03-18 22:35:02 +08:00
Willie c1e6f1d7b8 docs: add metadata.targets to v0.17.5 changelog 2026-03-18 22:35:02 +08:00
Willie 0ae936a3c1 docs: document metadata.targets in skill format page
Add the new metadata: block placement for targets, explain the
priority rule (metadata wins over top-level), and describe the
metadata block as an ecosystem convention.
2026-03-18 22:35:02 +08:00
Willie 3bedd8a7ea docs: note that ParseFrontmatterFields does not resolve metadata fields 2026-03-18 22:35:02 +08:00
Willie ae1906297f test: add integration tests for metadata.targets sync
Verify that the new metadata.targets format works end-to-end
through the full sync pipeline: filtering, mixed format
coexistence, and metadata-over-toplevel priority.
2026-03-18 22:35:02 +08:00
Willie 3c3974cab3 feat: support metadata.targets in SKILL.md frontmatter
Align with the emerging agent skill ecosystem convention where
deployment/behavioral fields live under a metadata: YAML block.

ParseFrontmatterList() now checks metadata.<field> first, then
falls back to the top-level field. Backward compatible — existing
SKILL.md files without metadata: continue to work unchanged.
2026-03-18 22:35:02 +08:00
Willie 6b3858620f feat(skillignore): add .skillignore.local for local pattern overrides
Allow users to override shared .skillignore patterns without modifying
the committed file. ReadMatcher transparently merges .skillignore +
.skillignore.local (local appended last so !negation rules win).

- Matcher.HasLocal flag tracks .local presence for CLI reporting
- IgnoreStats gains RootLocalFile, RepoLocalFiles, HasLocal() method
- sync/status/doctor show ".local active" indicator
- 6 unit tests + 2 integration tests
- Docs: file-structure, sync, status, doctor, best-practices, creating-skills, org-sharing
2026-03-18 22:35:02 +08:00
Willie 93a3067c76 refactor(tui): move wizard breadcrumbs to help bar footer
Compact single-line format: "✓ reviewer → quality" appended to
the help bar instead of a multi-line header above the list.
2026-03-18 22:35:02 +08:00
Willie c9624df637 feat(tui): add header field to checklist for wizard breadcrumbs
Breadcrumbs now render as a dedicated header area above the list,
separate from the title. This prevents title truncation and keeps
the layout clean.
2026-03-18 22:35:02 +08:00
Willie efdd6366de fix(new): show wizard breadcrumbs inside TUI title instead of terminal 2026-03-18 22:35:02 +08:00
Willie 650065393e feat(new): show breadcrumbs of previous selections in wizard steps 2026-03-18 22:35:02 +08:00
Willie 4f6ae5ad33 feat(new): add wizard back-navigation (Esc returns to previous step) 2026-03-18 22:35:02 +08:00
Willie 26760157b6 docs: add pattern and category fields to skill format reference 2026-03-18 22:35:02 +08:00
Willie 6fa73ae91b fix(new): handle .gitkeep write error instead of ignoring it 2026-03-18 22:35:02 +08:00
Willie c4bfcb0a44 docs: add skill design patterns guide and update new command reference
Add comprehensive skill design patterns page covering five structural
templates (Tool Wrapper, Generator, Reviewer, Inversion, Pipeline) with
a decision flowchart, use-case categories, and detailed examples.

Update `new` command reference with -P/--pattern flag documentation and
a scaffold directories table. Cross-link from skill-design.md.
2026-03-18 22:35:02 +08:00
Willie 8c675182cb test(new): add integration tests for -P flag and scaffold directories 2026-03-18 22:35:02 +08:00
Willie ffa5dba66b feat(new): add TUI prompts and integrate -P flag into new command 2026-03-18 22:35:02 +08:00
Willie 935752bfc9 feat(new): add pattern/category definitions and template generators 2026-03-18 22:35:02 +08:00
Willie 6d0ac1bf81 docs: add SKILLSHARE_UI_BASE_PATH to environment variables reference
Ref: #85
2026-03-18 22:35:02 +08:00
Willie 329869f258 docs: add use case context to reverse proxy section
Ref: #85
2026-03-18 22:35:02 +08:00
Willie da7dfd37cc test: add E2E runbook for UI base path reverse proxy
Covers: API routing with prefix, 404 without prefix, bare path redirect,
__BASE_PATH__ injection, SPA fallback, -b flag, env var fallback.

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

Ref: #85
2026-03-18 22:35:02 +08:00
Willie f0e164ce9c refactor: simplify base path code after review
- Export NormalizeBasePath and reuse in ui.go (eliminate duplication)
- Use json.Marshal for safe __BASE_PATH__ injection (prevent XSS)
- Always cache index.html at startup (avoid per-request disk reads)
- Extract shared BASE_PATH module in frontend (single source of truth)

Ref: #85
2026-03-18 22:35:02 +08:00
Willie 550f398464 fix(test): update integration tests for target path validation
Tests were failing because config validation now requires target paths
to exist before sync. Updated tests to create target directories
properly and adjusted expected error messages.

- TestExclude_GlobalSymlinkMode_Ignored: use CreateTarget instead of RemoveAll
- TestSync_SymlinkMode_CreatesSingleSymlink: same
- TestSync_SourceNotExist_ReturnsError: use CreateTarget, update error message
- TestLog_SyncPartialStatus: use read-only dir to trigger partial failure
2026-03-18 22:35:02 +08:00
Willie 657adcc8a6 test+docs: add base path integration tests and reverse proxy guide
- Integration tests: --base-path missing value, -b short flag, env var
- Docs: --base-path flag in table, Nginx/Caddy examples, env var usage

Ref: #85
2026-03-18 22:35:02 +08:00
Willie 214c8b993c feat(ui): support base path for reverse proxy deployments
- Vite base: './' for relative asset paths (works from any sub-path)
- API client reads window.__BASE_PATH__ for request prefix
- React Router uses basename for client-side routing

Ref: #85
2026-03-18 22:35:02 +08:00
Willie 04f65e5320 feat(cli): add --base-path flag and SKILLSHARE_UI_BASE_PATH env var to ui command
Allows serving the UI under a URL prefix (e.g., skillshare ui --base-path /app).
The flag value is passed through to the server constructors and used for
browser URL construction. Falls back to SKILLSHARE_UI_BASE_PATH env var
when the flag is not provided.
2026-03-18 22:35:02 +08:00
Willie 768c9f4a67 feat(server): inject __BASE_PATH__ into SPA index.html when base path is set
When spaHandlerFromDisk receives a non-empty basePath, it pre-computes
a modified index.html with a <script> tag injecting window.__BASE_PATH__.
This allows the frontend to discover its base path at runtime without
build-time configuration. The injection applies to both direct index.html
requests and SPA fallback routes.
2026-03-18 22:35:02 +08:00
Willie 10444eef3f feat(server): add basePath support for reverse-proxy sub-path hosting (#85)
Add normalizeBasePath + wrapBasePath to Server so the UI and API can be
served under a URL prefix (e.g. /app). StripPrefix wraps outside
withConfigAutoReload; bare-path requests redirect to path + "/".
Dev mode (no uiDistDir) prints a warning and skips wrapping.

Includes HTTP routing tests for prefix routing, 404 without prefix,
bare-path redirect, multi-level paths, and empty basePath passthrough.
2026-03-18 22:35:02 +08:00
Willie 92603f5be6 feat: add config save validation and sync safety checks
Validate config semantics (source path, sync modes, target paths) at
save time (API + CLI) instead of failing at sync time with cryptic
errors. Sync no longer auto-creates missing target directories — fails
fast to catch typos like ~/.cusor/skills. Dry-run also validates paths.

- ValidateConfig / ValidateProjectConfig with warnings + errors
- handlePutConfig returns 400 for invalid configs, 200 + warnings
- handleSync pre-checks via ValidateConfig
- ensureRealTargetDir shared helper (replaces duplicated blocks)
- UI: warning toast on config save, warning banners on sync/preview
- Dashboard shows full absolute source path
2026-03-18 22:35:02 +08:00
Willie 6424bc635e docs: update v0.17.5 changelog to reflect banner-based sync preview
Replace toast action description with inline banner approach.
Remove Toast Action Buttons section (feature was reverted).
2026-03-18 22:35:02 +08:00
Willie a7ecc4010d fix(ui): move sync preview banner above editor to avoid toast overlap 2026-03-18 22:35:02 +08:00