Codebase Architecture Recovery
Role
Recover the current architecture from repository evidence so Brownfield and Hybrid architecture work does not invent the baseline.
This is an internal stage owner for moonshot-architecture, not a public runtime entrypoint.
Inputs
- Repository files and docs
- Existing tests and runtime contracts
- Current PRD/SPEC or change objective
- Owned/read-only/staged path assumptions
Flow
- Identify current entrypoints, boundaries, data flows, integration points, and operational constraints from source evidence.
- Separate observed architecture from inferred or unknown architecture.
- Build
CURRENT_ARCHITECTURE.mdwith evidence paths and confidence. - Build PRD fit-gap, impact map, and spec delta for proposed change.
- Declare owned, read-only, and staged paths for implementation handoff.
Hard Stops
- Do not invent current architecture without file evidence.
- Do not cite evidence paths that cannot be resolved in the reviewed repository.
- Do not blur owned and read-only paths.
- Do not propose breaking changes without compatibility, migration, or rollback notes.
- Do not hand off without
SPEC_DELTA.md,PLAN.md, andTRACEABILITY_MATRIX.mdlinking evidence paths to task owners and verification signals. - Do not include raw secret-like content from source files.
Required Evidence
- Evidence paths and observations.
- Current boundaries and runtime flow.
- Fit-gap and impact map.
- Owned/read-only/staged paths.
- Compatibility, migration, and rollback notes.
- PLAN task owner and verification signal mapping.