Skip to content

feat(distill): synthesize rolling_pr articles instead of appending raw learnings #328

Done

Description

@jflowers

Problem

rolling_pr never synthesizes. Since commit 7fe5976 (RenderDraftArticle), and after #297 (RenderThemeArticle), each run appends every new learning verbatim as a ## <id> section under the existing article. The result on the 2026-12-01 hub run:

What was intended

Synthesis, consistently:

Raw append was never decided in an issue, spec or review. It arrived in 7fe5976, justified only by determinism (SC-004: an unchanged render must not commit).

Proposal

  1. Synthesize inside rolling_pr using the synthesizer compile already has. Prompt: the base article plus this run's new learnings. The model revises the prose, marks superseded or contradicted claims, and cites learning IDs inline.
  2. Keep the guards: the citation-superset check, plus a check that every new member ID is cited. If a check fails, fall back (step 5), never commit unverified prose.
  3. Cap per theme per run at a configurable N (default 30–50) new learnings; the rest stay in scope for the next run, the same way small themes are deferred.
  4. Redefine SC-004 as "no new members, no commit" (scope-based) instead of byte equality of the render, since LLM output isn't deterministic.
  5. Fallback when no synthesizer is configured or synthesis fails: write new learnings to a <theme>.pending.md sidecar for the interactive /dewey-distill curator, instead of appending to the article.
  6. PR body: list contradictions and supersessions the synthesis found, so the reviewer looks at those first.
  7. Spec: amend FR-012 from "regenerated" to "synthesized" and add the cap.

Alternatives considered: a "changes since" delta section only (never consolidates old prose); agent-side synthesis through MCP (brings the client timeouts back, and agent-side grouping uses tags rather than embeddings, so themes wouldn't match).

Related

Activity

  1. added a commit that references this issue on Dec 1, 2026
    2256c50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions