mirror of
https://github.com/alirezarezvani/ClaudeForge.git
synced 2026-07-03 10:23: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/.
113 lines
3.9 KiB
Markdown
113 lines
3.9 KiB
Markdown
> Parent context: see the root [CLAUDE.md](../CLAUDE.md) for project-wide guidelines and behavioural rules.
|
|
> Chained import: `@../CLAUDE.md`
|
|
|
|
# Installation, Testing & Release
|
|
|
|
Operational guidance for installers, smoke tests, and release management.
|
|
|
|
## Test Installation Scripts
|
|
|
|
```bash
|
|
# macOS/Linux
|
|
./install.sh
|
|
# Choose option 1 (user-level) or 2 (project-level)
|
|
|
|
# Windows
|
|
.\install.ps1
|
|
# Same options as above
|
|
|
|
# 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
|
|
```
|
|
|
|
## Directory Layout After Install
|
|
|
|
```
|
|
~/.claude/ # user-level (project-level mirrors under ./.claude)
|
|
├── skills/
|
|
│ ├── claudeforge-skill/ # from skill/
|
|
│ │ ├── SKILL.md
|
|
│ │ ├── analyzer.py
|
|
│ │ ├── validator.py
|
|
│ │ ├── generator.py
|
|
│ │ ├── template_selector.py
|
|
│ │ ├── workflow.py
|
|
│ │ └── examples/
|
|
│ └── karpathy-guidelines/ # from skill/karpathy-guidelines/
|
|
│ └── SKILL.md
|
|
├── commands/
|
|
│ ├── enhance-claude-md.md
|
|
│ └── sync-claude-md.md
|
|
└── agents/
|
|
└── claude-md-guardian.md
|
|
```
|
|
|
|
## Smoke Test (run from repo root)
|
|
|
|
```bash
|
|
python3 - <<'PY'
|
|
import sys; sys.path.insert(0, 'skill')
|
|
from validator import BestPracticesValidator
|
|
from template_selector import TemplateSelector
|
|
from generator import ContentGenerator
|
|
|
|
assert BestPracticesValidator.MAX_RECOMMENDED_LINES == 150
|
|
for cfg in TemplateSelector.TEAM_SIZE_TEMPLATES.values():
|
|
assert cfg['target_lines'] <= 150
|
|
|
|
ctx = {'type':'fullstack','tech_stack':['typescript','python'],
|
|
'team_size':'medium','phase':'production','workflows':['cicd']}
|
|
out = ContentGenerator(ctx).generate_root_file()
|
|
assert len(out.splitlines()) <= 150
|
|
assert '## Behavioral Guidelines' in out
|
|
print('smoke ok')
|
|
PY
|
|
```
|
|
|
|
Run after any change to `skill/`, `command/`, or `agent/`.
|
|
|
|
## Manual End-to-End Tests
|
|
|
|
**Fresh project init:**
|
|
1. `mkdir test-project && cd test-project && git init && npm init -y`
|
|
2. Run `/enhance-claude-md`.
|
|
3. Confirm generated CLAUDE.md ≤ 150 lines, contains `## Behavioral Guidelines`, has tech detection right.
|
|
|
|
**Existing project enhance:**
|
|
1. Seed `CLAUDE.md` with one short section.
|
|
2. Run `/enhance-claude-md`; confirm quality score reported, missing sections proposed, `## Behavioral Guidelines` appended if absent.
|
|
|
|
**Guardian agent sync:**
|
|
1. Add a new dependency and create a new directory.
|
|
2. Open a new Claude Code session — `SessionStart` fires.
|
|
3. Confirm the agent updates Tech Stack / Project Structure and quality re-validates.
|
|
|
|
**Sync command:**
|
|
1. In a repo with stale CLAUDE.md references, run `/sync-claude-md`.
|
|
2. Confirm stale lines flagged, 150-cap enforced via split, root ↔ sub chain repaired, diff left staged for the user.
|
|
|
|
## Common Operations
|
|
|
|
**Update a reference template:** edit `skill/examples/<name>-CLAUDE.md`, then add a matching scenario to `skill/sample_input.json`.
|
|
|
|
**Update quality scoring:** edit `skill/analyzer.py` → `calculate_quality_score()`. Re-run the smoke test.
|
|
|
|
**Update installer:** edit `install.sh` / `install.ps1` (paths, copy logic, backup logic, hooks). Test both user-level and project-level on a throwaway directory.
|
|
|
|
## Release Process
|
|
|
|
1. Update `CHANGELOG.md` under a new version header.
|
|
2. Bump the version in `README.md`, `skill/SKILL.md`, and `.claude-plugin/plugin.json`.
|
|
3. `git tag -a vX.Y.Z -m "Release vX.Y.Z"`.
|
|
4. `git push origin vX.Y.Z`.
|
|
5. Create the GitHub release with a CHANGELOG excerpt.
|
|
|
|
Versioning is semver. See `docs/MIGRATION_V2.md` for the v1 → v2 upgrade path.
|