docs: refresh README/docs/examples + install scripts for waves 1-4

User-facing documentation drifted behind several waves of feature work
(plugin manifest, hooks, sync command, --weekly, audit skills, Karpathy
skill, CLAUDE.local.md tier, layered hook config). Refresh + fix one
real install bug. Surgical edits only — no rewrites.

README.md:
  - "What's New" block now reflects the plugin manifest, --weekly,
    InstructionsLoaded hook, AGENTS.md interop, CLAUDE.local.md tier,
    layered hook config, and the fail-closed guardian.
  - "What's Included" expanded from 5 numbered bullets to a structured
    list grouping the 5 skills (incl. three forked audit skills),
    2 slash commands, 1 agent, and 3 hook scripts.
  - Components Deep Dive: /sync-claude-md and the guardian's fail-closed
    contract now documented.
  - Project Status: 1.0.0 -> 2.1.0; Quick Stats updated to reflect
    actual component counts.
  - Acknowledgments: attribution to MIT-licensed forrestchang and
    shanraisshan source repos for adapted patterns.

docs/ARCHITECTURE.md, docs/QUICK_START.md, docs/TROUBLESHOOTING.md,
docs/INSTALLATION.md, examples/modular-setup.md, examples/integration-
examples.md:
  - Every "20-300 lines" / ">300 lines" / "exceeds 300 lines" reference
    rewritten to the actual 150-line hard cap.
  - Every ls/Remove-Item path that pointed at the legacy
    ~/.claude/commands/enhance-claude-md/ bundle now points at the
    top-level enhance-claude-md.md + sync-claude-md.md files.
  - integration-examples.md line-bounds shell guard now uses 20..150.

docs/CLAUDE.md:
  - Install-verify ls list extended with the three new audit-skill
    directories so docs match what install.sh actually creates.

install.sh + install.ps1 (REAL FIX, not just docs):
  - The three forked audit skills (claude-md-drift-audit, link-check,
    dependency-rescan) were registered in plugin.json but never copied
    by the direct-install path. Both installers now iterate over them
    after the karpathy-guidelines block, mirroring the same backup +
    nested-duplicate-cleanup pattern. Banner section and uninstall
    instructions list all 5 skills.

Verified:
  - All 5 CLAUDE.md files in this repo still <= 150 lines after edits.
  - install.sh passes bash -n syntax check.
  - Plugin manifest still resolves all 8 referenced paths on disk.
  - README invariants present: 2.1.0, --weekly, hooks/hooks.json,
    both source-repo attributions, three audit skill names.
  - Stale-claim sweep: zero "20-300" / ">300" / "exceeds 300" refs
    remain in docs/ or examples/.
This commit is contained in:
Claude
2026-05-19 01:41:56 +00:00
parent 45767e8840
commit e45065e8ba
10 changed files with 120 additions and 51 deletions
+7 -6
View File
@@ -211,9 +211,10 @@ def calculate_quality_score(self) → int:
**Validation Categories:**
1. **Length Validation**
- Recommended: 20-300 lines
- Warning: 300-400 lines (suggest modular)
- Error: < 20 or > 400 lines
- Recommended: 20120 lines (sweet spot)
- Warning: 120150 lines (approaching cap)
- **Hard cap: 150 lines** — enforced deterministically by `hooks/validate-claude-md.py` on `PostToolUse(Edit|Write)` *and* `InstructionsLoaded`. Files over the cap must be split into chained sub-CLAUDE.md files.
- Exempt: any file whose basename ends in `.local.md` (personal-tier override).
2. **Structure Validation**
- Required sections: Core Principles, Tech Stack, Workflow
@@ -432,9 +433,9 @@ Triggers update if:
### File Size Limits
- Single file: Max 400 lines (prefer 300)
- Modular files: Each 150-300 lines
- Total project: Unlimited with modular
- Every CLAUDE.md: hard cap 150 lines (no exceptions outside `*.local.md`).
- Modular split via `@path/to/sub/CLAUDE.md` chain imports when content would exceed the cap.
- Total project: unlimited via modular chaining + `.claude/rules/*.md` for path-scoped guidance.
### Caching Strategy
+3
View File
@@ -19,6 +19,9 @@ Operational guidance for installers, smoke tests, and release management.
# Verify after install:
ls -la ~/.claude/skills/claudeforge-skill/
ls -la ~/.claude/skills/karpathy-guidelines/
ls -la ~/.claude/skills/claude-md-drift-audit/
ls -la ~/.claude/skills/claude-md-link-check/
ls -la ~/.claude/skills/claude-md-dependency-rescan/
ls -la ~/.claude/commands/enhance-claude-md.md
ls -la ~/.claude/commands/sync-claude-md.md
ls -la ~/.claude/agents/claude-md-guardian.md
+1 -1
View File
@@ -173,7 +173,7 @@ examples/
```bash
# macOS/Linux
ls -la ~/.claude/commands/enhance-claude-md/
ls -la ~/.claude/commands/enhance-claude-md.md ~/.claude/commands/sync-claude-md.md
# Windows
dir $env:USERPROFILE\.claude\commands\enhance-claude-md\
+1 -1
View File
@@ -256,7 +256,7 @@ Claude, invoke claude-md-guardian to update CLAUDE.md
### Tip 1: Use Modular Architecture for Large Projects
If your CLAUDE.md exceeds 300 lines, split it:
If your CLAUDE.md approaches or exceeds the 150-line cap, split it (or run `/sync-claude-md` to split for you):
```bash
/enhance-claude-md
+3 -3
View File
@@ -29,7 +29,7 @@ Common issues and solutions for ClaudeForge.
2. **Verify installation paths:**
```bash
# macOS/Linux
ls -la ~/.claude/commands/enhance-claude-md/
ls -la ~/.claude/commands/enhance-claude-md.md ~/.claude/commands/sync-claude-md.md
ls -la ~/.claude/skills/claudeforge-skill/
ls -la ~/.claude/agents/claude-md-guardian.md
@@ -119,7 +119,7 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
2. **Check file length:**
```bash
wc -l CLAUDE.md
# Recommended: 20-300 lines
# Hard cap: 150 lines. Sweet spot: 50-120.
# If > 300: Consider modular architecture
```
@@ -173,7 +173,7 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
**Symptoms:**
- Single CLAUDE.md generated for large project
- File exceeds 300 lines
- File exceeds the 150-line cap (validator hook will surface this)
**Causes:**
- Project type not detected as `fullstack`