mirror of
https://github.com/alirezarezvani/ClaudeForge.git
synced 2026-07-03 02:13:15 -04:00
e45065e8ba
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/.
3.3 KiB
3.3 KiB
Integration Examples
Integrating ClaudeForge with CI/CD and development workflows.
GitHub Actions Integration
.github/workflows/validate-claude-md.yml:
name: Validate CLAUDE.md
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install ClaudeForge
run: |
curl -fsSL https://raw.githubusercontent.com/alirezarezvani/ClaudeForge/main/install.sh | bash
export PATH="$HOME/.claude/bin:$PATH"
- name: Validate CLAUDE.md
run: |
# Check file exists
test -f CLAUDE.md || exit 1
# Check minimum quality (requires Python validation)
python3 -c "
from skill.validator import BestPracticesValidator
content = open('CLAUDE.md').read()
validator = BestPracticesValidator(content)
results = validator.validate_all()
passed = sum(1 for r in results if r['passed'])
if passed < 4:
print(f'Quality check failed: {passed}/5 checks passed')
exit(1)
print(f'Quality check passed: {passed}/5 checks')
"
Pre-Commit Hook
.claude/hooks/pre-commit.sh:
#!/bin/bash
# Validate CLAUDE.md before commit
if [ -f "CLAUDE.md" ]; then
echo "Validating CLAUDE.md..."
# Check file length
lines=$(wc -l < CLAUDE.md)
if [ $lines -lt 20 ] || [ $lines -gt 150 ]; then
echo "Error: CLAUDE.md length ($lines lines) outside the 20-150 cap; run /sync-claude-md to split."
exit 1
fi
# Check required sections
for section in "Core Principles" "Tech Stack" "Workflow"; do
if ! grep -q "$section" CLAUDE.md; then
echo "Error: Missing required section: $section"
exit 1
fi
done
echo "✅ CLAUDE.md validation passed"
fi
Setup:
chmod +x .claude/hooks/pre-commit.sh
git config core.hooksPath .claude/hooks
Package.json Scripts
package.json:
{
"scripts": {
"validate:claude": "python3 -m skill.validator CLAUDE.md",
"update:claude": "echo 'Run: /enhance-claude-md in Claude Code'",
"precommit": "./.claude/hooks/pre-commit.sh"
}
}
Usage:
npm run validate:claude # Check CLAUDE.md quality
Team Onboarding Automation
scripts/onboard-developer.sh:
#!/bin/bash
# Onboard new developer with ClaudeForge
echo "Setting up ClaudeForge for new team member..."
# Install ClaudeForge
curl -fsSL https://raw.githubusercontent.com/alirezarezvani/ClaudeForge/main/install.sh | bash
# Verify CLAUDE.md exists
if [ ! -f "CLAUDE.md" ]; then
echo "No CLAUDE.md found. Run /enhance-claude-md in Claude Code to create one."
fi
echo "✅ ClaudeForge installed. Restart Claude Code to use."
CI/CD Pipeline Integration
GitLab CI (.gitlab-ci.yml):
validate_claude:
stage: validate
script:
- python3 -c "import sys; sys.path.insert(0, 'skill'); from validator import BestPracticesValidator; v = BestPracticesValidator(open('CLAUDE.md').read()); results = v.validate_all(); sys.exit(0 if all(r['passed'] for r in results) else 1)"
only:
- merge_requests
See also: