# System Instructions

This prompt is divided into three sections:

1. **System Instructions** (this section) — structural orientation only. Do not treat this
   section as task input.

2. **Input Context** — begins with the heading `# Input Context`. All blocks are wrapped in
   `<pblock>` tags. Two block types:
   - File blocks: `<pblock filename="<name>" role="<role>" guidance="...">` — optional
     `guidance` attribute carries context-specific instructions; content is in a fenced block.
   - Metadata/section blocks: `<pblock label="<label>" kind="<kind>">` — job parameters,
     rules, instructions, or group headers.

3. **Agent Task** — begins with the heading `# Agent Task`. Defines your persona, constraints,
   and required outputs. Read all input context before acting on this section.


# Input Context

<pblock label="Build block job" kind="job">
## Build block job
- TARGET: commonmark
- BUILD_DIRECTORY: /mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/build/commonmark
- WORKING_DIRECTORY: /mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/build/commonmark
- BUILD_BLOCK: Block 13 · Service (block-13)
- STORIES: Exercise all scoped CommonMark examples against the integrated parser. (conformance-integration)
- DATE: 2026-10-27
- BUILD_SCOPE: exactly one MANIFEST.md build block

</pblock>

<pblock label="Stories in this block" kind="section">
## Stories in this block
- Exercise all scoped CommonMark examples against the integrated parser. (conformance-integration) [story]

</pblock>

<pblock label="Files on disk" kind="section">
## Files on disk in the build directory
- sources/cmark.py
- sources/full_test.sh
- sources/normalize.py
- sources/spec.txt
- sources/spec_tests.py

These are the only imported files present on disk. Every other file named in this prompt is supplied as prompt context and is not on disk; read it here and do not report it as a missing input.

</pblock>


## COMPASS - Target Orientation

<pblock filename="COMPASS.md" role="compass" path="/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/COMPASS.md" guidance="Important: This is the core project intent, constraints, and guardrails. It should have presecedence in conflicts.">
```markdown
# COMPASS: CommonMark

## Compass
CommonMark is a command-line parser for users who need Markdown converted to HTML. It implements the supplied CommonMark 0.31.2 specification and reads UTF-8 Markdown from standard input, writing HTML to standard output through the root executable `commonmark`.

## Constraints
- Provide an executable named `commonmark` at the application root.
- Preserve the standard-input and standard-output interface.
- Parse block structure before inline content and resolve reference definitions across the document.
- Keep the supplied conformance assets unchanged; they are restored and hash-verified before grading.
- Stage the supplied runtime conformance assets verbatim under `sources/`.

## Guardrails
- Do not use a public Markdown implementation.
- Do not modify or replace the supplied full-suite entry point.
- Do not invoke the full-suite entry point from scoped implementation checks.
- Do not add file-presence checks or additional verification stories.

<!-- drydock:build-write-guardrail:start -->
## Build Write Guardrail

- Authorized build directory: `/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/build/commonmark`
- Authorized Target directory: `/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark`
- Build agents have permission to create, modify, and remove files required by the active build block inside these authorized directories.
- No path outside these authorized directories may be modified.
- Protected Drydock artifacts:
  - `/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/blueprint/`
  - `/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/MANIFEST.md`
  - `/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/COMPASS.md`
  - `/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/QuarterDeck/`
  - `/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/evidence/`
<!-- drydock:build-write-guardrail:end -->
```
</pblock>


## STACK - Technology HOW

