Examples
Every example here is an experiment, not a demonstration: a frame, the predictions written before its first call, and the records of every run. The reader is Gemma 4 26B (the QAT q4_0 GGUF build, revision d1c082be), served by eGemma on one machine, except in rung 19, read by Muse Spark 1.3 Contributor through the unified model router; reading an example back needs no model.
- Predictions first:
examples/PREDICTIONS.mdholds what each step expected, written before its first call. - Every run kept:
examples/runs/holds every record of every run of the frames here. Rung 19's frame was also read by other models while its design was worked out; only the reading shown is kept. - Nothing edited after: a wrong prediction stays in, and so does a frame that turned out to be built wrong; a corrected frame is a new one beside it.
- Cheap to run: 6,380 calls in all, across code review, design review, contracts, access rules, incidents, migrations and performance work, and not one failed (
examples/FINDINGS.md).
The ladder
The examples climb. Each step is one or two frames on a new domain or grain, and it teaches one more thing Gadfly does, on top of the steps before it. Your first frame is the first step.
| Step | Frames | Teaches | Domain, grain |
|---|---|---|---|
| Your first frame | upgrade, rung1-rung6 | each trial in turn; levels; open checks; carried | dependencies, one changelog line |
| Cooled | 07, 08 | cooled; the control; discrimination; a contrast pair | code review, one repository rule |
| Quorum | 09 | quorum and agree; a trial with no level; runs | architecture, one requirement |
| Misaligned | 10a, 10b | allowed; coupled but misaligned; several inputs; placement | an incident, four tasks, one route each |
| Cumulative | 10c2, 10d | the cumulative trial; "carried elsewhere too"; two valid routes | the same incident, both routes |
| A frame built wrong | 10c | the control as a check on the frame; a new version, never an edit | the same incident |
| Bypass | 11 | allowed.bypass, the designated opening; a fallback left open | contract into engineering, one clause |
| Several inputs | 12 | one finding per input; overall; what one allowed cannot say | security, one grant, three requesters |
| Grain | 13, 13b | several anchors; the same evidence at two grains | data migration, a section, then one line |
| Paths | 14, 15 | inputs as paths to one goal; the result, not the route | optimizing; implementing |
| Inversion | 16 | the inversion trial, a direction the answer must follow; a default no rule carries | access, one rule, two cases |
| Asked | 17 | the input inversion, a change to what is asked the answer must follow | code review, one rule, the diff in the question |
| Each anchor alone | 18, 18b, 18b2, 18c | each anchor cut alone, evidence after a moved ablation; a default no cut moves | access and incidents, two statements each |
| Run your own | yours | predictions first; plan, run, report; which trial answers which question | yours |
How a step reads
Each step shows four things, each printed from the files in examples/ by examples/read.py, which calls no model:
- The frame, as Gadfly plans it (
--frame): the evidence one span a line, the anchors marked*, the question, and what each trial cuts, renames or moves. - The prediction, as it was written before the first call.
- The answers: the labels each trial's calls gave, all runs together.
- The reading: one run's verdict (
--verdict N, one input with--input), its levels, its evidence and its open checks, in the wordsgadfly reportuses.
Then what to take from it, and an experiment to try next. The scale is small on purpose: one model a frame, three to five runs a frame, each trial asked five times with four to agree, so each step says how narrow its result is.
examples/RESULTS.md sets every result against its prediction, and examples/FINDINGS.md gathers what they showed about the reader, the service and Gadfly.
Every result at a glance
| Example | Domain, grain | Does the decision rest on… | Per run, read by Gemma unless named |
|---|---|---|---|
upgrade.json, rung1-rung6 | dependencies, one changelog line | the line that removes a function our code calls? | carried; the rungs show each check closing |
07-sql-rule.json | code review, one repository rule | the rule against formatted SQL? | cooled: its training decides |
08-clock-rule.json | code review, one repository rule | the rule against datetime.now()? | the rule decides; unresolved, no bypass declared |
09-sync-sms.json | architecture, one requirement | the 300 ms requirement? | cooled in two runs of three |
10a-10d | debugging, fixing, optimizing, alerting; one test or two metrics | which of two routes to the cause? | the metrics decide every task; the rollback alone decides the fix, not the cause; with both, either can go (cooled) |
11-eu-clause.json | contract into engineering, one clause | the clause keeping data in the EU? | the clause carries; applied without the line that makes it the customer's |
12-payroll-access.json | security, one grant, three requesters | the grant to Finance? | Dana carried, Sam unresolved, the backup job cooled |
13, 13b | data migration, a section, then one line | the status saying the table is unused? | the section carries; "no reads in 30 days" carries nothing |
14-orders-latency.json | optimizing, one goal, five paths | the latency goal? | four paths carried whatever their cost; the timeout rejected |
15-invoice-export.json | implementing, one test, four processes | the passing test? | the test decides, never the process |
16-restore-inversion.json | access, one rule, two cases | the approval rule, and does the answer turn with it? | the answer turns every time; unresolved, a sham of the anchor's role and a default refusal |
17-clock-asked.json | code review, one rule, the diff asked about | the clock rule, and does the review turn with the diff? | carried in two runs of three; the review turns to approve |
18, 18b, 18b2, 18c | access and incidents, two statements each | each of two statements, alone? | the restore rule carries it and the cited break-glass line has no agreed level (one run); elsewhere another route, a default or a split comes first |
19-router-waist.json | design review, a repository and a program that calls it | the second program, not the repository's name? | read by Muse: carried in every run, and the name changes nothing |