all: read agent.md files too
too many agent rules files!
diff --git a/claudetool/about_sketch.txt b/claudetool/about_sketch.txt
index 7eeef98..fada880 100644
--- a/claudetool/about_sketch.txt
+++ b/claudetool/about_sketch.txt
@@ -106,7 +106,7 @@
## Customization and Preferences
- Sketch can remember preferences either by asking it to or by editing `dear_llm.md` files in the root directory or subdirectories.
- Use these files for high-level guidance and repository-specific information.
-- Sketch also respects most existing claude.md files and cursorrules files.
+- Sketch also respects most existing claude.md, agent.md, and cursorrules files.
- dear_llm.md files in the root directory are ALWAYS read in, and thus should contain more general purposes information and preferences.
- Subdirectory dear_llm.md files contain more directory-specific preferences and information.
diff --git a/claudetool/onstart/analyze.go b/claudetool/onstart/analyze.go
index 4b573d9..4b3fde2 100644
--- a/claudetool/onstart/analyze.go
+++ b/claudetool/onstart/analyze.go
@@ -147,6 +147,7 @@
if isRepoRootFile {
if (strings.HasPrefix(lowerFilename, "claude.") && strings.HasSuffix(lowerFilename, ".md")) ||
strings.HasPrefix(lowerFilename, "dear_llm") ||
+ (strings.HasPrefix(lowerFilename, "agent.") && strings.HasSuffix(lowerFilename, ".md")) ||
strings.Contains(lowerFilename, "cursorrules") {
return "inject"
}
@@ -166,7 +167,8 @@
// GuidanceFiles - other files that provide guidance but aren't critical enough to inject
// Non-root directory claude.md files, and other guidance files
- if !isRepoRootFile && strings.HasPrefix(lowerFilename, "claude.") && strings.HasSuffix(lowerFilename, ".md") {
+ if (strings.HasPrefix(lowerFilename, "claude.") && strings.HasSuffix(lowerFilename, ".md")) ||
+ (strings.HasPrefix(lowerFilename, "agent.") && strings.HasSuffix(lowerFilename, ".md")) {
return "guidance"
}