Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# tstack
# tstack

My personal set of agent skills for rigorous engineering work. It's a hard fork of [pstack](https://github.com/cursor/plugins/tree/main/pstack) by [poteto](https://x.com/poteto), rebuilt so it isn't tied to one tool: plain `SKILL.md` skills that install into Claude Code, Codex, GitHub Copilot CLI, Cursor, and any other harness that reads the open skills layout.

The main entry point is `/marius-mode`. It reads your request, picks a playbook (bug fix, feature, refactoring, investigation, and about twenty more), runs the other skills as the steps need them, and proves the result on the real app before calling it done.

## Install

```bash
npx skills add tacheshun/tstack -g -s '*' -a claude-code codex github-copilot cursor
```

Drop the harnesses you don't use. The skills land in `~/.agents/skills/`. Codex, Copilot, and Cursor read that folder directly, and Claude Code gets symlinks in `~/.claude/skills/`. Update with `npx skills update -g`.

## Quick start

Give it a goal and a way to check it:

```text
/marius-mode the export writes duplicate rows when a retry lands mid-run. repro first, then fix and verify.
```

For non-trivial work it writes a short plan and waits for your go. Then it runs to a ready change without checking in, and stops before any push or PR. You merge.

## Skills

| Skill | Use it when |
|---|---|
| `/marius-mode` | Any non-trivial task. Routes to a playbook and applies the principles. |
| `/how` | You want to know how a subsystem works. |
| `/why` | You want to know why something was built this way. Queries your MCP sources. |
| `/teach` | You want to understand a change or subsystem, not only get a summary. |
| `/recall` | You're resuming work and want your recent context rebuilt from chat history. |
| `/blast-radius` | A small-looking change and you want to know what else it could break. |
| `/architect` | You're about to write code that crosses a function boundary. |
| `/arena` | You want several parallel attempts at the same thing, then the best parts of each. |
| `/swarm` | You want parallel workers across slices or races, then one report. |
| `/interrogate` | You want reviewers to try to break a diff. |
| `/tdd` | A bug with a cheap local test path: failing test first, then the fix. |
| `/no-comments` | Strip comments before review. |
| `/unslop` | Clean AI tells out of writing. |
| `/technical-writing` | Docs, READMEs, PR descriptions, commit messages. |
| `/bro` | Restate the last message in plain language. |
| `/figure-it-out` | No playbook fits. Designs an auditable one for the task. |
| `/show-me-your-work` | You want a decision log you can review later. |
| `/reflect` | A long task landed and you want its lessons turned into skill edits. |
| `/automate-me` | You want your own `-mode` skill drafted from how you actually work. |
| `/create-verification-skill` | Your project has no scripted way to prove app behavior. |
| `/maintain-verification-skill` | Your verification skill has drifted from the app. |
| `/typescript-best-practices` | You're reading or editing TypeScript. |

There are also 23 `principle-*` skills, one rule each. `/marius-mode` reads their index and applies the ones a task triggers.

## Cross-vendor review

Review panels such as `/interrogate` can add reviewers from other model families by calling their CLIs headless (`claude`, `codex`, `copilot`). This is off by default. Allow CLIs per machine in `~/.config/tstack/bridge`, one per line, so a work machine can allow only the approved vendor. Details are in [the bridge reference](skills/interrogate/references/bridge.md).

## Learn more

The [tstack guide](docs/guide/README.md) walks through setup, routing, understanding code, design, building, verification, overnight runs, and making the style your own.

To work on tstack itself, run `node scripts/check.mjs` before every PR. It validates frontmatter, links, and skill references, and rejects harness-specific terms.

## License

MIT. Includes work from pstack, copyright Lauren Tan. See [LICENSE](LICENSE).
56 changes: 36 additions & 20 deletions docs/guide/01-setup.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,54 @@
# Set up pstack
# Set up tstack

In this page you install the plugin, pick which models pstack uses, and run your first task. Setup is one command plus a short conversation.
In this page you install the skills into your harness, optionally turn on cross-vendor review, and run your first task.

## Install the plugin
## Install the skills

In a Cursor chat, run:
tstack is a folder of standard `SKILL.md` skills, so one installer covers every harness. Run:

```text
/add-plugin pstack
```bash
npx skills add tacheshun/tstack -g -s '*' -a claude-code codex github-copilot cursor
```

Cursor confirms the plugin is installed.
- `-g` installs for your user, so every project sees the skills. Leave it out to install into the current project only.
- `-s '*'` installs all skills without asking which ones.
- `-a` names the harnesses. Drop the ones you don't use.

## Pick your models
The skills land once in `~/.agents/skills/`. Codex, GitHub Copilot, and Cursor read that folder directly. Claude Code gets symlinks in `~/.claude/skills/`. To update later, run `npx skills update -g`.

Run:
Check the install in your harness:

```text
/setup-pstack
```
| Harness | Check |
|---|---|
| Claude Code | Type `/` and look for `/marius-mode`. |
| Codex | Ask "what skills do you have?" |
| GitHub Copilot CLI | Run `/skills`. |
| Cursor | Type `/` in a chat and look for `/marius-mode`. |

`/setup-pstack` (not in tstack) detects the models you have access to, asks for a reasoning budget, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `~/.cursor/rules/pstack-models.mdc`, a small rule every pstack skill reads.
Some harnesses ignore the flag that keeps a skill slash-only. Each skill's description names its own command, so it matches only when you ask for it.

You only override what you care about. A role with no line in the rule keeps the skill's default. To restore a default, delete that role's line. A rerun of `/setup-pstack` keeps any role whose model differs from the default. A rule written before 0.15.3 pins the old default models, so delete those role lines, or delete the file, then run `/setup-pstack` again.
## Models

You might be wondering what happens if you use Auto. Set a role to `inherit-parent` or `auto` and pstack omits the subagent `model` field, so the subagent inherits your parent chat model. Both values mean the same thing, and neither is a model slug. For a panel role the value is a list, and one subagent runs per entry, so the list length sets the panel size. Setup also configures `swarm workers`, the default model for every `/swarm` worker unless a race names a model for each arm.
tstack does not configure models. Each skill names a role (the strongest model, the default model, or a fast one), and your harness picks its own model for that role. In Claude Code that means Opus, Sonnet, or Haiku. In Codex it means OpenAI models.

## Accept the verification offer, or don't
## Turn on cross-vendor review, or don't

At the end of setup, `/setup-pstack` looks for a way to prove app behavior in your project, either a `verify-*` skill or an existing harness. If it finds neither, it offers once to generate one with [`/create-verification-skill`](../../skills/create-verification-skill/SKILL.md).
Review panels such as `/interrogate` find more when reviewers come from different model families. Your harness's subagents all come from one vendor, so tstack can add reviewers by calling other vendors' CLIs. It only calls the CLIs you allow on this machine.

Say yes and it writes `.cursor/skills/verify-<app>/`, a project-local skill that teaches agents to drive your app the way a user does. It proves the skill works once before handing it over. Say no and setup moves on. You can run `/create-verification-skill` yourself any time. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers when it earns its place.
Create `~/.config/tstack/bridge` with one CLI per line:

```text
# personal machine
claude
codex
```

```text
# work machine: only the approved vendor
copilot
```

After setup, start a new chat. The model rule applies to new sessions.
With no file, the bridge is off and panels run on your harness's own models. That default is safe on any machine. The exact commands are in [the bridge reference](../../skills/interrogate/references/bridge.md).

## Run your first task

Expand All @@ -44,6 +60,6 @@ Pick something real but small, and describe it the way you'd describe it to a co

Watch the todo list. Its first items are the matched playbook's steps copied in, the Feature playbook for this prompt. If `/marius-mode` skips a step, the step stays in the list with `skip: <reason>`, so you can see what it chose not to do.

From here you can type normal follow-ups. `/marius-mode` is sticky. It stays on for the conversation until you opt out by saying so.
`/marius-mode` applies to the task you invoke it with. Start the next task with `/marius-mode` again when you want the same rigor.

Next: [Route work through `/marius-mode`](./02-marius-mode.md).
6 changes: 4 additions & 2 deletions docs/guide/02-marius-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ flowchart TD
J --> K
```

