Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

Stage authority: agent declaration channel #6

Closed

Description

@64ix

Part of #1

Question

Hybrid authority: the agent declares working stages (idea, exploring, spec, implementing, review), GitHub PR facts are incontestable (open → review, merged → shipped), shipped is human-or-fact only, closed-unmerged PR → triage sink.

Decisions inside:

  • The agent channel: Orca's agent hooks (OSC 9999 / event-stream, src/main/agent-hooks/) — what exact signal declares a stage? A prompt directive (agent is told to emit a marker), a CLI call, or a dedicated hook event? Nimbalyst's model (in-app MCP tracker tools, human-only statuses) as reference.
  • Where the declaration is validated (permission, human-only gates).
  • How the derivation handles the declared stage vs PR facts (the pre-alpha src/shared/workflow-stage.ts sketch: merged → shipped always; open → review; closed → triage only while undeclared; else declared).
  • The human-only boundary: can the user move shipped back?

Activity

  1. added
    wayfinder:grilling
    on Aug 12, 2026
  2. self-assigned this
    on Aug 17, 2026
  3. 64ix commented on Aug 17, 2026

    @64ix
    OwnerAuthor

    Answer

    Channel — in-app MCP server (Nimbalyst architecture as reference):

    • Embedded HTTP MCP server in the Electron main process: one localhost port, per-launch bearer token, workspace-scoped session identity, auto-approved internal tools surfaced on intent (deferred load).
    • Tool surface (agent): declare stage, link issue, read/list tasks. Orca's first MCP server.
    • CLI parity: orca worktree set --stage <id> on the existing worktree RPC, same validation — works from SSH/remote runtimes. No new OSC 9999/hook payload fields for stage.
    • The referenced pre-alpha src/shared/workflow-stage.ts sketch does not exist in the tree — nothing to reconcile.

    Boundary — everything except shipped (enforced fail-closed in the tool handler + RPC schema, like Nimbalyst's rejectHumanOnlyStatus, with a steering message):

    • Agent can declare: idea, exploring, spec, implementing, review, and exit triage (re-declare a working stage).
    • shipped is refused to agents — human-or-fact only: the board UI (human) or a merged PR (fact). Steering message: "shipped is set by a merged PR or by you in the board UI."
    • Human (UI) can place any stage, including de-shipping a shipped card.

    Derivation (declared vs facts) — facts always beat declarations; declarations only fill the gaps:

    • PR facts across the whole task tree (Task model: root worktree + parallel children #5), most-recent wins: any open PR → review; all merged → shipped; closed PR → triage.
    • Open spec issue → spec, but only from idea/exploring/unstaged — never regresses a card out of implementing.
    • Once a merged PR has shipped a card, that same PR does not re-push it after a human de-ships; only new facts (e.g. a new open PR → review) re-drive it.
    • triage is pushed in by facts only; exits by declaring a working stage (agent or human).
    • Renderer board DnD gates placement against governing facts (blocked-drop with explanation, emdash pattern).

    New component for the spec: Orca's first in-app MCP server (local-first; remote/SSH access deferred to #12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions