claude/lib
Bastien Chanot cb1e8cd814 feat(profile,statusline): show active profile in statusline via .active-profile cache
`bash lib/profile.sh current` is 12s+ — far too slow to call from the
statusline hook (runs on every keystroke). Add a one-line cache file at
`<repo>/.active-profile`, written by `cmd_apply` and `cmd_reset`. The
statusline reads the file directly with a single `head -n1`, no
sub-shell into `profile.sh`.

Behavior:
- `bash lib/profile.sh set <name>` (which ends in `cmd_apply`) and
  `bash lib/profile.sh apply <name>` both write `<name>` to
  `<repo>/.active-profile`.
- `bash lib/profile.sh reset` writes the literal `none`.
- Statusline inserts the cached profile name between the plan segment
  and the context-bar segment, e.g.
  `Opus 4.7 | claude (master) | Max | full | ████░░░░░░ 42% | 3m`.
- Missing or empty cache → statusline shows `?`.

Cache file is gitignored — it tracks runtime state, not source.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-21 05:14:12 +02:00
..
profiles fix(profiles): rename checkpoint to context-save in 5 profiles 2026-05-21 04:57:14 +02:00
project-archetypes refactor(onboard,init-project): migrate file paths to .claude/ 2026-04-23 16:06:14 +02:00
animation-lib-check.sh feat(animation): auto-install motion lib + detection across init/onboard/advisor 2026-04-27 15:32:46 +02:00
archetype-detector.md feat(archetypes): add project archetype library + detection algorithm 2026-04-21 22:37:07 +02:00
design-gate.md feat(animation): auto-install motion lib + detection across init/onboard/advisor 2026-04-27 15:32:46 +02:00
detect-plugins.sh feat(caveman): full install — plugin + standalone hooks + MCP scaffold 2026-05-03 23:02:47 +02:00
profile.sh feat(profile,statusline): show active profile in statusline via .active-profile cache 2026-05-21 05:14:12 +02:00
toggle-external.sh fix(toggle-external): handle source-only state in enable 2026-05-06 17:09:21 +02:00