Skip to content

Commit b5232ac

Browse files
committed
Replace the CLAUDE.md mirror rule with a retirement rule
The generator no longer emits .github/CLAUDE.md, so the byte-equality command rule is obsolete. A native file_absent rule fails closed on any recurrence (verified against both symlink and regular-file forms). Restore the repository root CLAUDE.md to a symlink: it is not generator output and no installer consumes this repository. Signed-off-by: Alexey Zhokhov <[email protected]>
1 parent 5b9d1e4 commit b5232ac

2 files changed

Lines changed: 12 additions & 79 deletions

File tree

‎.alint.yml‎

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@
1818
# inheritance predicates in `crates/velnor-actions-cli/tests/fixtures/`).
1919
#
2020
# Schema: alint config model (`version` + `rules`, each rule with
21-
# id/kind/level). The top-level `command` rule is trusted and checks only
22-
# each AGENTS.md's sibling CLAUDE.md mirror file, which Alint has no native
23-
# byte-equality rule to express. Its `pair` rule checks existence only;
24-
# the command below checks the regular-file type and identical bytes on the
25-
# CI Linux runner. Generated trees must not emit symlinks: plugin
26-
# installers reject packages that contain symlink entries.
21+
# id/kind/level). The retired `.github/CLAUDE.md` path uses the native
22+
# `file_absent` rule: the generator no longer emits it (plugin installers
23+
# reject symlink entries, and a second instruction copy next to AGENTS.md
24+
# carries no benefit), regeneration deletes stale copies, and the rule
25+
# fails closed on any recurrence.
2726
# Validate with the pinned alint binary: `alint validate-config`.
2827
# The 80-line function/method limit (§5, "using Clippy accounting") is NOT
2928
# expressed here — alint ships no function-level rule kind. It is enforced
@@ -69,25 +68,14 @@ rules:
6968
level: error
7069
message: "Repo-shape file is missing (rust-quality-contract §1)"
7170

72-
# Run against each real AGENTS.md and check its sibling. `pair` only checks
73-
# partner existence and cannot enforce file type or byte equality; this
74-
# trusted command requires a regular (non-symlink) file with bytes
75-
# identical to AGENTS.md. `.github/` is generated output owned by the
76-
# pinned generator and verified byte-exact by the generation-diff job,
77-
# so it stays out of this maintained-file rule.
78-
- id: claude-is-agents-copy
79-
kind: command
71+
# The generator retired `.github/CLAUDE.md` (see the policy header);
72+
# this native absence rule fails closed on any recurrence, file or link.
73+
- id: no-github-claude-md
74+
kind: file_absent
8075
paths:
81-
include: ["**/AGENTS.md"]
82-
exclude: [".github/**"]
83-
command:
84-
- sh
85-
- -c
86-
- 'dir=$(dirname "$1") && test -f "$dir/CLAUDE.md" && test ! -L "$dir/CLAUDE.md" && cmp -s "$dir/CLAUDE.md" "$1"'
87-
- alint-claude-mirror
88-
- "{path}"
76+
include: [".github/CLAUDE.md"]
8977
level: error
90-
message: "Each AGENTS.md must have a sibling CLAUDE.md regular file with identical bytes"
78+
message: ".github/CLAUDE.md is retired; AGENTS.md is the single instruction file"
9179

9280
# Keep instruction files concise so they fit in agent context by default.
9381
- id: agent-instructions-max-lines

‎CLAUDE.md‎

Lines changed: 0 additions & 56 deletions
This file was deleted.

‎CLAUDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

0 commit comments

Comments
 (0)