2.7 KiB
2.7 KiB
Reverse-Engineering Framework for Claude Code
A project scaffold for multi-session reverse-engineering projects with Claude Code. Keeps context coherent across sessions by storing everything in files — not in chat history.
Quick Start
- Copy this entire folder to your new project
- Put your legacy code into
legacy/(read-only, never modified) - Adapt
CLAUDE.mdto your project (update the goal description) - Adapt
docs/A_discovery/task.mdto your specific discovery goals - Start your first session with
/project:session-start
How It Works
The project has three phases, each in its own directory:
| Phase | Directory | Purpose |
|---|---|---|
| 1 — Discovery | docs/A_discovery/ |
Understand the legacy system |
| 2 — Planning | docs/B_planning/ |
Design the new system |
| 3 — Integration | docs/C_integration/ |
Build and migrate |
Each phase has a task.md (what needs to be done) and a status.md (where we are).
Decisions are tracked in docs/B_planning/decisions-log.md across all phases.
Session Workflow
Start a session: /project:session-start
- Claude reads the project state, summarizes it, and asks you for your session goal.
During a session: Work normally. Use these as needed:
/project:decision— Record an architectural or process decision/project:new-discovery— Create a new discovery document from template
End a session: /project:session-end
- Claude updates status, logs decisions, marks completed tasks, and lists open questions.
Switch phases: /project:phase-transition
- Only when all Definition-of-Done items in the current phase are checked off.
Key Principles
- Project lives in files, not sessions. Every insight, decision, and status update is written down.
- Structure before content. The scaffold exists before any analysis begins.
- Legacy code is read-only. The
legacy/folder is never modified. - Templates are read-only.
docs/templates/contains structural references, not working documents. - Decisions are append-only. Once logged, entries in
decisions-log.mdare never edited.
File Overview
CLAUDE.md — Project memory (Claude reads this first)
README.md — You are here
legacy/ — Legacy code (read-only)
docs/
A_discovery/ — Phase 1 working directory
B_planning/ — Phase 2 working directory + decisions log
C_integration/ — Phase 3 working directory
templates/ — Document templates (read-only reference)
rules/ — Constraints Claude follows automatically
.claude/commands/ — Slash commands for session workflow