Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RuleOfCode v7.17.4 Commit Message Validation
# RuleOfCode v7.17.5 Commit Message Validation
# Config-driven validation with 1 pattern(s)
# husky v9+ native hook (no deprecated v8 boilerplate)

Expand Down Expand Up @@ -28,7 +28,7 @@ fi
if [ "$VALID" = false ]; then
echo "❌ Invalid commit message format!"
echo ""
echo "🏛️ RuleOfCode v7.17.4 Constitutional Commit Message Format:"
echo "🏛️ RuleOfCode v7.17.5 Constitutional Commit Message Format:"
echo " Your message must match one of the configured patterns"
echo ""
echo "Types: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert"
Expand Down Expand Up @@ -68,4 +68,4 @@ if [ "$EXEMPT" = false ]; then
fi
fi

echo "✅ Commit message format validated (RuleOfCode v7.17.4)"
echo "✅ Commit message format validated (RuleOfCode v7.17.5)"
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RuleOfCode v7.17.4 Constitutional Checkpoint (husky v9+ native hook)
echo "🏛️ RuleOfCode v7.17.4 Constitutional Checkpoint with lint-staged"
# RuleOfCode v7.17.5 Constitutional Checkpoint (husky v9+ native hook)
echo "🏛️ RuleOfCode v7.17.5 Constitutional Checkpoint with lint-staged"
npx lint-staged

# Run constitutional audit on staged files
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RuleOfCode v7.17.4 Constitutional Compliance Pre-Push Hook (husky v9+ native)
echo "🏛️ RuleOfCode v7.17.4 Constitutional Checkpoint - Pre-Push Mode"
# RuleOfCode v7.17.5 Constitutional Compliance Pre-Push Hook (husky v9+ native)
echo "🏛️ RuleOfCode v7.17.5 Constitutional Checkpoint - Pre-Push Mode"
echo "═════════════════════════════════════════════════════"

# Run full RuleOfCode audit before push
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@ All notable changes to RuleOfCode will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [7.17.5] - 2026-08-08

### 🐛 Fixed — three git laws were blind to linked worktrees

In a linked worktree (`git worktree add`) `<root>/.git` is a **file** holding `gitdir: …`,
and the shared config and hooks live in the main repository's git directory. Three laws
joined `.git/hooks` and `.git/config` onto the project root, found nothing, and reported
it as a violation:

- **Git Hooks Standards** — "Git hooks directory missing"
- **Branch Protection Standards** — "Unable to read Git configuration"
- **Git Hook Compliance** — "Git hooks directory not found"

A consumer hit this in a worktree whose husky hooks had **just blocked a push**: the
concern was met and the law said otherwise. The same commit scored 100/100 in the primary
checkout and 90/100 in the worktree.

A new shared resolver asks git (`rev-parse --git-common-dir`) instead of guessing the
layout, and honours **`core.hooksPath`** — a second trap, since husky moves hooks to
`.husky`, which makes `<gitdir>/hooks` the default rather than the answer. A relative
`core.hooksPath` resolves against the working-tree top level, which is what git itself
does. Verified with real `git worktree add` fixtures.

Worktrees are a standard git workflow; if you audit from one, this is the fix. No config
change needed.

## [7.17.4] - 2026-08-07

### 🐛 Fixed — `init` crashed instead of setting up when there is no terminal
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ruleofcode",
"version": "7.17.4",
"version": "7.17.5",
"description": "Constitutional-compliance CLI — audit a codebase against a catalog of laws and get one honest pass-or-fail verdict, with git hooks. Supports TypeScript, Angular and Python.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface HooksInstallOptions {
}

export class GitHooksInstaller {
private static readonly VERSION = '7.17.4';
private static readonly VERSION = '7.17.5';
private static readonly PACKAGE_JSON_FILE = 'package.json';
private static readonly HUSKY_DIR = '.husky';
private static readonly PRE_COMMIT_HOOK = 'pre-commit';
Expand Down
Loading