Skip to content

Reconcile AGENTS.md and docs/worker-execution-contract.md with the new next-task, tasks/report, work-summary, active-wor #412

@itsmiso-ai

Description

@itsmiso-ai

Parent umbrella issue: #408
Source audit: Weekly tech debt audit: dispatch - 2026-06-17
Source audit date: 2026-06-17

Original recommendation

P1 — Reconcile AGENTS.md and docs/worker-execution-contract.md with the new next-task, tasks/report, work-summary, active-work, and AgentTask contract.

Matched top finding

The "OpenClaw Agent Workflow Contract" section of AGENTS.md documents POST /api/sync, POST /api/agent-runs, GET /api/issues, and GET /api/agents/[agentName]/queue, but does not mention:

  • GET /api/agents/[agentName]/next-task (the canonical entry point for new harnesses)
  • POST /api/agents/[agentName]/tasks/report (where harnesses report task outcomes)
  • GET /api/agents/[agentName]/work-summary (lane-aware work counts)
  • GET /api/agents/[agentName]/active-work (resume context)
  • GET /api/agents/[agentName]/queue is documented but the AgentTask contract from src/lib/agent-task.ts is not.

This drift is exactly what the previous audit flagged (#317 "Reconcile maintainer docs with implemented lane routes"), but the next wave of endpoint additions was not picked up by the same fix.

Evidence:

  • grep -n "/api/agents" AGENTS.md returns only queue/heartbeat/lane references.
  • src/lib/agent-task.ts (200+ lines) is not referenced anywhere in AGENTS.md or README.md.
  • docs/worker-execution-contract.md references getQueuedPrFixItems indirectly but does not show the next-task contract shape.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditAudit, review, or investigation work.priority/p1High priority.status/backlogNot ready for worker pickup yet.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions