Skip to content

LLM instructions: where the repos live, so finding one is not a search - #85

Open
landsman wants to merge 1 commit into
mainfrom
rule-where-repos-live
Open

LLM instructions: where the repos live, so finding one is not a search#85
landsman wants to merge 1 commit into
mainfrom
rule-where-repos-live

Conversation

@landsman

Copy link
Copy Markdown
Owner

A new rule file plus its row in the index.

Why

Asked to "update my landsman/config repo", the agent ran

find ~ -maxdepth 3 -type d -name config -not -path "*/Library/*"

instead of opening ~/projects/landsman/config. The name in the request was already the path, and the layout is not written down in this repo or any other, so there was nothing to read and the sweep was the only move left.

What it says

~/projects/<owner>/<repo>, one level deeper for a client with several products (softopus/mvcr/mvcr-web-be), github/ and codeberg/ as the exceptions holding other people's clones. ~ because the path differs per platform — /Users/landsman on macOS, /home/landsman on Kubuntu — and both boxes are in daily use.

The find is the part worth banning

Not for speed. This repo keeps git worktrees in .claude/worktrees/ and has three more registered under /private/tmp; git worktree list shows eight in total right now. A search matching on directory name reaches those before the real checkout, and an agent that edits a stale detached worktree produces a clean-looking diff in a place nothing will ever push. Not finding the repo fails loudly; that fails quietly.

Placement

Unconditional, and first in the table — it fires before any other rule can, since nothing else applies until the right directory is open. No paths: frontmatter: the trigger is a question, not a file, which is the test the index already states.

Checks

make lint claude-settings-test stow-test passes. shared/.claude/CLAUDE.md is the only place the rule list exists, so the index row is the whole wiring. Not verified: that /context shows it under Memory files — that needs a restarted session against the stowed copy, which is the check the index itself asks for after a layout change.

Asked to update landsman/config, the agent ran a `find` over $HOME
instead of opening ~/projects/landsman/config. The layout was never
written down anywhere, so it was guesswork by design.

The find is the part worth banning: worktrees under .claude/worktrees
and /private/tmp match on name, so it can return a detached copy of the
repo and the edits land somewhere that is never pushed.
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