docs: full rewrite from a clean slate (v0.3)

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.
This commit is contained in:
2026-10-14 10:28:21 +02:00
parent e8fa401597
commit 67f466bd84
10 changed files with 540 additions and 544 deletions
+34 -13
View File
@@ -1,27 +1,48 @@
# floop
**Fractal loop.** One algorithm — an LLM translates, a sound engine computes, the answer carries its proof — instantiated at every level of abstraction, including the orchestration level itself. The orchestrator is not a special component: questions too big for one expert recurse into new FLOOP runs, so the engine of FLOOP is FLOOP itself.
**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.
FLOOP is ReAct where the "thought" step is replaced by computation and the "observation" is typed before it enters the state. From the outside floop acts as an **LLM** (`messages + tools in → text or tool_call out`): the final goal is to be a drop-in replacement for the LLM of an agent harness. Answering questions is one use case; see [`SCOPE.md`](SCOPE.md) for the intent layer, the tool interface, and the self-learning meta level.
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 |
|---|---|
| [`SCOPE.md`](SCOPE.md) | floop beyond Q&A: drop-in-LLM positioning, the intent layer (answer / tool_call / chat / meta), tool_call + tool_result semantics, progress streaming, the offline self-analysis meta level. DESIGN, no code yet. |
| [`PIPELINE.md`](PIPELINE.md) | Definition of the pipeline: the generic expert pattern, the expert fleet, the orchestrator-as-recursion, the living plan, table laws, guarantees, v1→v2, known risks. |
| [`ALGORITHM.md`](ALGORITHM.md) | How the machine works, in words: the opening call (INIT), the main loop, the generic expert and the fleet, recursion (floop inside floop), backtracking, stopping and answering. |
| [`GAPS.md`](GAPS.md) | Design gap log from the step-by-step replay: what was missing, why it bites, proposed resolutions. GAP-11..14 = the 2026-10-13 scope additions. |
| [`ARCHITECTURE.md`](ARCHITECTURE.md) | The system and its laws: division of labour, LLM calls as function calls, context as a per-call budget, the evidence table, the interface contract, tools, the fleet, guarantees, risks, v1→v2. |
| [`ALGORITHM.md`](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`](KNOWLEDGE.md) | The knowledge substrate: verified facts on disk, the knowledge graph, extraction and its checks. |
| [`META.md`](META.md) | The two meta levels: in-run self-awareness; offline self-analysis and learning. |
| [`GAPS.md`](GAPS.md) | Design-gap log of the walkthrough replays (closed — resolutions merged into the docs above). |
| [`RUNLOG.md`](RUNLOG.md) | Run log: virtual walkthrough, executable runs. |
| [`code/`](code/) | v0.1 draft (dspy); `code/README.md` maps real vs stub per stage. |
## Status
Design docs (v0.2 — recursion redesign). **v0.1 draft executable since 2026-10-10** (`code/`):
the full loop runs on dspy LLM calls only (INIT/ROUTE/EXPERT/MISSING/ANSWER as dspy modules,
the machine — stack, dependency order, budget, recursion — as fixed code); formal checks,
prover and expert engines are stubs, so every answer is honestly `Unverified`. See `code/README.md`
and RUNLOG "Executable runs". Next: real check layer, `knowledge` vertical with real search,
prover (clingo/Z3).
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
Logic-LM (arXiv:2305.12295) — lm→solver pattern with self-refinement. ReWOO (arXiv:2305.18323) — plan-on-slots, decoupled execution. LLM-Modulo (arXiv:2402.01817) — LLMs propose, external verifiers decide. LLM+P (arXiv:2304.11477) — lm→PDDL→classical planner. POMDP-Coder (arXiv:2505.02216) — lm writes the model, a solver plans. Rational metareasoning (Russell & Wefald 1991; arXiv:2410.05563) — the value of computation decides what to do next.
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).