Skip to content

[Feature]: Add a structured expert handoff and acceptance contract #429

Description

@GTC2333

Problem or motivation

Delegated work currently returns through a free-form complete_task(reply=...) string. Personas ask experts to include conclusions and artifact paths, but the Principal cannot reliably distinguish:

  • verified results from interpretation
  • complete work from partial work
  • evidence from unsupported claims
  • executed checks from recommended checks
  • an intentionally absent artifact from a forgotten artifact
  • skill grounding from generic model knowledge

This makes acceptance depend heavily on the Principal rereading arbitrary prose and weakens automated evaluation.

There are also coordination ambiguities:

  • The high-impact action gate tells an expert to notify the task creator and wait, but does not specify whether to complete the current task, dispatch a new task, or use another protocol.
  • Principal is described as the single user-facing orchestrator, while Writer can call ask_user for general writing clarification.
  • Multi-hop delegation requires agents to stop after dispatch, which can create unnecessary sequential model turns.

Proposed solution

Define a versioned structured completion envelope while preserving a human-readable summary. Suggested fields:

{
  "status": "complete | partial | blocked",
  "summary": "...",
  "claims": [
    {
      "text": "...",
      "evidence": ["path, citation, or observed command output"],
      "confidence": "high | medium | low"
    }
  ],
  "skill_usage": [
    {
      "name": "...",
      "rules_applied": ["..."]
    }
  ],
  "verification": {
    "performed": ["..."],
    "not_performed": ["..."]
  },
  "artifacts": ["..."],
  "uncertainties": ["..."],
  "requested_action": null
}

A high-impact authorization request should use an explicit requested_action shape and route deterministically to Principal without falsely completing the scientific task.

Clarify which roles may contact the user and under which conditions.

Acceptance criteria

  • complete_task accepts or produces a versioned structured result.
  • Plain-text compatibility is retained during migration.
  • Principal receives explicit status, evidence, verification, uncertainties, and artifacts.
  • Partial and blocked work cannot be mistaken for complete work.
  • Authorization escalation has one documented tool path and cannot deadlock a task.
  • The user-contact policy is consistent across Principal, Writer, and tool allowlists.
  • Tests cover Principal-to-expert and expert-to-expert delegation, partial completion, authorization escalation, and malformed envelopes.

Area

Agents / orchestration

Alternatives considered

Prompt-only formatting guidance is simpler but cannot be validated reliably and will drift across models.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions