# Decision Index ## Active Decisions | ID | Decision | Status | Date | Applies To | Detail | |---|---|---|---|---|---| | RDS-001 | Production persistence uses explicit direct PostgreSQL through one server-only adapter; local JSON is explicit development/test mode. | Accepted | 2026-08-12 | Server stores and scripts | `ZHINIAN_DATA_BACKEND=postgres` fails closed and never silently falls back. | | RDS-002 | Database changes use versioned, checksummed, advisory-locked migrations. | Accepted; execution amended 2026-08-14 | 2026-08-12 | Database schema and rollout | Initial production schema is executed manually from `database/migrations/*.sql` plus application-role grants; the one-shot Job manifest is retained but not part of the deployment path. | | ADR-003 | Target architecture is a same-origin Next.js frontend plus Go modular-monolith backend with an initially embedded WorkerLoop. | Accepted target; Go implementation merged into `main` 2026-08-14; first production deployment pending | 2026-08-12 | Application and ACK architecture | First deployment runs the split topology directly; no legacy production instance exists. See `adr-003-next-go-target.md`. | | DEP-001 | Production starts fresh: the first production deployment runs the ADR-003 split topology (Next.js frontend + Go backend), there is no legacy cutover or Node Worker, and the schema is initialized by manually executed SQL. | Accepted | 2026-08-14 | Deployment model and schema initialization | Human decision: no migration Job pod; super administrator is bootstrapped from `ZHINIAN_BOOTSTRAP_ADMIN_*` configuration at Go startup. | ## Superseded Decisions | ID | Decision | Superseded By | Date | |---|---|---|---| | ACK-001 | Worker remains an HTTP poller and does not receive RDS credentials; Web owns database access. | `DEP-001`: production never deploys the Node Worker; the Go backend owns database access and embeds the WorkerLoop. | 2026-08-14 | ## Decision Criteria Create or update an ADR when a choice affects: - project positioning - architecture boundaries - public behavior - data model - long-term maintenance - user-facing workflow