Run artifact

evidence/prompts/20261025.052424.030Z_csvstat_lineage_attribute_claude.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="ragged.csv"> sku,price,in_stock A1,9.99,true A2,4.50,false A3,1.25,true,extra A4,3.00,false </source>

<stories> <story id="foundation" implements="ARCHITECTURE.md">Stand up the Go module, directory layout, and architecture for csvstat.</story> <story id="executable" implements="FEATURE-Executable.md">Build the csvstat executable from the module root with a thin main over cli.Run.</story> <story id="csv-reading" implements="FEATURE-CsvReading.md">Read UTF-8 RFC 4180 CSV with the first record as header.</story> <story id="value-trimming" implements="FEATURE-Trimming.md">Trim leading and trailing spaces from every header name and value.</story> <story id="null-values" implements="FEATURE-NullValues.md">Recognise null spellings: empty, NA, N/A, NULL ignoring case.</story> <story id="numeric-types" implements="FEATURE-NumericTypes.md">Infer integer and number column types.</story> <story id="date-type" implements="FEATURE-DateType.md">Infer date columns of real YYYY-MM-DD calendar dates.</story> <story id="boolean-text-types" implements="FEATURE-BooleanTextTypes.md">Infer boolean, text, and empty column types.</story> <story id="args-parsing" implements="FEATURE-Arguments.md">Parse options and exactly one file argument, with options preceding the file.</story> <story id="input-rejection" implements="FEATURE-InputRejection.md">Reject empty files, empty or repeated header names, and ragged records.</story> <story id="row-counts" implements="FEATURE-RowCounts.md">Report rows, nulls, and distinct counts per column.</story> <story id="sum-mean" implements="FEATURE-SumMean.md">Compute exact sum and mean for integer and number columns.</story> <story id="median" implements="FEATURE-Median.md">Compute the median for integer and number columns.</story> <story id="min-max" implements="FEATURE-MinMax.md">Compute min and max by column type.</story> <story id="decimal-format" implements="FEATURE-DecimalFormat.md">Format decimal results to two places, rounded half away from zero once.</story> <story id="freq-count" implements="FEATURE-FreqCount.md">Count and order distinct non-null values of a column.</story> <story id="freq-limit" implements="FEATURE-FreqLimit.md">Limit frequency rows with --top, default 5.</story> <story id="profile-output" implements="FEATURE-ProfileOutput.md">Write the column profile as RFC 4180 CSV for the default invocation.</story> <story id="usage-errors" implements="FEATURE-UsageErrors.md">Reject malformed arguments with exit 2 and a usage line on standard error.</story> <story id="column-profile" implements="FEATURE-ColumnProfile.md">Profile a single named column with --column.</story> <story id="failure-diagnostics" implements="FEATURE-FailureDiagnostics.md">Write one stderr diagnostic line and nothing on stdout when a command fails.</story> <story id="unreadable-file" implements="FEATURE-UnreadableFile.md">Exit 1 when the file cannot be opened or read.</story> <story id="freq-mode" implements="FEATURE-FreqMode.md">Select frequency mode with --freq.</story> <story id="test-gate" implements="FEATURE-TestGate.md">Provide bin/test.sh running go vet and go test and the project test suite.</story> <story id="release-verification" implements="VERIFICATION.md">Pass the supplied grader sources/run.sh with all 22 checks.</story> </stories>