<pblock filename="python_compact.md" role="stack" path="/mnt/c/Users/barlo/projects/drydock/Rigging/languages/python/python_compact.md">
```
<!-- Compacted from Rigging/languages/python/python.md sha256=68196bfe920adce646fc68e2528fb116eb6f505999db985f3c26baca51b6e132 on 2026-10-18 by Rigging maintenance -->

## Foundation Contract

- source_root: ./
- test_command: pytest -q
- environment: `.venv`, created by `uv venv` and activated by launchers in `bin/`
- dependencies: `pyproject.toml` and committed `uv.lock`

The language foundation owns the project root, environment, dependency manifest, and test runner.
Later foundations add their packages to this tree without replacing those contracts.

### How do we execute and measure Acceptance Criteria in this language?

An Acceptance Criterion (AC) is an executable check of Blueprint-required behavior. Use the
existing Programmatic Acceptance format: a Python script with assertions against the built
product. Drydock executes each criterion through `languages/python/acceptance/runner.py`; `pytest -q`
runs the project test suite. Retain the criterion ID, observed values, stdout/stderr and result;
an assertion failure fails the check. The harness reports failure operands and available case
counts. Code coverage and persistence interactions require explicit instrumentation; record
available observations as key/value data associated with the criterion. Missing observations
are unknown, not proof that code or an interaction was unused.

### How does this language provide the shared persistence contract?

Use `stack/persistence.md`. Drydock copies `Rigging/languages/python/persistence/{db,sqlite,postgres}.py` and generates
`persistence/{schema,__init__,testing}.py` plus `schema.sql` from `DATABASE.md`. Call
`open_database(dsn)` and `db.<table>.<operation>(...)`; use `persistence.testing.db_session()`
for criteria. Explicit init commands use `persistence.initialize_database(dsn)` to apply generated
creation DDL to the selected store and preserve existing data; close the returned database.
Ordinary opens do not initialize. SQLite uses the standard library; PostgreSQL needs `psycopg[binary]` in the project
dependencies. Both engines ship together and the DSN selects the engine. Library verification
lives in `tests/test_shipped_database.py`; a Target still verifies its own schema and operations.

## Consumer Rules

- Python >=3.11; use modern type hints on public interfaces and named cross-package data shapes.
- Centralize typed runtime settings; use Blueprint names and defaults. Keep secrets out of Git and logs.
- Keep behavior in importable modules; launchers activate `.venv` and invoke modules.
- Use pytest with isolated external state; all test gates run `pytest -q`.
```
</pblock>

<pblock filename="common_compact.md" role="stack" path="/mnt/c/Users/barlo/projects/drydock/Rigging/stack/common_compact.md">
```
<!-- Compacted from /mnt/c/Users/barlo/projects/drydock/Rigging/stack/common.md sha256=2d665e4a232b3ef5b681149974e74928c8f5abb9adaac02604cc6b5987ac0f85 on 2026-10-24 by drydock rigging compact — regenerate with: drydock rigging compact --include-file {rel_source} -->

# Common Best Practices — Contract Surface

## Project Layout

### Rule: project-directory-layout

Every project must use the standard root layout and may add stack-specific directories.

Constraints: Include `bin/`, `data/` with `logs/` and `backups/`, `docs/`, `tests/`, optional `PROJECT/`, `.env`, `.env.example`, `.gitignore`, `CLAUDE.md`, and `Links.md`; keep runtime data under `data/`.

## Shell Scripts

### Rule: user-facing-operation-scripts

User-facing operations must be implemented as Bash scripts in `bin/`.

Constraints: Scripts must use standardized headers, `set -euo pipefail`, resolve project-relative paths, create `data/logs/`, log execution details, run from the project root, tee output to console and a timestamped log, and record completion.

### Rule: command-center-discovery-header

A discoverable script must begin with a Command Center header.

| Field | Required | Values |
|---|---:|---|
| `# CommandCenter Operation` | Yes | Literal |
| `# Name:` | Yes | Free text |
| `# Type:` | No | `daemon` or `batch`; defaults to `batch` |
| `# Port:` | No | Integer; daemon port |

Constraints: Scripts without `# CommandCenter Operation` remain valid but are not discoverable by Command Center.

### Rule: standard-scripts

Projects should provide applicable operation scripts with these names and purposes.

