claude/lib
Bastien Chanot ae1f218d3e feat(lib): surgical doc-commit helper + real-exec scope/exclusion tests
New lib/doc-commit.sh: surgical commit of ONLY the public-doc files doc-sync patched (passed as args), twin of memory-commit.sh with INVERSE scope. Δ1 dynamic pathspec filtered to changed paths (LRN-051); Δ2 fail-closed + LOUD scope guard rejecting .claude/** and CLAUDE.md (BDR-022) with a dedicated exit 4; Δ3 no hash anchoring (LRN-052); Δ4 `docs:` message. Hash-only on stdout for `doc_hash=$(...)` capture.

lib/tests/run-doc-commit.sh: 24 assertions, all REALLY EXECUTED on real git fixtures (no presumed behavior). T1a/b/c prove the guard CATCHES — forbidden path alone → exit 4, mixed legit+forbidden → refuse-all (nothing half-committed, offender named); T2 dynamic pathspec no-match filter; T3/T4 dangling + stale-index safety; T5/T6 idempotent + unsafe-state skip. shellcheck clean (both).

Part of the doc-sync coupled chantier (twin of BDR-034). Include + 2 orchestrator reorders follow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ho5EQCFTSvYamuRtVZpp2d
2026-06-27 00:38:18 +02:00
..
profiles refactor(skill): rename validate → web-validate 2026-06-25 01:29:36 +02:00
project-archetypes refactor(onboard,init-project): migrate file paths to .claude/ 2026-04-23 16:06:14 +02:00
tests feat(lib): surgical doc-commit helper + real-exec scope/exclusion tests 2026-06-27 00:38:18 +02:00
analyze-before-plan.md feat(analyze-before-plan): read-before bookend — scan memory (+code) before planning 2026-06-26 23:46:41 +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
capitalize-commit.md chore(lib): capitalize-commit include protocol 2026-06-26 12:46:51 +02:00
design-gate.md feat(design-gate): §4 anim-lib suggestion — suggest-only, non-blocking, stateless 1-line 2026-06-26 00:11:01 +02:00
design-tool-gate.sh fix(design-gate): resolve claude on a sanitized PATH (real cause of unknown) 2026-06-21 12:12:49 +02:00
detect-plugins.sh chore(caveman): purge plugin + always-on integration 2026-06-19 19:08:40 +02:00
doc-commit.sh feat(lib): surgical doc-commit helper + real-exec scope/exclusion tests 2026-06-27 00:38:18 +02:00
memory-commit.sh feat(lib): emit memory-commit hash on stdout + T6/T7 (stdout contract, idempotence) 2026-06-26 12:45:06 +02:00
profile.sh feat(profile): activate gstack skills on-demand per profile 2026-06-24 14:22:36 +02:00
toggle-external.sh feat(secrets): .env source-of-truth in ~/.claude + repo symlink 2026-06-21 11:44:47 +02:00