Skip to content

[feat] Intent-before-action protocol: objection window logic #45

@NoobyGains

Description

@NoobyGains

Context

docs/protocols.md sec 1 ("Intent-before-action"): an agent publishes a Plan, then must wait an objection window (default 15s, configurable per Plan) before acting. Other agents may file a Disagreement during the window, which pauses the Plan until resolved. This is the protocol that turns parallel agents from a race into a coordination.

Desired behavior

A @quorum/protocol-intent module exposing:

  • openObjectionWindow(planId, windowMs): Promise<"clear" | "objected">.
  • Status transitions on the Plan artifact: draft -> proposed -> (clear|objected) -> approved|withdrawn.
  • On Disagreement filed against the Plan within the window: emit a PlanObjected event, freeze status, surface to author via [feat] MCP stdio server stub responding to ping #9.
  • On window expiry with no Disagreement: transition to approved and emit PlanCleared.
  • Idempotent on replay (timer state derived from proposedAt, not in-memory).

Acceptance criteria

  • Window timer survives process restart (re-derived from artifact timestamps).
  • Concurrent objections handled deterministically (first-write-wins via chore(ci)(deps): Bump actions/checkout from 4 to 6 #2 CAS).
  • Default window 15s, per-Plan override honored.
  • Unit tests pass.
  • Integration test against real git repo (no mocks) — reproduce docs/protocols.md t+12s -> t+31s sequence end to end.

Implementation notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions