cmdSyncExtras now parses mode args and auto-detects project mode via
projectConfigExists. Global logic is extracted into cmdSyncExtrasGlobal;
new cmdSyncExtrasProject handles project-scoped extras using
config.LoadProject and config.ExtrasSourceDirProject, with relative
target paths resolved against the project root.
sync --all in project mode now defers a cmdSyncExtras("-p", ...) call
instead of printing a warning, so extras are also synced.
- extras init: create new extra with --target/--mode flags, global + project mode
- extras list: show all extras with sync status detection, --json support
- extras remove: remove extra from config with --force confirmation
Move SKILLSHARE_GITLAB_HOSTS merge from Load()/LoadProject() to new
EffectiveGitLabHosts() methods so the GitLabHosts field stays config-file-only
and Save() never writes env-only hosts to disk.
Also fix project-mode direct install dropping gitlab_hosts from the
synthetic Config, and server project-mode parseOpts() falling back to
global config when project had no hosts configured.
Support CI/CD pipelines that need gitlab_hosts without a config file.
The env var is comma-separated and merged (deduplicated) with config
file values in both global and project modes.
Also cleans up from review:
- Extract isValidGitLabHostname to share validation logic
- Remove redundant ToLower before EqualFold in isGitLabHost
- Revert 3 no-opts call sites back to ParseSource()
- Add parseOptsFromProjectConfig helper to reduce inline duplication
- Fix project mode LoadProject missing env var merge
- Add install.md tip about custom GitLab domains
Self-managed GitLab instances on custom domains (e.g., git.company.com)
without "gitlab" in the hostname were parsed with 2-segment owner/repo
split instead of full-path repo. Users can now declare extra GitLab
hostnames in config so the parser treats them like gitlab.com (nested
subgroup support).
- Add `gitlab_hosts` field to both global and project Config structs
- Validate entries at load time (reject scheme, path, port, empty)
- Add `ParseOptions` / `ParseSourceWithOptions` to thread hosts into parser
- Add `isGitLabHost()` helper combining built-in + custom host detection
- Extend `InstallContext` interface with `GitLabHosts()` method
- Update all ParseSource call sites (install, search, update, server)
- Add JSON schemas for both config files
- Add unit tests for config validation and source parsing
- Add E2E runbook for devcontainer verification
- Document in configuration reference and URL formats appendix
Phase transitions during batch update (e.g. pull repos → update skills) were
printing separate PhaseHeader lines that created a second visible progress bar.
Now phases use ProgressBar.SetHeader() which overwrites the header line in place
via ANSI cursor-up, keeping a single continuous bar from start to finish.
colorSkillPath() and colorSkillPathBold() used Color("241")~Color("249")
gradient for subdirectory segments — fixed palette grays that render
inconsistently across terminal themes. Replace with tc.Dim (SGR faint).
\033[90m (bright black) renders too dark on many terminals and themes.
Replace with \x1b[0;2m (SGR dim attribute) which adapts to any foreground.
Changes:
- Add Dim constant and DimText() helper in internal/ui
- Replace all pterm.Gray() calls with DimText() in pterm.go
- Replace all ui.Gray references with ui.Dim across cmd/skillshare/
- Replace fixed 256-color grays (Color("247"/"242")) with lipgloss
.Faint(true) in TUI styles (tui_colors.go, list_tui.go, log_tui.go)
- Fix progress bar layout: put count after % at fixed position,
title last (truncated) — prevents count from being pushed off-screen
- Extract duplicate renderBar() from diff.go and search_batch.go
into shared ui.RenderInlineBar() helper
- Add -j short flag to wants_machine_output() in devcontainer wrapper,
preventing stderr banner noise for `skillshare list -j` etc.
- Show tracked repo name badge on skill items so filtered results remain
distinguishable when group headers are absent. Two tracked skills from
different repos now render with their repo origin visible.
Support key:value tag syntax in the `/` filter input for precise
skill filtering by type, group directory, and repo name:
t:tracked g:security audit
→ type=tracked AND group contains "security" AND free text "audit"
Tags: t:/type: (tracked/remote/local/github), g:/group: (substring),
r:/repo: (substring). Multiple tags use AND logic. Unknown tags
gracefully degrade to free text. Optional `_` prefix on type values
(e.g. t:_tracked) and short alias t:track are accepted.
Filter input placeholder and help line update to show available tags
when filtering mode is active.
- Skip group separator lines when all items belong to one group
- Fix row truncation: use ANSI-aware xansi.Truncate instead of
stripping ANSI codes then counting runes (lost color + wrong width)
- Account for bodyStyle padding when calculating text truncation width
- Add MaxWidth to prevent lipgloss from wrapping long rows
- Add repo-grouped layout with separator lines (matching list TUI)
- Use custom auditDelegate with compact single-line rows and truncation
- Sort by repo key (tracked first) then severity within each group
- Widen left panel from 25%/[25,45] to 36%/[30,46] to prevent wrapping
- Dynamically calculate panel height based on actual footer line count
instead of hardcoded overhead, maximizing list space
- Auto-skip group separator items on navigation
The audit summary used 10+ distinct colors on a single screen,
making it hard to focus on actionable information.
Changes:
- Threats line: remove per-category rainbow colors (8 colors → dim/bold)
- Severity c/h/m/l/i: zero values now gray, only non-zero get color
- Policy line: dim metadata (only STRICT/LEGACY get warning yellow)
- Passed count: no longer green (normal state needs no emphasis)
- Remove unused categoryStyle() and categoryColorCLI() functions
Design principle: quiet gray baseline with color only for items
that require user attention (failed count, aggregate risk).
- Add group separators: tracked repos and standalone skills are visually
grouped with dim header lines showing repo name and count
- Compact skill paths: strip tracked repo prefix, show at most last 2
path segments in list rows (full path in detail panel)
- Auto-skip group headers on navigation (up/down/page)
- Replace split Source/Sync sections with unified Details section,
removing duplicate info already shown in header
- Narrow left panel ratio (42% → 36%) for more detail space
- Separator "/" without spaces for tighter list rows
- Rename local group to "standalone" to avoid confusion with local badge
- Adjust renderFactRow label width (9 → 12) for longer labels
- Bold skill name in header for better distinction from list items
- Add spacing between name and metadata line
- Show full source URL instead of truncating at 50 chars
- Rename "Overview" section to "Description" to match frontmatter field
The detail panel header was rendered on L00 (same row as the list title),
making the skill name invisible. Push content to L01 with a leading newline
and use colorSkillPath for consistent group/name coloring matching the left
panel. Compress status/date/targets into a single metadata line to save
vertical space. Show full source URL and synced targets in Quick Facts.
Also suppress devcontainer stderr redirect message in --json/--format modes
and fix audit summary field name (analyzerCount → activeAnalyzers).
Keep sync dry-run diagnostics on stdout by default to avoid non-JSON behavior regressions. Introduce sync.DiagOutput so JSON mode can silence diagnostics via io.Discard at command entry and restore after execution. Update search JSON integration assertion to match fully silent progress behavior.
JSON mode stdout was already pure JSON, but stderr still emitted
progress lines (e.g. "Discovering skills...", "Found N local skill(s)")
which broke `2>&1 | jq .` pipelines. Remove the else-branch stderr
writes so --json mode is fully silent except for stdout JSON output.
Extract buildTrackedRepoJSON() that runs git.IsDirty concurrently via
goroutines + WaitGroup instead of sequential subprocess spawns per repo.
Also deduplicates the tracked-repo JSON loop between global and project
status paths, and optimizes skill counting to a single pass with a map.
- Extract writeJSONResult() to replace 5 identical write+silent-error trailers
- Replace local isRepoDirty() with existing git.IsDirty() (8 call sites)
- Use defer for suppressUIToDevnull restore instead of manual calls at each
return site in install.go and update.go (prevents stdout leak on new paths)
- Fix ResolvePolicy always filling EnabledAnalyzers, which broke the
nil-means-all contract for ForPolicy; add EffectiveAnalyzers() for display
- Simplify collectOutputJSON double map allocation
- Remove unnecessary string conversion in writeJSONError
collect --json and sync --json returned the raw error after writing
JSON, causing main() to print a duplicate plain-text error. Wrap with
jsonSilentError so main() exits non-zero silently.
Also fix sync --json skipping backup output that would corrupt stdout.
updateTrackedRepo and updateRegularSkill now return (updateResult, error)
instead of just error, so callers (including project mode and JSON output)
can accurately report updated/skipped/securityFailed/pruned counts.
Adapt cmdUpdateProject, cmdUpdateProjectBatch, updateAllProjectSkills,
and list_project.go TUI action to the new signatures.
suppressUIToStderr was redirecting UI to stderr, but in environments
where stdout and stderr share the same terminal (e.g. docker exec),
all the spinner/progress/header output was still visible alongside
the JSON. Replace with suppressUIToDevnull which opens os.DevNull
for both os.Stdout and ui.ProgressWriter, producing zero visible
noise in --json mode.
Also add status --json support for project mode, reusing the same
JSON schema as global mode (source, skill_count, tracked_repos,
targets, audit, version).
install --json: logo, spinners, and step output leaked to stdout,
corrupting machine-parseable JSON. Add suppressUIToStderr() around the
entire install flow, restoring stdout before writing JSON.
diff --project --json: spinner and progress display polluted stdout.
Skip spinner and progress creation in JSON mode, matching the existing
cmdDiffGlobal pattern.
uninstall --json: five error paths (discovery failure, no skills found,
glob detection, validation, preflight) returned plain-text errors instead
of JSON error envelopes. Wrap each with writeJSONError().
Add 8 integration tests (5 new failure cases + 3 confirming existing
behavior) with an assertPureJSON helper that validates stdout contains
only valid JSON with no leading/trailing noise.
The --json addition accidentally removed the guard that rejects
unexpected positional arguments in project mode. Restore it so
`skillshare status --project foo` correctly returns an error
instead of silently ignoring the extra argument.
writeJSONError now returns a jsonSilentError sentinel that main()
recognises — it exits with code 1 without printing plain-text output
to stdout. This fixes a regression where --json errors (config load
failure, missing source dir, discovery failure) returned exit 0.
All writeJSONError call sites changed from the broken pattern:
writeJSONError(err); return nil // exit 0, wrong
to:
return writeJSONError(err) // exit 1, correct
Also applied the same fix to update.go error paths which had the
older pattern of writeJSONError(err) followed by return err (which
would print both JSON and plain text).
Added regression tests for sync and install error paths verifying
both non-zero exit code and valid JSON error output on stdout.
Address code review feedback from PR #67:
- Move all dry-run diagnostic messages (internal/sync) from stdout to
stderr so they don't pollute JSON output
- Suppress UI output (spinners, headers, warnings) in uninstall --json
mode by adding jsonOutput guards across all phases
- Return nil after writeJSONError to prevent dual output (JSON + plain
text error) in install and sync commands
- Handle json.MarshalIndent error in writeJSONError with stderr fallback
- Merge duplicated discovery logic (JSON vs non-JSON branches) in sync,
sync_project, diff, and collect using nullable spinner pattern
- Remove checkRepoDirty alias in status.go, call isRepoDirty directly
- Remove extractJSON test workaround — tests now assert stdout is valid
JSON directly, enforcing the clean-stdout contract
- Replace hasFlag loop with slices.Contains (stdlib)
- Deduplicate checkRepoDirty → delegate to isRepoDirty
- Add nil-receiver guard to diffProgress.stop() for consistency
- Return explicit error for status --json in project mode
- Use consistent error message in sync --json source-not-found path
Improve all 5 active skills with pushy descriptions for better
triggering accuracy, following devcontainer as the gold standard.
- changelog: add trigger scenarios (release notes, version prep)
- cli-e2e-test: add trigger scenarios (runbook, E2E validation)
- codebase-audit: add 3 new audit dimensions (handler split, oplog
coverage, web API consistency) and trigger scenarios
- implement-feature: add project patterns reference (handler split,
dual-mode, TUI, web API, oplog) and trigger scenarios
- update-docs: expand scope to all 7 doc categories with code-to-doc
mapping guide and trigger scenarios
Also remove empty .skillshare/skills/frontend/ directory.
Detect local drift (modified/missing/added files) in installed skills
by comparing current SHA-256 hashes against stored .skillshare-meta.json
records. Skills without metadata are flagged as unverifiable warnings.
Replace bordered boxes around Source/Sync sections with simple
title + indented rows. Reserves brand yellow solely for selected
item indicator, reducing visual noise in the detail panel.
- Add contentEqual() byte comparison for copy-mode idempotency check:
re-running sync extras no longer marks identical copies as conflicts
- Restore mode default in CLI handler so display shows "(merge)"
instead of "()" for targets with no explicit mode
- Fix bug: pass `rest` (not `args`) to cmdSyncExtras in --all path
- Return error from cmdSyncExtras when totalErrors > 0
- Remove empty if-block dead code in syncOneExtraFile
- Remove redundant mode default (SyncExtra already defaults to merge)
- Consolidate capitalize/capitalizeFirst into single Unicode-safe helper
- Remove trivial copyExtraFile wrapper, call copyFile directly
- Warn when --all is used in project mode (extras are global only)
- Cache os.UserHomeDir() at package level for shortenPath
- Use source file set instead of per-file os.Stat in pruneExtraOrphans
Route `skillshare sync extras` to new cmdSyncExtras handler that
iterates config.Extras, calls sync.SyncExtra per target, and logs
to oplog. `skillshare sync --all` runs normal skill sync followed
by extras sync in one invocation.
- Use existing boolPtr() helper instead of inline *bool construction
- Add oplog instrumentation to cmdTUIToggle for operation history
- Pass pre-loaded cfg to shouldLaunchTUI in diff.go and backup.go
to avoid redundant config.Load() calls
The old applyDetailScroll embedded a scroll indicator inside the panel
content, consuming panel height and causing MaxHeight to clip the last
visible lines. Long lines that visually wrapped also broke the scroll
line-count calculation.
Replace with wrapAndScroll (hardWrapContent + applyDetailScrollSplit)
which hard-wraps content for accurate line counts and returns scroll
info separately for display in the help bar. Extract appendScrollInfo
helper to eliminate repeated if-append boilerplate across all TUIs.
Affects: audit, audit-rules, log, diff, restore TUIs (both horizontal
and vertical layouts).
Header, findings, and summary box were visually cramped with no
blank lines separating them. Add breathing room between:
- header box and first finding (single-skill / path mode)
- last arrow line and summary box
- logical groups inside summary box (policy / counts / severity / aggregate / note)
Apply per-category ANSI colors to the Threats breakdown in the CLI
summary box, matching the TUI footer palette. Add Purple, BrightRed,
OrangeAlt, BrightBlue color constants to internal/ui. Non-TTY output
remains plain text.
Labels use dim style while values use bold semantic colors, making
counts visually prominent. Threat category breakdown now colors each
category independently (injection=red, exfiltration=orange, etc.)
instead of uniform yellow, so users can distinguish threat types at
a glance.
Surface per-category finding counts (e.g., injection:3 exfiltration:2)
in CLI summary, TUI footer, markdown report, JSON output, and web API.
Adds Result.CountByCategory(), formatCategoryBreakdown() with compact
mode for TUI, and byCategory field to all audit summary structs.
Previously the Phase 2 finding fields (ruleId, analyzer, category,
confidence, fingerprint) were only emitted in JSON and SARIF output.
This propagates them to CLI text, TUI detail panel, Markdown reports,
Server API responses, and the React frontend — each channel showing
the subset most useful for its audience.
- Server API: all 5 fields (omitempty) in auditFindingResponse
- CLI text: dim [ruleID / analyzer] line between severity and snippet
- TUI: cyan ruleID / analyzer / category line + search index
- Markdown: Rule ID and Category table columns
- Frontend: ruleId · analyzer · category dim metadata line
LEGACY dedupe label used Gray (ANSI 90) which is near-invisible on dark
backgrounds — switch to Yellow for both CLI and TUI. Add Gray color to
separator and label text (dedupe:, analyzers:) so colored values stand
out from structural punctuation.