Run artifact

evidence/prompts/20260822.050638.760Z_jq_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="exclusions.txt">

exclusions.txt — corpus cases this kit cannot run, and why.

#

The corpus in sources/jq.test is byte-for-byte upstream and is never edited. Where a case

cannot run under this kit's harness, it is named here instead, so every skip is visible,

reasoned, and auditable against the upstream file. This file is a scoring asset: it is

hash-verified against the import and restored before grading.

#

One verbatim program line per entry. An entry that matches no case in the corpus is a hard

error (exit 2), not a shrug — a silent no-op would quietly re-admit a case the kit cannot run

if the corpus pin ever moved.

#

Nothing is excluded for being hard. The module-loader cases below are excluded because the

kit physically cannot deliver their inputs, not because the semantics are difficult.

--------------------------------------------------------------------------------------------

Module loading from disk.

#

These cases resolve import and include against a module search path supplied by jq's -L

flag, reading roughly twenty fixture files spread across nested directories upstream

(tests/modules/{b,c,lib/jq/e,home2/.jq,...}). Drydock copies a kit's declared sources into the

application flattened by basename, so that directory tree cannot be carried, and the interface

this kit fixes exercises no flag but -c.

#

Only the loader cases are excluded. The module grammar cases — module (.+1); 0,

module []; 0, include "a" (.+1); 0, include "a" []; 0, include "\ "; 0,

include "\(a)"; 0, and %::wat — remain in the scored set: they are parse errors that a

correct front end rejects without ever touching the filesystem.

--------------------------------------------------------------------------------------------

import "a" as foo; import "b" as bar; def fooa: foo::a; [fooa, bar::a, bar::b, foo::a] import "c" as foo; [foo::a, foo::c] include "c"; [a, c] import "data" as $e; import "data" as $d; [$d[].this,$e[].that,$d::d[].this,$e::e[].that]|join(";") import "data" as $a; import "data" as $b; def f: {$a, $b}; f include "shadow1"; e include "shadow1"; include "shadow2"; e import "shadow1" as f; import "shadow2" as f; import "shadow1" as e; [e::e, f::e] import "syntaxerror" as e; . import "test_bind_order" as check; check::check

modulemeta reports a module's declared dependencies and definitions. Its three cases take

the module name "c" as input and read tests/modules/c/c.jq from the search path, so they fail

for the same reason as the loader cases above.

modulemeta modulemeta | .deps | length modulemeta | .defs | length </source>

