PrumoGrid

HomeLearnRecipesA change that spans two projects

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:

  1. In loja-api, Claude Code reads src/frete.cjs and writes the rule in CONTRATO.md, in front-end terms.
  2. 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

VIDEO 06 · 0:56

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-api and C:\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

  1. Select loja-api and click + New stage, with Runs on: Claude Code.
  2. Task:

    Read src/frete.cjs and write the free-shipping rule for the front end in CONTRATO.md, in up to five lines.

  3. 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.
  4. In On creation, choose Plan only and confirm. The stage appears as planned in the Flow.

Continue in portal-web

  1. In the loja-api Flow, open Other actions and choose Continue in another project….
  2. In Destination project, choose portal-web, check the Source stage, and confirm with Plan at destination.
Continue in another project: the destination and the stage it depends on.
  1. 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.
  2. Task:

    Read ../loja-api/CONTRATO.md and update the text in src/banner.js with that rule.

  3. Add it to the plan. In the portal-web Flow, the stage shows the Waiting for source · loja-api badge.
The portal stage waits for its source. Open source flow takes you to loja-api; Cancel dependency undoes the link.

Run

  1. Go back to loja-api and click Run flow.
  2. Claude Code writes CONTRATO.md. When the stage is done, the portal badge changes to Source completed · loja-api and Codex starts in portal-web.
  3. Select portal-web to watch Codex edit src/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.md in loja-api describes the right rule (R$ 200, when it applies).
  • git diff in portal-web shows 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.md works because the two folders are siblings in C:\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-api at 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.