Skip to content

Implement Distill #86

Description

@ineedjet

Summary

distill is one of the two remaining placeholder jobs in proposal-shared.yml (propose/apply/reject are implemented; distill/rework are not). This issue is the concrete implementation of Distill, split out from #11 now that #11 itself is closed.

What #11 specifies

Distill — agent — diff the proposal's original values against what the human edited directly, classify the lesson, and (when warranted) open a pull request improving the regulations that produced the original proposal.

This is exactly the loop #13 ("Build a regulation improvement feedback loop") describes at a higher level — Distill is that loop's concrete trigger and mechanism, not a separate design.

Open questions

  • Diffing needs an "original" snapshot. Apply reads the proposal's current field values — if a human edited fields directly before triggering Distill, the proposal issue's current state already reflects the edit, with no record of what the agent originally proposed. Nothing today captures that original snapshot. Where does it live — a copy stored at Propose time (e.g. in the control comment, a hidden field, or an external store), or reconstructed from Issue history/timeline events?
  • What counts as "warranted"? Not every diff is a lesson worth a regulations PR (a typo fix isn't; a systematic misjudgment might be). Is this classification itself an agent judgment call with no hard threshold, or does Build a regulation improvement feedback loop #13 need to define one?
  • Where does the regulations PR land? regulations_repo/regulations_path are already proposal-shared.yml inputs (currently unused) — presumably Distill opens its PR there, but against which base branch, with what review/merge gate (per Build a regulation improvement feedback loop #13: "the improving agent cannot merge its own regulation changes").
  • Model invocation. Needs whatever Design a configurable agent execution contract #9 (configurable agent execution contract) ends up defining for how a job gets model credentials, regulations content, and playbook/prompt structure — distill shouldn't invent its own ad hoc invocation shape if Design a configurable agent execution contract #9 lands first.
  • Composition with the existing deterministic CLI. actions/proposal's modes so far (dequeue/list-fields/propose/apply/reject/check-control-comment) are all deterministic GraphQL orchestration with mocked or no model involvement. Does distill become a new mode in that same tool (with the model call as one step inside it), or a separate action entirely, given it's genuinely agent-driven rather than deterministic?

Acceptance criteria

  • A defined mechanism captures the proposal's original (agent-proposed) values distinctly from its current (possibly human-edited) values, for diffing.
  • distill classifies whether a diff is a lesson worth acting on, not just detects that a diff exists.
  • When warranted, distill opens a pull request against regulations_repo/regulations_path describing the proposed regulation change, without merging it itself.
  • Verified live against a real diff/regulations-PR cycle, not just unit-level.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions