lakehouse/docs/PHASE_AUDIT_GUIDE.md
root 41b0a99ed2 chore: add real content that was sitting untracked
Surfaced by today's untracked-files audit. None of these are accidents —
multiple are referenced by name in CLAUDE.md and memory files but were
never added.

Categories:
- docs/PHASE_AUDIT_GUIDE.md (106 LOC) — Claude Code phase audit guidance
- ops/systemd/lakehouse-langfuse-bridge.service — Langfuse bridge unit
- package.json — top-level npm manifest
- scripts/e2e_pipeline_check.sh + production_smoke.sh — real test scripts
- reports/kimi/audit-last-week*.md — the "Two reports live" CLAUDE.md cites
- tests/multi-agent/scenarios/ — 44 staffing scenarios (cutover decision A)
- tests/multi-agent/playbooks/ — 102 playbook records
- tests/battery/, tests/agent_test/PRD.md, tests/real-world/* — real tests
- sidecar/sidecar/{lab_ui,pipeline_lab}.py — 888 LOC dev-only UIs that
  remain in service post-sidecar-drop (commit ba928b1 explicitly kept them)

Sensitivity check: scenarios use synthetic company names ("Heritage Foods",
"Cornerstone Fabrication"); audit reports describe code findings only;
no PII or secrets surfaced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 22:22:10 -05:00

2.5 KiB

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:

# 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:

# 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:

# 1. Build
cargo build -p <crate-name>

# 2. Test  
cargo test -p <crate-name>

# 3. Clippy (if installed)
cargo clippy -p <crate-name> -- -D warnings

# 4. Format check
cargo fmt -p <crate-name> -- --check

# 5. Cargo check
cargo check -p <crate-name>

# 6. Doc check
cargo doc -p <crate-name> --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:

## 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

# 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 <crate>
cargo test -p <crate>
cargo check -p <crate>