feat: example 10 - AI judges state, the graph schedules (simulated detectors, real model calls) - #8
Merged
Merged
Conversation
…Vertex MaaS)
The AI version of example 09: each task carries a done_when + simulated detector
evidence; the assess stage is now a real model-call transform (LiteLLM model-string
routing) that judges {status, value, cost}, and the example-09 scheduler consumes it
unchanged. Offline deterministic stub (expected-output.txt) + live via MODEL (Vertex
MaaS / OpenRouter / OpenAI / Gemini); the LLM adapter lives in the example, not core.
Includes a real MiniMax sample run, a Takeaways section, and a pointer from example 09.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The AI version of example 09. Example 09 proved the scheduler deterministically (state given as data). This fills that state with a real model, and changes nothing else.
done_when+evidencesimulated from detectors (GitHub / deploys / filesystem). The detectors are simulated; the AI judgment is real.assessstage (the seam example 09 reserved) is now a model-call transform: it reads each task's evidence and returns{status, value, cost, confidence, reason}. The example-09 scheduler below it is unchanged.storage-adapter: code on an unmerged PR) so the model has to judge, not keyword-match.How
model.py) mirrors how intelligence-flow runs terminal-bench calls: LiteLLM model-string routing, so the provider is one env var (MODEL). The LLM client lives in the example, never incore(capability gap math: expose error sensitivity signal #1, done right).expected-output.txt.MODEL=vertex_ai/minimaxai/minimax-m2-maas(Vertex MaaS, ADC) for the author, oropenrouter//openai//gemini/for anyone else.The point (Takeaways)
The README closes with what this way of working buys you vs how the same feature usually gets built: prove the graph deterministically, then add AI at a clean seam. A committed
sample-live-output.txt(real MiniMax run) shows it: the model judged the unmerged-PR task as not-done, and its value/cost estimates shifted the critical path (10 -> 21) and the top unblock (storage-adapter -> auth) vs the stub. Same engine, different inputs, different schedule.Verify
python3 python/examples/10-best-time-to-implement-ai/main.py # offline stub, self-check PASSSelf-check asserts invariants that hold for ANY assessment, plus the exact stub values; a live run stays structurally validated even though its numbers vary.
Note
Stacked on #7 (base
feat/example-09) because it adds a pointer to example 09's README; retargets tomainonce #7 merges. Python first; TypeScript parity deferred.🤖 Generated with Claude Code