# AGENT-PROMPT-v5-P1-1b — Piece D mapping amendment: D-M2-A approval

**Date:** 2026-08-07
**Follows:** `docs/AGENT-PROMPT-v5-P1-1b-piece-d-mapping-amendment-a-approval.md`,
`docs/p1-1b-status.md` ("2026-08-07 Piece D Option A ordered instruction 3 — new item-6
collision, clean stop, Miguel decision required"), and `docs/PROJECT-STATE.md`
**Authority:** Miguel
**Stage:** governed records only

## Decision: D-M2-A approved; D-M2 closed

Miguel's exact approval sentence, recorded verbatim:

> Aprovo D-M2-A

This explicitly selects **D-M2-A** exactly as already published under
`docs/p1-1b-status.md` heading "D-M2 alternatives for Miguel's decision". It amends only Piece D
mapping item 6 and closes D-M2. The binding amended contract is:

1. The native and imported proof rows for an active company each start `Open`.
2. Each proof performs exactly one atomic Open→terminal `UPDATE`, setting
   `ItemClass='Bogus'` together with `Status='Resolved'`, `ResolutionEvidence`, `ResolvedBy`, and
   `ResolvedAt`.
3. Every orthogonal CHECK and prerequisite, including provenance prerequisites, is satisfied so
   the proof reaches the intended composite foreign key rather than an earlier barrier.
4. Each rejection asserts SQLSTATE `23503` and exact constraint name
   `DOCFLG_EFCode_ItemClass_ReviewPriority_BlockingLevel_fkey`.
5. The separate NULL/`MATCH SIMPLE` proof targets remain on an imported `Open` row.
6. Repairing the company-scoped validator test expectation is ordinary item-6 scope under this
   amendment and is not a separate decision.

Every other Piece D mapping item remains exactly as previously approved and as amended by the
Option A approval that closed D-M1. This amendment authorizes no migration, DDL, accepted-object,
`src/`, Designer, ModelSnapshot, baseline, pin, O8, O9, O10, item 5, Scope 1, or O5 decision
change. Item 5's real-population proof remains deferred to Scope 1. Scope 1 remains unauthorized
until Piece D receives a fresh independent **Accept**, and O5 remains open until the target-host
session closes it.

## Ordered execution authority

Piece D still has no candidate. Ordered instruction 3 is re-authorized **only after** the records
commit containing exactly this approval document, `docs/p1-1b-status.md`, and
`docs/PROJECT-STATE.md` is independently reviewed, committed, and pushed. TDD must then start
fresh from that pushed tip and implement only D-M2-A together with the otherwise-unchanged approved
Piece D mapping.

This records stage does not itself authorize starting TDD, running a database, build, or test, or
touching any implementation path. It does not authorize ordered instruction 4 separately; after a
candidate is produced under ordered instruction 3, the existing requirement for a fresh independent
integration-focused Accept/Reject review remains in force.

## Scope and non-goals

This is a records-only approval. It does not create a Piece D candidate or Accept, authorize Scope
1, alter any accepted migration or schema object, reopen any baseline or prior decision, change the
prototype pin, perform O5 work, or update project evolution. The prior D-M2 stop and all three
published alternatives remain intact as historical evidence; D-M2-A is now the operative item-6
mapping.

## Ordered authority and records instruction

For current state, `docs/PROJECT-STATE.md` remains authoritative. For the Piece D execution
contract, read the Piece D go-ahead and approved mapping, the Option A amendment that closed D-M1,
then this D-M2-A amendment; this document supersedes only the prior item-6 direct-UPDATE shape that
caused D-M2. Record the approval by prepending a current records-only entry to
`docs/p1-1b-status.md`, amending its operative item-6 mapping, and updating every current-facing
Piece D/D-M2 location in `docs/PROJECT-STATE.md` in the same records commit.

The exact versioned path set for that records commit is:

1. `docs/AGENT-PROMPT-v5-P1-1b-piece-d-mapping-amendment-b-approval.md`
2. `docs/p1-1b-status.md`
3. `docs/PROJECT-STATE.md`

No other versioned path belongs to this records stage.
