pilot-shell icon indicating copy to clipboard operation
pilot-shell copied to clipboard

impeccable design-review hook writes unformatted cache file that then blocks every commit's prettier pre-commit hook

Open ianrios opened this issue 2 months ago • 1 comments

What's happening

Every commit in a worktree the impeccable skill's design-review hook has scanned fails the repo's own prettier --check . pre-commit hook, on a file neither hook owns: .impeccable/hook.cache.json.

Why

  • .impeccable/hook.cache.json is excluded from git only via the worktree-local .git/info/exclude (not the repo's tracked .gitignore, and not a .prettierignore entry), so prettier --check . in the pre-commit hook still walks it.
  • The impeccable hook rewrites this cache file, unformatted, on every file edit it observes.
  • The two combine: any edit → impeccable rewrites the cache file unformatted → the next commit's prettier --check . fails on a file the developer never touched and doesn't own.

Impact

Recurred 4 times across two sessions (2026-09-04, then again 2026-09-08 on a different worktree in a different repo), each time requiring a manual prettier --write .impeccable/hook.cache.json immediately before the commit that had just failed on it. Not a one-off — it reproduces in any worktree impeccable has run in, on the next commit after any file edit.

Requested fix

Either:

  1. Have the impeccable hook write pre-formatted (prettier-compliant) JSON to its cache file, or
  2. Ship a .prettierignore entry for .impeccable/ alongside the skill, so an untracked tool cache file can't block a repo's own formatting gate.

Either fix removes the recurring manual intervention.

ianrios avatar Sep 08 '26 19:09 ianrios

Thanks @ianrios for reporting this and documenting the repeated formatter failures so concretely.

Resolved in Pilot Shell v11.0.2.

Pilot now installs the Impeccable CLI, skills, supporting agents, and detector with --no-hooks. Impeccable provider edit/stop hooks are an explicit per-project opt-in through /impeccable hooks on, or $impeccable hooks on in Codex. When hooks are enabled, their disposable cache defaults to ~/.pilot/cache/impeccable instead of the repository, while an existing user-configured cache root is preserved. A valid legacy .impeccable/hook.cache.json is also preserved and pretty-formatted once during migration.

Existing project hook registrations are left untouched because Pilot cannot reliably distinguish an older automatic registration from a later user opt-in. Fresh installs no longer activate those provider hooks. Thanks again for catching this.

maxritter avatar Sep 09 '26 13:09 maxritter