# Build Context

## Run Intent
- Current intent: build
- `plan`: update `PRODUCT_SENSE.md`, `PLAN.md`, and planning docs only.
- `build`: implement runtime files under `src/` and assets under `public/`.

## Project Structure
- `src/app`: Next.js routes and shell pages.
- `src/components`: flow shell and editor panel UI.
- `src/config`: manifest, runtime metadata, and per-step billing config.
- `src/runtime`: manifest helpers, flow controller, and step registry.
- `src/steps`: step components and registry.
- shared packages: `@funnelsgrove/runtime`, `@funnelsgrove/analytics`, `@funnelsgrove/payments`.

## Source Of Truth Files (Build)
- `src/config/funnel.manifest.ts` (flow, optional legacy entry points, branches, experiments, architecture version)
- `src/runtime/step-registry.ts` (component ownership)
- `src/steps/index.ts` (derived active step registry)
- `src/runtime/use-funnel-flow-controller.ts` (flow orchestration, tracking, and runtime mode)
- `src/components/FunnelFlow.tsx` (shell render)
- `src/components/FunnelEditorPanel.tsx` (editor controls)
- `docs/funnelsgrove/contracts/content-answers.md` (typed user answers + analytics usage)

## Onboarding Artifacts
- `PRODUCT_SENSE.md`: required
- `PLAN.md`: required

## Sequence Contract
- Keep the starter route linear: `step-1`, `email-capture`, `paywall`, `subscription-started`.
- Do not add alternate paywalls or branches unless the funnel explicitly requires them.

## Generation Mode
- Use the lightweight four-step starter by default unless a wider flow is explicitly requested.
