Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
479a1fb
Load the Factory skills from the worktree as thirdshift-<skill> (#391)
JacobStephens2 Oct 5, 2026
ed9a63e
Review clean-ups: clearer names for writing out and removing the Fact…
JacobStephens2 Oct 5, 2026
2639aa6
Merge pull request #400 from JacobStephens2/issue-391
JacobStephens2 Oct 5, 2026
d62a5ac
Choose the Harness, Model and Effort on the command line and in the U…
JacobStephens2 Oct 5, 2026
731386a
Review clean-ups for the Harness choice (#392)
JacobStephens2 Oct 5, 2026
59ec879
Merge origin/issue-136 into issue-392
JacobStephens2 Oct 5, 2026
c9e8ce3
Merge pull request #402 from JacobStephens2/issue-392
JacobStephens2 Oct 5, 2026
ee85338
Setup asks for the Harness, Model and Effort (#393)
JacobStephens2 Oct 5, 2026
2c45b87
Run a Command's sessions on Codex (#394)
JacobStephens2 Oct 5, 2026
57e6904
Review clean-ups for Setup's Harness questions (#393)
JacobStephens2 Oct 5, 2026
a5a35f5
Merge pull request #403 from JacobStephens2/issue-393
JacobStephens2 Oct 5, 2026
ffb42f2
Review clean-ups for Codex sessions (#394)
JacobStephens2 Oct 5, 2026
6789850
Merge origin/issue-136 into issue-394
JacobStephens2 Oct 5, 2026
06c1ccc
Check the fake codex's stdin by fstat, as macOS has no /proc (#394)
JacobStephens2 Oct 5, 2026
233a95d
Merge pull request #404 from JacobStephens2/issue-394
JacobStephens2 Oct 5, 2026
c9161b1
Resume Codex sessions that leave sub-agents running, and interrupt th…
JacobStephens2 Oct 5, 2026
6afee41
Setup offers Codex (#396)
JacobStephens2 Oct 5, 2026
70ccc3c
Review clean-ups: a Harness's stop signals on Harness, and clearer ki…
JacobStephens2 Oct 5, 2026
51feb30
Merge pull request #405 from JacobStephens2/issue-395
JacobStephens2 Oct 5, 2026
0701225
Review clean-ups for Setup offering Codex (#396)
JacobStephens2 Oct 5, 2026
12a694d
Merge remote-tracking branch 'origin/issue-136' into issue-396
JacobStephens2 Oct 5, 2026
5f56c05
Merge pull request #406 from JacobStephens2/issue-396
JacobStephens2 Oct 5, 2026
369a267
Review clean-ups for Spec #136: prompts worded for either Harness, Se…
JacobStephens2 Oct 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 55 additions & 13 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/adr/0001-rust-binary-with-embedded-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ The factory is a Rust binary that compiles `skills/` into itself (`include_dir!`
## Consequences

- Editing a skill has no effect until the binary is rebuilt and reinstalled (`cargo install --path .`).
- The skills are loaded as a plugin, so they are namespaced (`/thirdshift:implement`), and their references to each other must use that namespace.
- ~~The skills are loaded as a plugin, so they are namespaced (`/thirdshift:implement`), and their references to each other must use that namespace.~~ Replaced by [ADR 0012](0012-factory-skills-linked-into-the-worktree-codex-unsandboxed.md): the skills are linked into each worktree, named `thirdshift-<skill>`, and name each other in plain prose.
12 changes: 7 additions & 5 deletions prompts/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<!-- Generated by src/prompts_page.rs from the prompts' titles and when sentences in src/prompts_page.rs and the claude arguments in src/session.rs; don't edit. Regenerate with UPDATE_PROMPTS=1 cargo test prompts_page -->
<!-- Generated by src/prompts_page.rs from the prompts' titles and when sentences in src/prompts_page.rs and the claude and codex arguments in src/session.rs; don't edit. Regenerate with UPDATE_PROMPTS=1 cargo test prompts_page -->

# Session prompts

Every Session prompt thirdshift can start or resume an agent session with, one file each, with placeholders such as `<branch>` where each Run fills in its own values. The [Prompts and skills page](https://thirdshift.app/prompts/) shows the same prompts.

Every session runs `claude` headless in the Run's worktree, in auto permission mode, with the Factory skills loaded as a plugin from a temporary directory:
Every session runs `claude` headless in the Run's worktree, in auto permission mode. The Factory skills are linked into the worktree's `.claude/skills/`, where Claude Code finds them, and kept out of git:

```sh
claude -p --permission-mode auto --plugin-dir <plugin dir> --output-format stream-json --verbose <prompt>
claude -p --permission-mode auto --output-format stream-json --verbose <prompt>
```

A [Resume](resume.md) continues the session that ended:

```sh
claude -p --permission-mode auto --plugin-dir <plugin dir> --output-format stream-json --verbose --resume <session id> <prompt>
claude -p --permission-mode auto --output-format stream-json --verbose --resume <session id> <prompt>
```

With `harness codex`, each session runs `codex exec --json --dangerously-bypass-approvals-and-sandbox -m <model> -c model_reasoning_effort="<effort>" -c project_doc_fallback_filenames=["CLAUDE.md"] <prompt>` instead, without `-m <model>` or the Effort's `-c` where they are not set, and with `resume <session id>` before the prompt for a Resume. The Factory skills are linked into `.agents/skills/`, and a prompt's first line loads its skill as `$thirdshift-<skill>`.

| Prompt | When it is sent | File |
| --- | --- | --- |
| Fresh | Starts the implement session, which goes on to review and open the pull request, when the Run starts a new Issue branch. | [fresh.md](fresh.md) |
Expand All @@ -30,4 +32,4 @@ claude -p --permission-mode auto --plugin-dir <plugin dir> --output-format strea
| CI-fix Repair, with Inherited failures | Starts a Repair session when CI fails on the pull request's head commit and some of the failed checks, but not all, are Inherited failures: they also failed on the Base branch commit the head last merged in, so they are listed apart as not to fix. | [ci-fix-repair-inherited.md](ci-fix-repair-inherited.md) |
| Resume | Continues any session, once, that ended its turn with background work still running, which was killed with it. | [resume.md](resume.md) |

The Factory skills the prompts name are in [`skills/`](../skills/), as the plugin writes them out.
The Factory skills the prompts name are in [`skills/`](../skills/), as thirdshift writes them out.
8 changes: 4 additions & 4 deletions prompts/architecture-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
Starts the Architecture review, the session an Architect run opens with, in a worktree at the head of the Base branch. The line naming the focus is left out when the command gives none.

```
/thirdshift:improve-codebase-architecture
/thirdshift-improve-codebase-architecture

This is an Architecture review of the base branch <base>: this worktree is checked out at its head on origin, on no branch.

Focus the review on: <focus>

Find the deepening opportunities with /thirdshift:improve-codebase-architecture, using /thirdshift:codebase-design for the vocabulary. Skip any that an open issue already covers, and take the top recommendation.
Find the deepening opportunities with the `thirdshift-improve-codebase-architecture` skill, using the `thirdshift-codebase-design` skill for the vocabulary. Skip any that an open issue already covers, and take the top recommendation.

If it is Strong, settle its design yourself and publish it as the plan with /thirdshift:to-spec and /thirdshift:to-tickets: a Spec with Tickets, or a single Ticket when one session is enough. Label the plan's top issue, the Spec or the single Ticket, `needs-triage`, not `ready-for-agent`: thirdshift marks it ready once you are done.
If it is Strong, settle its design yourself and publish it as the plan with the `thirdshift-to-spec` and `thirdshift-to-tickets` skills: a Spec with Tickets, or a single Ticket when one session is enough. Label the plan's top issue, the Spec or the single Ticket, `needs-triage`, not `ready-for-agent`: thirdshift marks it ready once you are done.

If it is not Strong, file it as one issue labelled `needs-triage`, unless an open issue already covers it.

Expand All @@ -24,5 +24,5 @@ Architecture review plan: <URL of the Spec or the single Ticket you published>
Architecture review idea: <URL of the issue you filed>
Architecture review already filed: <URL of the open issue that already covers it>

You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the Bash timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need with the `TaskStop` tool, by its task id: a task still running when your turn ends is taken as work you were waiting on.
You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the command's timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need, by its task id (with the `TaskStop` tool, if you have it): a task still running when your turn ends is taken as work you were waiting on.
```
2 changes: 1 addition & 1 deletion prompts/ci-fix-repair-inherited.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ Run the affected checks locally, commit, and push <branch>.

If a failure is not caused by this branch (it is flaky, or also fails on <base>), do not change code for it. Instead, add it to a "CI notes" section of the pull request body with a one-line explanation.

You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the Bash timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need with the `TaskStop` tool, by its task id: a task still running when your turn ends is taken as work you were waiting on.
You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the command's timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need, by its task id (with the `TaskStop` tool, if you have it): a task still running when your turn ends is taken as work you were waiting on.
```
2 changes: 1 addition & 1 deletion prompts/ci-fix-repair.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Run the affected checks locally, commit, and push <branch>.

If a failure is not caused by this branch (it is flaky, or also fails on <base>), do not change code for it. Instead, add it to a "CI notes" section of the pull request body with a one-line explanation.

You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the Bash timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need with the `TaskStop` tool, by its task id: a task still running when your turn ends is taken as work you were waiting on.
You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the command's timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need, by its task id (with the `TaskStop` tool, if you have it): a task still running when your turn ends is taken as work you were waiting on.
```
4 changes: 2 additions & 2 deletions prompts/conflict-repair.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
Starts a Repair session when merging the Base branch into the Issue branch leaves conflicts.

```
/thirdshift:resolving-merge-conflicts
/thirdshift-resolving-merge-conflicts

A merge of origin/<base> into <branch> is in progress in this worktree and has conflicts.
<branch> implements <Issue URL>; its pull request is <pull request URL>.

Resolve the conflicts, finish the merge, and push <branch>. Do not rebase or force-push.

You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the Bash timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need with the `TaskStop` tool, by its task id: a task still running when your turn ends is taken as work you were waiting on.
You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the command's timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need, by its task id (with the `TaskStop` tool, if you have it): a task still running when your turn ends is taken as work you were waiting on.
```
8 changes: 4 additions & 4 deletions prompts/continuation-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
Starts the implement session when the Run is a Continuation of an Issue branch whose pull request is open.

```
/thirdshift:implement <Issue URL>
/thirdshift-implement <Issue URL>

You are continuing work on branch <branch>, which already has commits (see git log <base>..HEAD). Build on them; don't start over.

The base branch is <base>. Review with /thirdshift:code-review using <base> as the fixed point.
The base branch is <base>. Review with the `thirdshift-code-review` skill using <base> as the fixed point.

Address the Standards and Spec findings you agree with.

Push branch <branch>.

Update PR <pull request URL> using /thirdshift:pr, rewriting its body to cover the whole branch, marked ready for review.
Update PR <pull request URL> using the `thirdshift-pr` skill, rewriting its body to cover the whole branch, marked ready for review.

In the PR body, add an "Unaddressed findings" section listing each skipped finding under Standards or Spec, with at least a one-line reason.

Include "Closes #<n>" in the PR body.

You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the Bash timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need with the `TaskStop` tool, by its task id: a task still running when your turn ends is taken as work you were waiting on.
You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the command's timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need, by its task id (with the `TaskStop` tool, if you have it): a task still running when your turn ends is taken as work you were waiting on.
```
8 changes: 4 additions & 4 deletions prompts/continuation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
Starts the implement session when the Run is a Continuation of an Issue branch that has no pull request.

```
/thirdshift:implement <Issue URL>
/thirdshift-implement <Issue URL>

You are continuing work on branch <branch>, which already has commits (see git log <base>..HEAD). Build on them; don't start over.

The base branch is <base>. Review with /thirdshift:code-review using <base> as the fixed point.
The base branch is <base>. Review with the `thirdshift-code-review` skill using <base> as the fixed point.

Address the Standards and Spec findings you agree with.

Push branch <branch>.

Create a pull request against <base> using /thirdshift:pr, marked ready for review.
Create a pull request against <base> using the `thirdshift-pr` skill, marked ready for review.

In the PR body, add an "Unaddressed findings" section listing each skipped finding under Standards or Spec, with at least a one-line reason.

Include "Closes #<n>" in the PR body.

You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the Bash timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need with the `TaskStop` tool, by its task id: a task still running when your turn ends is taken as work you were waiting on.
You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the command's timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need, by its task id (with the `TaskStop` tool, if you have it): a task still running when your turn ends is taken as work you were waiting on.
```
4 changes: 2 additions & 2 deletions prompts/foreign-conflict-repair.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
In a Merge run, starts a Repair session when merging Foreign commits from the Issue branch on origin into the local one leaves conflicts.

```
/thirdshift:resolving-merge-conflicts
/thirdshift-resolving-merge-conflicts

A merge of origin/<branch> into <branch> is in progress in this worktree and has conflicts.
<branch> implements <Issue URL>; its pull request is <pull request URL>.

Resolve the conflicts, finish the merge, and push <branch>. Do not rebase or force-push.

You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the Bash timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need with the `TaskStop` tool, by its task id: a task still running when your turn ends is taken as work you were waiting on.
You run headless: nobody is watching, and ending your turn ends the session. Run tests and other long commands in the foreground, raising the command's timeout if needed. If a command is moved to the background, wait for that task by its own task id or output file, never by process names or patterns (`pgrep`, `ps | grep`, and the like): other sessions on this machine run the same commands. Never end your turn while a background task you depend on is still running: ending the turn kills it. Before ending your turn, stop every background task you no longer need, by its task id (with the `TaskStop` tool, if you have it): a task still running when your turn ends is taken as work you were waiting on.
```
Loading
Loading