The diagram shows the common routes. There are also playbooks for hillclimbing a metric, diagnosing runtime symptoms and captured traces, prototypes, visual parity, authoring and evaluating skills, autonomous runs, babysitting a PR or stack to merge-ready, shipping a verified stack, running a PR queue on autopilot, orchestrating project-scale programs, session pickup, pausing safely, multi-phase plans, and worktree cleanup. The [playbook directory](../../skills/marius-mode/playbooks/) has the full set.
The diagram shows the common routes. There are also playbooks for hillclimbing a metric, diagnosing runtime symptoms and captured traces, prototypes, visual parity, authoring and evaluating skills, autonomous runs, babysitting a PR or stack to merge-ready, shipping a verified stack, building a verified PR stack on autopilot, session pickup, pausing safely, multi-phase plans, and worktree cleanup. The [playbook directory](../../skills/marius-mode/playbooks/) has the full set.

Two gates sit around every route. Non-trivial or greenfield work starts with a short plan: the approach, the files it touches, and each open decision with a recommended option. After your go, it runs to a ready change without checking in. It stops again before anything leaves your machine, such as a push, a PR, or a message, and you merge PRs yourself. Small fixes skip the plan.

## Say the goal, not the ceremony

Expand All @@ -49,7 +51,7 @@ continue
keep going until done
```

Short works because the mode is sticky and the playbook holds the structure. Your words carry the intent, and the skill carries the rigor.
Short works because the playbook holds the structure. Your words carry the intent, and the skill carries the rigor.

## Switch tasks with "new task"

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/03-understand.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Understand the code before changing it

Editing code you don't understand is how subtle regressions ship. pstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic.
Editing code you don't understand is how subtle regressions ship. tstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic.

## Trace behavior with `/how`

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/04-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ flowchart LR
H --> I[Verify]
```

