feat(rules): rules/ directory symlinked into ~/.claude like the other dirs
Claude Code loads modular rule files from ~/.claude/rules/ (user scope, recursive, markdown, optional paths: frontmatter for lazy path-scoped loading — stable, symlink-supported). The repo had no rules/ at all, so the ctx7 setup had created ~/.claude/rules as a REAL directory outside version control — invisible to the repo, unreproducible on a new machine. - rules/README.md — doctrine: one rule per file; paths:-scoped extraction is the token win, always-on doctrine stays in CLAUDE.md - link.sh — rules added to the symlinked-dirs loop - .gitignore — rules/context7.md ignored (machine-owned: `ctx7 setup` (re)writes it, same treatment as skills/find-docs/) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XpphkdTosUzokBDNG7PToS
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1cd13e7a3d
commit
06391a6247
@@ -20,7 +20,7 @@ link_file() {
|
||||
link_file "$REPO/CLAUDE.md" "$CLAUDE/CLAUDE.md"
|
||||
link_file "$REPO/settings.json" "$CLAUDE/settings.json"
|
||||
|
||||
for item in hooks agents skills lib templates; do
|
||||
for item in hooks agents skills lib templates rules; do
|
||||
target="$CLAUDE/$item"
|
||||
if [ -L "$target" ]; then
|
||||
if [ "$(readlink "$target")" = "$REPO/$item" ]; then
|
||||
|
||||
Reference in New Issue
Block a user