Skip to content

Spec: the Ticket run as a Built-in process file #1456

Closed
6 of 6 issues completed
Closed

Description

@JacobStephens2

This was generated by AI during triage.

Grill: docs/grill-with-docs/1456-built-in-ticket-run.md (Q1.1–Q3.3). Background: #877, ADR-0024, ADR-0001. Questions are cited by their grill number.

Problem Statement

thirdshift v0.17 introduced Processes, but only Custom processes are files. Every Built-in process (the Ticket run, Spec run, Architect run, Pickup run and Security run) is still a sequence fixed in Rust. Their names are only reserved, so a Custom process can't take them.

That leaves a thirdshift user with three problems:

  • They can't see, in the same format as their own Processes, what a Ticket run actually does.
  • They can't copy the Ticket run as a starting point for a Custom process.
  • Their Custom processes can't use the parts that make a Ticket run safe and useful: the implement session with bug diagnosis and Continuation, the Security review, and Resume.

#877 agreed that the run types would move into files one at a time, starting with the Ticket run (#877 Q1.5, Q4.6 slice 5). That slice was never filed. ADR-0024 says the move waits until the catalogue has Steps for the Ticket run's parts.

Solution

The Ticket run becomes a Built-in process: a TOML file in a top-level processes/ folder of thirdshift's repository, compiled into the binary as the Factory skills are. It drives every Ticket run, whichever Command starts it (Q1.1). It reads, roughly:

implement → security-review → delivery → self-merge

Nothing the Ticket run does changes (Q1.2). It keeps its name, sessions, progress lines, Command log, Endings, Run notifications, Console view and Recovery. It still skips the Security review and the Self-merge whenever it does today.

Before the Ticket run moves, the catalogue gains what it needs, and each addition is open to Custom processes:

  • an implement catalogue Step (Q1.3, Q2.4),
  • a security-review catalogue Step (Q2.1),
  • Resume for every session Step (Q2.3),
  • the ability of implement to end a Process successfully when a bug is not reproduced (Q3.1).

A user can list the built-in ticket-run with thirdshift process list, print it with thirdshift process show ticket-run, and save a copy under a new name as a Custom process (Q1.5).

Only the Ticket run moves in this Spec. The Spec run, Architect run, Security run and Pickup run are filed afterwards as their own issues, in that order (Q1.4).

