feat: support claude.local.md for local-only documentation

Add support for claude.local.md and .claude/claude.local.md as local-only
alternatives to CLAUDE.md. These files are intended to be gitignored for
personal customizations that should not be committed to the repo.

Changes:
- Update CheckAgentDocumentation to detect claude.local.md files
- Update CheckLegacyBeadsSlashCommands to check claude.local.md files
- Update CheckDocumentationBdPrimeReference to check claude.local.md files
- Add fix message mentioning claude.local.md as an option
- Add test cases for claude.local.md support

Closes #488

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-14 17:20:59 -08:00
parent 1b5efd5d47
commit 03e7d7c650
4 changed files with 59 additions and 0 deletions

View File

@@ -22,6 +22,9 @@ func CheckLegacyBeadsSlashCommands(repoPath string) DoctorCheck {
filepath.Join(repoPath, "AGENTS.md"),
filepath.Join(repoPath, "CLAUDE.md"),
filepath.Join(repoPath, ".claude", "CLAUDE.md"),
// Local-only variants (not committed to repo)
filepath.Join(repoPath, "claude.local.md"),
filepath.Join(repoPath, ".claude", "claude.local.md"),
}
var filesWithLegacyCommands []string
@@ -71,11 +74,15 @@ func CheckLegacyBeadsSlashCommands(repoPath string) DoctorCheck {
// CheckAgentDocumentation checks if agent documentation (AGENTS.md or CLAUDE.md) exists
// and recommends adding it if missing, suggesting bd onboard or bd setup claude.
// Also supports local-only variants (claude.local.md) that are gitignored.
func CheckAgentDocumentation(repoPath string) DoctorCheck {
docFiles := []string{
filepath.Join(repoPath, "AGENTS.md"),
filepath.Join(repoPath, "CLAUDE.md"),
filepath.Join(repoPath, ".claude", "CLAUDE.md"),
// Local-only variants (not committed to repo)
filepath.Join(repoPath, "claude.local.md"),
filepath.Join(repoPath, ".claude", "claude.local.md"),
}
var foundDocs []string
@@ -103,6 +110,10 @@ func CheckAgentDocumentation(repoPath string) DoctorCheck {
" • Run 'bd onboard' to create AGENTS.md with workflow guidance\n" +
" • Or run 'bd setup claude' to add Claude-specific documentation\n" +
"\n" +
"For local-only documentation (not committed to repo):\n" +
" • Create claude.local.md or .claude/claude.local.md\n" +
" • Add 'claude.local.md' to your .gitignore\n" +
"\n" +
"Recommended: Include bd workflow in your project documentation so\n" +
"AI agents understand how to track issues and manage dependencies",
}