Agentic Software Factory · 2026-07-17 · mdflow section guide
“Isn't this just a saved prompt?”
The mdflow section as the workshop room actually runs it: skeptical questions drive the reveal, and each answer lands the real file or command the question demands.
The Q&A
A saved prompt is frozen text. A flow executes while the prompt is being built: every !`command` inline runs at prompt-build time and its output is spliced in, so the agent's first token arrives already knowing your branch, your terminal panes, your tickets. Here is the one this section's demo actually runs — lift it:
---
description: pane-aware standup — agent starts already knowing git, panes, and tickets
model: sonnet
print: true
---
You are a standup assistant. Everything below was captured at prompt-build
time, BEFORE you started — do not re-run these commands.
## Repo state (git)
!`git status --short --branch`
!`git log --oneline -5 2>/dev/null || echo "(no commits yet)"`
## Terminal workspace (herdr panes)
!`herdr api snapshot 2>/dev/null | head -40 || echo "(herdr not running)"`
## Open tickets (linear)
!`echo "(placeholder: linear 'list my in-progress issues' — sandboxed agent call)"`
## Your job
From the preloaded context only:
1. Say what I'm in the middle of (branch, dirty files, visible panes).
2. Flag anything that looks stalled or contradictory.
3. Suggest the single next action, one sentence.
And it's a file in your repo — versioned, diffable, reviewable like any other code. This flow is also a downloadable attachment — the install block is on the section guide.
git status itself.It can — for a tool-call round trip, and only if it decides to. Preloading makes the briefing deterministic: never skipped, never reordered, already in the prompt. The production version of this pattern runs a preload script that fetches workshop ticket buyers and current calendar attendees, prints the computed diff as markdown, and then tells the agent: fetched moments ago — do not re-fetch. One detail worth stealing: the script exits 0 even on failure and prints a PRELOAD ERROR section instead, so the error lands inside the prompt and the agent relays it and stops rather than dying silently.
Deliberately — by default. A flow that summarizes a standup doesn't need your memory files, plugin lists, or MCP servers; hauling them in costs context and blurs focus. mdflow strips ambient config using each engine's own flags — claude gets --safe-mode --no-session-persistence, codex --ignore-user-config --ephemeral, gemini --extensions none, copilot --no-custom-instructions. Captured from this very project:
ISOLATION
ON (default) — ambient engine context is disabled; host capabilities
remain available
safe-mode: true
no-session-persistence: true
(opt out with _isolated: false)
Anything a flow genuinely needs, it declares in frontmatter; _isolated: false opts back into ambient. Straight caveat: this strips context, it is not a host sandbox — the inline commands and the engine still reach your filesystem, network, and credentials.
Nothing to look. The two audit commands are free and execute no engine, no inline, no hook:
md explain flows/workshop-standup.claude.md # engine + why, isolation, every inline, token estimate
md doctor --json # whole-project diagnosis, read-only
md explain on the standup flow reports which engine won and why (the .claude.md filename), every prompt-build command as a declared capability, and an estimated 174 tokens — 0.1% of the context window. If your command shows up in the capability list, the context will land.
Bare md. It opens the Flow Workbench: one searchable list of everything runnable, each entry labeled with its provenance — PROJECT, GLOBAL, INSTALLED, or PATH. My machine has roughly sixty-five flow-* commands on PATH — flow-git, flow-ffmpeg, flow-karabiner, flow-zsh — each a globally installed specialist that preloads its entire config domain plus a mission, trust boundary, and mutation policy on every single run. The installed flow-zsh file is printed complete on the section guide — study its anatomy, don't paste it.
That's how flows regress silently. Instead, record the failure and let the eval suite — not your memory — decide whether a fix is real:
md feedback flows/review.md "missed the renamed-file regression"
md eval flows/review.md --plan # free cost preview of the eval suite
md evolve plan flows/review.md # free: evidence, verification, cost, writes
md evolve propose flows/review.md # off-path proposal; source unchanged
md evolve show <run-id> # decision, capability diff, prompt diff
md evolve apply <run-id> # atomic, explicit, reversible
The canonical file stays byte-identical until an explicit apply, and the outcome vocabulary is honest: verified_improvement means a feedback-linked case failed on the old prompt and passed on the new one; regression_safe means guardrails held but your reported problem wasn't proven fixed.
This repo answers that itself. The Elo-voting process that chose the very format of this page was captured as a flow — flows/this-or-that.md at the workshop repo root, written from that session the day before the workshop. It encodes the whole round (frame the axis, scaffold the duel harness, generate distinct options, bank the taste rules) and re-injects the accumulated vote record fresh on every run via @-includes. Auditing it is free: md explain flows/this-or-that.md. In prior sessions the same week, a Stripe-to-calendar sync workflow became a flow the same way. Flows aren't the demo — they're how the demo got made.