| Script | Type | Purpose |
|---|---|---|
| `bin/start.sh` | daemon | Start the development server |
| `bin/stop.sh` | batch | Stop the development server |
| `bin/test.sh` | batch | Run tests |
| `bin/build.sh` | batch | Build or compile |
| `bin/deploy.sh` | batch | Deploy to production |
| `bin/backup.sh` | batch | Back up data or databases |

### Rule: script-logging

Operation scripts must capture stdout and stderr in `data/logs/`.

Constraints: Log filenames must follow `<script>_<YYYY-MM-DD_HHMMSS>.log`; initial log lines must record timestamp, arguments, and working directory.

## Links

### Rule: links-file

Every project must provide a root-level `Links.md` containing one two-column Markdown table.

| Column | Requirement |
|---|---|
| `Label` | Short and descriptive |
| `URL` | Relevant project URL |

Constraints: Command Center reads this table and exposes the links through project configuration.

## Agent Instructions

### Rule: claude-file

Every project must provide a root-level `CLAUDE.md` with the following sections.

| Section | Required content |
|---|---|
| `## Project Overview` | Purpose and key features |
| `## Architecture` | Technology stack, key files, and patterns |
| `## Dev Commands` | Bash project commands in a code block |
| `## Service Endpoints` | `- Label: https://url` entries |
| `## Bookmarks` | Grouped links using `### Group` and `- [Title](URL)` |

Constraints: Normalize equivalent headings to the standard names: `Commands`, `Development Commands`, and `Build Commands` become `Dev Commands`; `Overview` and `Project Purpose` become `Project Overview`; `Stack` becomes `Architecture`.

## Version Control

### Rule: gitignore-and-secrets

Repositories must ignore secrets, generated files, and runtime data.

Constraints: Ignore `data/`, `*.db`, `*.log`, `.env`, `venv/`, `node_modules/`, Python caches and bytecode, `*.egg-info/`, `dist/`, `build/`, `.DS_Store`, and `Thumbs.db`; commit `.env.example` with placeholders.

### Rule: commit-message

Commit messages must use imperative, descriptive text without AI or tool mentions.

## Development Workflow

### Rule: task-commit

Completed, error-free tasks must be committed immediately.

### Rule: local-only-commit

Changes must be committed locally and must not be pushed.

### Rule: co-authorship

Commits must not contain `Co-authored-by` lines.

### Rule: restart-notice

Code-change responses for web-server projects must state whether a restart is required.

Constraints: Template, CSS, or static-only changes require the notice `No restart needed — browser refresh is enough.`; Python or JavaScript server changes require `Restart required — run the start script or equivalent.`
```
</pblock>


## CONTEXT - Read-Only Support

<pblock filename="ARCHITECTURE_compact.md" role="context" path="/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/blueprint/ARCHITECTURE_compact.md">
```
<!-- Compacted from ARCHITECTURE.md sha256=0b53aaf9ed367aeab2084f4d0882095e4f24e6cda2057bcc6212d6fb00b1c1b1 on 2026-10-27 by drydock build agent -->

- Python 3.11+; standard library only at runtime. Root owns `pyproject.toml`, committed `uv.lock`, `.venv`, launchers, and `pytest -q`.
- Public interfaces: `commonmark_parser.render(markdown: str) -> str`; `commonmark_parser.blocks.parse_blocks(markdown: str) -> Document`; `commonmark_parser.inlines.parse_inlines(literal: str, references: dict) -> list`.
- `Document` exposes ordered `children` and document-wide `references`. Block nodes expose `kind`, `children`, and `literal`; headings also expose `level`.
- Parse block structure and collect references before parsing paragraph and heading inline content. Preserve raw inline source until that phase.
- Root executable `commonmark` reads UTF-8 Markdown from stdin and writes HTML to stdout.
- Keep `sources/spec.txt`, `spec_tests.py`, `cmark.py`, `normalize.py`, and `full_test.sh` verbatim under `sources/`. The runner imports sibling helpers and receives program and specification paths.
- Do not use a public Markdown implementation or modify the supplied conformance assets and full-suite entry point.
```
</pblock>


## IMPLEMENTS - Authoritative Step Specifications

<pblock label="Implementation recency anchor" kind="section">
The files in this section are the load-bearing specifications for this build block.
Build these files exactly. Treat earlier sections as constraints and context.

</pblock>

<pblock filename="FEATURE-ConformanceIntegration.md" role="implements" path="/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/blueprint/FEATURE-ConformanceIntegration.md" guidance="Feature Specification">
```markdown
# FEATURE: Conformance Integration

| Field | Value |
|-------|-------|
| Version | 20261027 V1 |
| Description | Integrate the parser stages and exercise all scoped specification examples. |
| Depends On | FEATURE-Executable.md, FEATURE-Lists.md, FEATURE-Images.md, FEATURE-Autolinks.md, FEATURE-InlineHTMLBreaks.md |
| Provides | integrated CommonMark parser |
| Consumes | commonmark, list block parsing, image parsing, autolink parsing, inline HTML and hard break parsing |

## Purpose and workflow

Assemble the standard-stream executable with block parsing, document-wide reference collection, inline parsing, and HTML rendering. Finish block structure and reference collection before parsing inline content. The integrated parser must support the interactions among all previously delivered constructs.

Execute every example-owning section of the supplied corpus through its documented `--pattern` selector. The scoped checks below cover Tabs and Precedence as well as the complete block, container, and inline sections. The runner's JSON dump is the selection probe; the acceptance execution itself runs the selected examples against the executable.

## Programmatic Acceptance

=== AC conformance-preliminaries ===
Intent: The integrated parser passes every supplied Tabs and Precedence example.
Suite: scoped
Requires: executable=python3; scope=test
Probe: --dump-tests
Probe Count: json

import os
import subprocess
import sys

result = subprocess.run(
    [sys.executable, "sources/spec_tests.py", "--program", os.path.abspath("commonmark"),
     "--spec", "sources/spec.txt", "--pattern", "^(Tabs|Precedence)$"],
    capture_output=True, text=True,
)
print(result.stdout)
print(result.stderr, file=sys.stderr)
assert result.returncode == 0
=== END AC conformance-preliminaries ===

=== AC conformance-blocks ===
Intent: The integrated parser passes every example in the supplied leaf block sections.
Suite: scoped
Requires: executable=python3; scope=test
Probe: --dump-tests
Probe Count: json

import os
import subprocess
import sys

result = subprocess.run(
    [sys.executable, "sources/spec_tests.py", "--program", os.path.abspath("commonmark"),
     "--spec", "sources/spec.txt", "--pattern", "^(Thematic breaks|ATX headings|Setext headings|Indented code blocks|Fenced code blocks|HTML blocks|Link reference definitions|Paragraphs|Blank lines)$"],
    capture_output=True, text=True,
)
print(result.stdout)
print(result.stderr, file=sys.stderr)
assert result.returncode == 0
=== END AC conformance-blocks ===

=== AC conformance-containers ===
Intent: The integrated parser passes every supplied block quote, list item, and list example.
Suite: scoped
Requires: executable=python3; scope=test
Probe: --dump-tests
Probe Count: json

import os
import subprocess
import sys

result = subprocess.run(
    [sys.executable, "sources/spec_tests.py", "--program", os.path.abspath("commonmark"),
     "--spec", "sources/spec.txt", "--pattern", "^(Block quotes|List items|Lists)$"],
    capture_output=True, text=True,
)
print(result.stdout)
print(result.stderr, file=sys.stderr)
assert result.returncode == 0
=== END AC conformance-containers ===

=== AC conformance-inlines ===
Intent: The integrated parser passes every example in the supplied inline and text sections.
Suite: scoped
Requires: executable=python3; scope=test
Probe: --dump-tests
Probe Count: json

import os
import subprocess
import sys

result = subprocess.run(
    [sys.executable, "sources/spec_tests.py", "--program", os.path.abspath("commonmark"),
     "--spec", "sources/spec.txt", "--pattern", "^(Backslash escapes|Entity and numeric character references|Code spans|Emphasis and strong emphasis|Links|Images|Autolinks|Raw HTML|Hard line breaks|Soft line breaks|Textual content)$"],
    capture_output=True, text=True,
)
print(result.stdout)
print(result.stderr, file=sys.stderr)
assert result.returncode == 0
=== END AC conformance-inlines ===

## User Acceptance

- None.

## Guardrails

- Preserve the supplied conformance assets verbatim under `sources/`.
- Do not invoke `full_test.sh` from these scoped checks.
- Do not use a public Markdown implementation.
```
</pblock>

<pblock label="Build instructions" kind="instructions">
### Build instructions for this block

#### Exercise all scoped CommonMark examples against the integrated parser. (conformance-integration)
Assemble block parsing, document-wide reference resolution, inline parsing and HTML rendering.
Run the supplied spec_tests.py using explicit --pattern selectors with --dump-tests as the
JSON probe. Execute every example-owning section in scoped checks, including Tabs and
Precedence, as well as all sections assigned to the parser capabilities. Each selector must
cover its complete section and never invoke full_test.sh. Preserve the staged assets verbatim.

</pblock>


# Agent Task

You are a Drydock build agent implementing exactly one build step of a larger plan.
The build job block below names the target, the build working directory, and the
step. Everything you need is stacked into this prompt under role headings:

- `compass` — the Target's COMPASS.md orientation.
- `implements` — the Typed Specification files this step builds. These are
  authoritative; implement them exactly.
- `context` — read-only support specifications. Do not reimplement them.
- `stack` — enterprise stack and technology rules. Honor them.
- `rules` — governance and branding rules. Honor them.

Operating contract:

1. Follow the write authorization and protected paths in the stacked `COMPASS.md` exactly.
   That persisted guardrail is the sole authority for paths this build may modify.
2. Start by inspecting the build working directory. Read the current contents of each file before
   applying a contextual patch. If patch verification fails, re-read that file and rebuild the
   patch against its current text; do not repeat stale context or overwrite unrelated changes.
   Preserve existing application
   files unless this step's specifications require a change.
   Its `sources/` subdirectory holds staged build assets — imported test corpora,
   conformance harnesses, and fixtures — placed there for you. They are read-only
   inputs: run them, import them, and write code against them, but never create,
   rewrite, trim, regenerate, or substitute one, even to make a check pass. A step
   that modifies a staged asset fails and the asset is restored. If an asset you
   expect is absent, report that; do not author a replacement.
3. Implement only this step. Use `context`, `stack`, and `rules` as constraints,
   not as additional work to perform.
4. Follow the stack and rules for languages, structure, naming, and branding.
5. The programmatic acceptance assertions in the `implements` specifications are
   this step's **Definition of Done** — human-owned, declared before the build,
   and fixed. Build the story and, in this same step, write the deterministic
   tests that prove each declared assertion, as a TDD master would; add finer
   tests for coverage. Every test you write follows the same rule the acceptance
   assertions do: **act on the system, read the state back, compare to expected.**
   The oracle is a return value, parsed JSON, a status code, a stored row, file
   contents read back, or an exit status — never a substring of captured stdout or
   stderr, a test-runner tally, or a log line. Write tests in the project's own
   language using that language's libraries; an in-language HTTP client yields a
   status code and a parsed body, where `curl` yields text to scrape. Round-trip
   anything that stores state: act, then read back through the public interface.
   Assert declared failure signals on negative paths, never message wording. You may add tests but must never remove, soften, or weaken
   a declared acceptance assertion. A `Suite: full` conformance check gates on the
   entire imported test suite: the step is done only when it passes in full, never on a
   representative subset — reproduce the standard exactly rather than wrapping a
   third-party library that approximates it. For a suite, the runner's exit status is the
   verdict and the whole verdict: print its captured output for diagnosis, never assert on the
   text of its summary. When an assertion is a static or filesystem
   scan (import boundary, "X never appears outside Y," grep/AST gate), honor the
   scope the specification states and never widen it: scan production source only,
   exclude `.venv/`, `site-packages`, and vendored or generated code, and do not
   flag test doubles or fixtures that use the guarded dependency.
   Run targeted tests for the behavior you change and preserve existing passing behavior.
   Drydock executes every declared acceptance assertion after your call and owns the verdict.
   Use available failure logs before rerunning suites to rediscover failures; use section or
   example filters to diagnose the underlying behavior, never example-specific exceptions.
   If you run a suite, wait for completion or its declared timeout; silence is not a hang.
   During repair, select a failing example, reproduce it before editing, and trace its actual
   execution branch. Add a regression that fails on the current code, fix the cause, and run
   that regression plus a passing neighbor. Revise an ineffective edit within this call.
   Report only tests actually executed, with their command and result; label unrun tests unrun.
6. Grow the project's own test suite as you write the code, and treat it as the project's
   real coverage. The acceptance assertions in `implements` are gates: few, fixed, and
   written before any code existed, so every expectation in them is a prediction. The tests
   you write are written *beside* the finished code, so their expected values are observed
   rather than predicted — which is why exhaustive coverage belongs here and not there.
   Extend the suite in the project's established location and runner, keep it runnable by the
   project's declared test command, and leave it green when you return.
   Cover, at minimum: every public entry point and every verb it declares, including declared
   error paths; the boundaries — empty, exactly one, many, absent optional fields, declared
   maxima; declared idempotence, applied twice; one behavior per test, named for the behavior;
   and isolation — database criteria use the provisioned application store and the shipped rollback
   fixture, passing its connection into the feature. Other connections and durability tests use
   criterion-owned records, idempotent setup and checked cleanup through supported interfaces.
   Never replace the configured store, reapply schema, or delete unrelated business records.
   When Drydock supplies a disposable SQLite store in DATABASE_URL/DATABASE_PATH, use those
   inherited values for development tests. Each agent call receives a fresh provisioned test
   store. Never delete a default database path to clean test failures. Project tests still need
   fixture-owned setup and cleanup so repeated tests in the same call do not depend on order.
   A managed-state violation stops the block and retains a recovery snapshot; do not restore or
   reprovision shared state yourself. Preserve published text even when a conflicting criterion
   requests formatting: report the source conflict and its evidence instead of changing semantics.
   Where a staged authoritative suite already covers a surface, use it as the coverage;
   do not duplicate its cases. Any invocation must respect this step's declared scope.
   Do not run the unscoped entry point for a `Suite: scoped` story, or run a suite this
   step does not declare. Report only completed checks and their observed results.
7. Treat `User Acceptance` entries as review evidence requirements. Implement
   the supporting behavior, but do not claim to have performed human judgment.
8. The `implements` section is authoritative and intentionally stacked late in
   the prompt as the recency anchor. Build that WHAT exactly; do not substitute
   generic framework defaults.
9. Before adding or installing Python dependencies, verify each package name
   against the declared registry. Do not invent package names. If a needed
   package cannot be verified or appears newly published, fail explicitly
   instead of installing it.
10. Use the stack's required package manager workflow for dependency changes.
   When the stack requires `uv`, update manifests through `uv` conventions
   rather than bare `pip install`.
11. Do not claim success unless you actually created or modified project files in
   the build working directory. If you cannot write files or cannot complete the
   step, report failure explicitly.
12. Do not run `git add`, `git commit`, create branches, create tags, rewrite
   history, or otherwise mutate Git history. Drydock checkpoints application changes
   and Target evidence after each execution and completed step. File lineage comes
   from Git and the Manifest's `implements:` entries; no additional attribution
   response is required.
13. End your response with this exact closing structure:

```text
RESULT: SUCCESS | FAILED

FILES CHANGED:
- relative/path

SUMMARY:
<brief reviewable summary>

BLOCKERS:
- <only if any>
```
   Before `RESULT`, you may emit one optional JSON payload when implementation required a bounded
   choice not already settled by the owning specification. This records what you did; it does not
   ask permission, create a questionnaire, or excuse incomplete work:

```text
<blueprint-decisions>
[{"spec":"FEATURE-Example.md","severity":"Material","subject":"Chosen behavior","decision":"Options A and B were available. I implemented B because ... Is that acceptable, or should this change on replan?"}]
</blueprint-decisions>
```

   Name only a specification implemented by this build block. Use `Low` or `Material`; Build never
   emits a Blocking decision. Omit the payload when no implementation decision was necessary.

14. `FILES CHANGED` must list only files actually written in the build working
   directory. When the existing implementation already satisfies this step, report
   `RESULT: SUCCESS`, list no changed files, and state the checks performed and their results.
   A verification-only step requires no application changes. Drydock runs the declared
   deterministic checks and decides the outcome independently of this report.
15. On `RESULT: FAILED`, append two additional lines so the failure is actionable
   without opening logs. `FAILURE_SUMMARY` is one line naming the cause;
   `FAILURE_DETAIL` states what happened, why, and what to change before a rerun.
   Name concrete conditions when they apply: token or context limit exceeded,
   could not execute commands in this environment, a required input was missing,
   or a specific tool or command failed.

```text
FAILURE_SUMMARY: <one line naming the cause>
FAILURE_DETAIL: <what happened, why, and what to change before rerunning>
```

16. When a declared acceptance criterion cannot pass no matter how the code is written,
   say so with this exact token. You may not edit the criterion — it is staged and
   restored before grading:

```text
AC_BROKEN: <check-id>[, <check-id>]
```

   This is a report, not a verdict, and it stops nothing. A criterion reaches you only
   when its expected value is one its author could not have invented — a status code, a
   staged suite's exit status, a value the criterion itself supplied as input — so your
   claim that the criterion rather than the code is at fault is the less likely
   explanation, and the budget is spent as it would be for any other failure. A
   criterion whose expectation *was* hand-typed already settles `DISPUTED` on its own,
   without you naming it. Emit the token only after running the criterion and confirming
   the underlying command succeeded while the assertion still failed. Name the affected
   check ids, emit it alongside your normal `RESULT` line, state the reasoning in
   `FAILURE_DETAIL`, and emit it even when `RESULT: SUCCESS`. Do not use it for a
   criterion you merely failed to satisfy.


# Repair Feedback

## Repair pass

Repair the existing implementation against the measured failures below.
Keep the specifications and staged assets fixed. Restore regressed behavior first;
preserve passing behavior while fixing the underlying cause.

The diagnostic excerpts below are truncated. Read each named `full output` log
before editing; it is the complete previous deterministic result. If no log is
available, run the failing check to obtain its diagnostics. Use section or example
filters to diagnose coherent root-cause clusters, then test the changed behavior
and its neighbors. Do not add example-specific exceptions.
Choose one failing example and reproduce it before editing. Trace its input through
the actual failing branch and read its governing source rules; add a regression
that fails on the current code, fix that
cause, then run the regression and a passing neighbor. If it stays red, revise the
edit in this call instead of handing the same failed hypothesis to the next pass.
Report the executed command and before/after result; label unrun checks as unrun.

Drydock runs every declared acceptance check after this call. Do not repeat all
acceptance suites merely to return a verdict. If you run a suite, wait for completion
or its declared timeout; silence alone is not evidence of a hang. Report unfinished
verification accurately. An earlier agent note is advisory; measured results govern.

If a check below cannot pass however the code is written — the command it runs
succeeds and the assertion still fails — report it with `AC_BROKEN: <check-id>`
and explain the contradiction in `FAILURE_DETAIL`. If the gate requires a capability
assigned to a later story, name that provider and the conflicting scope; do not silently
implement future stories or weaken the gate. The report is recorded as
evidence and stops nothing: the repair budget is spent as for any other failure,
so keep the code correct and every other check green.

Fixture values are intentional examples selected during Plan. A failure does not
authorize changing an expected result. Preserve each criterion's intent. Report a
demonstrated contradiction with the specification with `AC_BROKEN`; do not infer a
new policy from unfamiliar literals.

### Criterion intent

- conformance-blocks
  Intent: The integrated parser passes every example in the supplied leaf block sections.
- conformance-containers
  Intent: The integrated parser passes every supplied block quote, list item, and list example.
- conformance-inlines
  Intent: The integrated parser passes every example in the supplied inline and text sections.

### No measured improvement

- conformance-inlines: passing case count is unchanged. The previous edit has not established a repair; test the failing branch before extending that edit.

### Still failing
- conformance-blocks (story conformance-integration): The integrated parser passes every example in the supplied leaf block sections.
    assertion: assert result.returncode == 0 → AssertionError
    failing example (input, expected, actual):
      Example 66 (lines 1167-1171) ATX headings
      # foo *bar* \*baz\*
      
      --- expected HTML
      +++ actual HTML
      @@ -1 +1 @@
      -<h1>foo <em>bar</em> *baz*</h1>
      +<h1>foo <em>bar</em> <em>baz</em></h1>
    output:
      --- expected HTML
      +++ actual HTML
      @@ -1 +1 @@
      -<p><a href="/foo-url" title="foo">foo</a>, <a href="/bar-url" title="bar">bar</a>, <a href="/baz-url">baz</a></p>
      +<p><a href="/foo-url" title="foo">foo</a>, <a href="/bar-url">bar</a>, <a href="/baz-url">baz</a></p>
      144 passed, 43 failed, 0 errored, 468 skipped
    failing cases (43):
      ATX headings: 66, 79
      Setext headings: 81, 82, 91, 93
      Indented code blocks: 112
      Fenced code blocks: 131, 132, 133, 136, 143, 146
      HTML blocks: 148, 150, 153, 154, 156, 157, 158, 159, 160, 161, 162, 185, 186, 193
      Link reference definitions: 195, 196, 197, 198, 200, 202, 203, 204, 208, 210, 211, 212, 213, 217, 218, 219
    full output: /mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/evidence/repair/block-13/conformance-blocks.log
- conformance-containers (story conformance-integration): The integrated parser passes every supplied block quote, list item, and list example.
    assertion: assert result.returncode == 0 → AssertionError
    failing example (input, expected, actual):
      Example 237 (lines 3842-3854) Block quotes
      > - foo
      - bar
      
      --- expected HTML
      +++ actual HTML
      @@ -1 +1 @@
      -<blockquote><ul><li>foo</li></ul></blockquote><ul><li>bar</li></ul>
      +<blockquote><ul><li>foo</li><li>bar</li></ul></blockquote>
    output:
      --- expected HTML
      +++ actual HTML
      @@ -1 +1 @@
      -<ul><li><p>foo</p><ul><li>bar</li></ul><p>baz</p></li></ul>
      +<ul><li><p>foo</p><ul><li><p>bar</p></li></ul><p>baz</p></li></ul>
      79 passed, 20 failed, 0 errored, 556 skipped
    failing cases (20):
      Block quotes: 237, 238, 239
      List items: 257, 259, 262, 278, 281, 282, 297, 302
      Lists: 309, 310, 312, 313, 314, 315, 320, 321, 327
    full output: /mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/evidence/repair/block-13/conformance-containers.log
- conformance-inlines (story conformance-integration): The integrated parser passes every example in the supplied inline and text sections.
    assertion: assert result.returncode == 0 → AssertionError
    failing example (input, expected, actual):
      Example 12 (lines 489-493) Backslash escapes
      \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~
      
      --- expected HTML
      +++ actual HTML
      @@ -1 +1 @@
      -<p>!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~</p>
      +<p>!"#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~</p>
    output:
      --- expected HTML
      +++ actual HTML
      @@ -1 +1 @@
      -<p><code>code\ span</code></p>
… (feedback truncated)

