docs: rewrite the flow docs for the new flow API - #80
Merged
Merged
Conversation
Every page that shows how a flow is written, run, called or tested now describes the protocols in `hmz.flows` and the engine in `hmz.runtime.flowing`: - Flows are async functions under `@flow(agents=, envs=, params=)`. - Roles are TypedDict keys whose types carry mixins. - A flow is handed views granting exactly what each role declared. - Hooks are one `on_*` method per kind. - The outworlder is auto-filled and may be away. - Budgets nest, and exhaustion is sticky. - Resumable runs keep a journal, which `--resume` picks up. - Flows call flows through `load` refs, narrowing what they hand on. - Flows are tested on the fake kit. `hmz exec` is documented with `-a role=…`, `-e role=…`, `-p key=value`, a required `-b` (except for `chat`), `--resume` and `--json`. The pages for removed features are deleted: the atlas, the prophecy, checking and proving flows, and their two tutorials. A new "Build under test" tutorial takes their place. The catalogue drops fixed_juice_ralph and replaces the mission flow with parallel_flame_chase_git_pr. The sidebar, the theme data and the redirects follow, with each deleted page redirecting to its successor. The demo flows in docs/tapes/stage.py are ported, and the GIFs are not re-rendered. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
futrime
pushed a commit
that referenced
this pull request
Sep 25, 2026
docs: rewrite the flow docs for the new flow API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unit 6 (Docs) of the new flow API. Every page that shows how a flow is written, run, called or tested is rewritten to match
hmz.flows(the protocols) andhmz.runtime.flowing(the engine and its drivers). Onlydocs/**changes. README needed nothing.What changed
docs/reference/flows.md: rewritten from scratch. Its headings keep the old anchors where the topic survived.@flowcontract, andAgentCollection/EnvCollectionroles.Permissionand how it maps onto each harness.local=ALLmeans bypass on every harness, anduser/systemare not fenced; that widening is written down. Codex runs withuntrustedapprovals while a permission-request hook is hung; Kimi Code and ZCode use their ask-and-approve rung while a permission or ask-user hook is hung./goal,/loop,steer,fork.on_*method per kind. The outworlder: away,Outworlder.new(),on_outworlder_run.FlowParamsand-p.ctx. Budgets: nesting, deadlines, sticky exhaustion,graceful.--resume, and how subflows are matched.docs/weaver/*: every page rewritten.tools.mdbecomes "The agent asking the flow". Callbacks as tools are gone, andon_ask_userand the other hooks are the way back from a turn to the flow.worktrees.mdcovers worktrees, copies and scratch directories.testing-flows.mdreplaces the old checking and proving docs with the public fake kit.tutorials/build-under-test.md.docs/features/*,docs/flows/*,docs/index.md: the new API throughout.agent,worker,first_chaser/second_chaser,actor/reviewer, …).humanandworkspaceare auto-filled.-b. Per-flow default budgets are gone.fixed-juice-ralphis dropped.parallel-flame-chase-missionis replaced byparallel-flame-chase-git-pr.docs/reference/{cli,agents,sdk,tui,…}.md,docs/user/*,docs/contributing/*:hmz execsection:-a/-e/-p/-b,--resume,--json, and what is refused before anything runs.approvalsoverride and the flow API's permission mapping in agents.md./afkand/resume.weaver/atlas,features/prophecy,weaver/checking-flows,weaver/tutorials/{checked-build,prove}andflows/fixed-juice-ralph, plus theHmzProphecycomponent.GONEtable inconfig.mts, instead of returning a 404.fixed_juice_ralph(the governor family and the juice meter) is removed.docs/tapes/stage.py: the two demo flows (twiceand the resumablenightly) are ported to the new API.checks.tapenow shows new refusals. The GIFs are not re-rendered.Checked
cd docs && pnpm install --frozen-lockfile && pnpm build && pnpm check:anchors: the build completes, and every#fragmentresolves.uv run pre-commit run --all-filespasses. That includes pyright ondocs/tapes/stage.py.uv run pytest --ignore=tests/system: 4314 passed, 11 skipped.run_fake), including the full test file on the testing page against the flow it tests. The ported stage flows load, run and resume from a journal.code-reviewpass found 15 issues. All were fixed except the expected one: the docs describe CLI/TUI behaviour that Unit 5 has not landed yet.For the coordinator to reconcile after Unit 5 and the flowverse units land
hmz exec: error: <engine message>, the missing--busage error, and exit statuses;--json, and--resumemeaning the newest resumable run of the flow in this workspace;/flowrole, environment, params and budget sheets, what is remembered per flow,/afkmaking the outworlder away, and/resume.chatis assumed to have rolesassistantandhuman, the full view, and no-b.hmz.runtime.flowing.fakesdirectly.humanize1:rlcrbuilder → gates → reviewer loop, and the Git PR page, which is a summary of the flowverse README.hmz.runtime.flowing.runningstill maps to the legacy module. The docs point toengine.running().run.tapestill readsstate.json, andHmzSurfaces.vuestill names the SDK'sRunand runner. Both depend on Unit 5.🤖 Generated with Claude Code