Skip to content

Triage run: turn a Report into triaged issues #1323

Closed
5 of 5 issues completed
Closed

Description

@JacobStephens2

Problem Statement

Reports of problems reach the Day shift from everywhere: a staff member's bug email, a chat message, a call transcript, a machine alert such as a blocked-deploy canary. Each time, the Day shift does the same thing by hand: it makes a worktree in the right repository, starts a session, runs triage on the pasted text, and nearly always accepts the recommended labels and issues. thirdshift can't do this today. It has no triage skill, no Command that takes free text, and no way for an alerting script to hand it a Report and get back an alert already shaped into an issue or a diagnosis.

Solution

A Triage run: a Command, thirdshift triage, that reads a Report from standard input or a file. It triages the Report against the repository the way the Day shift's triage does, without pausing for a person. By default it files the shaped issues with their triage labels. With --recommend-only, it files nothing and reports what it would have filed. It investigates the repository read-only and puts its diagnosis in the issue. Where a person must answer, it says who and writes them a questionnaire. Where an open issue already covers the Report, it comments there. Its Run notification gives the Day shift, or an alerting script's recipient, a shaped analysis rather than raw text.

User Stories

  1. As the Day shift, I want to pipe a Report into thirdshift triage, so that a pasted email becomes triaged issues without my making a worktree and a session.
  2. As the Day shift, I want thirdshift triage --file <path>, so that a long Report or a saved transcript can be triaged.
  3. As an alerting script's author, I want to pipe an alert into thirdshift triage, so that the alert arrives already shaped.
  4. As the Day shift, I want a Triage run to run in the repository's Launch directory like other Commands, so that it triages against the right repository.
  5. As the Day shift, I want --recommend-only to write nothing to GitHub and give me its recommendation (category, state, the issues it would file, its investigation) in the Run notification and on standard output, so that I can see the shaped report before deciding to file it.
  6. As an alerting script's author, I want to choose --recommend-only until I trust the Triage run to file, so that the alert email is useful from day one.
  7. As the Day shift, I want a Triage run to file the shaped issues by default, so that the click I always make is made for me.
  8. As the Day shift, I want each filed issue to carry exactly one category label and one state label, so that it is triaged like an issue I triaged by hand.
  9. As the Day shift, I want ready-for-agent applied only when a flag or the User config allows it, so that an alert can't lead to code being built and merged with nobody reading it unless I chose that.
  10. As the Day shift, I want an issue recommended ready-for-agent without that permission labelled needs-triage, saying ready-for-agent was recommended, so that I can make the call in one step.
  11. As the Day shift, I want thirdshift itself, not the session, to enforce which labels may be applied, so that a session can't apply a label it isn't allowed to.
  12. As the Day shift, I want each issue to quote the Report verbatim in a collapsed section, with where it came from, so that anyone can check the triage against what was said.
  13. As the Day shift, I want a Report that holds several separate problems filed as one issue each, cross-linked, so that each can be worked on its own.
  14. As the Day shift, I want every comment and issue a Triage run writes to start with the AI-generated disclaimer, so that readers know what wrote it.
  15. As the Day shift, I want a Triage run to apply its own recommendation rather than wait for direction, so that it finishes unattended.
  16. As the Day shift, I want a Triage run that would grill to label the issue needs-info when the reporter must answer, and ready-for-human when I must decide, so that it stops only where a person really has to answer.
  17. As the Day shift, I want a Triage run on a needs-info or ready-for-human outcome to write a questionnaire aimed at whoever has the answer, so that the follow-up is ready to send.
  18. As the Day shift, I want that questionnaire posted on the issue and put in the Run notification, so that I can forward it to a reporter who isn't on GitHub.
  19. As a reporter outside the repository, I want to hear from the Day shift, never from thirdshift, so that I'm only contacted by a person.
  20. As the Day shift, I want a Triage run to investigate the repository and put its diagnosis in the issue, so that an alert arrives with analysis ready.
  21. As the Day shift, I want a Triage run to try to confirm the problem, reproducing a bug from the reporter's steps where it can, so that a confirmed issue makes a stronger brief.
  22. As the Day shift, I want a problem it can't confirm without credentials or production access labelled ready-for-human, saying why, so that I know what only I can do.
  23. As the Day shift, I want a Triage run never to start code changes itself, so that a pull request only ever comes through a Ticket run.
  24. As the Day shift, I want a Triage run kept to its worktree by default, so that an unattended session reading untrusted text sees as little as it needs.
  25. As the Day shift, I want an opt-in flag or per-repository User config setting that lets a Triage run read the whole machine, so that it can investigate beyond the repository as I would.
  26. As the Day shift, I want that wider reading enforced read-only by a sandbox, with only the worktree writable, so that "read-only" is true rather than hoped for.
  27. As the Day shift, I want a Triage run that finds an open issue already covering the Report to comment there instead of filing, so that a repeating alert gathers on one issue.
  28. As the Day shift, I want that comment to quote the Report and add anything new, and change no labels, so that a repeat never undoes a decision I made on the issue.
  29. As the Day shift, I want --recommend-only to name the issue it would have commented on, so that I see the duplicate too.
  30. As the Day shift, I want a Run notification when a Triage run ends, linking every issue it filed or commented on, so that I hear about it where I hear about every other Command.
  31. As an alerting script's author, I want the email flag to choose who gets a Triage run's Run notification, so that an alert's analysis goes to the right person.
  32. As the Day shift, I want a Triage run never skipped for the Command limit, since it is started with a Report and isn't a Pass, so that an alert is never dropped.
  33. As the Day shift, I want a Triage run shown in status and the Inbox like other Commands, so that I can see what it did.

