Run artifact

evidence/prompts/20260816.122259.144Z_toml_lineage_attribute_codex.prompt.md

Attribute Stories to Source Requirements

You are the lineage attribution agent. You are given one imported source file and the complete list of stories that already exist for this Target. Identify the distinct requirements the source states, and for each one name the stories that implement it.

This is a matching task against a closed set. Every story you may name is listed in <stories>. You are not decomposing work, proposing new stories, or judging whether the existing stories are correct.

Method

  1. Read the source and identify each distinct requirement it states. A requirement is a thing the

system must do, at whatever granularity the author wrote it. One sentence may state one requirement that several stories implement — for example "add a table and show it on screen" is one requirement implemented by a schema story, a route story, and a view story. Do not split a requirement to make the mapping tidier, and do not merge two requirements that a reader would act on separately.

  1. Give each requirement a short kebab-case name that describes it. The name is an identifier, not

a summary: mark-book-read, not the-reader-can-mark-a-book-as-read.

  1. For each requirement, list every story that implements any part of it. A story may implement

more than one requirement; a requirement may need more than one story.

  1. List any story that implements no requirement in the source as <unattached>. This is expected

and correct for foundational work — application scaffolding, configuration, shared UI framing, test harnesses — that the author never asked for by name. Do not force such a story onto an unrelated requirement.

Rules

Output

<requirement name="add-remove-books" stories="add-book,remove-book,database">
The reader can add a book with a title and author, view the books in the order added, and remove a book.
</requirement>
<requirement name="reject-empty-fields" stories="validate-book">
An empty title or author is rejected with a clear error message.
</requirement>
<unattached story="architecture"/>
<unattached story="ui-general"/>

Attribution job

<source name="run_conformance.sh"> #!/bin/sh

Run the upstream toml-test conformance suite against the built decoder.

#

Imported sources land in sources/ inside the application directory, so this is

normally invoked as sh sources/run_conformance.sh from that directory.

#

Usage:

DECODER=./toml-decoder sh sources/run_conformance.sh # full suite

DECODER=./toml-decoder sh sources/run_conformance.sh -run 'valid/string/*' # one group

DECODER=./toml-decoder sh sources/run_conformance.sh -json # machine-readable

#

Environment:

DECODER decoder command. Required — this harness is language-neutral and

deliberately has no default implementation language.

TOML_TEST absolute path to the toml-test binary (default: found on PATH)

#

Exit code follows the harness exit-status standard in prompts/UAT_SETUP_INSTRUCTIONS.md:

0 only when every test passes, 2 when this harness could not run at all, and any other nonzero

when it ran and the decoder failed. A precondition of the harness is never charged to the build.

set -u

if [ -z "${DECODER:-}" ]; then echo "error: DECODER is not set; give the command that runs your decoder." >&2 exit 2 fi

if [ -n "${TOML_TEST:-}" ] && [ -x "${TOML_TEST}" ]; then HARNESS="${TOML_TEST}" elif command -v toml-test >/dev/null 2>&1; then HARNESS="$(command -v toml-test)" else cat >&2 <<'EOF' error: toml-test not found.

Install the harness once:

sh sources/setup_harness.sh

or set TOML_TEST to an existing binary:

TOML_TEST=/path/to/toml-test sh sources/run_conformance.sh EOF # 2, not the shell's own 127: an uninstalled harness says nothing about the decoder, and 127 # would be read as an ordinary nonzero exit and charged against the build as a product FAIL. exit 2 fi

The suite's identity is part of the verdict. Without this, "the authoritative suite passed"

names no particular suite: whichever toml-test happened to be on PATH decided the run, and a

different version on a different machine is a different exam. Recorded always, and enforced

when the caller states which version it expects.

HARNESS_VERSION="$("${HARNESS}" version 2>/dev/null | head -n 1 || true)" echo "harness: ${HARNESS} ${HARNESS_VERSION:-(version unknown)}" >&2 if [ -n "${TOML_TEST_VERSION:-}" ] && [ -n "${HARNESS_VERSION}" ]; then case "${HARNESS_VERSION}" in "${TOML_TEST_VERSION}") ;; *) echo "error: harness is ${HARNESS_VERSION}, expected ${TOML_TEST_VERSION}." >&2 echo "Run: sh sources/setup_harness.sh" >&2 exit 2 ;; esac fi

NO_COLOR=1 exec "${HARNESS}" test -toml 1.0 -decoder "${DECODER}" "$@" </source>

<stories> <story id="architecture" implements="ARCHITECTURE.md">Establish the standard-library-only Go module and decoder command.</story> <story id="decoder-contract" implements="FEATURE-Decoder-Contract.md">Implement the TOML decoder stdin, tagged-JSON, diagnostic, and exit-status contract.</story> <story id="parser-strings" implements="FEATURE-Strings.md">Parse TOML basic, literal, and multiline string values.</story> <story id="parser-keys" implements="FEATURE-Keys.md">Parse TOML key forms and enforce key-definition semantics.</story> <story id="parser-lexical-scalars" implements="FEATURE-Lexical-Scalars.md">Parse TOML booleans, integers, and floating-point scalar values.</story> <story id="parser-lexical-boundaries" implements="FEATURE-Lexical-Boundaries.md">Handle TOML comments, whitespace, line endings, UTF-8, and control-character rules.</story> <story id="parser-tables" implements="FEATURE-Tables.md">Parse standard tables and arrays of tables with ordering and conflict rules.</story> <story id="parser-datetimes" implements="FEATURE-Datetimes.md">Parse and format TOML offset and local date/time values.</story> <story id="parser-arrays-inline" implements="FEATURE-Arrays-Inline.md">Parse arrays and inline tables with closure and conflict semantics.</story> <story id="conformance" implements="FEATURE-Conformance.md">Assemble the completed parser and verify the complete TOML 1.0.0 suite.</story> </stories>