Skip to content

feat: project detection heuristics for CLAUDE.md generation#1

Merged
futuregerald merged 9 commits intomainfrom
feat/project-detection
Feb 13, 2026
Merged

feat: project detection heuristics for CLAUDE.md generation#1
futuregerald merged 9 commits intomainfrom
feat/project-detection

Conversation

@futuregerald
Copy link
Owner

Summary

  • Adds detect.go with ProjectInfo struct and detectors for Go, Node.js (React, Next.js, AdonisJS, Svelte, Express), Rust, Python, Ruby, and PHP projects
  • detectProject(dir) reads project files (package.json, go.mod, Cargo.toml, etc.) to extract name, description, framework, and commands
  • applyProjectDetection() replaces {{...}} template placeholders with real values, inserts language-specific template snippets, strips unfilled placeholders, and removes empty sections
  • Updates generateConfigFile and generateFrameworkConfig in main.go to use detection for all targets (Claude Code, Cursor, Copilot, etc.)

Test Plan

  • 14 unit tests covering all detectors, template processing, placeholder stripping, empty section removal
  • Table-driven tests for Node.js framework detection priority (AdonisJS > Svelte > Next.js > React > Express > fallback)
  • Integration test with fstest.MapFS verifying full template processing pipeline
  • Manual verification: Go project detection, empty dir fallback, non-Claude target, dry-run output
  • Code review: 1 Critical + 6 Important findings addressed
  • Code simplifier: 6 recommendations applied

🤖 Generated with Claude Code

futuregerald and others added 9 commits February 13, 2026 11:43
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- reduce repetition in detectNodeProject with shared defaults
- fix extractTOMLString double-Trim bug with apostrophes
- rename shadowed info variable in detectKeyDirectories
- extract writeTestFile helper in tests
- consolidate Node framework tests into table-driven test
- remove redundant TestCommand in Rails branch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@futuregerald futuregerald merged commit 98ed9b2 into main Feb 13, 2026
1 check passed
@futuregerald futuregerald deleted the feat/project-detection branch February 13, 2026 21:33
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