FEATURES / 11
Routines
A sequence of stages saved to repeat with another task: use a ready-made one, save a flow that worked, or build your own from scratch.
Updated for PrumoGrid 0.5.11
What it's for
A routine is a flow you save to use again. It remembers the stages, the suggested agent for each one, and the condition to move from one to the next; the task is left out and is asked for on each use. With it, "review with Claude and fix with Codex, only moving on if the tests pass" becomes a two-click choice, and you write only what changes that time: which bug, which module, which PR.
Watch the video
Routines. A routine built from scratch, with npm test as a condition, and reused with a new task. Captions and transcript ↗
When to use it and when not to
Use a routine when the same process repeats: fixing a bug with a test, reviewing before opening a PR, investigating a failure. It also helps keep the same process across projects, because a routine does not belong to a single project.
For a task you do once, build the flow directly with New stage or in Flow. Routines are optional, like Flow and New stage.
Step by step
Create the Review and fix routine
- Open Routines. There are three doors to the same screen: the Routines button in the top bar, next to Grid, Focus and Flow; Routines… in the right sidebar or in Tools; and the shortcut Ctrl+Shift+U.
- In step 1, under Your routines, click + New routine from scratch….
- In Routine name, type
Review and fix. - In stage 1, in Stage 1 title, type
Review the code and write up to three findings to REVISAO.md, with file and line. Do not change the code.In Agent for stage 1, choose Claude Code. In Condition to continue, choose Automatic. - Click + Add stage.
- In stage 2, type
Read REVISAO.md, fix what was pointed out and run the tests., choose Codex CLI and the condition Command verification. - Click Save routine. The routine appears under Your routines, already selected.
Back returns to step 1 without saving. Remove takes out a stage; a routine needs at least one.
Use the routine with a new task
- Open Routines and click Review and fix. The stages appear on the right, with the Condition to continue column. Click Continue.
- In step 2, Project and terminals, check the Project:
loja-api. - In Task this time:, type
Review the coupon module and fix whatever is found. - Because stage 2 uses Command verification, the Project verification block shows the command,
npm test · detected, which runs in the project folder at the end of the stage. - Under Terminal for each stage, each stage shows the agent suggested by the routine and the terminal:
Claude Code · new terminalor a terminal of that agent that is already open. You can change the agent and the terminal here. - Click Continue. In step 3, Review, read What will happen: the flow name, and each stage with its condition and its terminal. See what the agent will read shows the exact text each stage will deliver.
- Click Run. The notice says "Routine running. Stage 1 delivered to…", and Flow opens with the two stages.
The flow it creates is named after the routine and the task, such as Review and fix · Review the coupon module…, and appears in the project's flow selector.
What you see on screen
| On screen | What it means |
|---|---|
| Ready routines | Examples that ship with the product: Analyze and review before the PR, Fix a bug with a test and Review someone else's PR. |
| Your routines | The routines you created, each with its number of stages. |
| Automatic | The next stage starts when the agent reports that it is done. |
| With your approval | The next stage waits for you to approve. |
| Command verification | The stage is only done if the project's verification command passes. |
| suggested by the routine / default agent | Where the stage's agent came from. It can be changed. |
| Same conversation as stage N | In a ready-made routine, this stage continues the terminal of an earlier one. |
Save a flow as a routine
If you built a flow that worked, save it instead of recreating it:
- In Flow, click Save as routine, in the bar below the cards. The same option is in a stage's result and, in Routines, on the + New routine from the current flow… card.
- In Routine name, the first field, give it a name.
- Check Included stages. A parallel group goes in whole or not at all.
- Click Save routine.
The routine saves the agent for each stage. Old evidence and approvals are not included.
Tips
- In the ready-made routines, the task already suggests the format: "the bug to fix" or "the PR to review (number or link)". The light text inside the field is only an example and is not sent: the routine does not continue with Task this time empty.
- If the project has no verification command and the routine asks for one, step 2 offers Set it now or Use human approval for this stage.
- If a terminal for the suggested agent is missing, step 2 shows Open with the agent's name, such as Open Codex CLI.
- To change a routine, use it, adjust the flow it creates, and save that as another routine with a new name.
Where they are stored
Routines are stored on this computer, in %APPDATA%\TerminalGrid\mission-templates.json. They apply to every project in this profile.
Known limitations
- Routines cannot be edited. To change one, save another with a new name, from the flow or from scratch.
- Up to 64 saved routines.
- Routine name and Stage title take up to 80 characters; Task this time, up to 240.
- Up to 16 stages per routine, and the project's plan needs room for all of them.
- In a routine built from scratch, each stage runs in its own terminal; the only thing passed between stages is the instruction. For stage 2 to build on the work of stage 1, ask stage 1 to write a file.
- Creating from a routine authorizes delivering the instructions to the chosen terminals. The agents' permission requests are still answered by you.