Parent: #366
Problem statement
Raw top-level comments and inline threads can be noisy, stale, duplicated, or settled. Stuffing the raw discussion into downstream prompts is another form of context stuffing and can poison reviewer judgment.
Proposed change
Add a durable LLM task that runs after raw PR discussion fetch and gate/override checks, but before final dossier assembly. It should summarize and normalize top-level comments and inline threads into structured artifacts that the dossier builder can consume.
The summary should represent:
- Top-level comments that affect review judgment.
- Inline threads mapped to file/line anchors.
- Settled threads as concise decisions, for example
Settled: Decided <decision>.
- Unresolved human disagreement with enough detail to preserve the open question.
- Agent/bot threads aggressively summarized when settled.
Empirical success criteria
- First run emits an existing structured progress line like
op="run_llm_task" task_id="dossier-discussion-summary" phase="dossier".
- Re-running without discussion changes emits
op="load_llm_task" for the same task.
- Adding or changing a relevant comment/thread changes the discussion payload digest and reruns this task plus dependent downstream tasks.
- Generated summary artifacts preserve file/line anchors for inline threads.
- Settled and unresolved thread examples are distinguishable in the generated output.
Additional context
The logging breadcrumbs are only observability for this task. The core deliverable is reusable, anchored discussion context for dossier assembly.
Parent: #366
Problem statement
Raw top-level comments and inline threads can be noisy, stale, duplicated, or settled. Stuffing the raw discussion into downstream prompts is another form of context stuffing and can poison reviewer judgment.
Proposed change
Add a durable LLM task that runs after raw PR discussion fetch and gate/override checks, but before final dossier assembly. It should summarize and normalize top-level comments and inline threads into structured artifacts that the dossier builder can consume.
The summary should represent:
Settled: Decided <decision>.Empirical success criteria
op="run_llm_task" task_id="dossier-discussion-summary" phase="dossier".op="load_llm_task"for the same task.Additional context
The logging breadcrumbs are only observability for this task. The core deliverable is reusable, anchored discussion context for dossier assembly.