refactor: both tools import the same fragments; scope code comments by path
Codex reads ~/.codex/AGENTS.md, not ~/.agents/AGENTS.md, so the file generated there last commit was inert. Both tools support @path imports, which removes the generate-and-drift step entirely. code-comments.md moves to ~/.claude/rules/ with paths frontmatter, so its 24 lines load only when a source file is read.
This commit is contained in:
+3
-5
@@ -21,11 +21,9 @@
|
||||
".claude/writing.md".source = "${agent-skills}/claude-md/writing.md";
|
||||
".claude/operating.md".source = "${agent-skills}/claude-md/operating.md";
|
||||
|
||||
# Codex has no @import, so the fragments are concatenated into one file.
|
||||
".agents/AGENTS.md".text = builtins.concatStringsSep "\n" [
|
||||
(builtins.readFile "${agent-skills}/claude-md/operating.md")
|
||||
(builtins.readFile "${agent-skills}/claude-md/writing.md")
|
||||
];
|
||||
# Path-scoped: loads only when Claude reads a matching source file.
|
||||
".claude/rules/code-comments.md".source = "${agent-skills}/claude-md/code-comments.md";
|
||||
|
||||
};
|
||||
}
|
||||
# Hook wiring lives in ~/.claude/settings.json, which this module does not own.
|
||||
|
||||
Reference in New Issue
Block a user