flow-read-prerequisite
Read a flow's execution prerequisite without running it to confirm the device is on the expected app, account, or screen. Reads a file only—nothing is launched or changed.
Instructions
Read the execution prerequisite of a flow without running it — a saved flow from the .argent/flows/ directory, or an explicit boundary-managed flow_path.
Returns { flow, executionPrerequisite }: the logical name, plus the precondition its author recorded
verbatim. Empty when none was declared, which is always so for a self-contained scenario: one opening
on a launch may declare no prerequisite, because it builds its own start state.
Use when deciding whether the device already sits where a fragment expects it (correct app foregrounded,
correct account, correct screen) before committing to a run, or when relaying that requirement to a human.
Touches no device: nothing is launched, tapped, dispatched or torn down, and no simulator or emulator
needs booting, so calling this costs nothing but a file read.
Fails if the flow file does not exist.
Address the flow exactly as you will address it in flow-execute: name or flow_path, one and only one; supplying both or neither is rejected. The name goes in name, which resolves /.argent/flows/.yaml.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set. | |
| flow_file | No | Path to the flow .yaml as readable by the tool-server. Internal — the argent client derives it from project_root and name automatically; leave unset. | |
| flow_path | No | Omit when name is set. Absolute path to a co-located flow .yaml on the client and tool server's shared filesystem. This must be supplied through the file-input boundary. Pass the same flow source here as to flow-execute, so the prerequisite you read belongs to the flow that will run; for remote reads, pass name + project_root instead. | |
| project_root | Yes | Absolute path to the calling agent's project root — the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the prerequisite is read from that YAML instead, so pass the agent's cwd. |