Files
ruflo/v3/@claude-flow/guidance/scripts
Claude e06f273a1b feat: add CLAUDE.md generators, analyzer, and auto-optimizer
Generators (src/generators.ts):
- generateClaudeMd() - structured CLAUDE.md from project profile with
  language-specific invariants (TS, JS, Python, Rust, Go, Java) and
  framework rules (React, Next.js, Express, Django, etc.)
- generateClaudeLocalMd() - CLAUDE.local.md for personal overrides
  with machine notes, editor prefs, and experimental rules
- generateSkillMd() - Claude Code skills with YAML frontmatter
- generateAgentMd() - Agent definitions with YAML frontmatter
- generateAgentIndex() - Agent index.yaml grouped by category
- scaffold() - Full .claude/ directory structure generation

Analyzer (src/analyzer.ts):
- 6-dimension scoring (0-100 each, weighted composite):
  Structure (20%), Coverage (20%), Enforceability (25%),
  Compilability (15%), Clarity (10%), Completeness (10%)
- benchmark() - before/after comparison with per-dimension deltas
- autoOptimize() - iteratively applies high-priority suggestions
  with concrete patches, re-scores to verify improvement
- formatReport() / formatBenchmark() - human-readable output

Analysis of existing CLAUDE.md files:
- Root CLAUDE.md: 73/100 (C) -> 77/100 after optimization
- v3/CLAUDE.md: 64/100 (D) -> 78/100 after optimization
- Key findings: low rule density, oversized constitution section,
  missing Architecture section

Tests: 141 new tests (68 generators + 73 analyzer), 1229 total passing

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 20:48:36 +00:00
..