Skip to content

docs(readme): add a data-driven loop program graph beside the linear one#1045

Merged
abrichr merged 1 commit into
mainfrom
readme-loop-graph-example
Jul 21, 2026
Merged

docs(readme): add a data-driven loop program graph beside the linear one#1045
abrichr merged 1 commit into
mainfrom
readme-loop-graph-example

Conversation

@abrichr

@abrichr abrichr commented Jul 21, 2026

Copy link
Copy Markdown
Member

What

The launcher README shows the compiled MockMed workflow as a linear program graph. This adds a second, richer example right after it -- a data-driven loop -- so the README shows both the straight-line case and the control flow a linear IR cannot express.

The graph is a compact save-encounter body wrapped by openadapt flow for-each into a governed LOOP, rendered by openadapt flow visualize --format mermaid:

flowchart TD
  n0{"Loop over worklist"}
  n1("type patient_id")
  n2("type note")
  n3("save encounter<br/><small>effect · irreversible</small>")
  n4{{"Success"}}
  n0 -->|per row of worklist| n1
  n1 --> n2
  n2 --> n3
  n3 -->|next record| n0
  n0 -->|worklist exhausted| n4
Loading

It shows the Loop over worklist node running the body once per record (per row of worklist), the next record loop-back edge, the worklist exhausted exit to Success, and the irreversible, effect-verified save encounter write as the per-record halt point. A plain-text caption carries the same content for PyPI (which does not render Mermaid), matching the linear example's style.

Honesty

  • The graph is engine-generated, not hand-drawn, and the loop it depicts is replay-tested in openadapt-flow (a companion PR expands loop bodies in visualize and ships the committed docs/showcase-encounter-loop bundle the runtime interprets once per record).
  • Identity gating is stated as "where armed" (this body's keypress save shows the effect gate + irreversible halt, not an identity gate); the body is labelled a compact MockMed fixture, with a pointer to the full-recording loop showcase.
  • No new claims beyond what the engine produces; explicit if/else branching is not depicted.

Depends on openadapt-flow to render this exact graph. The Mermaid embedded here is static and already correct; no code in this repo changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NyCHrzA1psrKMFfroYbzaM

The README showed only the linear MockMed program graph. Add a second, richer
example right after it: a compact `save-encounter` body wrapped by
`openadapt flow for-each` into a governed data-driven LOOP, rendered by
`openadapt flow visualize --format mermaid`. The graph shows the `Loop over
worklist` node running the body once per record (`per row of worklist`), the
`next record` loop-back edge, the `worklist exhausted` exit to `Success`, and
the irreversible, effect-verified `save encounter` write as the per-record halt
point. A plain-text caption carries the same content for PyPI (no Mermaid
there).

The graph is engine-generated (not hand-drawn) and the loop it depicts is
replay-tested in openadapt-flow. Honest about scope: identity gating is noted as
"where armed", and the body is labelled a compact MockMed fixture with a pointer
to the full-recording loop showcase.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NyCHrzA1psrKMFfroYbzaM
@abrichr
abrichr merged commit 0ec1b7d into main Jul 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant