claude/lib
Bastien Chanot da4e6b9590 feat(profile): add gstack on|off verb to lib/profile.sh
Centralize gstack toggling in the `profile` command without losing the
active-profile label.

  - `gstack on`  re-enables ALL parked gstack skills (moves
    skills-disabled/gstack__* back) but does NOT touch .active-profile,
    so the user layers full gstack on top of their current profile and
    the statusline label is preserved. Unlike `reset`, which clears the
    label to "none".
  - `gstack off` disables gstack skills not listed in the active profile;
    errors cleanly when no profile is active (needs one to know what to
    keep).

Refactor (behavior-preserving): extract three shared helpers
`enable_all_gstack`, `disable_gstack_not_in`, `parked_gstack_count` and
rewire `cmd_reset` + `cmd_set` to reuse them instead of duplicating the
symlink-toggle loops. Wire `gstack` into main() dispatch, usage(), and the
header usage block.

Docs: SKILL.md argument-hint, examples, and output-policy updated. The
generic `make profile cmd="gstack on"` target already covers Make usage.

Verified: shellcheck CLEAN, `bash -n` OK, 6-case test (help, bad-action,
off-with-no-profile, on, off-trim, on-cycle) with final assertion that the
live symlink state was restored exactly to its pre-test value.

Memory: capitalize BDR-018 (decision), LRN-024 (DRY helper-extraction
pattern), BLK-007 (6 gstack source skills ios-*/spec unlinked post
submodule bump — open follow-up), EVAL-002 (self-eval, false "full.profile
bug" flag corrected pre-edit). Backfill index drift: BDR-017, BLK-005/006.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 18:31:48 +02:00
..
profiles feat(skills): add pdf-translate — PDF to translated HTML via Vision 2026-05-26 03:38:16 +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(skills): add design-motion-principles from kylezantos 2026-05-25 22:40:23 +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): add gstack on|off verb to lib/profile.sh 2026-06-02 18:31:48 +02:00
toggle-external.sh fix(toggle-external): handle source-only state in enable 2026-05-06 17:09:21 +02:00