Skip to content

Guiding the agent

Connect your coding agent through CLI and MCP setup. Use preferences to establish working conventions, load task-specific skills on demand, and pair deterministic flow assertions with original review evidence.

Leave a note that every agent working with Reflow on your behalf reads before running anything. Write it the way you would say it:

Tail the running test in another terminal pane, and close the pane when it is done.
Report results as a short list: what passed, what failed, what you did not run.

There are two notes, each plain text or Markdown up to 4,000 characters:

NoteWho sets itWho reads it
Your preferencesYouYou, and agents using your login across every team. Private—even team owners cannot read it.
Team preferencesA team ownerEvery member of the team and their agents. Displays who last updated it and records changes in the team audit log.

Set notes in the app (Account for personal, Settings → Team for team), from the CLI, or by asking your agent:

Terminal window
reflow preferences set "Tail the running test in another terminal pane, close it when done."
reflow preferences set --file notes.md
reflow preferences show
reflow preferences set --team --file team-notes.md # team owners only
reflow preferences clear

Through MCP, the agent uses manage_preferences with action set to get, set_user, clear_user, set_team, or clear_team. Agents update preferences only when you explicitly ask.

When a note is set, the agent receives it through three channels, each labelled with its author scope:

  1. MCP server instructions at session start. Short notes (under ~500 characters total) are quoted inline; longer notes are referenced by length so the agent loads the full text via load_skill.
  2. The reflow entry skill, appended fresh each time it is loaded.
  3. The user-preferences skill, listed while a note is set and loaded fresh before running anything.

reflow plan and reflow apply never print preferences—they are agent guidance, not command output. If the Reflow service is unreachable at startup, the agent continues without them.

Preferences govern working style: how to watch runs, format summaries, or prioritize checks. Where personal and team notes disagree, your personal note wins. Preferences cannot widen permissions, change credentials, switch teams or collections, or override direct instructions in the current conversation.

Reflow delivers preferences as text for the agent rather than executing them directly. For live tailing in another pane, reflow apply prints admitted apply <key> and reflow watch --request <key> follows that run live from any terminal until it finishes; opening or closing panes stays with your terminal and agent host.

For a branch or pull request, start with load_skill("test-change"): it finds existing flows covering the diff via search_flows, reruns them, identifies uncovered behavior with coverage-guided testing, strengthens or promotes durable checks via golden-authoring, and audits retained evidence.

For user-visible features, also load evidence-review before choosing Browser checkpoints:

  • Ground intended behavior in the application knowledge base and canonical design-system components, tokens, and interaction patterns.
  • Cover the primary happy path plus affected normal variants (roles, first-time vs. returning users, create vs. edit, entry routes, persisted state) and high-risk permission or error paths. Shared code can affect journeys beyond the one named in the PR.
  • Prefer strengthening an existing durable assertion or promoting a suitable normal flow over adding a one-off PR test. Use golden-authoring for self-contained setup, the two-pass golden verification check, and the golden: metadata block—a golden-* filename alone is not promotion.
  • Keep PR-only behavior as a candidate until merged to the default branch; never weaken the main suite to make a PR pass. Name what ran, what was omitted, and which target and source revision were checked.

Load plugin-execution and flow-authoring via load_skill, then inspect list_plugins for installed schemas and exact pins. State intent in the step heading and place executable RFL in its fence (assuming site: Browser in providers frontmatter):

### Check the confirmation after payment
```rfl
site.click selector="[data-testid='place-order']"
site.expect selector="[data-testid='order-number']"
site.snapshot name="confirmation"
```

Prose outside fences is human context; every step executes its RFL statements deterministically as written. See Write a flow and the RFL reference for full syntax. Never silently weaken assertions to force a green run—preserve the failing evidence and test any justified update separately.

Add 1–3 lowercase words in tags: for the suite, task, or pull request (such as golden, v2, pr-8839). Run reflow flows tags first and reuse existing tags rather than inventing near-duplicates. Tag throwaway checks with the task tag plus scratch so they can be archived together later.

Tags power the filter bar in the app and reflow plan --tag <tag> on the CLI. Editing tags re-runs nothing and keeps golden flows golden. Retag existing flows safely with reflow flows tag ... --dry-run first (tags).

Load load_skill("knowledge-corpus"), read the pinned revision with search_kb and get_kb_page, and verify claims against source code and observed runs. Knowledge pages describe the application as it exists at that revision—replace stale facts in place and keep change narratives or work logs out of corpus pages. Immutable revisions preserve history automatically.

Deepen affected pages with verified variants, permissions, design conventions, source entry points, and the saved flows that assert them. Test usefulness with a few realistic feature or incident questions against the candidate corpus so answers lead quickly to the right code and tests.

For committed source changes, prepare_knowledge_refresh returns a bounded task brief for a fresh knowledge-maintainer worker managed by your host. Publication and root selection remain explicit decisions.

Load load_skill("evidence-review") and inspect retained screenshots even when every assertion passed. Verify settled values, layout, and visible identity fields against intended behavior—loading skeletons, masked data, blank cells, or unexpected error toasts limit any claim. Separate Browser journeys from command checks, distinguish screenshot observations from assertions, and name untested paths.

Choose the review surface that fits your team’s workflow:

  • Interactive Review Apps: Load load_skill("review-apps") to assemble a sandboxed HTML/Markdown review page embedding <reflow-compare>, <reflow-flow>, <reflow-run>, and <reflow-file> components via manage_review_apps (Review apps).
  • Inline PR reviews: Load load_skill("pr-publishing") and publish summary plus line-anchored findings directly to GitHub with reflow pr review as reflow-code-review[bot] (PR review).
  • Structured comparisons and exports: Use review_changes to publish exact base/candidate comparisons, add independent fresh_review annotations, or export local Markdown and verified media (MCP PR preparation).

Keep handoffs concise: tested outcomes and key variants, source revision, remaining gaps, knowledge updates, and golden coverage improvements. Link original retained evidence instead of pasting raw logs or private data. Human acceptance belongs to PR merge.

Flows execute deterministically with zero LLM calls or model provider keys inside the runner. When a step fails, your coding agent owns the diagnosis using Reflow’s retained evidence and live hold-and-resume debugging:

  1. Inspect the failed step’s error, command output, and screenshots.
  2. When recorded evidence is not enough, run reflow apply --hold (or manage_execution with hold: true) so the browser page and plugins stay alive at the failure point.
  3. Inspect live state with debug_execution (snapshot, screenshot, act), patch the flow or application, and apply again to continue directly from the failed step without replaying passed steps.

See Repair and rerun for reuse rules and hold continuation details. Judgement that RFL assertions cannot express belongs to your agent and human reviewer reading the retained evidence.