<stories> <story id="architecture-foundation" implements="ARCHITECTURE.md">Establish the standalone Python interpreter architecture and executable boundary.</story> <story id="EXEC-001" implements="FEATURE-Executable-Entry-Point.md">Implement the executable jq entry point.</story> <story id="EXEC-002" implements="FEATURE-Process-Contract.md">Implement jq process exit and diagnostic behavior.</story> <story id="EXEC-003" implements="FEATURE-JSON-I-O.md">Implement JSON input and compact output handling.</story> <story id="PARSE-001" implements="FEATURE-Lexer.md">Implement jq lexical scanning.</story> <story id="PARSE-002" implements="FEATURE-Literals-and-Strings.md">Implement literals, strings, escapes, and interpolation.</story> <story id="PARSE-003" implements="FEATURE-Filter-Grammar.md">Implement the core jq filter expression grammar.</story> <story id="PARSE-004" implements="FEATURE-Advanced-Grammar.md">Implement declarations, control syntax, and grammar rejection.</story> <story id="CORE-001" implements="FEATURE-Generator-Core.md">Implement stream-valued filter evaluation.</story> <story id="CORE-002" implements="FEATURE-Composition.md">Implement composition and cartesian evaluation.</story> <story id="CORE-003" implements="FEATURE-Errors-and-Optional.md">Implement empty, runtime errors, optional evaluation, and partial output.</story> <story id="CORE-004" implements="FEATURE-Truthiness-and-Comparison.md">Implement truthiness, equality, and ordering semantics.</story> <story id="VALUE-001" implements="FEATURE-Value-Model.md">Implement the jq value model and numeric edge cases.</story> <story id="VALUE-002" implements="FEATURE-Accessors.md">Implement field and index access.</story> <story id="VALUE-003" implements="FEATURE-Slices-and-Iteration.md">Implement slices and collection iteration.</story> <story id="VALUE-004" implements="FEATURE-Type-and-Numeric-Primitives.md">Implement type, length, numeric predicates, and math primitives.</story> <story id="CONF-001" implements="FEATURE-Conformance-Assets.md">Stage and validate immutable conformance assets.</story> <story id="FLOW-001" implements="FEATURE-Arithmetic-and-Structural-Operators.md">Implement arithmetic and structural operators.</story> <story id="FLOW-002" implements="FEATURE-Boolean-and-Alternative-Operators.md">Implement boolean and alternative operators.</story> <story id="FLOW-003" implements="FEATURE-Conditionals-and-Exception-Flow.md">Implement conditionals and exception flow.</story> <story id="FLOW-004" implements="FEATURE-Labels-and-Breaks.md">Implement lexical labels and breaks.</story> <story id="FLOW-005" implements="FEATURE-Reductions-and-Iteration-Control.md">Implement reductions and iteration-control builtins.</story> <story id="FLOW-006" implements="FEATURE-Recursive-Generators.md">Implement recursive generators.</story> <story id="FUNC-001" implements="FEATURE-Variable-Bindings.md">Implement lexical variable bindings.</story> <story id="FUNC-002" implements="FEATURE-Function-Parameters.md">Implement filter and value function parameters.</story> <story id="FUNC-003" implements="FEATURE-Function-Definitions.md">Implement function definitions, scope, redefinition, and recursion.</story> <story id="FUNC-004" implements="FEATURE-Destructuring-Alternatives.md">Implement destructuring alternatives.</story> <story id="PATH-001" implements="FEATURE-Path-Discovery.md">Implement path discovery and projection.</story> <story id="PATH-002" implements="FEATURE-Path-Primitives.md">Implement path access and mutation primitives.</story> <story id="PATH-003" implements="FEATURE-Assignment-Operators.md">Implement deletion and assignment operators.</story> <story id="PATH-004" implements="FEATURE-Complex-Assignments.md">Implement complex assignment edge cases.</story> <story id="DATA-001" implements="FEATURE-Collection-Transformations.md">Implement collection transformation builtins.</story> <story id="DATA-002" implements="FEATURE-Sorting-and-Grouping.md">Implement sorting, grouping, and extrema builtins.</story> <story id="DATA-003" implements="FEATURE-Object-Entries-and-Containment.md">Implement object-entry and containment builtins.</story> <story id="DATA-004" implements="FEATURE-Index-and-Membership.md">Implement index, membership, search, and SQL-style utilities.</story> <story id="TEXT-001" implements="FEATURE-String-Manipulation.md">Implement string manipulation builtins.</story> <story id="TEXT-002" implements="FEATURE-Formats-and-Serialization.md">Implement JSON conversion and output formats.</story> <story id="TEXT-003" implements="FEATURE-Regular-Expressions.md">Implement regular-expression filters.</story> <story id="TEXT-004" implements="FEATURE-Date-and-Time.md">Implement date and time filters.</story> <story id="IO-001" implements="FEATURE-Input-Controls.md">Implement input stream controls.</story> <story id="IO-002" implements="FEATURE-Diagnostics.md">Implement diagnostics and stderr filters.</story> <story id="IO-003" implements="FEATURE-Streaming.md">Implement streaming transformations.</story> <story id="CONF-002" implements="FEATURE-Scoped-Conformance.md">Provide scoped conformance verification for implementation slices.</story> <story id="CONF-003" implements="FEATURE-Full-Conformance.md">Verify the completed interpreter against the full conformance corpus.</story> </stories>