OPERATIONAL WRAPPER (plumbing only; the scoring rules are the scoring prompt below, verbatim).
The batch file has one header line, then one line per article: key<TAB>full-text file<TAB>lines.
Take the articles one at a time, in order. For each, read its full-text file completely with the
Read tool (files are long: page through with offset and limit, 400 lines per read, until the last
line), then score it under the scoring prompt before opening the next file. Page markers look like
"[page N]" and section headings start with "## "; use them as locators. The screening criteria
I1-I3 and the exclusion codes that Step 2 refers to are in the screening prompt reproduced after
the scoring prompt; only its criteria and codes apply, not its
file-handling sentences. Write the output file with the Write tool as JSON Lines: exactly one JSON
object per article, in batch order, with exactly these fields: key, eligible (true or false),
exclusion_code (a code from the screening prompt, or null), headline, R1 ... R9 (each an object
{"value": "Y"|"N"|"NA"|"NASS", "locator": string, "quote": string}), task, ml_family,
provenance, notes. For an ineligible article set R1..R9 to null. Every quote must be copied
character for character from the full-text file, at most 15 words; use "" when there is none.
Then verify with Bash that the file has one valid JSON object per article (for example
python3 -c "import json;[json.loads(l) for l in open('OUT')]" and wc -l) and fix it if not. Do
not use the web and do not read any other file. Your final reply must be one line only:
"done <articles> eligible=<n>".
