HANDOFF — GatewayPrismaQR¶
Read before coding¶
CONTEXT.md— glossary.SPEC.md— scope, RouterQR/POS facts (§3.0), compensation (§3.1), quality bar (§3.2), acceptance (§5).CONSTITUTION.md— invariants (a breach is a BLOCKER).DOMAIN-MODEL.md— entities.docs/adr/ADR-001..004— stack, compensation, plan source modes, POS connection.ACCEPTANCE.md— 32 confirmed criteria; each closes only with a green test carrying its ID.docs/SISTEMA.md(rendered:docs/sistema.html) — the system as it is today, in Spanish. Thendocs/PLANES-CUOTAS.md(docs/planes-cuotas.html, with a plan simulator),docs/POS-IMPUTACION-QR.md(docs/pos-imputacion-qr.html, the POS-side imputation handover) anddocs/emulador-qr.html(POS / gateway / Prisma browser simulator) — plans, surcharges/discounts, worked examples.docs/modelo/README.mdholds the TLA+ model of the payment lifecycle: rerun it (and updatePaymentLifecycle.tla) when you change code behind a modelled action.docs/research/— Prisma v27 digest, GatewayQR and GatewayMP-JH8 reverse engineering.RISKS.md— open risks and owners.
Then, before touching code: 1) summarize the expected behavior, 2) flag ambiguities or contradictions, 3) propose a file plan and tests. Implement only the SPEC's scope. Do not change contracts outside the SPEC, and do not edit the SPEC to make your implementation look correct.
Hard rules¶
- Strict TDD: no money behavior without a failing test first.
- Never store state that decides money only in memory.
- Never change the GatewayQR
estadostrings or make ids non-numeric. - Never log secrets or full benefit card numbers.
- No new dependency without human approval.
- Integration tests use the isolated local SQL Server database
GatewayPrismaQR_IT(credentials from environment variables, never committed); the clean is refused unless the database name ends in_IT. - Commits: conventional commits, no AI attribution lines (user rule).
Required evidence per change¶
- Tests named with their AC IDs, green.
- Coverage and mutation thresholds of SPEC §3.2.
- ArchUnit green.
- Updated
docs/RUNBOOK.mdwhen operation changes.
Pending inputs (owners: human)¶
- Export of
dM_Banda/dM_TarPl(Becerra copy atC:\Work\AI\DINO_BUILD\BASES) — the PCPOS session was denied by its permission control; the human runs or authorizes it. - GatewayQR production
traffic.log(R-11). - Prisma answers to the questions in
docs/PRISMA-PREGUNTAS.md(environments, notification path, 27 s miss behavior,total_amount≠ original, idempotency). - VPN coverage for every branch (R-14).