RECIPES / 03
A change that spans two projects
The free-shipping rule changes in the API and needs to reach the site. A stage in loja-api writes the contract; the portal-web stage starts on its own when it is done.
Updated for PrumoGrid 0.5.11
The scenario
loja-api sets free shipping starting at R$ 200, in src/frete.cjs. portal-web shows this rule in a banner, in src/banner.js. When the rule changes in the API, the site text needs to follow.
You will build a flow that starts in one project and continues in the other:
- In
loja-api, Claude Code readssrc/frete.cjsand writes the rule inCONTRATO.md, in front-end terms. - In
portal-web, Codex reads that contract and updates the banner text. It starts on its own when the first stage is done.
Each stage can use its own agent and its own model. Here, the portal task is changing a piece of text, so a smaller model is enough.
Watch the video
Across projects. An API step linked to a web portal step, each with its own agent and model. Captions and transcript ↗
Before you start
- Register both projects (
C:\demo\loja-apiandC:\demo\portal-web). With only one project, the Another project option in New stage is disabled, with the explanation Only one project is open. - Make sure both agents work in each folder (open each CLI once and accept trust for the folder, if it asks).
Step by step
In loja-api
- Select
loja-apiand click + New stage, with Runs on: Claude Code. Task:
Read src/frete.cjs and write the free-shipping rule for the front end in CONTRATO.md, in up to five lines.- If you want to pin the model for this stage, open More options → Stage options → Model and permissions (optional) and fill in Model with an identifier available on your account. Left empty, the CLI default applies.
- In On creation, choose Plan only and confirm. The stage appears as planned in the Flow.
Continue in portal-web
- In the
loja-apiFlow, open Other actions and choose Continue in another project…. - In Destination project, choose
portal-web, check the Source stage, and confirm with Plan at destination.
- In
portal-web, New stage receives the destination stage. Choose Runs on: Codex CLI and, in More options → Stage options, the model if you want. Task:
Read ../loja-api/CONTRATO.md and update the text in src/banner.js with that rule.- Add it to the plan. In the
portal-webFlow, the stage shows the Waiting for source · loja-api badge.
Run
- Go back to
loja-apiand click Run flow. - Claude Code writes
CONTRATO.md. When the stage is done, the portal badge changes to Source completed · loja-api and Codex starts inportal-web. - Select
portal-webto watch Codex editsrc/banner.js. The stage shows as done in the portal Flow.
Meanwhile, if the portal agent asks for permission while you are looking at loja-api, Attention shows In another project: portal-web is waiting for permission at the end of the list. One click takes you to the terminal that asked. See Attention.
What to check
CONTRATO.mdinloja-apidescribes the right rule (R$ 200, when it applies).git diffinportal-webshows only the banner text changed.- The site reflects the contract, not what the agent imagined: compare the two files.
Tips
- The path
../loja-api/CONTRATO.mdworks because the two folders are siblings inC:\demo. If your projects are in different places, use the full path in the instruction. - Some CLIs, with a restricted sandbox, do not read files outside the project folder. In that case, ask the first stage to also write the contract inside
portal-web, or paste the rule into the instruction itself. - Give the contract file a clear name and keep it in the API repository: it becomes documentation for the next change.
- One flow per goal. If you are fixing something else in
loja-apiat the same time, keep the two flows separate and switch between them with the flow selector.
Limitations
- The destination stage depends on the source stage: closing or hiding the source project does not approve anything. If the source fails, the destination keeps waiting.
- Automatic advancing between stages happens while the PrumoGrid window is open. If you close the window midway, the terminals keep running, but the next stage is delivered only when you reopen it.