Skip to content

Targeted in-place thirdshift triage <Issue> with Claim, Stop, failure labels, and readiness gating #1891

Closed

Description

@JacobStephens2

Parent

Part of #1695.

What to build

Extend thirdshift triage so that running thirdshift triage <Issue URL or number> [base <branch>] investigates an existing open GitHub issue in the repository read-only against the selected Base branch (defaulting to the Launch directory's checked-out branch) and updates that issue in place, while keeping existing Report mode (--file <path> or non-empty standard input) unchanged.

Specifically:

  • CLI parsing (thirdshift triage <Issue URL or number> [base <branch>]): Accept a positional <Issue URL or number> and optional base <branch> alongside the existing triage flags (--recommend-only, --allow-ready-for-agent, --read-machine, --email, --harness, --model, --effort). Reject combining <Issue> with --file <path>.
  • Trusted-account gate and .thirdshift-issue.md: Verify that the target issue belongs to the Launch directory's repository, is open, was authored by a Trusted account (OWNER, MEMBER, or COLLABORATOR), and has had no title or body edit by a non-Trusted account. Write .thirdshift-issue.md at the root of the throwaway triage worktree with the issue's title, URL, body, and only Trusted-account comments (with untrusted comments replaced by the standard placeholder) before starting the session. Allow re-triaging an open issue regardless of its current triage state label.
  • Reservation, Claim, Failure, and Stop lifecycle: Unless --recommend-only is set, reserve the issue on origin for the duration of the Triage run and apply an in-progress Claim in place of the issue's prior triage role label (needs-triage, ready-for-human, needs-info, ready-for-agent, or wontfix) and agent-failed. If the Triage run ends with an error or interruption:
    • On thirdshift stop --requeue, replace in-progress with needs-triage (without agent-failed).
    • On thirdshift stop (without --requeue), replace in-progress with ready-for-human (without agent-failed).
    • On any other failure or interruption, replace in-progress with ready-for-human and agent-failed.
  • In-place recommendation & publication: Update the session prompt and skills/thirdshift-triage/SKILL.md (and regenerate prompts/ and site/prompts/index.html with UPDATE_PROMPTS=1 cargo test prompts_page) so that when triaging an existing issue #N:
    • recommendation.issues contains a single entry representing the update to #N (body with the ## Agent Brief, investigation summary, or wontfix explanation, questionnaire required for needs-info and ready-for-human, and optional confirmation_blocked). If #N should be split into multiple Tickets or a Spec, the session recommends ready-for-human on #N with a ## Questionnaire proposing the split rather than proposing multiple issues.
    • If #N duplicates another open issue #M in the repository, the session recommends wontfix on #N and may include #M in recommendation.comments to cross-reference #N or add new context onto #M.
    • When publishing (unless --recommend-only is set):
      • Apply the recommended repository category label only if #N does not already carry a repository category label (preserving any existing category label on #N).
      • When ready-for-agent is recommended on #N and readiness permission is not granted (!allow_ready_for_agent), hold back readiness by transitioning #N's state label to ready-for-human (not needs-triage) and appending the readiness-held notice to the ## Agent Brief comment.
      • Post one AI-attributed comment (> *This was generated by AI during triage.*) on #N with the brief, investigation + ## Questionnaire, or wontfix explanation, replace in-progress with the resulting triage state label (ready-for-agent, ready-for-human, needs-info, or wontfix), and close #N when wontfix.
      • Populate url on the recommendation issue entry with #N's URL in stdout JSON and include #N in the Run notification.
  • Glossary: Update Claim and Triage run in GLOSSARY.md to reflect in-place issue triage, readiness hold-back to ready-for-human, and Claim completion on success, Stop, and failure.

Acceptance criteria

  • thirdshift triage <Issue URL or number> [base <branch>] parses the target issue and optional Base branch, and rejects combining <Issue> with --file <path>.
  • Single-issue triage refuses closed issues, issues from another repository, and issues authored or edited (title/body) by a non-Trusted account, and writes .thirdshift-issue.md containing only Trusted-account comments into the triage worktree.
  • Unless --recommend-only is set, single-issue triage reserves the issue on origin and applies in-progress (removing any prior triage state label and agent-failed) while running, releasing the reservation when the run finishes.
  • On success, in-place publication preserves any existing repository category label on #N (or adds the recommended category label when #N has none), posts the AI-attributed comment (## Agent Brief, investigation + ## Questionnaire, or wontfix explanation), replaces in-progress with the resulting triage state label, and closes #N when wontfix (also posting any cross-reference comments on other open issues).
  • When ready-for-agent is recommended on an existing issue and neither triage.allow_ready_for_agent nor --allow-ready-for-agent is enabled, #N receives the ## Agent Brief comment (with the readiness-held note) and is labelled ready-for-human.
  • When an issue Triage run fails, completion replaces in-progress with ready-for-human and agent-failed; thirdshift stop replaces in-progress with ready-for-human; thirdshift stop --requeue replaces in-progress with needs-triage.
  • --recommend-only on an existing issue validates the recommendation against GitHub without reserving, claiming, commenting on, or relabelling the issue, and prints the recommendation JSON on stdout.
  • prompts/ and site/prompts/index.html are regenerated and cargo test prompts_page passes.
  • GLOSSARY.md and integration tests cover the new behavior.

Blocked by

  • None (can start immediately).

Activity

  1. added
    enhancement
    ready-for-agent
    on Nov 9, 2026
  2. JacobStephens2 commented on Nov 9, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during a grill-with-docs session.

    A note from the #1165 grill (Q1.5 and Q2.1), now Spec #1901, which settles what in-progress and agent-failed mean for every Command that holds a Claim, Triage runs included.

    For #1891: if it lands before #1902, today's check would clear agent-failed from a failed Triage run at once, because the issue has neither in-progress nor needs-triage. Until then, it's fine to stop that by treating ready-for-human like needs-triage in that check. Please don't present "remove ready-for-human" as how the Day shift takes over a failed triage, in the glossary, guide or site. #1902 removes that whole clause.

  3. JacobStephens2 commented on Nov 9, 2026

    @JacobStephens2
    OwnerAuthor

    Closed by #1911, merged into issue-1695 by a thirdshift Ticket run with Self-merge.

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

    enhancementready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions