Skip to content

Define a compact, operationally unambiguous agent-control envelope #333

Closed

Description

@pengfei-threemoonslab

Parent epic: #338

Canonical v0.17 design issue for the shared agent-control envelope. #323 owns the v0.18 command-by-command rollout and end-to-end coverage; it must apply this shape, not define a second one. The permission model (#335) and current-control pointer (#339) are complete prerequisites.

Problem

A verifier run can simultaneously report:

  • execution: "succeeded"
  • head_exit_code: 0
  • release_decision.decision: "review_required"
  • control.state: "human_review_required"

Humans and coding agents naturally interpret “succeeded” or exit code 0 as permission to continue. The authoritative operational fields are buried inside thousands of tokens of JSON, causing users to ask whether the run is “done” and whether the agent may push.

The full forensic document is valuable, but it is a poor default control interface for an agent loop.

Proposed direction

Provide a compact, stable agent-control envelope that clearly separates:

  • tool execution status;
  • release/merge decision;
  • publication permissions;
  • completion permission;
  • next actor and exact next action;
  • paths and hashes for detailed forensic artifacts.

Example:

{
  "schema_version": "shipgate.agent_control/v1",
  "execution_status": "succeeded",
  "control_state": "human_review_required",
  "ready_to_update_pr": true,
  "ready_to_merge": false,
  "completion_allowed": false,
  "next_actor": "human",
  "next_action": {
    "kind": "review",
    "surface": "github_pull_request",
    "why": "..."
  },
  "artifacts": {
    "receipt": {"path": "...", "sha256": "..."},
    "verifier": {"path": "...", "sha256": "..."}
  }
}

Detailed verifier/report JSON should remain available by path, not dominate the default agent stdout.

Acceptance criteria

  • A compact format is available and promoted for coding-agent control loops.
  • The result explicitly answers: may edit, may commit, may push/update PR, may merge, may report complete?
  • Execution success cannot be mistaken for release readiness.
  • Human-facing text leads with the operational state and next actor.
  • Full forensic artifacts remain content-addressed and discoverable.
  • Agent-mode errors and nonterminal results include an exact executable next action.
  • The compact control payload has a documented size budget and does not duplicate the full report.
  • Exit-code semantics are documented and tested against passed, review_required, insufficient_evidence, and blocked.

Success measure

A user or coding agent should determine the permitted next action without reading any other artifact or interpreting prose.

Activity

  1. added this to the v0.17.0 milestone on Aug 7, 2026
  2. added
    P1Picked up inside the current milestone window; keep about 15 open
    area:agent-modeAgent-mode contract: control envelope, next actions, command strings
    on Aug 7, 2026
  3. pengfei-threemoonslab commented on Aug 7, 2026

    @pengfei-threemoonslab
    ContributorAuthor

    Overlap alert: this and #323 are the same surface, approached from opposite ends.

    Both land in core/agent_control.py and schemas/agent_control.py, and both propose a schema (shipgate.agent_control/v1 here; an embedded control block there). Built separately, the result is two envelope definitions and a migration between them. These should be one design and one PR.

    Recommend this issue absorb #323's scope, since the compact/permission model is the harder constraint and the horizontal rollout is mechanical once the shape is fixed.

    Two carry-over constraints from the #323 triage that apply here unchanged:

    The envelope must project release_decision, never restate it. The roadmap non-goal is "no second verdict — nothing gates independently of release_decision.decision." ready_to_merge and completion_allowed must be derived, not computed in a renderer. #318 is a live example of a projection that started deciding for itself.

    init and doctor have no release_decision to project from. They run before any scan, so their control state derives from setup facts. That is legitimate but must be stated, or control_state means "the gate says" in one command and "setup says" in another. #325 is the concrete instance and should settle it.

    Sequencing: this depends on #335. The permission model (may commit / may push / may merge / may report complete) is what the compact payload reports; designing the payload first would mean guessing at the fields.

    Re-ranked to P1 for that reason, despite the P0 in the title — not a judgement on importance, only on order. It cannot lead its own epic.

  4. changed the title [-][Agent-first UX][P0] Make verifier results compact and operationally unambiguous[/-] [+]Define a compact, operationally unambiguous agent-control envelope[/+] on Aug 9, 2026
  5. added a commit that references this issue on Aug 10, 2026
    9a38d6d
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

    P1Picked up inside the current milestone window; keep about 15 openarea:agent-modeAgent-mode contract: control envelope, next actions, command stringsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions