Objective
PR comments were unreadable — reviewer could not tell what task was based on details there. Earlier research/findings Markdown notes actually detailed in plain English what the task was about and what was accomplished. Make that durable, searchable, and enforced by the pipeline, with the same note surfacing in the changelog (docs/results.html / docs/site-data/results.json) and duplicated into the PR Summary.
Approach
- Extended the pipeline
completionnode contract inresearch/pipeline/graph.jsonto requireresult_entry_path(research/results/<task-id>.md) andresult_entry_summary(one-paragraph plain-English summary duplicated into the PR). - Updated
research/pipeline/prompts.jsoncompletion prompt to instruct agents to write that Markdown note with YAML front matter (id/title/summary/category/completed_at) plus body sections Objective/Approach/Files changed/Validation/Results, then rebuild withpython3 -m research.reports.resultsorbuild --render. - Added runtime enforcement in
research/pipeline/runtime.py:completionnow validatesresult_entry_pathshape and that the file exists atrepo_rootbefore reachingawaiting_shipping. - Added artifact contract
changelog_entryinresearch/pipeline/artifact_contracts.jsonrequiringresearch/results/{result_id}.md,docs/site-data/results.json,docs/results.html,docs/results/{result_id}.htmlandpython3 -m research.reports.results+ static check. Movedcompletionout ofgeneric_change. - Updated offline verifier
research/pipeline/verify.pyto exercise the new completion fields, ensure the durable note exists for every route, and routerepo_rootcorrectly for file checks. - Made PRs self-explanatory in
research/scripts/pr_body.py(--result-file) andresearch/scripts/open_pr.sh(auto-discoversresearch/results/<task-id>.mdfrom--task-idand duplicates its summary into## Summarywith aTask note: <path>footer). The same note file is what the changelog renders, so search isgit grepon Markdown, PR body has a quick duplicate, anddocs/site-data/results.jsonis the changelog source. - Updated docs:
research/results/README.md(pipeline MUST),docs/site-data/README.md(results.jsonpayload).
Files changed
research/pipeline/graph.json— completionrequired_outputnow includesresult_entry_path+result_entry_summaryresearch/pipeline/prompts.json— completion prompt with durable note + rebuild instructionsresearch/pipeline/runtime.py— completion semantic + file-existence check (repo_rootaware)research/pipeline/artifact_contracts.json— newchangelog_entrycontract,completionremoved fromgeneric_changeresearch/pipeline/verify.py— fixture completion note,repo_rootplumbing, new overridesresearch/scripts/pr_body.py—--result-filesupport,_extract_result_note, duplicate into Summary + Task headerresearch/scripts/open_pr.sh—--result-file+ auto-discover from--task-idresearch/results/README.md— pipeline contract notedocs/site-data/README.md—results.jsonchangelog payload descriptionresearch/results/qm-9kwp.md— this durable note (example of the new contract)
Validation
python3 -m research.pipeline validate
# → {"status":"passed", "nodes":28, "edges":38, "graph_hash":"sha256:6802..."}
python3 -m research.pipeline verify --offline
# → {"status":"passed", "node_coverage":{"covered":28,"total":28}, ...}
python3 -m research.reports.results
# → writes docs/site-data/results.json, docs/results.html, docs/results/qm-9kwp.html
python3 research/scripts/check_static_reports.py docs
# → static site checks pass (progress/coverage linkage intact)
# PR helper duplicate check
python3 research/scripts/pr_body.py --summary "dummy" --considerations "c" --changes "c" --validation "c" --risks "None" --task-id qm-9kwp --result-file research/results/qm-9kwp.md --output /tmp/body.md
grep -q "Task note:" /tmp/body.md && echo "PR duplicate ok"
git grep -l "durable searchable task note" research/results
# → research/results/qm-9kwp.md (proves git-grep searchability)
Results
Every future pipeline completion now has:
- A searchable Markdown file at
research/results/<task-id>.md(front matter + plain English).git grepfinds it without opening a PR. - A PR Summary that duplicates that file's summary with a
Task note: research/results/<id>.mdlink — instant readability. - A changelog entry in
docs/site-data/results.json+docs/results.html+docs/results/<id>.htmlrebuilt deterministically viaresearch.reports.results.
Legacy research/findings/*<em>/</em>.md notes remain valid and are referenced via source_report pointer instead of duplicated.
Risks / follow-ups
- Existing tasks that already passed
completionwill not retroactively gain a result file; they remain searchable only via PR bodies/commit messages. A backfill is not required unless audit finds high-value tasks missing. - The file-existence check in
completionfail-closes the run if the agent forgets to writeresearch/results/<id>.md— correct behavior, but agents must remember to write before submitting the final node. --result-fileauto-discover inopen_pr.shonly triggers when--task-idmatches a file that exists on disk at PR creation time; manual--result-filemay be needed for out-of-directory runs.
Links
- Task:
qm-9kwp - Detailed analysis:
research/pipeline/graph.json,research/pipeline/prompts.json,research/pipeline/runtime.py,research/pipeline/artifact_contracts.json,research/pipeline/verify.py(completion contract and enforcement) - Code changes:
research/pipeline/*,research/scripts/pr_body.py,research/scripts/open_pr.sh,research/reports/results.py,research/results/README.md,docs/site-data/README.md - Experiments / data:
python3 -m research.pipeline validate,python3 -m research.pipeline verify --offline(28 nodes/38 edges),python3 -m research.reports.resultsdeterministic rebuild - Affected website pages:
docs/results.html(changelog index),docs/site-data/results.json(results/v1payload),docs/results/qm-9kwp.html(detail), PR body duplication via--result-file