# AGENT-PROMPT-v5-P1-1a-d2 — Amendment 1

**Date:** 2026-08-05
**Amends:** `docs/AGENT-PROMPT-v5-P1-1a-d2.md`
**Authority:** Miguel. This amendment supersedes the base prompt wherever they conflict; everything not touched here stands unchanged.

## The finding that forces this amendment

The base prompt's Step 1 source gate is unsatisfiable, and the agent that stopped on it was
right to stop. Verified independently on three fronts on 2026-08-05:

1. The blocked agent searched pin `9359c67c4ef0101218d7e0ffff1986114ba5cc7a`, current
   `origin/main` (`6146004`), and the entire fetched history case-insensitively:
   no `validate_registry.py` under any equivalent name.
2. A filesystem search of the prototype working machine — working tree including untracked
   files, `Backups/`, sandbox folders, `Scripts/README.md`, `Specs/Manifest/` — found nothing.
3. The prototype's own skill review (prototype roadmap line 120) had already reached the same
   conclusion: `validate_registry.py` is described in five places in the prototype `SKILL.md`
   (§5, §7, §10, §15) and in `run_pipeline.py`'s conceptual-shape comment as a live, hard-fail
   pipeline gate — **and it has never been written**. The script was authored and run only
   inside ephemeral working sessions and evaporated; the registry has never once run the
   validation gate it believed it had.

This is the same category error `docs/PROJECT-STATE.md` records for P1-0c: an instruction to
*read* a source that no pin can contain. O6's diagnosis ("mechanical block — clone the
prototype and the block is gone") is therefore wrong and is corrected below. The counts quoted
in `docs/project-todo.md`'s validation-service item ("640 rows at the pin", "1,425 of 1,475")
came from ad-hoc checks run in those ephemeral sessions, not from a tracked script.

## What changes

**1. The Step 1 source gate is replaced.** Do not clone-and-read `Scripts/validate_registry.py`;
it does not exist and never has. The authoritative specification for deliverable 2 is now, in
precedence order:

- `docs/project-todo.md`, the P1-1 item "Implement the validation service (port of
  `validate_registry.py`)" — **including its two decisions the prose sources lack**: the check
  set is scoped to captured documents, `Source <> 'BNK'` (C9), and `DOCLOG.CaptureQuality`
  cannot be checked non-nullable (blank on 1,425 of 1,475 pinned rows) — implement it as a
  reported warning, not a failure, and surface the open nullable-with-default-vs-backfill
  decision in the status document rather than deciding it.
- `docs/project-todo.md`, the two adjacent items: the **orphan-DOCLOG check** (a DOCLOG row
  whose EntryCode resolves to no document in FDCHDR or the bank-generated set) and the
  **`(Filename, EntryCode)` ↔ LGCode bijection** check, with the recorded warning that the
  naive one-code-one-EntryCode test is wrong and must not be implemented.
- The prototype `SKILL.md` at the pin, §15 (check list) and §10, §7, §5 (per-check context),
  read from the pinned clone. The prototype clone rules of the base prompt (read-only, beside
  the repository, no real value copied out) apply unchanged to this reading.
- `docs/p1-0-vocabularies.md` for every literal, per C4.
- The DOCEFL seed/import completeness assertion carried from P1-0e, unchanged from the base
  prompt.

**2. The reconstruction prohibition is lifted and replaced.** The base prompt forbade
reconstructing the validator from the checklist on the premise that a richer tracked source
existed. It does not; the checklist *is* the primary source. You are authorized to implement
the validation service from the sources above. The discipline that replaces the prohibition:
for every check, record in `docs/p1-1a-d2-status.md` which source specified it; where the
sources are silent or disagree, **stop-and-report stands** — do not invent semantics. The
"every place the prototype's script disagreed with the P1-0 drafts" reporting requirement
becomes "every place the documented check set disagreed with the P1-0 drafts."

**3. What "read at the pin" now means.** Record the pin and the blob/section of the prototype
`SKILL.md` you read. The Definition of done bullet "`Scripts/validate_registry.py` was read,
not reconstructed" is replaced by: *the documented check set was read from the sources above
at the recorded pin, and no check was invented beyond them.*

**4. Corrections to record, not perform silently:**

- `docs/PROJECT-STATE.md` O6: rewrite the diagnosis — not a mechanical clone block but a
  P1-0c-class category error; the validator never existed as a tracked file; deliverable 2
  proceeds from the documented check set per this amendment. Add a changelog row dated
  2026-08-05 recording the finding and citing this amendment.
- `docs/project-todo.md` validation-service item: annotate that "port of
  `validate_registry.py`" means port of the *documented* check set; the script never existed.
- The prototype `SKILL.md`'s five false "live gate" claims are **out of scope for you** — they
  belong to the prototype owner and are already tracked there (prototype roadmap line 120).
  Do not edit the prototype. Note the dependency in your status document.

## What does not change

Everything else in the base prompt stands: the narrow authorization (validation service,
synthetic fixtures, disposable database only), the prototype-clone rules if you consult the
pinned `SKILL.md`, the no-real-value rule, the `docs/p1-1a-status.md` Step 2 correction, the
"what you may not do" list, and the Definition of done except as amended in §3 above.
