PRD: agent triage surface — labctl issue create, label ops, and close through the tracker seam #3
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
The maintainer's issue workflow runs on agent skills (triage, to-issues, to-prd): an agent in an interactive instance reads an issue, discusses it, applies triage roles, files new issues broken out of plans, and closes what won't be fixed. Per D10,
labctlis a session's only tracker surface — but today it can only view, list, comment, and open a PR/change request. An agent that diagnoses a bug mid-session cannot file the issue it found; an agent running triage cannot move an issue between triage roles, cannot create a missing triage label on a fresh repo, and cannot close a wontfix issue. The workflow dead-ends inside every instance, on both tracker bindings.Solution
Extend the agent surface end-to-end —
labctl→ agent API →Trackerseam → both bindings — with the full triage set: issue create (with labels), label add/remove on an issue, label list, idempotent label create ("ensure"), and issue close. Record the revised invariant as ADR-0014: what stays dead is the engine writing tracker state implicitly (claim-is-the-branch is untouched; thein-progresslabel class stays deleted); a deliberate agent workflow action flows through the tracker seam to whichever backend the repo's tracker binding names — exactly as agent comments and PR/CR creation already do. Operator mutations remain builtin-only.User Stories
needs-triagelabel applied at creation, so that a plan becomes dependency-ordered tracker issues without me copy-pasting anything.Implementation Decisions
issue create --title --body [--labels],issue label add <n> <labels>,issue label remove <n> <labels>,issue close <n>,label list,label create --name [--color --description].issue listoutput gains labels and created-at. Output stays plain parseable text; exit codes stay pinned (0 success, 1 API/HTTP error, 2 usage/configuration error).Testing Decisions
Out of Scope
issue editandissue reopen— no skill consumes them; add when a consumer exists.Further Notes
The session failure that motivated this had two independent causes: the deployed lab predated M5 (its labctl answered reads with a stub), and the triage mutation surface genuinely does not exist at HEAD. Redeploying lab fixes the former today; this PRD is the latter. Forgejo quirks the binding must keep respecting: unknown label names are silently discarded from list filters (client-side verification stays), the per-issue comments endpoint ignores pagination, and pagination terminates on an empty page.