feat: add aot, the flow that writes a flow - #8
Open
DongyunZou wants to merge 3 commits into
Open
Conversation
A description in, a checked and proved flow out. The writer reads the description against a briefing of what the installed humanize serves and answers with a spec -- places, settings, endings, needs -- and a need nothing serves is refused at compile time, with the person asked whether to narrow. Then the writer writes the flow in a scratch directory, and three gates hold it: the static checker, the stub-driven proof against the reviewer that never says done, and a critic that shares nothing with the writer. Refusals go back to the writer's own session word for word, for as many repairs as the config allows. One rule is the compiler's own: a generated loop is bounded, always -- the checker's unbounded-loop warning is a refusal here whatever strict says. What passes lands whole and atomically in the flows of your own, and the compile ends with a report and the line that runs it. Every shaped answer's model declares every field required: a backend that holds a model to a strict schema refuses defaults, and the compiler compiles on any backend that shapes. The writing-flows skill is the contract the drafts are held to, and the stub tests drive every gate -- including that the compiler passes its own. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Agent-gated golden compiles -- AOT_WRITER=cli/model:effort runs them, and AOT_SMOKE=1 besides drives the compiled review loop once on a toy repository. What is asserted is structural equivalence with the flow each description describes, never text: it loads, drives as many agents as the description says, can be set up, reads clean, and ends under the reviewer that never says done. The flow's own skills are mounted the way a real run mounts them. Ran green with claude/claude-sonnet-5:medium (all five, the smoke included) and with codex/gpt-5.6-sol:medium. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sked An unserved need is more often the description's words taken for a capability -- writing a file, reading the repository -- than a real hole, and a headless compile was stopping on one where the writer could have restated the spec in the catalogue's vocabulary. Now it is handed back to the writer once; only what is still unserved after that reaches the person, or ends the compile where nobody is. Found in the wild: a compile of the gen-plan description declared 'plan file' as a need and aborted where a restatement lands it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DongyunZou
marked this pull request as ready for review
August 29, 2026 03:43
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.
A description in, a checked and proved flow out.
What this is
official/aotcompiles a natural-language description into a flow that lands in the flows of your own. The writer draws a spec from the description against a briefing of what the installed humanize serves — an ask nothing serves is refused at compile time, with the person at the prompt asked whether to narrow. The draft is then held to three gates, with every refusal handed back to the writer's own session word for word for repair:hmz.flows.checked) reads it without running it.hmz.flows.proved) drives it in a subprocess held to a clock, against the reviewer that never says done, the reviewer that always does, and the world where every turn fails.One rule is the compiler's own: a generated loop is bounded, always — the checker's
unbounded-loopwarning is a refusal here whateverstrictsays, so what lands ends even when its reviewer never says the work is done. What passes is copied whole and atomically; a name already taken is never written over.Requirements
Needs an hmz with
checking,provingand the capability catalogue (humanfia/humanize2#29):checked,proved,briefed,catalogue,Scenario,MINEand friends handed throughhmz.flows.Tests
tests/test_aot.py— deterministic, stub-driven, every gate shown to gate; the compiler passes its own gates (checked(flows/aot) == ()).tests/test_aot_golden.py— agent-gated (AOT_WRITER=cli/model:effort,AOT_SMOKE=1): compiles flame-chase from one line and gen-idea / gen-plan / rlcr from their descriptions, asserting structural equivalence — loads, drives as described, reads clean, ends under never-done — and drives the compiled review loop once on a toy repository.Ran green end to end with
claude/claude-sonnet-5:medium(all five, the smoke included — the compiled review loop builthello.txton a toy repo and its reviewer verified it byte-for-byte before saying done) and withcodex/gpt-5.6-sol:medium(whose critic caught and had repaired a real alternation bug before approving).🤖 Generated with Claude Code