# Phase Audit Guidance for Claude Code ## Purpose This document provides the proper workflow for auditing completed phases in the Lakehouse project. ## ⚠️ Important: Do NOT Skip Steps Each phase requires BOTH: 1. PRD spec verification (check code exists) 2. Full SCRUM execution (6 commands) ## Proper Phase Audit Workflow ### Step 1: Read PRD Specification For each phase, read the PRD to understand what's supposed to ship: ```bash # Read from docs/PRD.md or docs/PHASES.md cat docs/PHASES.md | grep -A20 "Phase N:" ``` ### Step 2: Verify Code Exists Check that each deliverable from the PRD spec has corresponding code: ```bash # Example - check for specific implementations grep -r "function_name" crates/*/src/ ls crates/*/src/*.rs ``` ### Step 3: Run Full SCRUM (6 Commands) In order, execute ALL of these for the phase's crates: ```bash # 1. Build cargo build -p # 2. Test cargo test -p # 3. Clippy (if installed) cargo clippy -p -- -D warnings # 4. Format check cargo fmt -p -- --check # 5. Cargo check cargo check -p # 6. Doc check cargo doc -p --no-deps ``` ### Step 4: Fix Issues If any SCRUM command fails: - Fix the code - Re-run the failing command - Re-run ALL 6 commands to verify ### Step 5: Update Phase Documentation Only mark as ✅ after ALL 6 SCRUM commands pass: ```markdown ## Phase N: [Name] ✅ - [x] spec item 1 - [x] spec item 2 - SCRUM: build ✅ test ✅ clippy ✅ fmt ✅ check ✅ doc ✅ ``` ## Current Phase Status | Phase | Status | Notes | |-------|--------|-------| | 0 | ✅ | Bootstrap complete | | 1 | ✅ | Storage + Catalog | | 2 | ✅ | Query Engine | | 3 | ✅ | AI Integration | | 4 | ✅ | Frontend | | 5 | ✅ | Hardening | | 6-42 | ✅ | See docs/PHASES.md | ## Notes from Previous Session - Clippy and rustfmt are NOT installed on this system - Run `rustup component add clippy rustfmt` to install - Some crates have 0 unit tests (expected for service crates) - 28 warnings remain in unused code paths (ui/vectord) ## Key Files - `docs/PHASES.md` - Phase tracker with checkboxes - `docs/PRD.md` - Full product requirements - `docs/CONTROL_PLANE_PRD.md` - Phases 38+ specifications - `crates/*/` - All crate implementations ## Quick Reference ```bash # Full workspace SCRUM cargo build --workspace cargo test --workspace # (clippy if installed) cargo fmt -- --check cargo check --workspace cargo doc --no-deps # Per-crate cargo build -p cargo test -p cargo check -p ```