User Stories

  1. As a thirdshift user, I want the Ticket run defined in a Process file, so that I can read exactly which Steps it runs, in the same format as my own Processes.
  2. As a thirdshift user, I want thirdshift process list to show ticket-run marked as built-in, so that I can tell it apart from my Custom processes.
  3. As a thirdshift user, I want thirdshift process show <name> to print a Process's file, so that I can see what the installed version of thirdshift runs.
  4. As a thirdshift user, I want thirdshift process show to work for my Custom processes too, so that one command shows any Process.
  5. As a thirdshift user, I want to save the printed ticket-run file under a new name and have it run as a Custom process, so that I can start from the Ticket run instead of from scratch.
  6. As a thirdshift user, I want a Custom process named ticket-run still refused, so that a copied file never quietly replaces what a Pickup run or Spec run starts.
  7. As a thirdshift contributor, I want the built-in Process files in a visible processes/ folder beside skills/, with a README, so that I know where they live and that they are compiled in.
  8. As a thirdshift user, I want every Ticket run to behave exactly as it did before the move, so that nothing unattended changes under me.
  9. As a thirdshift user, I want a Ticket run to keep the name "Ticket run" in thirdshift status, the Console, the Activity log, Endings and Run notifications, so that nothing I read changes.
  10. As a thirdshift user, I want a Ticket run started from an Issue URL, a Spec run, an Architect run, a Pickup run or a Security run to run the same ticket-run Process, so that there is one definition of a Ticket run.
  11. As a thirdshift user, I want an issue with sub-issues still to go to a Spec run, decided before any Process starts, so that a Spec never runs as a Ticket run.
  12. As a thirdshift user, I want a Ticket run its command started still to make a Claim before its worktree, and a child Ticket run still to make none, so that Claims work as they do today.
  13. As a thirdshift user, I want child Ticket runs still to inherit their Child asks and Limits, so that a Spec run's or Security run's settings still reach each Ticket.
  14. As a thirdshift user, I want a fresh Ticket run and a Continuation to choose their Issue branch exactly as today, so that existing branches and open pull requests are picked up the same way.
  15. As a thirdshift user, I want a Ticket run on a bug issue still to diagnose the bug before fixing it, so that the move doesn't weaken bug handling.
  16. As a thirdshift user, I want a bug that isn't reproduced still to end the Ticket run successfully with triage notes and needs-info, opening no pull request, so that unreproduced bugs still wait for me.
  17. As a thirdshift user, I want a Continuation on a bug issue still to reproduce at the merge base and check the fix on the branch, so that a fix already there still goes to review.
  18. As a thirdshift user, I want the Base fix advice still given to the implement session, so that inherited failures are still handled.
  19. As a thirdshift user, I want the Security review still to run only when the flag or the User config asks for one, so that the move doesn't add or drop Security reviews.
  20. As a thirdshift user, I want the Security review still to run on security.harness when it is set, and still to fall back to the default Harness when that one can't start, so that its Harness choice is unchanged.
  21. As a thirdshift user, I want a refused or early-ended Security review still to hold a Self-merge, so that the move doesn't loosen merging.
  22. As a thirdshift user, I want Delivery, the Repair loop and the Self-merge of a Ticket run unchanged, so that pull requests are still left mergeable and green, or merged only when asked.
  23. As a thirdshift user, I want a Failed ticket run still to push its work, keep what it can't push, and end with its Recovery, so that I can take over as before.
  24. As a thirdshift user, I want Command interruption of a Ticket run still to finish its work as it does today, so that stopping a Command is still safe.
  25. As a thirdshift user, I want a Ticket run's session kinds and their Session-trace names unchanged, so that existing traces, metrics and Console views keep working.
  26. As a Custom process author, I want an implement catalogue Step, so that my Process can start the same implement session a Ticket run does.
  27. As a Custom process author, I want implement to select a fresh Issue branch or continue an existing one as a Ticket run does, so that my Process can resume its own earlier work.
  28. As a Custom process author, I want implement on a bug issue to diagnose the bug before fixing it, so that a copy of ticket-run doesn't fix bugs it never reproduced.
  29. As a Custom process author, I want implement to end my Process successfully when the bug isn't reproduced, skipping the Steps after it, ending the Claim and cleaning up the worktree as a Ticket run does, so that no pull request is opened for an unreproduced bug.
  30. As a Custom process author, I want the progress line and Ending to say the bug was not reproduced, so that I can tell an early successful end from a failure.
  31. As a Custom process author, I want implement allowed only on an Issue-branch worktree, with the same refusals as other editing Steps, so that its edits are never lost.
  32. As a Custom process author, I want implement to take its own Harness, Model and Effort like any Step, defaulting to the Command's, so that I can run it on a different family from my review Steps.
  33. As a Custom process author, I want a security-review catalogue Step, so that my Process gets the same Security review a Ticket run does by adding one Step.
  34. As a Custom process author, I want security-review to decide for itself whether to run, from the command's flag and the User config, so that I don't restate that rule in my file.
  35. As a Custom process author, I want security-review refused where it can't review an Issue branch, so that a misplaced Step fails before any session.
  36. As a Custom process author, I want my session Steps to get one Resume when they end their turn with background work killed, so that my sessions don't lose awaited work.
  37. As a Custom process author, I want a Resume that ends the same way not to fail my Process, and to be named in a progress line and in any failure's cause, as for a Ticket run, so that Resume behaves the same everywhere.
  38. As a Custom process author, I want a Resume not to count against the Repair cap, so that limits I set in my file mean what they say.
  39. As a thirdshift maintainer, I want the Spec PR left ready for review and never Self-merged, so that I can run live checks before the Ticket run's new path reaches every scheduled Command.
  40. As a thirdshift maintainer, I want the compiled-in ticket-run file to pass thirdshift process check, so that a broken built-in file fails tests, not a live run.
  41. As a thirdshift maintainer, I want the hand-written site pages updated where they describe the Ticket run, Processes and the process commands, so that the site matches the release.