Implementation Decisions

  • Settled in the grilling in docs/grill-with-docs/done/706-1323-review-and-triage.md (Q1.11 to Q1.18, Q2.1, Q3.1, Q3.2, Q4.1); question numbers are cited below.
  • A new top-level Command, thirdshift triage, with a new Command kind, "Triage run", in the Command record, Activity log, Run notification and status. It reads the Report from standard input or --file (Q1.11). It is never a Pass (Q1.11).
  • An embedded thirdshift-triage Factory skill, derived from the Day shift's triage skill for the unattended case. It takes a Report rather than an existing issue. It applies its own recommendation instead of waiting, and labels needs-info or ready-for-human where it would grill (Q1.17). It files the shaped issues directly, each quoting the Report (Q3.2). Before filing, it searches open issues for one that already covers the Report (Q4.1).
  • An embedded thirdshift-to-questionnaire Factory skill for the needs-info and ready-for-human outcomes (Q1.18).
  • The session runs in a throwaway worktree. It reports what it filed, or under --recommend-only what it would file, on final lines thirdshift parses, as an Architect run's session does.
  • thirdshift enforces readiness. After the session, thirdshift removes ready-for-agent from any issue it filed unless the flag or User config allows it, and labels it needs-triage with a note, as the Architect run already owns its plan's readiness (Q1.12).
  • The Run notification carries the recommendation or the filed and commented issues, plus any questionnaire (Q1.18, Q2.1).
  • The opt-in whole-machine mode runs the session in the existing sandbox, with the filesystem mounted read-only and only the worktree writable. The prompt alone keeps the session to the worktree otherwise (Q3.1). SSH is out of scope (Let a session SSH to other servers during an investigation #1701).
  • The glossary already defines Triage run and Report.

Testing Decisions

  • Test external behaviour at the highest seam: the real binary run in a test Scenario with a Report on standard input, against the fake gh and a fake Harness session whose script files issues and writes the final lines. Assert on what GitHub sees (issues, labels, comments), on standard output, on the Run notification and on the Command record, not on internal calls.
  • Readiness enforcement is tested by a fake session that applies ready-for-agent, with and without the permission.
  • The sandbox's read-only whole-machine launch is tested at the sandbox module's own seam, as the Trial sandbox launch is, plus one binary test that the opt-in reaches it.
  • Prior art: the Architect run tests (a session that files issues and reports them on final lines, with thirdshift owning readiness), and the Trial sandbox tests.

Out of Scope

Further Notes

Part of #1691. A sibling of #706 (Review run), which shares the --recommend-only flag's name and meaning.

Sub-issues

Sub-issues

5 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. added
    enhancement
    needs-triage
    on Oct 25, 2026
  2. JacobStephens2 commented on Nov 3, 2026

    @JacobStephens2
    OwnerAuthor

    Related: #1693 records the idea of feeding reports from Slack and email to thirdshift triage, kept out of this issue's scope (grilling Q1.2).

  3. changed the title [-]add thirdshift triage command for unattended triage[/-] [+]Triage run: turn a Report into triaged issues[/+] on Nov 3, 2026
  4. added
    ready-for-agent
    in-progress
    agent-failed
    and removed
    needs-triage
    ready-for-agent
    agent-failed
    on Nov 3, 2026
  5. added a commit that references this issue on Nov 4, 2026
  6. removed
    in-progress
    on Nov 4, 2026
  7. added a commit that references this issue on Nov 4, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions