RECIPES / 04
A routine to repeat every week
Create the Review and fix routine from scratch, with Claude Code reviewing and Codex fixing under npm test, and use it with a new task.
Updated for PrumoGrid 0.5.11
The scenario
Every week you ask for the same thing: one agent reviews part of the code and another fixes what was found, with the tests as the criterion. Building that flow by hand each time is repetitive. A routine saves the sequence (the stages, the agent for each one and the condition to continue) and asks only for that time's task.
Watch the video
Routines. A routine built from scratch, with npm test as a condition, and reused with a new task. Captions and transcript ↗
Before you start
- Project
loja-apiselected, with the project verification set (npm test). The Command verification condition uses that command. - Claude Code and Codex installed and signed in.
Create the routine from scratch
- Open Routines (the button in the top bar, next to Grid, Focus and Flow, or Ctrl+Shift+U).
- Under Your routines, click + New routine from scratch….
- In Routine name, type
Review and fix. - Stage 1: Stage title
Review the code, Agent for stage Claude Code, Condition to continue Automatic. - Click + Add stage.
- Stage 2:
Fix and test, Codex, Command verification. - Click Save routine. It appears under Your routines.
A stage with no title is refused with a notice, for example Give stage 2 a title. Back leaves without saving.
Use the routine
- Open Routines again, click Review and fix and then Continue.
In step 2, Project and terminals, check the project
loja-apiand type in Task this time:Review the coupon module and fix whatever is found.- Because stage 2 uses Command verification, the Project verification block shows the command that will decide (
npm test · detected). - Under Terminal for each stage, the agents appear as suggested by the routine, and you can change them. If a terminal for the agent is missing, the Open button with its name (for example Open Codex CLI) takes care of it.
- Click Continue. In step 3, Review, read what will happen; See what the agent will read shows the text each stage will deliver.
- Click Run. Flow opens with the routine's two stages.
Another way: save a flow that worked
If you already built and ran a good flow, you do not need to recreate it:
- At the end of the flow, or in the last stage's result, click Save as routine. On the Routines screen, the + New routine from the current flow… card does the same.
- Enter the Routine name and check the Included stages. A group of parallel stages goes in whole.
- Save routine. The routine saves the agent for each stage.
Tips
- Use stage titles that say what the stage does ("Review the code", "Fix and test"). They appear in Flow and in Attention.
- Put the verification on the stage that changes code. On a stage that only reads and writes a report, the automatic condition is enough.
- Open the ready-made routines (Analyze and review before the PR, Fix a bug with a test, Review someone else's PR) to see how they are built, and create your own from what works in your project.
Limitations
- Routines cannot be edited. To change one, save another with a new name, from scratch or from a flow.
- Routines are stored on your computer, in
%APPDATA%\TerminalGrid\mission-templates.json, with up to 64 entries. Old evidence and approvals are not included in the routine. - The task is not part of the routine: it is asked for on each use (up to 240 characters), and the routine does not start with the field empty.