# SUPERSEDED — DO NOT EXECUTE — historical P1-0c agent prompt

> **P1-0c is superseded and closed. Do not run or rerun this assignment.** P1-0d reused its
> evidence and completed the required work; P1-0c is complete only as a historical record. It does
> not run in parallel with P1-1a. Read `docs/PROJECT-STATE.md` for current state. Everything below
> is preserved as historical assignment evidence, not as current instructions.

# Developer agent prompt — Sibyla v5.0, assignment P1-0c (historical)

This historical prompt was handed to the coding agent on the **development machine**, working in
`D:\fileStorage\repos\GOTT.Sibyla` on the then-current branch. It must not be pasted into a new
session or executed now.

> **Historical context:** this file was rewritten on 2026-08-05 after P1-0b completed. It then
> defined the seed-extraction pass, which stopped at its mandatory source gate. P1-0d superseded
> that pass and closed its work. P1-0c no longer runs and does not run in parallel with P1-1a.

---

> ## Read this first — state, and where to get it
>
> **`docs/PROJECT-STATE.md` is the only source of project state. Read it before this prompt's
> context, before the backlog, and before any draft.** Everything else in the repository is a
> record of a moment: reviews, correction registers, letters to Luís, status reports, other agent
> prompts. They are accurate at their date and **none of them is current state.**
>
> Three things you will otherwise get wrong, because three readers already have:
>
> - **C1–C19 are all decided.** Every one, since 2026-08-04. A *needs Luís to confirm* marker means
>   the decision is taken, applied, and implementable today — reversible only if he objects. A
>   *Needs Luís* marker without "confirm" is an action in his own repository, not a decision.
> - **Nothing on the .NET side is blocked on Luís Nascimento**, and nothing has been since
>   2026-08-04. Do not report a Luís item as a blocker, and do not write "pending confirmation"
>   into any draft. If you want provenance visible, write *"decided 2026-08-04 on Luís's behalf
>   against pinned data; reversible on his objection"* — a sentence that cannot be misread.
> - **Historical state at assignment time:** P1-0 had a four-item carve-out. P1-0d later closed it;
>   this prompt closes nothing now and must not be executed.
>
> If any document contradicts `PROJECT-STATE.md`, that file wins, the document is stale, and you
> **report it rather than carrying it forward**. Do not reconstruct state from decision history.

---

## What this assignment was (historical; do not execute)

**Documentation only.** No C#, no EF Core migrations, no SQL, no `src/`, no `tests/`, no
`migrations/`, no database of any kind. The original prompt described P1-1a as parallel work; that
sequencing is superseded. P1-0c is closed and must not run alongside P1-1a.

Five deliverables, in this order of importance.

### 1 · Extract the missing seed rows — verbatim, from the pinned prototype

This is the whole reason the assignment exists. Four corrections are structurally complete and
cannot close because the authoritative rows exist in no repository file:

| Need | For |
|---|---|
| All **19 exact DOCTYP tuples** — every DTCode and every source field | C9 |
| The **complete DOCEFL seed rows**, including the sentinel row's placement | C11 |
| The **exact EFCode and full DOCEFL row** for the Monthly-gap detector | C12 |
| The **literal ITMCLS `CLCode`s** for *Banks / Financing* and *Revenue / Intercompany* | C15 |
| D6's **exact BTCode and complete 14-field BNKMAT governance row** | D6 |
| The **natural keys** for the `MatchGroupID` and `BRCode` CodeLedger buckets | A3 |

**Read them. Do not derive them, infer them, reconstruct them from counts, or reason them out from
the surrounding rows.** The vocabulary annex gives marginal domains and counts; it is not a
row-level source and was already mistaken for one once.

**If a value is not there, stop and report it.** Name what you looked for, where you looked, and
what you found instead. An honest gap is a result. A plausible invented seed is indistinguishable
from a real one in six weeks, and by then it is in a production database.

The prototype is **read-only, at a pinned SHA**, and contains real IBANs, fiscal numbers, salaries
and bank statements for Gott and Itoorer. Record the SHA. Nothing is written to it. **No real
financial or personal value reaches this repository, a commit message, a log line or a fixture** —
seed rows for controlled vocabularies and code tables are the exception this assignment authorizes,
and only those.

### 2 · Fold the standalone decisions into the drafts

Same defect the last round closed: a decision that sits *beside* the document it governs leaves the
document asserting something false to anyone who reads it alone.

- **`docs/p1-0-a-group-decisions.md`** — A1–A7, C3's immutability, group-B scope. In particular:
  `CounterpartyCodeName`; stored `char(1)` `FlowType`; generated `NormalizedDocumentID` with
  `DocumentIdNormalizationVersion` **inside** the unique index; `ProposedMatchBTCode`;
  `ImportBatch`'s identity PK; `FailureCategory` deleted, `Category` kept.
- **`docs/p1-0-signoff.md`** — S1 the `identifierType` vocabulary (`VAT`, `NIF`, `EORI`,
  `PassportNumber`, `NationalID`, `Other`), S2 the DOCFLG `ItemClass` snapshot, S3 the Legal
  archive sub-path `{Company}/Legal/{Subtype}/{Counterparty}/`, S4's three defaults.

**These are decided. You are transcribing, not deciding.** Two in particular were decided today and
older text still shows them as open — do not "surface them as open items":

- **C3 is closed: `EnforcementStartsAt` is immutable after import or first use**, with a named
  reject trigger, no recompute path and no recompute audit table.
- **Freeze decision 13 is closed: the hash-index swap is P1-1b**, as its own reviewed migration,
  never folded into the initial train.

### 3 · Provenance markers on every column (A2)

Every column in `p1-0-schema-mapping.md` gets exactly one of `source`, `derived`, `production`. No
unmarked column. This is what tells an importer what to read; its absence is how `LineNumber` and
the ENTITM inversion got through. The known starting list is in the group-A decisions file, A2.

### 4 · Governance the drafts still do not specify (B2, B3, B4, B12)

Specify, in the discard/purge lifecycle and the roles policy:

- **B2** — Discard authority is unbounded today: any reviewer can discard a `Posted` fiscal record,
  removing it from every operational, export and archive selection, with no counter-signature and
  no reversal path.
- **B3** — *"restore for review"* names no target state, and the disposition enum is closed.
- **B4** — no entry transition into any disposition state is defined, so a freshly captured
  document, a malformed-response capture and a valid `NOT_A_DOCUMENT` are all in no legal state.
- **B12** — the counterparty is named three ways across paths and filename patterns
  (`{CounterpartyCode}`, `{Counterparty}`, `{Entity}`), none mapped to a defined column.

These block go-live, not the migration train. Specify them; do not implement anything.

**Historical correction:** B1 was outside this assignment and was subsequently closed by
`docs/p1-0-b1-decision.md`: byte storage is per capture, is never shared, and uses no reference
counting. This assignment remains superseded and must not be rerun.

### 5 · Close the loop

- Update **`docs/PROJECT-STATE.md`**: move O1 and O2 to decided if you closed them, or record
  precisely what is still missing. Add a changelog row. **This is the deliverable that matters most
  after the seeds** — if it is stale, the next agent repeats this whole problem.
- Tick the four carve-out entries (C9, C11, C12, C15) in `docs/project-todo.md` **only if the rows
  are actually in the drafts.** Read, agreed and understood is not ticked.
- Write `docs/p1-0c-status.md`: the prototype SHA, one line per extraction, what you could not
  find and where you looked, and the exact list of paths you changed.

---

## What you may not do

- Touch `src/`, `tests/`, `migrations/`, any database, or any P1-1 item. P1-1a owns those.
- Write, apply or plan a migration.
- Invent, infer or approximate a seed value. **Stop and report instead.**
- Copy any real financial or personal value beyond the controlled vocabulary rows named above.
- Modify, commit to, or push anything in the prototype repository.
- Reopen a decided item. C1–C19, A1–A7, C3, group-B scope and S1–S4 are decisions, not proposals.
- Write "pending", "unconfirmed" or "awaiting Luís" anywhere.
- Merge to `main`, or claim P1-0 is fully closed unless every carve-out row is in a draft.

## When to stop and report

- A seed value is not in the prototype at the pin.
- A draft contradicts `PROJECT-STATE.md`, the corrections, or the group-A/sign-off decisions.
- Closing a carve-out would require a decision nobody has taken.
- You find yourself about to widen the assignment. A gate that erodes quietly is worse than none.

## Definition of done

- Every extracted row is **verbatim**, with its source file and the pinned SHA recorded.
- Every value you could not find is named, with where you looked — no silent omissions.
- A1–A7, C3, group-B scope and S1–S4 are **in the drafts**, not only in their decision files.
- Every column in the schema mapping carries a provenance marker.
- B2, B3, B4 and B12 are specified.
- `PROJECT-STATE.md` reflects reality, `p1-0c-status.md` exists, and no document anywhere says a
  decided item is pending.
- `dotnet build GOTT.Sibyla.slnx` still passes — documentation-only changes must not break it.
