diff --git a/hooks/core.yml b/hooks/core.yml index c08e755..d0f2063 100644 --- a/hooks/core.yml +++ b/hooks/core.yml @@ -1,7 +1,8 @@ # hooks/core.yml — byte-identical in the five owner .github repositories. # Loaded by each repository's lefthook.yml through `remotes` at a pinned tag. # Dispatcher only: every job calls a `just` recipe from the contract in -# standards/core.md C7.8. Repository jobs use their own names and never +# standards/core.md C7.10, run through `mise exec` so pinned tools are on PATH +# without shell activation. Repository jobs use their own names and never # redefine a job named here. min_version: 2.2.2 assert_lefthook_installed: true @@ -13,21 +14,21 @@ pre-commit: jobs: - name: core-fmt glob: "**/*.{ts,tsx,js,jsx,mjs,cjs,mts,cts,json,jsonc,yml,yaml,md,toml,css,html}" - run: just fmt {staged_files} + run: mise exec -- just fmt {staged_files} stage_fixed: true fail_text: "Formatting could not be applied; run `just fmt` and read the error." - name: core-lint glob: "**/*.{ts,tsx,js,jsx,mjs,cjs,mts,cts}" - run: just lint {staged_files} + run: mise exec -- just lint {staged_files} fail_text: "Lint failed on staged files; fix the findings and stage again." - name: core-secrets - run: just secrets-staged - fail_text: "A staged secret was found. Remove it; if it was ever pushed, rotate it." + run: mise exec -- just secrets-staged + fail_text: "Secret scan failed: either a staged secret was found (remove it; rotate it if it was ever pushed) or gitleaks is missing (run `mise install`)." - name: core-forbidden-files - run: just forbidden-files {staged_files} + run: mise exec -- just forbidden-files {staged_files} fail_text: "A forbidden or oversized file is staged (env file, key, kubeconfig, >5 MB)." - name: core-whitespace @@ -36,12 +37,12 @@ pre-commit: - name: core-workflows glob: ".github/workflows/*.{yml,yaml}" - run: just workflows {staged_files} + run: mise exec -- just workflows {staged_files} fail_text: "actionlint or zizmor rejected a workflow." - name: core-shell glob: "**/*.{sh,bash}" - run: just shellcheck {staged_files} + run: mise exec -- just shellcheck {staged_files} fail_text: "shellcheck findings in staged shell scripts." - name: core-agent-files @@ -49,32 +50,32 @@ pre-commit: - "AGENTS.md" - ".agents/**" - ".claude/**" - run: just agent-files + run: mise exec -- just agent-files fail_text: "Agent files are inconsistent (C8.3); run `just agent-files`." commit-msg: jobs: - name: core-conventional - run: just commit-msg {1} + run: mise exec -- just commit-msg {1} pre-push: piped: true jobs: - name: core-policy use_stdin: true - run: just hook-pre-push + run: mise exec -- just hook-pre-push fail_text: "Push refused. main changes only through a pull request (C2.1), or the pushed range failed the secret scan." - name: core-fast-check - run: just pre-push-check + run: mise exec -- just pre-push-check fail_text: "Fast pre-push checks failed; run `just check` for the full set." post-checkout: jobs: - name: core-deps-refresh - run: just deps-refresh + run: mise exec -- just deps-refresh post-merge: jobs: - name: core-deps-refresh - run: just deps-refresh + run: mise exec -- just deps-refresh diff --git a/hooks/owner.yml b/hooks/owner.yml index 591e109..3e855f3 100644 --- a/hooks/owner.yml +++ b/hooks/owner.yml @@ -4,9 +4,9 @@ pre-commit: jobs: - name: owner-privacy-identity - run: just privacy-identity + run: mise exec -- just privacy-identity fail_text: "The author or committer email is not the owner's GitHub no-reply address." - name: owner-privacy-staged - run: just privacy-staged + run: mise exec -- just privacy-staged fail_text: "A staged blob contains private material. Remove it and stage again." diff --git a/standards/core.md b/standards/core.md index eea3265..2011400 100644 --- a/standards/core.md +++ b/standards/core.md @@ -164,6 +164,10 @@ without a reason or a date is drift. Budgets: pre-commit under 3 seconds and pre-push under 30 seconds on a typical change. + + Every hook job, core and owner, runs as `mise exec -- just ` so the + repository's pinned tools are on PATH without shell activation. `mise` itself + must be on PATH on every machine that commits. - C7.11 Agents never skip hooks: no `LEFTHOOK=0`, no `--no-verify`, no `lefthook-local.yml`. Hooks are advisory for humans; rulesets, the direct-push guard and CI are the enforcement. diff --git a/standards/owner.md b/standards/owner.md index 890430f..2c5ed51 100644 --- a/standards/owner.md +++ b/standards/owner.md @@ -112,7 +112,7 @@ backlog row stays open rather than claiming a number. Hooks run through Lefthook, pinned in `mise.toml` as `"aqua:evilmartians/lefthook"` (C7.8). Each repository's `lefthook.yml` loads `hooks/core.yml` and `hooks/owner.yml` from this repository -through `remotes` at the annotated tag `hooks-v2`, and adds its own jobs under names that never +through `remotes` at the annotated tag `hooks-v3`, and adds its own jobs under names that never start with `core-` or `owner-`. Repositories migrate from the old `.githooks` launchers to Lefthook per core C7.8. @@ -189,7 +189,7 @@ listed: every repository has `runs.total_count: 0`. | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `.github` | C1.5 wiki and Projects on. C2.1 no ruleset. C2.3 settings still allow merge and rebase. C2.6 `delete_branch_on_merge=false` and a stale `chore/t3-project-icon` branch. C1.6 no MIT `LICENSE`. C2.2 and C5.1 no `check` workflow, so no required status check. C7.5 `install`, `lint`, `typecheck`, `test`, `hooks` and `agent-files` have nothing to run. | Owner applies the `main` ruleset and turns the merge settings to squash-only with branch deletion. Add an MIT `LICENSE`, a `checks.yml` running `just check`, and exception rows for the recipes that do not apply to a docs-only repository. Delete the stale branch. | | `deathpie` | C1.2 no description. C1.5 wiki and Projects on. C2.1 no ruleset. C2.6 stale `chore/t3-project-icon`. C1.6 no license. C7.5 and C7.7 no `justfile`, `mise.toml`, `.editorconfig` or `.gitattributes`. C8.1 no `AGENTS.md`. C2.2 no required check. | One pull request with the description, the ruleset and the same cheap skeleton as `.github`. Record C1.6 as an exception while the repository is a two-file profile README. | -| `deathpie-discord` | C2.1 no hook, guard or automerge workflow. C3.2 no `dependabot.yml`. C1.5 Projects on. C2.5 `save/opentofu-pilot-handoff` and three merged `chore/*` branches remain. C7.5 and C7.7 no `justfile`, `mise.toml`, `.editorconfig` or `.gitattributes`. | Add `lefthook.yml` loading the `hooks-v2` remotes, the two workflows, `dependabot.yml` for `github-actions`, the toolchain skeleton and `AGENTS.md` updates for the new recipes. Delete the `save/` and merged branches after confirming the handoff document exists. No CI: data-only. | +| `deathpie-discord` | C2.1 no hook, guard or automerge workflow. C3.2 no `dependabot.yml`. C1.5 Projects on. C2.5 `save/opentofu-pilot-handoff` and three merged `chore/*` branches remain. C7.5 and C7.7 no `justfile`, `mise.toml`, `.editorconfig` or `.gitattributes`. | Add `lefthook.yml` loading the `hooks-v3` remotes, the two workflows, `dependabot.yml` for `github-actions`, the toolchain skeleton and `AGENTS.md` updates for the new recipes. Delete the `save/` and merged branches after confirming the handoff document exists. No CI: data-only. | | `nsfw-model-testing` | C2.1 no hook, guard or automerge workflow. C3.2 no `dependabot.yml`. C5.1 no required check in a repository that ships a script. C8.1 no `AGENTS.md`. C7.5 and C7.7 no `justfile`, `mise.toml`, `.editorconfig` or `.gitattributes`. C1.5 Projects on. C2.5 stale `save/research-notes-prereinstall-20261029` branch. | Same protection and dependency files, plus `justfile` with `check` (`fmt-check`, `actionlint`, `zizmor`, PSScriptAnalyzer) and a `checks.yml`; `AGENTS.md` covering the model tree and the adult-content constraints. Delete the `save/` branch after the notes land in `docs/`. | | `sd-card-tools` | C2.1 no hook, guard or automerge workflow. C3.2 no `dependabot.yml`. C5.1 no required check. C8.1 no `AGENTS.md`, and the destructive-script rule has nowhere to live. Owner rule 5: `format-photos.sh` plans and asks for `FORMAT`, but `--yes` bypasses the word and there is no dry-run default. C7.7 no `.editorconfig` or `.gitattributes`. C1.5 Projects on. | Add protection, dependency and toolchain files with `check` = `fmt-check` plus `shellcheck`. Make `--dry-run` the default when `--yes` is absent, keep `FORMAT` as the interactive word, and state both in a new `AGENTS.md` with the `targets.conf` privacy rule. | | `wow-forever-settings` | C2.1 no hook, guard or automerge workflow. C3.2 no `dependabot.yml`. C5.1 no required check. C8.1 no `AGENTS.md`; the constraints live in README prose. C7.4 four Python helpers (`export_portable_settings.py`, `make_snapshot_linux.py`, `restore_snapshot_linux.py`, `compare_savedvariables.py`). Owner rule 5: restore and apply need a dry-run default and a confirmation word; `restore_snapshot_linux.py` has `--dry-run` only as an option. C7.7 `.gitattributes` has byte rules but no `* text=auto eol=lf`. C2.5 `docs/research-keyboard-party-invites` remains. | Add protection, dependency and toolchain files; `check` = `fmt-check`, `actionlint`, `zizmor`, `py_compile` until the migration. Port the helpers to Bun TypeScript one at a time, recording an exception for any that cannot move. Add the global `text=auto` line above the `/WTF/**` byte rules, and `AGENTS.md` with the dry-run and confirmation rules. |