Implementation Decisions

  • Built-in process files. A top-level processes/ folder in thirdshift's repository holds ticket-run.toml and a README. Its files are compiled into the binary, as the Factory skills are (ADR-0001). They use the same format, version = 1, and the same validation as Custom processes. Custom processes stay in ~/.thirdshift/processes/. A Custom process still can't take a built-in name.
  • process commands. process list includes built-ins, marked as built-in. A new process show <name> prints the file of a built-in or a Custom process. Copying is done by hand: save the output under a new name.
  • What stays in front of the file (Q2.2). The Command dispatch keeps, in Rust, the choices that decide which Process runs and how it starts: an issue with sub-issues goes to a Spec run, a run its command started makes a Claim before its worktree while a child run makes none, and children inherit their Child asks and Limits. It then runs the ticket-run Process with those decisions. Every starter of a Ticket run goes through this one path.
  • The ticket-run file reads implement → security-review → delivery → self-merge. It sets no Harness, Model or Effort on any Step, so each Step keeps today's per-Command choice (Custom processes: compose Steps from a catalogue in a file #877 Q2.4).
  • implement catalogue Step (Q1.3, Q2.4, Q3.1). It owns Issue-branch selection (fresh or Continuation), the implement session and its Session prompt, bug diagnosis on a bug issue with its Bug reproduced / Bug not reproduced completion lines, the Base fix advice, and Resume. It is an editing Step, valid only on an Issue-branch worktree. When the bug is not reproduced, it ends the Process successfully: the Steps after it are skipped, triage notes and needs-info go on the issue, the Claim ends as a Ticket run's does today, and the Issue-branch worktree is cleaned up. This is the first Step that can end a Process successfully before its last Step. That ability belongs to implement alone and isn't a general file setting.
  • security-review catalogue Step (Q2.1). It runs today's Security review on the Issue branch after the editing Steps and before delivery. It decides for itself whether to run, from the command's flag and the User config. It keeps its security.harness choice and its fallback to the default Harness when that Harness can't start. Custom processes: compose Steps from a catalogue in a file #877 Q2.5's up-front refusal applies only when a file names a Step's Harness explicitly. A refused or early-ended review holds a later self-merge, as today.
  • Delivery split. Today Delivery owns the opening session and the Security review. After this Spec, implement and security-review are Steps of their own, and Delivery keeps the push, marking the pull request ready, the Repair loop, the Failed-run path and the Self-merge. Behaviour, ordering and stage names in the Command record stay exactly as they are (Q1.2).
  • Resume (Q2.3). Resume becomes a property of every session Step: skill Steps, implement and security-review. It keeps today's rules: once only, never a failure on its own, named in progress lines and in a failure's cause, and outside the Repair cap. GLOSSARY "Resume" already reflects this.
  • Identity. A Command that carries out the ticket-run Built-in process is recorded, shown and notified as a Ticket run, not as a Process. Session kinds and Session-trace tokens are unchanged.
  • Glossary. "Built-in process", "Step" and "Resume" were updated during the grill. When this lands, update "Ticket run" and "Delivery" only as far as they describe ownership that has moved, without implementation detail.
  • Ticket slicing (Q3.2), one Spec with no release split:
    1. The processes/ folder compiled in, with a README, and process show. process list marks built-ins.
    2. Resume for every session Step.
    3. The security-review catalogue Step.
    4. The implement catalogue Step, including the early successful end. Blocked by 2.
    5. The Ticket run runs from processes/ticket-run.toml, every starter routed through it, the sequencing removed from the Ticket run's own code, and the hand-written site pages updated. Blocked by 1, 3 and 4.

Testing Decisions

  • A good test checks what a user sees, not how it is built: the sessions started and their order, progress lines, Command log and Command record stages, Endings, Run notifications, the pull request's state, the Claim and the issue's labels.
  • One main seam: the CLI with real Git, the fake gh and fake Harnesses (Scenario in the integration-test support). No new seam.
  • Tickets 1–4 are tested through thirdshift process <name> (and process list, process show, process check) alongside the existing Custom process integration tests, the prior art for Steps, Issue-branch worktrees, delivery and self-merge. Each new Step gets tests for its success, its refusals and its failure. implement also gets tests for Continuation, a reproduced bug and an unreproduced bug ending successfully. Resume's prior art is the existing background-work integration tests.
  • Ticket 5's proof is the existing CLI integration suites passing with at most mechanical changes, such as a stored kind. The suites are: fresh run, Continuation, bug run, background work, Security review, merge run, Failed run, Spec run, Pickup run, Architect run, Security run, Run notification, status, Console and progress lines. Ticket 5 adds a test that the compiled-in ticket-run file passes process check.
  • In-process unit tests behind the Ticket run's and Delivery's seams are split, not weakened. Tests of what stays in front of the file stay with the dispatch: Spec or Ticket, Claim or not, Claim-before-worktree ordering and the refusals. Tests of the sequence move to the Process engine, or are dropped only where a CLI test already covers the same behaviour. No assertion is lost.
  • Before merge (Q3.3): the Spec PR is left ready for review and never Self-merged. The Day shift runs live checks from a build of the Spec branch on a test repository: a fresh Ticket run, a Continuation, a bug issue that reproduces and one that doesn't, plus a Pickup run and a Spec run that start Ticket runs.

Out of Scope

Further Notes

  • ADR-0024's consequence "Moving a Built-in process such as the Ticket run into a file waits until the catalogue has Steps for its parts" is met by Tickets 2–4. Bug reproduction, Continuation and Resume live in implement and in every session Step. The Repair loop stays inside delivery.
  • This Spec is labelled needs-triage until its Tickets are published and linked, per docs/agents/triage-labels.md.

Sub-issues

Sub-issues

6 of 6 Issues completed
Loading 6 sub-issues

Activity

  1. added
    enhancement
    needs-triage
    on Oct 27, 2026
  2. changed the title [-]Built-in processes: move the Ticket run into a process file[/-] [+]Spec: the Ticket run as a Built-in process file[/+] on Oct 27, 2026
  3. added
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 27, 2026
  4. added a commit that references this issue on Oct 27, 2026
  5. removed
    in-progress
    on Oct 28, 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