Skip to content

refactor(claude-code): remove duplicated settings table, translate hookify rules to EN, delete dead pre-bash hook#76

Merged
salimomrani merged 1 commit into
masterfrom
refactor/claude-scaffolding-cleanup
Apr 20, 2026
Merged

refactor(claude-code): remove duplicated settings table, translate hookify rules to EN, delete dead pre-bash hook#76
salimomrani merged 1 commit into
masterfrom
refactor/claude-scaffolding-cleanup

Conversation

@salimomrani

Copy link
Copy Markdown
Owner

Summary

  • CLAUDE.md.hbs: removed the ## Claude Settings table — it duplicated settings.json, violating Constitution Principle 3 (ProjectConfig = single source of truth). settings.json is now the only place where git.strategy + speckit.* live.
  • Hookify rules: translated from French to English (block-dangerous-rm, block-force-push, block-no-verify, warn-env-edit, warn-todo-fixme, stop-verify-tests, warn-no-test-before-commit). Aligns with the "docs → always English" convention.
  • Opt-in noise: warn-todo-fixme and warn-console-log now ship with enabled: false. Too noisy as defaults; opt-in via settings.local.json.
  • Dead hook removed: deleted hooks/pre-bash.sh.hbs + removed PreToolUse wiring from settings.json.hbs. Its only rule was "block npm install outside frontend/", which was low-value duplication of what the hookify block-* rules already cover. With the rule gone, the hook was a no-op — deleted per Principle 6 (no speculative abstractions).
  • Scope correction: initially flagged Bash(npm install) + Bash(npm run) as duplicated in permissions.allow — that was wrong. Without a wildcard, Bash(npm run) does not cover npm install. No permission changes.

Test plan

  • npm test → 423/423 pass (4 preset tests refactored to assert settings.json directly; hook tests updated for session-start.sh only)
  • npm run typecheck
  • npm run lint

…lete dead pre-bash hook

- CLAUDE.md.hbs: removed the `## Claude Settings` table — it duplicated
  settings.json (SSOT violation, Constitution Principle 3).
- Hookify: all rules translated from French to English for consistency.
- warn-todo-fixme + warn-console-log → `enabled: false` by default
  (opt-in via settings.local.json; too noisy as defaults).
- Deleted `hooks/pre-bash.sh.hbs` + removed PreToolUse wiring from
  settings.json.hbs. The only rule was "block npm install outside
  frontend/", which was low value; hookify block-* rules already cover
  bash safety. Empty hook violated Principle 6 (no speculative
  abstractions).
- Tests: 4 preset tests now assert settings.json values directly (SSOT)
  instead of CLAUDE.md table rows; hook tests updated for session-start
  only.
@salimomrani
salimomrani merged commit 2f35654 into master Apr 20, 2026
5 checks passed
@salimomrani
salimomrani deleted the refactor/claude-scaffolding-cleanup branch April 20, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant