Skip to content

The suggest policy names an approval that nothing can enforce #341

Description

@MongLong0214

From an external review of v0.5.0.

Measured

src/core/capture-policy.ts:

export type CaptureMode = 'suggest';

The pending transaction's phases, across src/:

prepared → verified → staged → applied → consumed

There is no approved, no rejected, and no approval token.

What that means

suggest reads as "produce a candidate rather than committing one automatically", and that is a real policy. But it is not an enforceable one: nothing in the transaction can represent "a human has seen this and said yes", so nothing can refuse to stage a record that was never shown.

Whether a candidate gets approval is currently a property of how a host skill happens to behave, not of the record's own state. Two hosts can disagree and both be within contract.

The UX this blocks

One decision worth keeping from this work:

  Checkout pricing is not reused for the admin quote — the two flows
  round and discount differently.

  [keep]  [skip]

with:

  • at most one prompt per commit
  • at most candidates
  • skip is completely ordinary — most commits carry nothing
  • editing re-verifies
  • staging refused before approval
  • silence on a trivial commit

Two ways in, and they are not equivalent

  1. Host-side only. A skill withholds the stage call until the user answers. Ships fastest, changes no schema — but the contract is still unenforceable, and a different host can stage without asking.
  2. A phase in the transaction. Approval becomes state the core can check, and stage can refuse. This changes the pending format, so it needs an ADR: ADR-0021 fixed the phase vocabulary and the identity-hash inputs, and a new phase touches both.

(1) is a reasonable first step and (2) is what makes suggest mean something. They should not be confused for each other.

Depends on

#340 — the skill is where the prompt would live either way.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions