~bigbes/sr-ht-spec · parade

main · last commit 18 hours ago · 8tmadfpi

← Back to the parade

spec-zqb Phase 3: write plane — agents propose Past Stand

status: closed P1 feature @Eugene Blikh
bd reopen spec-zqb
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-07-23T04:08:58Z
Started2026-07-23T04:52:59Z
Updated2026-07-23T05:29:29Z
Closed2026-07-23T05:29:29Z
Description
The agent half of the loop, and the service's whole premise: an agent proposes a document change, gets back a link, a human approves in a browser. Until this ships, agents can only read.
Design
Scope: proposals (branch proposals/<id> + Postgres row, state open->merged|rejected); the If-Match tree-splice merge with the four staleness cases and the ancestry check gitx flagged; the single agent token + mandatory provenance trailers; spec_propose / spec_comment over REST + MCP; every write response returns {proposal, url} so the agent can hand over a link. Prereqs found during Phases 1-2: (1) service.ListProposals(space, state) — graph proposal listing is stubbed and db only has ListProposalsByState; (2) IsAncestor(proposalHead, H) check before Merge so an already-merged proposal reports 'already merged' not a confusing 409; (3) auto-merge policy evaluation (.spec.yml AutoMerges) which the reconciler's 'approval=policy' inference also wants. Dispatch like Phases 1-2: proposal orchestration in service/ first and committed, then surface tools fan out. This is where the merge model and reconciler first run under real proposals rather than on paper.

Depends on

  • spec-ejq — spec.sr.ht — reviewable document storage for humans and agents parent-child open

Depended on by

  • spec-3vz — Phase 4: review plane — approve/reject in a browser blocks

Unblocks — everything waiting on this, transitively

  • spec-3vz — Phase 4: review plane — approve/reject in a browser blocks closed
  • spec-by6 — Phase 5: comments, webhooks, mutations, vector search blocks open
  • spec-by6.3 — Phase 5b: inline comments on proposals parent-child closed
  • spec-by6.3.2 — service: comment API + policy auto-merge gate parent-child closed
  • spec-by6.3.4 — mcpsrv: spec_comment tool (read + reply, no resolve) blocks closed
  • spec-by6.3.3 — web: commentable diff — context blocks, anchor ids, comment UI blocks closed
  • spec-by6.3.1 — Comment anchors: core type + db schema parent-child closed
  • spec-by6.3.5 — Port review UI to a line-numbered unified prose diff parent-child closed
  • spec-3m9 — Phase 5a: webhooks + notifications on proposal lifecycle parent-child closed
  • spec-8y4 — Phase 5a-1: adopt core-go graph conventions (directives, database.Model, cursors, auth+user model) parent-child closed
  • spec-45j — Phase 5a-2: webhook tables, SDL, resolvers, delivery on proposal open/merge/reject parent-child closed
  • spec-by6.2 — Attachments: image embeds render as visibly missing parent-child open
  • spec-by6.4 — A code fence whose only change is its info string renders as unchanged parent-child closed
  • spec-by6.1 — GraphQL complexity limit on the /query surface parent-child open
  • spec-by6.5 — prosediff: an equal span's Space flag is read from the old side only parent-child closed

No comments.

Close reason

Write plane shipped: service.Propose/Merge/Reject/ListProposals with provenance trailers, auto-merge policy, If-Match staleness + already-merged ancestry check; surfaces graph (Proposals port), mcpsrv spec_propose, and new api/ REST PUT — every write returns {proposal, url}. Validated end-to-end against Postgres. spec_comment deliberately deferred to Phase 5 (spec-by6), which gates the comment schema on the Phase 4 review UI; the approve/reject browser UI is Phase 4 (spec-3vz).
  • Eugene Blikh created the issue · 2026-07-23T07:08:58Z
  • Eugene Blikh added under epic spec-ejq · 2026-07-23T07:09:24Z
  • Eugene Blikh spec-3vz now depends on this · 2026-07-23T07:09:26Z
  • Eugene Blikh claimed · 2026-07-23T07:52:59Z
  • Eugene Blikh closed the issue · 2026-07-23T08:29:29Z
    Write plane shipped: service.Propose/Merge/Reject/ListProposals with provenance trailers, auto-merge policy, If-Match staleness + already-merged ancestry check; surfaces graph (Proposals port), mcpsrv spec_propose, and new api/ REST PUT — every write returns {proposal, url}. Validated end-to-end against Postgres. spec_comment deliberately deferred to Phase 5 (spec-by6), which gates the comment schema on the Phase 4 review UI; the approve/reject browser UI is Phase 4 (spec-3vz).
Stored rows — what this pane was built from, as read
issues 1 row
id spec-zqb
content_hash c07464bc7a9591857c6b728007a315cf1ff427be76a0aa4c2f54c75081d776a2
title Phase 3: write plane — agents propose
description The agent half of the loop, and the service's whole premise: an agent proposes a document change, gets back a link, a human approves in a browser. Until this ships, agents can only read.
design Scope: proposals (branch proposals/<id> + Postgres row, state open->merged|rejected); the If-Match tree-splice merge with the four staleness cases and the ancestry check gitx flagged; the single agent token + mandatory provenance trailers; spec_propose / spec_comment over REST + MCP; every write response returns {proposal, url} so the agent can hand over a link. Prereqs found during Phases 1-2: (1) service.ListProposals(space, state) — graph proposal listing is stubbed and db only has ListProposalsByState; (2) IsAncestor(proposalHead, H) check before Merge so an already-merged proposal reports 'already merged' not a confusing 409; (3) auto-merge policy evaluation (.spec.yml AutoMerges) which the reconciler's 'approval=policy' inference also wants. Dispatch like Phases 1-2: proposal orchestration in service/ first and committed, then surface tools fan out. This is where the merge model and reconciler first run under real proposals rather than on paper.
acceptance_criteria
notes
status closed
priority 1
issue_type feature
assignee Eugene Blikh
estimated_minutes NULL
created_at 2026-07-23T04:08:58Z
created_by Eugene Blikh
owner bigbes@gmail.com
updated_at 2026-07-23T05:29:29Z
closed_at 2026-07-23T05:29:29Z
closed_by_session
external_ref NULL
spec_id
compaction_level 0
compacted_at NULL
compacted_at_commit NULL
original_size NULL
sender
ephemeral 0
wisp_type
pinned 0
is_template 0
mol_type
work_type
source_system
metadata �{}
source_repo
close_reason Write plane shipped: service.Propose/Merge/Reject/ListProposals with provenance trailers, auto-merge policy, If-Match staleness + already-merged ancestry check; surfaces graph (Proposals port), mcpsrv spec_propose, and new api/ REST PUT — every write returns {proposal, url}. Validated end-to-end against Postgres. spec_comment deliberately deferred to Phase 5 (spec-by6), which gates the comment schema on the Phase 4 review UI; the approve/reject browser UI is Phase 4 (spec-3vz).
event_kind
actor
target
payload
await_type
await_id
timeout_ns 0
waiters
hook_bead
role_bead
agent_state
last_activity NULL
role_type
rig
due_at NULL
defer_until NULL
no_history 0
started_at 2026-07-23T04:52:59Z
is_blocked 0
dependencies 2 rows
id 358c0130-0e1a-5942-870d-d417425737b6
issue_id spec-3vz
type blocks
created_at 2026-07-23T07:09:26Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id spec-zqb
depends_on_wisp_id NULL
depends_on_external NULL
id e2a29145-51fa-53a4-bf1c-de0d086f56ed
issue_id spec-zqb
type parent-child
created_at 2026-07-23T07:09:24Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id spec-ejq
depends_on_wisp_id NULL
depends_on_external NULL
events 3 rows
id 019f8d29-8cc1-7d90-b19d-8c7c5c36b37c
issue_id spec-zqb
event_type created
actor Eugene Blikh
old_value
new_value
comment NULL
created_at 2026-07-23T07:08:58Z
id 019f8d51-d807-7465-87f6-e94b035bd584
issue_id spec-zqb
event_type claimed
actor Eugene Blikh
old_value {"id":"spec-zqb","title":"Phase 3: write plane — agents propose","description":"The agent half of the loop, and the service's whole premise: an agent proposes a document change, gets back a link, a human approves in a browser. Until this ships, agents can only read.","design":"Scope: proposals (branch proposals/\u003cid\u003e + Postgres row, state open-\u003emerged|rejected); the If-Match tree-splice merge with the four staleness cases and the ancestry check gitx flagged; the single agent token + mandatory provenance trailers; spec_propose / spec_comment over REST + MCP; every write response returns {proposal, url} so the agent can hand over a link. Prereqs found during Phases 1-2: (1) service.ListProposals(space, state) — graph proposal listing is stubbed and db only has ListProposalsByState; (2) IsAncestor(proposalHead, H) check before Merge so an already-merged proposal reports 'already merged' not a confusing 409; (3) auto-merge policy evaluation (.spec.yml AutoMerges) which the reconciler's 'approval=policy' inference also wants. Dispatch like Phases 1-2: proposal orchestration in service/ first and committed, then surface tools fan out. This is where the merge model and reconciler first run under real proposals rather than on paper.","status":"open","priority":1,"issue_type":"feature","owner":"bigbes@gmail.com","created_at":"2026-07-23T04:08:58Z","created_by":"Eugene Blikh","updated_at":"2026-07-23T04:08:58Z"}
new_value {"assignee":"Eugene Blikh","status":"in_progress"}
comment NULL
created_at 2026-07-23T07:52:59Z
id 019f8d73-443d-74e2-b383-b1fe9cac3f89
issue_id spec-zqb
event_type closed
actor Eugene Blikh
old_value
new_value Write plane shipped: service.Propose/Merge/Reject/ListProposals with provenance trailers, auto-merge policy, If-Match staleness + already-merged ancestry check; surfaces graph (Proposals port), mcpsrv spec_propose, and new api/ REST PUT — every write returns {proposal, url}. Validated end-to-end against Postgres. spec_comment deliberately deferred to Phase 5 (spec-by6), which gates the comment schema on the Phase 4 review UI; the approve/reject browser UI is Phase 4 (spec-3vz).
comment NULL
created_at 2026-07-23T08:29:29Z