The panel comes from your `/setup-pstack` (not in tstack) configuration, and you can adjust it per task. Ask for more candidates when the decision matters, fewer when it doesn't:
The panel runs on your harness's models, plus other vendors' CLIs if you allowed them in `~/.config/tstack/bridge` ([Set up tstack](./01-setup.md#turn-on-cross-vendor-review-or-dont)). Adjust it per task. Ask for more candidates when the decision matters, fewer when it doesn't:

```text
/arena this, 5 candidates. the cache key format is expensive to change later.
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/05-build-and-clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ In context, that's enough. [`/tdd`](../../skills/tdd/SKILL.md) writes the smalle

## Clean before you commit

The [Opening a PR playbook](../../skills/marius-mode/playbooks/opening-a-pr.md) rereads the diff against the laziness protocol before each commit and applies [`/unslop`](../../skills/unslop/SKILL.md) to the PR description and commit bodies. `/deslop` ships in the `cursor-team-kit` plugin, not in pstack. If you don't have it, ask for the same outcome in plain words: remove narrating comments, unsupported guards, dead compatibility paths, and unrelated edits.
The [Opening a PR playbook](../../skills/marius-mode/playbooks/opening-a-pr.md) rereads the diff against the laziness protocol before each commit and applies [`/unslop`](../../skills/unslop/SKILL.md) to the PR description and commit bodies. To ask for the same pass yourself, say it in plain words: remove narrating comments, unsupported guards, dead compatibility paths, and unrelated edits.

For prose, `/unslop` takes a target and any extra rules you have:

Expand All @@ -70,6 +70,6 @@ Comments need their own pass, and not from the agent that wrote them. An author

The division of labor is worth keeping straight. The laziness reread cleans slop out of the code, `/unslop` cleans it out of prose, and `/no-comments` hands the comments to a reviewer who didn't write them.

**Pitfall:** cleanup is not optional polish. A diff with narrating comments and defensive dead weight reads as unfinished to reviewers, and the extra code is where the next bug hides. If the diff feels padded, say `deslop it` before you commit, not after review calls it out.
**Pitfall:** cleanup is not optional polish. A diff with narrating comments and defensive dead weight reads as unfinished to reviewers, and the extra code is where the next bug hides. If the diff feels padded, ask for that cleanup before you commit, not after review calls it out.

Next: [Verify and ship](./06-verify-and-ship.md).
2 changes: 1 addition & 1 deletion docs/guide/06-verify-and-ship.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The UI bullet above hides a real requirement. The agent needs a scripted way to

[`/create-verification-skill`](../../skills/create-verification-skill/SKILL.md) interviews the repository, not you. It works out what a user touches, how the app launches locally, what can drive it (an existing harness first, otherwise browser and CDP, a PTY, or plain HTTP), what evidence proves behavior, and whether two instances can run side by side. It asks you only what the code can't answer.

It writes `.cursor/skills/verify-<app>/`, agent-facing instructions with exact Launch, Doctor, Drive, Evidence, and Cleanup sections, plus a feature map under `features/` that indexes what the app does and what result proves each feature works. The skill ships a [worked feature-map example](../../skills/create-verification-skill/references/feature-map-example/) with a README index and one file per feature using the four required H2s. Before handing it over, the generator proves the skill once end to end: launch, doctor check, drive one feature, capture evidence, clean up. If that proof fails, don't use the output.
It writes `.agents/skills/verify-<app>/` in your project, with a `.claude/skills/` symlink for Claude Code, agent-facing instructions with exact Launch, Doctor, Drive, Evidence, and Cleanup sections, plus a feature map under `features/` that indexes what the app does and what result proves each feature works. The skill ships a [worked feature-map example](../../skills/create-verification-skill/references/feature-map-example/) with a README index and one file per feature using the four required H2s. Before handing it over, the generator proves the skill once end to end: launch, doctor check, drive one feature, capture evidence, clean up. If that proof fails, don't use the output.

From then on, "verify it in the app" is a step any agent can execute, in this repo, with no setup conversation.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/07-overnight.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Walk through what each line buys you:
- "done means..." turns the goal into checks every iteration can run.
- "fresh worktree off `<base>`" keeps the run from colliding with anything else you have open.
- "don't ask me before committing" pre-answers the permission the agent would otherwise block on.
- `/loop` is Cursor's built-in wake mechanism, not a pstack skill. The [Autonomous run playbook](../../skills/marius-mode/playbooks/autonomous-run.md) uses it to re-check the finish condition on events or a heartbeat.
- `/loop` is Claude Code's built-in recurring loop, not a tstack skill. In a harness without one, the agent polls until done. The [Autonomous run playbook](../../skills/marius-mode/playbooks/autonomous-run.md) uses it to re-check the finish condition on events or a heartbeat.
- The escape hatch lets it stop at a genuine dead end and write up why, which beats eight hours of creative goal reinterpretation.

Because you'll review this work after stepping away, `/marius-mode` routes it through [`/figure-it-out`](../../skills/figure-it-out/SKILL.md), which designs the run's phases before any code and wires in the decision log.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/08-principles.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Steer with principle names

pstack ships 23 principles as individual skills. `/marius-mode` reads their index at the start of every multi-step task, applies the ones the task triggers, and names each applied principle in its reply along with the decision it changed.
tstack ships 23 principles as individual skills. `/marius-mode` reads their index at the start of every multi-step task, applies the ones the task triggers, and names each applied principle in its reply along with the decision it changed.

You don't invoke principles. You use their names to steer. Each name points at a complete rule the agent has already read, so one phrase redirects the work more precisely than a paragraph of instructions.

Expand Down
Loading
Loading