Skip to content

Custom process: run sequential skill Steps from a file #1380

Closed

Description

@JacobStephens2

Parent

#877 (Spec: Custom processes). Design record: docs/grill-with-docs/877-composable-by-file.md, ADR-0024.

What to build

A user writes ~/.thirdshift/processes/<name>.toml and runs it. This is the tracer bullet: the file format, validation, the three CLI forms, sequential session Steps in one throwaway worktree, Step results passed between Steps, and the Command's records. Every Step uses the Command's Harness, Model and Effort (per-Step choice is a later Ticket).

  • thirdshift process lists the Custom processes and their description. thirdshift process check <name> validates the file and prints the plan without starting a session. thirdshift process <name> runs it.
  • The file has version = 1 (required), description, and [[steps]] with a name and skill. The name is the file stem.
  • A Step's skill is looked up as thirdshift skill looks it up. Share that lookup, don't copy it.
  • Steps run in order in one throwaway worktree, detached at the Base branch and cleaned up as a standalone skill's worktree is.
  • Each Step's final message is stored with the Command's logs, outside the worktree. The next Step's Session prompt (a new one, generated with the others) gives the paths to earlier results. The last Step's message goes to stdout.
  • The Command is recorded as a new stored kind, Process, with the Process name. The Command log gets one line per Step: name, duration, outcome and cause. A failed Step fails the Command.

Acceptance criteria

  • check and running refuse a missing or wrong version, an unknown key, a Step without exactly one kind, a skill not found, and a name that's reserved (check, list, and the Built-in names ticket-run, spec-run, architect-run, pickup-run, security-run). Each refusal names its rule and the file line, and starts no session.
  • thirdshift process with no name lists every Custom process with its description.
  • A two-Step Process runs both sessions in order. The second session's prompt names the path of the first Step's result, and the file there holds the first Step's final message.
  • The last Step's final message is printed to stdout. Progress and failure causes go to stderr. Exit codes match thirdshift skill's.
  • The Command record's kind is Process with the Process name, and its Command log has one line per Step.
  • The throwaway worktree is removed afterwards, and the launch checkout is untouched.
  • Interruption (Stop, Ctrl-C) and the [resources] checks behave as for other Commands' sessions.
  • docs/guide.md has a Custom processes section with an example file. site/index.html and site/how-it-works/ mention thirdshift process next to thirdshift skill, marked experimental. The prompts page is regenerated (UPDATE_PROMPTS=1 cargo test prompts_page).
  • Tests go through the thirdshift binary in the tests/support Scenario, like tests/skill.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions