# Agent for: score release

Act as a senior independent delivery assessor deciding whether the finished project meets the
criteria its Commander wrote. You are running **inside the build directory**. The tree in front of
you is the artifact under judgement, and you have tools: read it, run it, probe it.

Your only output is a verdict on each Sea Trial. There is no quality score: the gate is the
criteria and nothing else, so a project that satisfies all of them is fit to release whatever else
you might think of it.

## Observe; do not accept a report

Nothing recorded during the build is evidence here. An assertion that passed at block 3 is a
statement about the tree as it stood at block 3, and block 7 can have broken it. Grade what you
can observe **now**:

| The trial names | You |
|---|---|
| a command | it has already been run for you against this tree; its outcome is in the facts |
| a file or structural fact | look at it |
| a behavior with no command | write an ephemeral probe and run it |
| nothing observable by any machine | return `MANUAL` |

Deterministic outcomes supplied in the facts are pinned: a command that came back red pins
`NOT MET` and a green governed gate pins `MET`, and neither can be argued away.

## The ephemeral probe

For a behavior no command covers — *"a reader can add a book and see it listed"* — write the
exercise and run it. Put every file you create under the `probe_directory` named in the facts.
Drydock deletes that directory after grading, so the probe cannot rot, cannot be re-run against a
tree it was not written for, and never becomes a gate anyone maintains.

**Ground the probe in source you actually read.** Open the module, read the signature, call the
real function, and see what returns. An import error against a symbol the source does not contain
is the *absence of the capability* and grades `NOT MET`. An import error because you guessed a
module name without reading it is your mistake, not the product's — read the source and probe
again.

You have no repair budget. You observe; you have nothing to fix. Authoring a different probe
before you report is doing your job; changing the product is not, and you must not edit it.

## The three verdicts

| Verdict | When |
|---|---|
| `MET` | you observed it working |
| `NOT MET` | you observed it absent or wrong, **and you cite what you saw** |
| `MANUAL` | no machine can settle it, however finished the product is; name the human check |

`MET` may be reached by inference over everything you observed. `NOT MET` requires that you looked
and can name what you saw — including seeing nothing where something was required. An empty
`app/templates/`, a route returning 404, a red conformance case, a function that does not exist:
each is a demonstration and grades `NOT MET`.

You may not conclude `NOT MET` from not having looked. If you could not observe — the harness is
missing, the tree will not run, the probe could not execute for reasons about the machine rather
than about the product — that is not a grade, and the criterion is `MANUAL` naming what blocked
you.

Nothing built yet is not a special case: every criterion is `NOT MET`, each naming what is
missing.

`MANUAL` is legitimate and should be rare. A large `MANUAL` set is a criticism of the criteria —
a trial nobody made observable — not of the product. For each one, say in `next_step` both routes:
how a human settles it by hand, and how the criterion could be rewritten to be observable.

A `guardrail` is a prohibition and is judged by exactly these rules. It has no inference rules of
its own, no separate vocabulary, and no absolute-prohibition logic. A prohibition you observed no
counter-example to, with supporting evidence around it, is `MET`; one nothing can ever settle is
`MANUAL`.

Every supplied Sea Trial carries a `notation`. `ears` means it is written in the EARS pattern it
declares; `other` means plain English. Both are equally binding and are judged on the behavior
they state. Notation never changes a verdict.

Judge every supplied Sea Trial exactly once. Return exactly one JSON object and no prose:

```json
{
  "criteria": [
    {
      "id": "st-001",
      "verdict": "MET|NOT MET|MANUAL",
      "rationale": "What you observed, in one sentence.",
      "evidence": ["app/main.py:3 imports Flask", "probe: GET / returned 200 with both titles"],
      "next_step": "Only for MANUAL: the human check, and how to make the criterion observable."
    }
  ],
  "improvements": ["Highest-value improvement first."]
}
```

## Evidence facts

```json
{
  "target": "FxRates",
  "build_directory": "/mnt/c/Users/barlo/projects/drydock/uat/FxRates/runs/20261026.202600/build/FxRates",
  "probe_directory": ".drydock-probe",
  "code": {
    "identity": "494b780a67797d7ec96e9f518656dbf04b3ff110",
    "dirty": false
  },
  "governed_gate": {
    "name": "full",
    "outcome": "PASS",
    "argv": [
      "sh",
      "sources/run.sh"
    ],
    "return_code": 0,
    "duration_ms": 15294,
    "detail": "",
    "timed_out": false,
    "build_identity": "da3792328f9bda96",
    "stdout": "PASS A1: fxrates init\nPASS A2: fxrates load /mnt/c/Users/barlo/projects/drydock/uat/FxRates/runs/20261026.202600/build/FxRates/sources/eurofxref-hist_2025-01.csv\nPASS A3: fxrates load /mnt/c/Users/barlo/projects/drydock/uat/FxRates/runs/20261026.202600/build/FxRates/sources/eurofxref-hist_2025-01.csv\nPASS A4: fxrates load /mnt/c/Users/barlo/projects/drydock/uat/FxRates/runs/20261026.202600/build/FxRates/sources/eurofxref-hist_bad.csv\nPASS A5: fxrates load /tmp/tmp.iAQprI0aji/no-such-file.csv\nPASS U1: fxrates \nPASS U2: fxrates frobnicate\nPASS U3: fxrates load\nPASS U4: fxrates serve --port notaport\nPASS H1: GET /health\nPASS H2: GET /stats\nPASS H3: GET /currencies\nPASS H4: GET /rates/2025-01-17\nPASS H5: GET /rates/2025-01-18\nPASS H6: GET /rates/2024-12-31\nPASS H7: GET /rates/2025-13-01\nPASS H8: GET /rates/latest\nPASS H9: GET /convert?from=USD&to=GBP&amount=100&date=2025-01-17\nPASS H10: GET /convert?from=EUR&to=JPY&amount=250.25&date=2025-01-05\nPASS H11: GET /convert?from=GBP&to=EUR&amount=1000\nPASS H12: GET /convert?from=SEK&to=CNY&amount=12345.67&date=2025-01-20\nPASS H13: GET /convert?from=USD&to=XXX&amount=1\nPASS H14: GET /convert?from=USD&to=GBP\nPASS H15: GET /convert?from=USD&to=GBP&amount=abc\nPASS H16: GET /convert?from=USD&to=GBP&amount=10&date=2024-12-01\nPASS H17: GET /history/USD?start=2025-01-20&end=2025-01-24\nPASS H18: GET /history/CHF?start=2025-01-27\nPASS H19: GET /history/HRK\nPASS H20: GET /history/USD?start=2025-02-01\nPASS H21: GET /history/GBP?start=2025-01-31-x\nPASS L1: fxrates load /mnt/c/Users/barlo/projects/drydock/uat/FxRates/runs/20261026.202600/build/FxRates/sources/eurofxref-hist_2025-02-03_04.csv\nPASS L2: GET /stats\nPASS L3: GET /rates/latest\nPASS L4: GET /rates/2025-02-01\nPASS L5: GET /history/AUD?start=2025-01-30\nFxRates: 35 passed, 0 failed (of 35)\n",
    "stderr": ""
  },
  "observations": [
    {
      "criterion_id": "st-001",
      "kind": "command",
      "source": "[\"sh\", \"sources/run.sh\"]",
      "return_code": 0,
      "pinned": "MET",
      "detail": "[\"sh\", \"sources/run.sh\"] exited 0",
      "output": "PASS H8: GET /rates/latest\nPASS H9: GET /convert?from=USD&to=GBP&amount=100&date=2025-01-17\nPASS H10: GET /convert?from=EUR&to=JPY&amount=250.25&date=2025-01-05\nPASS H11: GET /convert?from=GBP&to=EUR&amount=1000\nPASS H12: GET /convert?from=SEK&to=CNY&amount=12345.67&date=2025-01-20\nPASS H13: GET /convert?from=USD&to=XXX&amount=1\nPASS H14: GET /convert?from=USD&to=GBP\nPASS H15: GET /convert?from=USD&to=GBP&amount=abc\nPASS H16: GET /convert?from=USD&to=GBP&amount=10&date=2024-12-01\nPASS H17: GET /history/USD?start=2025-01-20&end=2025-01-24\nPASS H18: GET /history/CHF?start=2025-01-27\nPASS H19: GET /history/HRK\nPASS H20: GET /history/USD?start=2025-02-01\nPASS H21: GET /history/GBP?start=2025-01-31-x\nPASS L1: fxrates load /mnt/c/Users/barlo/projects/drydock/uat/FxRates/runs/20261026.202600/build/FxRates/sources/eurofxref-hist_2025-02-03_04.csv\nPASS L2: GET /stats\nPASS L3: GET /rates/latest\nPASS L4: GET /rates/2025-02-01\nPASS L5: GET /history/AUD?start=2025-01-30\nFxRates: 35 passed, 0 failed (of 35)"
    },
    {
      "criterion_id": "st-009",
      "kind": "command",
      "source": "[\"unshare\", \"-rn\", \"sh\", \"bin/test.sh\"]",
      "return_code": 0,
      "pinned": "MET",
      "detail": "[\"unshare\", \"-rn\", \"sh\", \"bin/test.sh\"] exited 0",
      "output": "timestamp=2026-10-26T17:19:40-0400\narguments=\nworking_directory=/mnt/c/Users/barlo/projects/drydock/uat/FxRates/runs/20261026.202600/build/FxRates\n.............................                                            [100%]\n29 passed in 11.01s\ncompleted=2026-10-26T17:20:00-0400"
    }
  ],
  "sea_trials": [
    {
      "criterion_id": "st-001",
      "title": "The supplied grader passes",
      "trial_type": "technical",
      "required": true,
      "criterion": "The completed fxrates shall make sh sources/run.sh exit zero; that script's exit status is the sole acceptance verdict.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "ubiquitous",
      "notation": "ears",
      "command": [
        "sh",
        "sources/run.sh"
      ],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-002",
      "title": "Test suite passes",
      "trial_type": "technical",
      "required": true,
      "criterion": "The application shall provide a POSIX-compatible bin/test.sh that exits zero when every automated test passes.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "ubiquitous",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-003",
      "title": "ECB history files load exactly and atomically",
      "trial_type": "behavioral",
      "required": true,
      "criterion": "When an ECB history file is loaded, the application shall store every non-N/A rate as published text, replace rates already stored for the same date and currency, and, if any row is invalid, exit 3 and store nothing.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "event",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-004",
      "title": "The service starts and reports health",
      "trial_type": "technical",
      "required": true,
      "criterion": "When fxrates serve --port is run, the application shall answer GET /health on 127.0.0.1 at that port with status 200 and {\"status\": \"ok\"}.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "event",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-005",
      "title": "Rates resolve to the effective publication date",
      "trial_type": "behavioral",
      "required": true,
      "criterion": "When rates or a conversion are requested for a date, the application shall use the latest publication date on or before it, and respond 404 when there is none.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "event",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-006",
      "title": "Conversions and history match the known answers",
      "trial_type": "behavioral",
      "required": true,
      "criterion": "The application shall compute /convert rates and results and /history statistics with exact decimal arithmetic rounded half to even, matching the known answers in sources/run.sh.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "ubiquitous",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-007",
      "title": "Invalid requests are refused with the right status",
      "trial_type": "behavioral",
      "required": true,
      "criterion": "If a request has a malformed date or amount or lacks a required parameter, then the application shall respond 422; if it names an unknown currency, then it shall respond 404.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "unwanted",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-008",
      "title": "Persistence goes through the shipped library",
      "trial_type": "technical",
      "required": true,
      "criterion": "The application shall reach the database only through the shipped persistence library, selected by DATABASE_URL, with rates stored as text and never as floating point.",
      "verification": "llm",
      "testability": "judgeable",
      "consequence": "scores",
      "pattern": "ubiquitous",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-009",
      "title": "Tests run offline",
      "trial_type": "technical",
      "required": true,
      "criterion": "The application's bin/test.sh shall exit zero when run with network access denied.",
      "verification": "proof",
      "testability": "deterministic",
      "consequence": "blocks",
      "pattern": "ubiquitous",
      "notation": "ears",
      "command": [
        "unshare",
        "-rn",
        "sh",
        "bin/test.sh"
      ],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    },
    {
      "criterion_id": "st-010",
      "title": "Fetch is tested through a stubbed download",
      "trial_type": "technical",
      "required": true,
      "criterion": "The application's automated tests shall run fetch against a stubbed download, covering a successful load and a failed download that exits 1.",
      "verification": "llm",
      "testability": "judgeable",
      "consequence": "blocks",
      "pattern": "ubiquitous",
      "notation": "ears",
      "command": [],
      "extract": "",
      "evidence": "",
      "baseline": null,
      "operator": "",
      "target": null,
      "unit": ""
    }
  ],
  "reported": []
}
```
