Skip to content

rules: Lunatik's checks rule loads for the files it governs - #2744

Merged
lneto merged 1 commit into
masterfrom
claude_lunatik_checks_paths
Nov 27, 2026
Merged

lneto merged 1 commit into
masterfrom
claude_lunatik_checks_paths

Conversation

@lneto

@lneto lneto commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Claude Code loads .agents/rules/lunatik-checks.md when a session or an agent reads any file under .agents/ or an AGENTS.md, a skill and the mount's agent definitions among them, though the rule speaks of none of those, and every such read carries it.

Its paths now follow what it governs: the tools, .claude/, the CI, .agents/harness.conf and the rules. Read over the tree and both mounts, the change drops the skills, the AGENTS.md files, and the mount's agent definitions and reader cases, and matches no file it did not match before. luainkernel/harness#43 narrows the harness's own checks.md the same way (D177 C on luainkernel/harness#6). Nothing a script calls changes.

`.agents/rules/lunatik-checks.md` loaded on a read of any file under
`.agents/` or of an AGENTS.md, a skill or the mount's agent definitions
among them, none of which it speaks of. Its paths now follow what it
governs, the tools, `.claude/`, the CI, `.agents/harness.conf` and the
rules, as luainkernel/harness#43 narrows the harness's `checks.md`
(D177 C on luainkernel/harness#6). Read over the tree and both mounts
with git's glob pathspec, the change drops the skills, the AGENTS.md
files, and the mount's agent definitions and reader cases, and matches no
file it did not match before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lneto lneto added the complexity: small One line or one file, with a trivial or existing test label Nov 26, 2026
@lneto

lneto commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Note

This comment was written by an LLM, not a human.

Proof for head bcc4c6cb979b42ce2116de46016c0b9f47da4af4.

The files of the tree and of both mounts, harness/ and luaebpf/, that the rule's paths matched on origin/master and no longer match, and those they match now and did not, by git's glob pathspec, git ls-files --recurse-submodules -- ":(glob)<path>" for each path of the front matter:

dropped:
      1 .agents/skills/lunatik-cycle/
      1 .agents/skills/new-binding/
      1 .agents/skills/new-test/
      1 AGENTS.md
      1 harness/
      3 harness/.agents/agents/
      7 harness/.agents/agents/cases/lunatik-reader/
      1 harness/.agents/skills/explain-pr/
      2 harness/.agents/skills/implement-issue/
      1 harness/.agents/skills/merged/
      1 harness/.agents/skills/pr-prep/
      1 harness/.agents/skills/release/
      3 harness/.agents/skills/review-pr/
      1 luaebpf/
added:

Each line counts a directory's files, harness/ and luaebpf/ the AGENTS.md at their top. None of the dropped files is one the rule speaks of; what it governs, tools/checks/, .claude/, .github/workflows/ and .agents/harness.conf, still matches, and nothing is added.

@lneto
lneto merged commit 586cc2f into master Nov 27, 2026
6 checks passed
@lneto
lneto deleted the claude_lunatik_checks_paths branch November 27, 2026 00:49
lneto added a commit to luainkernel/harness that referenced this pull request Nov 27, 2026
The auto mode classifier refused the merge of luainkernel/lunatik#2744,
small, its CI passed and its proof posted, as "Destructive or Unwanted
Actions" in a session started by /clear and continue, and passed the
same command once the maintainer's words were in the conversation. A
merge on a proof sets no status before it runs, so nothing the session
does after a clear lets it through, and a small pull request waits on
him.

tools/merge.sh hands merge-guard.sh, as a hook input, the rebase merge
it runs, the head named, and runs it only where the guard exits 0, so a
narrow permissions.allow rule over it lets through what the guard
admits and nothing else: the command never carries MERGE_OK=1, which
the guard reads in the command alone, and the arguments are held to a
repository's name, a number and a full SHA. It reads the token from the
file it is handed, as tools/agent-review.sh does (#35), and prints
GitHub's answer, whose sha section 5 of the merged skill reads for the
status and the bumps. Sections 0 and 5 merge through it; a merge the
maintainer ordered in his own words keeps MERGE_OK=1 on the gh api call.
The merge-guard cases hold the guard to the command the script hands
it, the token in GH_TOKEN.

The rules go in the maintainer's own settings, not in a tracked file,
which would bind every session opened on the checkout.

Closes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lneto added a commit to luainkernel/harness that referenced this pull request Nov 27, 2026
The auto mode classifier refused the merge of luainkernel/lunatik#2744,
small, its CI passed and its proof posted, as "Destructive or Unwanted
Actions" in a session started by /clear and continue, and passed the
same command once the maintainer's words were in the conversation. A
merge on a proof sets no status before it runs, so nothing the session
does after a clear lets it through, and a small pull request waits on
him.

tools/merge.sh hands merge-guard.sh, as a hook input, the rebase merge
it runs, the head named, and runs it only where the guard exits 0, so a
narrow permissions.allow rule over it lets through what the guard
admits and nothing else: the command never carries MERGE_OK=1, which
the guard reads in the command alone, and the arguments are held to a
repository's name, a number and a full SHA. It reads the token from the
file it is handed, as tools/agent-review.sh does (#35), and prints
GitHub's answer, whose sha section 5 of the merged skill reads for the
status and the bumps. Sections 0 and 5 merge through it; a merge the
maintainer ordered in his own words keeps MERGE_OK=1 on the gh api call.
The merge-guard cases hold the guard to the command the script hands
it, the token in GH_TOKEN.

The rules go in the maintainer's own settings, not in a tracked file,
which would bind every session opened on the checkout, and each names
its script by the absolute path of the checkout sessions start in.
merge.sh runs the merge-guard.sh beside it, so a rule that matched the
relative `bash tools/merge.sh` in any directory would let a worktree
whose guard or script an edit changed decide a merge with no classifier;
the same holds of agent-review.sh, whose rules matched the relative
spelling since #35, and the skill now spells both from that checkout.

Closes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lneto added a commit to luainkernel/harness that referenced this pull request Nov 27, 2026
The auto mode classifier refused the merge of luainkernel/lunatik#2744,
small, its CI passed and its proof posted, as "Destructive or Unwanted
Actions" in a session started by /clear and continue, and passed the
same command once the maintainer's words were in the conversation. A
merge on a proof sets no status before it runs, so nothing the session
does after a clear lets it through, and a small pull request waits on
him.

tools/merge.sh hands merge-guard.sh, as a hook input, the rebase merge
it runs, the head named, and runs it only where the guard exits 0, so a
narrow permissions.allow rule over it lets through what the guard
admits and nothing else: the command never carries MERGE_OK=1, which
the guard reads in the command alone, and the arguments are held to a
repository's name, a number and a full SHA. It reads the token from the
file it is handed, as tools/agent-review.sh does (#35), and prints
GitHub's answer, whose sha section 5 of the merged skill reads for the
status and the bumps. Sections 0 and 5 merge through it; a merge the
maintainer ordered in his own words keeps MERGE_OK=1 on the gh api call.
The merge-guard cases hold the guard to the command the script hands
it, the token in GH_TOKEN.

The rules go in the maintainer's own settings, not in a tracked file,
which would bind every session opened on the checkout, and each names
its script by the absolute path of the checkout sessions start in.
merge.sh runs the merge-guard.sh beside it, so a rule that matched the
relative `bash tools/merge.sh` in any directory would let a worktree
whose guard or script an edit changed decide a merge with no classifier;
the same holds of agent-review.sh, whose rules matched the relative
spelling since #35, and the skill now spells both from that checkout.
The rule runs that checkout's tree as it stands, as its hooks do, so an
edit under its mount still decides a merge with no classifier.

Closes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lneto added a commit to luainkernel/harness that referenced this pull request Nov 27, 2026
The auto mode classifier refused the merge of luainkernel/lunatik#2744,
small, its CI passed and its proof posted, as "Destructive or Unwanted
Actions" in a session started by /clear and continue, and passed the
same command once the maintainer's words were in the conversation. A
merge on a proof sets no status before it runs, so nothing the session
does after a clear lets it through, and a small pull request waits on
him.

tools/merge.sh hands merge-guard.sh, as a hook input, the rebase merge
it runs, the head named, and runs it only where the guard exits 0, so a
narrow permissions.allow rule over it lets through what the guard
admits and nothing else: the command never carries MERGE_OK=1, which
the guard reads in the command alone, and the arguments are held to a
repository's name, a number and a full SHA. It reads the token from the
file it is handed, as tools/agent-review.sh does (#35), and prints
GitHub's answer, whose sha section 5 of the merged skill reads for the
status and the bumps. Sections 0 and 5 merge through it; a merge the
maintainer ordered in his own words keeps MERGE_OK=1 on the gh api call.
The merge-guard cases hold the guard to the command the script hands
it, the token in GH_TOKEN.

The rules go in the maintainer's own settings, not in a tracked file,
which would bind every session opened on the checkout, and each names
its script by the absolute path of the checkout sessions start in.
merge.sh runs the merge-guard.sh beside it, so a rule that matched the
relative `bash tools/merge.sh` in any directory would let a worktree
whose guard or script an edit changed decide a merge with no classifier;
the same holds of agent-review.sh, whose rules matched the relative
spelling since #35, and the skill now spells both from that checkout.
The rule runs that checkout's tree as it stands, as its hooks do, so an
edit under its mount still decides a merge with no classifier.

Closes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity: small One line or one file, with a trivial or existing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant