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
- 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.
- 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.
- 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.
- 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
- Use only story ids that appear in
<stories>. Never invent one. - Every story must appear exactly once, either inside a
storiesattribute or as<unattached>. - Quote the requirement text verbatim from the source in the tag body. Do not paraphrase it.
- Emit nothing but the tags below. No preamble, no commentary, no explanation.
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="full_test.sh"> #!/bin/sh
full_test.sh — scoring entry point. Do not filter, skip, or reinterpret.
#
drydock uat runs sh sources/full_test.sh from the completed application root and takes its
exit code and output as the score.
#
Unlike a conformance fixture, this Target supplies no suite of its own: the source prose makes
"the application provides a POSIX-compatible bin/test.sh" a product requirement (st-001), so the
tests are part of the deliverable. This harness is therefore a dispatcher, and its whole value
is that it is still Commander-owned. An absent bin/test.sh is a delivered product that failed to
meet st-001, which this script reports as a failure — rather than leaving the release gate with
no oracle at all, where an unbuilt project grades PASSED by default.
set -eu
if [ ! -f bin/test.sh ]; then echo "error: no bin/test.sh at the application root." >&2 echo "st-001 requires the application to provide a POSIX-compatible bin/test.sh that exits" >&2 echo "zero when every automated test passes." >&2 exit 1 fi
exec sh bin/test.sh </source>
<stories> <story id="architecture" implements="ARCHITECTURE.md">Establish the Flask application structure and module boundaries.</story> <story id="database" implements="DATABASE.md">Provide relational persistence for ordered books.</story> <story id="ui-general" implements="UI-GENERAL.md">Define the shared server-rendered interface patterns.</story> <story id="reading-list" implements="FEATURE-READING-LIST.md">Serve the ordered reading-list view.</story> <story id="add-book" implements="FEATURE-ADD-BOOK.md">Add a valid book to the reading list.</story> <story id="remove-book" implements="FEATURE-REMOVE-BOOK.md">Remove a selected book from the reading list.</story> <story id="validate-book" implements="FEATURE-VALIDATE-BOOK.md">Reject incomplete book submissions with correction feedback.</story> <story id="reading-list-screen" implements="SCREEN-ReadingList.md">Assemble the primary reading-list page and interactions.</story> <story id="verification" implements="FEATURE-VERIFICATION.md">Provide the complete POSIX automated test runner.</story> </stories>