PrumoGrid

HomeLearnRecipesA routine to repeat every week

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

VIDEO 07 · 0:46

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-api selected, 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

  1. Open Routines (the button in the top bar, next to Grid, Focus and Flow, or Ctrl+Shift+U).
  2. Under Your routines, click + New routine from scratch….
  3. In Routine name, type Review and fix.
  4. Stage 1: Stage title Review the code, Agent for stage Claude Code, Condition to continue Automatic.
  5. Click + Add stage.
  6. Stage 2: Fix and test, Codex, Command verification.
  7. Click Save routine. It appears under Your routines.
Each stage of the routine has a title, the suggested agent and the condition to continue to the next one.

A stage with no title is refused with a notice, for example Give stage 2 a title. Back leaves without saving.

Use the routine

  1. Open Routines again, click Review and fix and then Continue.
  2. In step 2, Project and terminals, check the project loja-api and type in Task this time:

    Review the coupon module and fix whatever is found.

  3. Because stage 2 uses Command verification, the Project verification block shows the command that will decide (npm test · detected).
  4. 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.
  5. Click Continue. In step 3, Review, read what will happen; See what the agent will read shows the text each stage will deliver.
  6. Click Run. Flow opens with the routine's two stages.
The task is asked for on each use. The light text inside the field is only an example and is not sent.

Another way: save a flow that worked

If you already built and ran a good flow, you do not need to recreate it:

  1. 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.
  2. Enter the Routine name and check the Included stages. A group of parallel stages goes in whole.
  3. 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.