Imported from AltangadasTbl-source/ai-paper-val (
2018/jama.2018.9128/AGENTS.md). Install upstream withnpx skills add AltangadasTbl-source/ai-paper-val --skill jama.2018.9128. Copyright stays with the author.
Quantitative Quality-Control Review 1.5.2 — Full Source-First Restart
The current project root is exactly one paper package containing one main article and zero or more support files. Workflow 1.5.2 restarts the entire review from supplied sources, including inventory, text/table extraction, page rendering/OCR decisions, quantitative relationship mapping, discovery, recheck, and reporting. Existing audit outputs may remain in the package, but they are not evidence inputs or discovery boundaries for this run.
Use English only in prompts, generated artifacts, logs, and reports. Preserve every supplied source and every pre-existing audit artifact. Write new work only to:
.ai_paper_validation/review_1_5_2/.ai_paper_validation/final_report_1_5_2.md.ai_paper_validation/final_report_1_5_2.html
Agent-first execution
Start immediately and operate autonomously. The coordinator plans source and stage coverage,
delegates bounded disjoint scopes to specialist agents, merges their durable artifacts, and verifies
completion. Python is auxiliary only. Do not use Python to orchestrate scientific review, choose
pages, select candidates, perform ordinary PDF extraction, or run OCR. Prefer direct local tools:
sha256sum, file, pdfinfo, pdftotext, pdftoppm/pdftocairo, tesseract, and
libreoffice/soffice. The only permitted Python helpers are the optional Office structure
extractor, deterministic token-cost calculator, report renderer, and final validator in
workflow_1_5_2/scripts/. The calculator summarizes authoritative runtime usage; it does not estimate
tokens from review text.
Use artifact-first handoffs. Every specialist writes complete English output to one unique assigned path and returns only compact status, exact scope, counts, limitations, and one artifact path. Never let two agents write the same artifact concurrently. Shard by disjoint pages, tables, relationships, or candidate IDs when needed; shard size is a context bound, never a finding limit.
Do not create, rewrite, or require a writable package-root .codex/ directory during validation.
The bundled .codex files are optional runtime presets. If they cannot be installed, spawn specialists
with explicit model and reasoning-effort arguments and the role contract in this workflow.
Read before reviewing
Read completely:
QUALITY_CONTROL_SCOPE.mdPERFORMANCE_PROFILE.mdworkflow_1_5_2/review_contract.mdworkflow_1_5_2/report_spec.mdworkflow_1_5_2/settings.toml
Ignore all old OCR, extracted text/tables, candidate sets, review queues, verifier/critic records, endetail reports, and final reports as evidence inputs. Do not delete them. The only permissible use of an old audit directory is to avoid writing into or overwriting it.
Required workflow
- Record the UTC start time, then inventory every direct source, its complete stable unit count, and
SHA-256 in
.ai_paper_validation/review_1_5_2/source_hashes_before.sha256. Set a package-specific target and boundedTarget basisfromPERFORMANCE_PROFILE.md; do not infer either from SAP length or page count alone. Initialize every required field inrun_state.md. Initializeagent_execution_manifest.mdwith the current coordinator and add every spawned agent exactly once as the run proceeds; the manifest is not limited to statistical agents. - Use
qc15_fresh_source_preprocessorto classify all direct sources and create a new evidence-asset inventory underreview_1_5_2/. Extract PDF native text and layout text directly. Convert Office sources locally when possible and use the optional structure extractor only when needed. Render result-relevant pages and use direct CPU Tesseract only for pages whose native text is unusable. Insource_coverage.md, record one row per direct source with total units, zero reusable units, fresh-required units equal to total units, mapped units, and status. - Create
coverage_manifest.mdbefore scientific extraction. Record every source/evidence unit and disjoint stage assignment. The plan must cover all result-relevant main and support contents, not only primary outcomes, significant results, or old cited pages. Each row contains exactly one plain relative artifact path; put every shard part on its own row. - Run
qc15_main_quantitative_mapperandqc15_support_quantitative_mapperin parallel over disjoint newly prepared units. Map all result-relevant numeric and statistical relationships. - Run numeric and cross-source review in new Terra/medium agents. Independently spawn a new
gpt-5.6-terra/highagent for statistical pass 1; do not reuse a mapper agent or use follow-up to request a reasoning-effort change. Record the runtime agent ID, model, effort, start mode, and one output artifact inagent_execution_manifest.md. After each completed model response, retain its authoritative runtime usage record for later token accounting when the runtime exposes it. Each lane completes every assigned relationship. There is no target, minimum, maximum, top-N rule, or review queue. - Merge only genuine duplicates before stable IDs. Assign
C001,C002, ... to every distinct candidate and writecandidate_ledger.md, preserving all provenance and locations. - Run
qc15_evidence_recheckerover every stable ID against exact source locations. - Spawn a different new
gpt-5.6-terra/highagent for statistical pass 2 over every statistical relationship, the complete cross-lane ledger, and all recheck facts. Record its distinct runtime ID inagent_execution_manifest.md. Append genuinely new candidates without renumbering, then recheck every appended ID. - Run
qc15_quality_control_auditorover every stable ID, coverage row, source-coverage row, and the statistical execution manifest. Repair supportable omissions, but never delete or suppress an assigned candidate ID. - Run
qc15_report_generatorto assemble the complete Markdown report. It must contain every ledger candidate. If complete coverage finds none, produce a zero-candidate report documenting coverage and limitations. For a large ledger, generate disjoint candidate-card parts in parallel waves and merge all parts; never shorten the report to fit one agent call. - Immediately after Markdown assembly, finalize
run_state.md. TreatFinished UTCas the token- accounting cutoff. Writetoken_usage_ledger.csvfor the coordinator and every manifested agent, using exact response-level runtime/API usage only. UseTOTALS_ONLYwhen exact input/output/total counts exist without billing details; useUNAVAILABLEplus exact__token fields when no count is exposed. Never approximate from text length. Run the bundled cost calculator, then copy the exact performance fields, token-accounting status, per-model totals, package total, and token-only price estimate into the report. Recompute source hashes, render HTML once, and validate:
python3 workflow_1_5_2/scripts/calculate_token_cost.py \
--ledger .ai_paper_validation/review_1_5_2/token_usage_ledger.csv \
--pricing workflow_1_5_2/token_pricing.toml \
--markdown .ai_paper_validation/review_1_5_2/token_usage_summary.md \
--json .ai_paper_validation/review_1_5_2/token_usage_summary.json
python3 workflow_1_5_2/scripts/render_report.py \
.ai_paper_validation/final_report_1_5_2.md \
.ai_paper_validation/final_report_1_5_2.html \
--profile 1.5.2
python3 workflow_1_5_2/scripts/validate_review.py --profile 1.5.2 --package .
Repair correctable defects until
.ai_paper_validation/review_1_5_2/review_validation.json reports PASS.
If elapsed time exceeds the selected target's upper bound, record bounded causes and complete the work;
do not omit coverage or candidates to meet the target.
If a repair requires another model call after Finished UTC, reopen the accounting window, update the
finish time and manifest/ledger, and rerun the token calculation before rendering and validation.
Fixed scientific and communication boundaries
- Prioritize numeric, denominator/proportion/total, inferential-statistical, cross-document numeric, effect-measure/label/scale, and rate-versus-count consistency.
- Analysis-unit, randomization-level, sample-unit, or population-definition issues are secondary and qualify only when they create a concrete inconsistency in a reported number, statistic, denominator, label, or interpretation.
- Do not perform a broad methodology, study-design, clinical, novelty, misconduct, or raw-data audit.
- Use only supplied package evidence. Do not browse the web or use external literature.
- Never register a candidate solely because a very small P value is displayed as
P = 0,p = 0.000, or equivalent. Treat coherent display zero as finite-precision shorthand and recordDISPLAY_ZERO_NOT_CANDIDATE. Require an independent supplied-source contradiction before assigning aCID, and frame the candidate around that contradiction. - Treat findings as quality-control candidates. Explain that small preventable reporting defects can enter systematic reviews, meta-analyses, or later evidence products, but do not claim propagation or conclusion change without supplied-package evidence.
- Never assign
Major,Minor,Verified,Rejected,Uncertain, severity, validity, acceptance, exclusion, or a final correction. Every candidate remainsPending Human Adjudication. - Preserve 1.2-style truthful relative links: PDF evidence ends in
#page=N; workbook evidence names worksheet and exact cells; CSV evidence names row and column; DOC/DOCX evidence names a stable paragraph/table location or a locally derived PDF page. - The Linux target is CPU-only. Use native text first and targeted direct Tesseract OCR only when needed; never probe or invoke a GPU.
Completion
Do not finish until every direct-source row has mapped units equal to total units; all coverage rows
are complete and contain one artifact path; both fresh Terra/high statistical agents are recorded and
cover every registered relationship; every actual agent including the coordinator appears in both the
execution manifest and token ledger; agent- and model-level token summaries are current;
ledger/recheck/quality/report ID sets are identical; every local
evidence link resolves; source hashes are unchanged; standalone HTML exists with embedded CSS and a
table of contents; and the validator reports PASS.