Run G hung at call 8/80 for minutes with no way to see what was sent.
Reproducing it found TWO root causes, both fixed here:
1. THE 22K TABLE CHUNK WAS A PARSER BUG, not just a size problem. The
world-rivers table marks each data row's leading cell with
'!scope="row"|' (a row-label th); parse_tables flagged any row that
touched a '!' as a header row, so all 227 data rows collapsed into ONE
header of 1,825 cells and zero rows. tables_as_text then flattened
that monster into a single 22,021-char prose chunk. Fix: a row is a
header row only if ALL its cells are '!' cells; mixed rows are data
rows. Live: the world table now parses as 8 cols x 227 rows.
2. NO PROMPT OBSERVABILITY. The log's CALL/OUTPUT lines never carried
what the LM actually received. floop/llm.py now installs a dspy global
callback (PromptLogCallback): every LM call's exact rendered prompt
lands in runs/<ts>/prompts/NN-stage.txt (NN mirrors the budget counter
-- 08-EXTRACT.txt IS call 8/80), plus size/duration lines in run.log.
Stage comes from a module stack (dspy fires on_module_start with a
DIFFERENT call_id than the inner LM call -- verified with DummyLM
probes), not a call_id map.
Plus the design Emili steered (tables reach the extractor as typed
fragments, never prose dumps):
- tables_as_chunks: per-table fragments of <=40 rows, EVERY fragment
repeats header + caption, part i/N markers; the extractor always knows
which table ('troç 2/10') it is reading.
- STOP_TABLE: the extractor may early-skip a table whose subject is
wrong for the question after one fragment; fixed code skips the rest
of THAT table. ExtractSignature teaches the protocol.
- fetch_rich no longer appends the '== Tables ==' enrichment to prose
(the giant chunk's birthplace; also let verify_count cite the table as
'prose'). Tables reach the extract path only as fragments; LIST and
harvest keep reading page.tables directly.
- fragment candidates pass the same containment check against prose +
full table text; LIST answer's table never re-enters extract.
Tests: knowledge/tests/tablefrags.py (fragment generation/render,
STOP_TABLE skipping, fragment extraction with containment, prompt log
files + log lines). Live smoke: world article 10 chunks none >5k; world
table = 6 fragments (max 5,787c); Italy discharge fragment intact
(Po/1540). Full suite 47/47.
floop
Fractal loop. An AI built on one division of labour: LLMs do the language (translating, decomposing, composing prose), algorithms do the thinking (solvers, provers, planners, retrieval — deterministic computation decides, checks and stops), and knowledge is verified and stored on disk (extracted from trusted sources, checked, persisted — never trusted from model "memory"). The same loop — translate → compute → verify — runs inside every expert, at the orchestration level, and on floop's own behaviour. floop is aware of the loop it is running, and studies its own past runs to improve the process that produced them.
From the outside, floop acts as an LLM: messages + system + tools in → text or tool_call out, OpenAI-compatible. A Hermes agent — or any harness — can point its model
provider at floop and get a reasoner whose steps are typed, evidenced and auditable.
Answering questions is one use case; acting with tools, holding a conversation and
managing itself are others.
Documents
| File | Contents |
|---|---|
ARCHITECTURE.md |
The system and its laws: division of labour, LLM calls as function calls, context as a per-call budget, intake and the language boundary (English inside, any language outside), the evidence table, the interface contract, tools, the fleet, guarantees, risks, v1→v2. |
ALGORITHM.md |
The machine in words: the general loop for any goal, tool action as loop output, the generic expert, recursion, stopping, backtracking, per-call context composition. |
KNOWLEDGE.md |
The knowledge substrate: verified facts on disk, the knowledge graph, extraction and its checks. |
META.md |
The two meta levels: in-run self-awareness; offline self-analysis and learning. |
GAPS.md |
Design-gap log of the walkthrough replays (closed — resolutions merged into the docs above). |
RUNLOG.md |
Run log: virtual walkthrough, executable runs. |
code/ |
v0.1 draft (dspy); code/README.md maps real vs stub per stage. |
Status
Design docs v0.3 (full rewrite, 2026-10-13). Executable draft: the loop runs on dspy LLM
calls — INIT / ROUTE / EXPERT / MISSING / ANSWER as Signatures, the machine as fixed
code — with formal checks, prover and expert engines stubbed, so every output is honestly
Unverified. Next: real check layer, the knowledge vertical (code/knowledge/), the
prover (clingo/Z3), the OpenAI-compatible endpoint.
Lineage
floop's parts have measured prior art; the composition is ours. Logic-LM (arXiv:2305.12295) — lm→solver with self-refinement (+39% on logic benchmarks). ReWOO (arXiv:2305.18323) — plan on slots, decouple execution (5× token efficiency). LLM-Modulo (arXiv:2402.01817) — LLMs propose, external verifiers decide. LLM+P (arXiv:2304.11477) — NL→PDDL→classical planner. POMDP-Coder (arXiv:2505.02216) — the LLM writes the model, a solver plans. HippoRAG (arXiv:2405.14831) — knowledge graph + PPR as memory (+20% multi-hop QA, 10–30× cheaper than iterative retrieval). GraphRAG (arXiv:2404.16130) — LLM-extracted graphs for global questions. Rational metareasoning (Russell & Wefald 1991; arXiv:2410.05563) — the value of computation decides what to do next (v2's router).