# Phase register and scope locks Implement one explicitly approved phase at a time. Keep out-of-scope files, existing authentication machinery and production systems unchanged. ## P01 — Foundation (COMPLETE) - Baseline commit `8f54ccb30426f2955472c0cd40fb94d0b18e86ac`. - Initial monorepo folder structure, docs, project Git identity and clean commit completed. ## P02 — ZITADEL local backend (APPROVED 2026-11-22) - **Allowed source writes:** `core/backend/zitadel/**`, `deployment/docker/compose.backend.dev.yaml`, `.env.example`, backend-focused `tests/**`, and narrow `docs/**` / `README.md`. - Official versioned ZITADEL v4 backend image, local PostgreSQL persistence, secure random dev secret generation, first-admin bootstrap and health checks. - Official prebuilt Login V2 image as a **runtime dependency only** (v4 Admin Console login requires it); no Login V2 source import. - No backend Go source vendoring, UI redesign, public domain, Coolify deploy, production keys, remote push or changes to unrelated files. - Verify: static focused test/patch audit; with Docker available, live startup/ready/Admin Console, persistent DB after restart and shutdown. - **Execution evidence:** Docker CLI/Desktop absent on connected Windows PC; live Compose startup, admin login and persistence remain NOT VERIFIED. Prior P02 static checks are recorded in `docs/P02-EVIDENCE.md`. - **P02-RUNTIME-ACCEPTANCE-01 instruction update (2026-11-22):** user explicitly deferred all local test/dev execution to a future Gitea Actions phase; this is a source handoff, **not** runtime acceptance. Existing source is committed; authorized push to `vibtools/ZitPlane` is in scope. CI workflow creation and UI import remain outside P02. - Existing unrelated untracked `AI_INSTRUCTIONS.md` must remain untouched. ## P03 — Login V2 import (proposed, NOT approved) Import one compatible upstream commit and necessary workspace/dependencies under an exact approved scope; verify original behavior. No visual redesign. Do not claim P02 runtime integration was verified if Docker remains unavailable. ## P04 — Account portal foundation (proposed, NOT approved) OIDC-protected basic account self-service skeleton; no fake production authentication. ## P05 — Integration (proposed, NOT approved) Local development, shared UI tokens as needed, production-safe Docker topology, routing drafts, tests/docs. No live deployment. ## P06 — UI redesign (proposed, NOT approved) Compact login and account UI, accessibility, responsive design and scoped regressions. Protected authentication semantics unchanged. ## P07 — Production deployment (proposed, NOT approved) Coolify, HTTPS, secrets, backups, durable storage and focused production readiness; explicit approval required.