Docs: describe the core-mode pre-commit guard

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lexxandClaude Opus 5.5 committed 2026-11-06 15:57:38 +02:00
1 parent 5cce0e95d7
commit 32475b63bd
1 file changed
+3 -1
+3 -1
View File
@@ -38,7 +38,9 @@ bin/core-mode repo # back to tagged releases
It swaps the `composer.json` / `package.json` wiring, runs `down` with the old mode's Compose wrapper and `up` with the new one, then waits until the entrypoints have re-resolved core. Running it for the mode you're already in skips the edits and just restarts the stack — in repo mode, that's how you pick up a newly pushed tag. It swaps the `composer.json` / `package.json` wiring, runs `down` with the old mode's Compose wrapper and `up` with the new one, then waits until the entrypoints have re-resolved core. Running it for the mode you're already in skips the edits and just restarts the stack — in repo mode, that's how you pick up a newly pushed tag.
(`3dealer` has `bin/core-mode` and `bin/deploy`; they're app-agnostic, so other consumer apps can copy them as-is.) **Pre-commit guard.** The first time you run `bin/core-mode local` or `repo`, it sets `git config core.hooksPath .githooks`. That turns on a pre-commit hook (`bin/check-core-mode`) that blocks any commit with local-mode `composer.json`, `package.json` or either lockfile staged. You can keep working in local mode and commit everything else: just leave those four files unstaged (`git restore --staged composer.json composer.lock package.json package-lock.json`). If you already use a custom `core.hooksPath`, `core-mode` leaves it alone and warns you. In that case, call `bin/check-core-mode` from your own hook.
(`3dealer` has `bin/core-mode`, `bin/check-core-mode`, `.githooks/` and `bin/deploy`; they're app-agnostic, so other consumer apps can copy them as-is.)
### Day to day in local mode ### Day to day in local mode