ARCHITECTURE 9-bis BUILT: one run = one OTel trace, deterministic id
(sha of run dir name); root span named by the question with the final
answer as attribute; INIT/ROUTE/EXPERT/ANSWER as nested component spans;
every llm.done/probe.done/fact.merged event one span; recursive child
runs (same events.jsonl, own run_ts, seq restarts) nest as per-run
spans. Post-mortem only - the run never touches the network.
floop/traces.py stdlib only; pushes OTLP/HTTP JSON to Jaeger v2
(docker on agentvps, 10.3.14.59:16686 UI / :4318 ingest, VPN-bound).
python -m floop.traces runs/<dir> | --latest N | --dry.
Verified: Pedro 09:15 run -> 393 spans (root 1193.8s, 128 llm spans),
read back via Jaeger API; fractal goal run nests to depth 6.
tests/traces.py 5/5; recorder 3/3; inspect 3/3.
His branching design (22-23/10, consolidated; now coded): when an
expert returns SEVERAL defensible readings of one question (the
knowledge ablation audit's ambiguous + alternatives payload), a
question that DEPENDS on that row must not inherit the coin-flip.
The old behaviour: alternatives were passed in the router context
(rejected — it only moves the guess into answer_kg) or collapsed
inside the ANSWER prompt (run L: 'Papandreou was the predecessor' —
the exact rejected behaviour).
The mechanism (floop/branches.py + machine._run_branch):
- LAZY: a branch is born only when the ambiguous row has an OPEN
dependent subtree (open_subtree, frozen at fork time so every
branch of the fork copies the same questions); an ambiguity nobody
needs stays a note.
- A branch is a WORLD, not a fork of the run: the dependent subtree
is re-created inside the branch with branch-scoped qids (B1.Q2),
and the shared evidence table is read through a BranchView that
BINDS the ambiguous row to the branch's reading (a VIEW — the table
is never mutated, the original row keeps all readings) and hides
other branches' rows.
- SHARED: acquired knowledge lands in the ONE table, tagged
provenance['branch']; the KG/seen-index live in the expert, shared
by construction. A later branch reuses an earlier one's gathering.
- DEATH: by contradiction, dead end (all branch questions failed) or
NATURAL MERGE (same normalized answer as another branch — one
conclusion, recorded merged). Never an absurdity judge.
- NESTING: an ambiguous row answered inside a branch (with its own
dependent) opens sub-branches under it (origin=<branch id>); the
parent carries its children's conditional as its answer. Branch
cap (6) drops and NAMES extra readings — never silent.
- CONDITIONAL ANSWER: _finish composes the final answer by FIXED
CODE over surviving branches — 'if you meant X -> A | if you meant
Y -> B'; single survivor renders plain. Never a synthesis prompt
choosing a reading inside itself.
- WARNINGS: FORK/BRANCH lines on screen AND log ([W]) — the fork is
a machine judgement worth a human's eye, and META's lessons bank
counts them.
Docs: ALGORITHM.md §6-bis (the mechanism as a law); README honest map
row. Tests: tests/branches.py — 5 E2E (fork+conditional, lazy no-fork,
dead-branch honesty, natural merge, nested sub-branches). Suite 18/18.
Live smoke (ollama-cloud, warm agent KG): the Pedro question runs
clean through the new paths (8 calls, 52s, honest answer; the fork
did not fire — the audit found no second reading in that KG; the
mechanism is proven by the E2E tests, the real-detector proof is his
local run over his accumulated KG).
His 23/10 weights-tightness audit found the TRANSLATE step composing
search queries from its own knowledge of the entities: 'Pedro Sánchez
2018 investiture President of the Government of Spain' for a term-start
question (the '2018' IS the answer, steered into retrieval from weights),
'Po, Adige, Tiber' proposed as entities for a question that named only
Italy. Measured over every logged TRANSLATE call of runs 22-23/10: 5/10
calls carried untraceable query terms, 6/10 untraceable entity terms.
Probed against real Wikipedia before deciding: queries composed
deterministically from question ∪ evidence put the decisive article at
top-1/2 of the search in 8 of 9 cases — the LLM's world knowledge was
never load-bearing; the search engine's own relevance was. So the step
becomes code (the law: LLMs translate, fixed code composes — and here
nothing is left to translate).
- NEW knowledge/queries.py: compose_queries() + proper_nouns/keywords
(moved here, single source — the expert delegates). Laws: every query
token traces to the question or an evidence row; deterministic; never
empty. Top-N asks slice the FIRST N evidence members by source order
(never dump all members); enumerations with one subject NE get the
list-article shape ('List of rivers of Italy'); sentence-initial
capitals are dropped when other NEs exist ('During', 'Ranked').
- DELETED TranslateSignature + the Predict + the stage map entry;
the gather charges one LLM call less.
- expert.py: COMPOSE at the gather head; the context var (rendered
only for the dead prompt) removed — evidence feeds the probe seeds,
the composer and the guards directly.
- Tests: knowledge/tests/queries.py (12) — the sonde's cases as the
contract, incl. the traceback law over the logged questions.
- DESIGN.md §4 + code/README honest map updated.
Suite 17/17. Live probe (real Wikipedia): rivers/Pedro/France/Po all
fetch the decisive article at top-1.
Per Emili 2026-10-16: the draft experts are baseline experts - the LLM answers each subquestion directly from its own knowledge (no verification yet; engines replace the baseline path per expert later). ExpertSignature no longer forbids weights-based answers; source_quote now means verbatim from GIVEN evidence, empty when answering from weights. Evidence rows record source: model_weights | given_evidence. --baseline mode: the same LM answers the whole question in ONE raw call - the A/B control against the loop's many small directed calls. Also: pyproject fixed (name floop, hatchling backend, package floop/) - uv_build expected src/ layout; runner docs now uv-first; uv.lock regenerated.
The idea is now clear, so the docs are rewritten from zero around it: LLMs do language, algorithms do thinking, verified knowledge lives on disk. New set: ARCHITECTURE (system + laws: division of labour, LLM calls as typed function calls via dspy Signatures, context as a per-call budget over unlimited machine state, evidence table laws, interface contract, tools as loop output, fleet, guarantees, v1->v2), ALGORITHM (general loop for any goal: reception/typing, main loop, tool action, generic expert, recursion, backtracking, per-call context composition), KNOWLEDGE (substrate: store, gather, checks, probe, offline growth), META (two levels: in-run self-awareness; offline self-analysis, lessons bank, prompt optimization, fine-tuning, v2 router). PIPELINE.md and SCOPE.md removed - superseded; GAPS.md closed with a merge map. Code untouched.