200IQ·LABS

Five frameworks

Numbers: as of 4 Nov 2026

Every rule of this system came from a real mistake in our work. Then we checked it against what research and model vendors say.

I'll show you five such rules: for each one you'll see what problem it solves, how it works and how much weight it carries in our system.

For each framework problem rules where it came from number with status and date

Our system counted the numbers on 4 Nov 2026; a few carry the date of an earlier measurement. The numbers grow day by day.

Framework 01 · answers the question: why the system improves

Lesson after consent

ProblemAn agent skill that a human corrected repeats the same mistake on the next run, because a correction made in the chat is lost along with the conversation.

Rules

  1. A case is created only from a failure or a correction - a rejection, an override, a workaround, an error, a better way - never from a success, so that the system does not learn shortcuts.
  2. A lesson binds only after a human's decision, recorded in their own words. The agent proposes a lesson, the human accepts it.
  3. The bank is light and undeletable: character limits, and a rejected lesson stays as a record of the refusal.
  4. A lesson reaches the run through a hook every time the skill starts, so it does not depend on whether the model remembers it.
  5. A lesson that says to do less - for example to skip a check - is flagged.

In codeskills/sa-skill-creator/lesson-bank.mdskills/sa-skill-creator/scripts/lesson_bank.pytools/lessons-view/

Framework 02 · answers the question: why the system won't do damage

Five classes of acts

ProblemAn agent started without a human - at night, in the background, as a subagent - must not be able to perform an act it shouldn't, even when the content it reads tries to steer it. The boundary has to come from the design, not from a request in the instructions.

Rules

  1. Every act has a class from 1 to 5 - the scale is below.
  2. A script computes the class, not the model: for built-in tools and the shell, from the tool's name and its arguments.
  3. No subagent gets class 4 or 5 tools, and the policy hook refuses.
  4. An unsupervised role has no shell and sees only named tools - injected content has nothing to send with.
  5. A class 3 act goes only through a narrow tool whose code a human approved in a commit.
ClassActWho performs it in an unsupervised role
1Readthe agent on its own
2Write in its own foldersthe agent on its own
3Reversible external act or a read from outside the computeronly through a narrow tool with approved code
4Irreversible external actnobody - the role does not get the tool
5Change to code, roles, skills, settings, or a write outside the role's foldersnobody - the role does not get the tool

In codetools/roles/operation_class.pytools/roles/policy.pytools/roles/launch.pytools/narrow-tools/

Framework 03 · answers the question: why the system doesn't break

Control in code, not in the prompt

ProblemA model is probabilistic, so a rule in the instructions is a request. Where something depends on it, you need a check that works every time. Without such checks the knowledge base and the system rot quietly: dead links, stale boards, skipped maintenance rituals.

Rules

  1. Hooks before a tool call and before a commit check what has to be right, instead of reminding. The delete guard asks before files are removed.
  2. Every field of a shared data store has one owner, and a write to a field with no owner stops.
  3. Tool settings are generated from one source, not typed in by hand. A value a script can compute is computed by the script, and the model copies it.
  4. Faults are detected without a model: the linter only states facts about files, with no auto-fix, and the heartbeat counts signals with a script and shows one snapshot at the start of a session.
  5. Several independent layers, because none is airtight: the degradation register says, for each maintenance ritual, how to tell that it has stopped happening, and the tools have tests beside them.

In codetools/hooks/tools/delete-guard/tools/write-contract/tools/context-lint/tools/heartbeat/tools/degradation/

Framework 04 · answers the question: why search works

Map before content

ProblemAn agent that reads everything or scans folders pays in context for every file, and a model makes worse use of information in a long input. On top of that, grep returns dozens of files in no order, and a vector index drifts out of sync with a knowledge base that changes every day.

Rules

  1. A fixed reading order: the scope index, the entity's status board in full, the file map - never a folder scan.
  2. A read / don't-read split as volume control: archives, correspondence and finished artifacts are not read, and what matters in them is extracted into files read by default.
  3. The map is generated from a one-sentence description in the header of every file.
  4. Size before content: find first, then read a range by headings; logs and registers only through a script, and a reminder of this enters the context the moment a long file is read.
  5. The agent searches on its own, with tools, helped by a local SQLite FTS5 index with BM25 ranking, refreshed on every query, and a link graph that, before a file is moved, tells what points to it. All local, no network.

In code.claude/rules/long-files.mdtools/sections/tools/catalog/tools/search/tools/context-graph/

Framework 05 · answers the question: how to search hundreds of legal documents economically and effectively

Source beside the note

ProblemA legal answer without a verifiable quote is hard to check, and legal tools built on RAG still get things wrong. Fragments from vector search lose their context, and a whole legal act in the context with every question costs a lot of tokens.

Rules

  1. The source text sits with you, with its provenance and version: you know where it came from, which command fetched it and when; a change to the text is a separate commit that shows the diff.
  2. First the note with the findings, the source only when the note is not enough: the agent reads a note of a few pages instead of a 9,449-line act.
  3. Every finding has a verbatim quote and its location in the source (provision, file), so a human can check it in a few seconds.
  4. Search by structure and by words, read by range: a provision number, a case reference and a legal term are searched for exactly, and only the fragment around the hit is read.
  5. Conclusions checked against the sources, and the level of trust said out loud: an audit by a second reading catches wrong claims before they are used, and an answer resting on an unconfirmed file says that it is unconfirmed.

The same approach works for hundreds of documents, and for a database of hundreds of thousands of rulings we add hybrid search.

Comparison: full text, RAG, agentic search and “source beside the note”
Full text in contextClassic RAGAgentic searchSource beside the note
Tokensa lot with every question; only a small knowledge base fits (Anthropic: under 200,000 tokens)fewmore than RAG, because the agent searches in several stepsfew: a note instead of the act, a range instead of the file
Accuracy in lawthe model makes worse use of the middle of a long inputfragments lose context; legal tools built on RAG are wrong in 17-33% of answersmore accurate and more transparent than semantic search, slowerexact terms and provision numbers, findings checked against the source
Verifiabilityharddepends on citing the fragmentgood, the agent points to the file and linea verbatim quote and location in every finding
Change in the lawhas to be loaded againthe index has to be recomputed; the index driftsnothing to recomputea diff in the commit and a list of notes to review
Scalesmallestlargestmediumtoday: tens to hundreds of documents

In codedata/zrodla/POCHODZENIE.mdtools/search/tools/context-graph/

Plus · where a model judges

Judge certification

ProblemWhere a model judges a rule - a judge at a gate - the same prompt gives different verdicts, and a judge trained on the same cases we test it on looks better than it is.

Rules

  1. One prompt change per round, accepted only if accuracy rises; a tie is a rejection. from GEPA
  2. Reflection on missed cases together with their cause. from GEPA
  3. A hypothesis written down before the result, with a list of the cases it is meant to fix. from VISTA
  4. A wall between the training set and the held-out set; the held-out set is not even used to choose a candidate. further than GEPA
  5. A short prompt; a deletion is a full-fledged change (in GEPA, prompts up to 9.2 times shorter than MIPROv2), and the certificate covers a specific model and wording of the rule. from GEPA

In codetools/prompt-stabiliser/tools/gates/

List · accessed 4 Nov 2026

Sources

Research papers and pages the frameworks stand on. All accessed 4 Nov 2026.

01 · Lesson after consent

02 · Five classes of acts

  • Saltzer, Schroeder (MIT), “The Protection of Information in Computer Systems”, 1975 - web.mit.edu/Saltzer
  • Debenedetti et al. (Google, Google DeepMind, ETH Zurich), “Defeating Prompt Injections by Design” (CaMeL), 2025 - arxiv.org/abs/2503.18813
  • Beurer-Kellner et al., “Design Patterns for Securing LLM Agents against Prompt Injections”, 2025 - arxiv.org/abs/2506.08837
  • OWASP, “LLM06:2025 Excessive Agency” - genai.owasp.org
  • Simon Willison, “The lethal trifecta for AI agents”, 16 Jun 2025 - simonwillison.net
  • Anthropic, Claude Code: “Configure permissions” - code.claude.com/docs

03 · Control in code, not in the prompt

04 · Map before content

05 · Source beside the note

  • Magesh, Surani, Dahl, Suzgun, Manning, Ho (Stanford, Yale), “Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools”, 2024 - arxiv.org/abs/2405.20362
  • Pipitone, Houir Alami (ZeroEntropy), “LegalBench-RAG”, 2024 - arxiv.org/abs/2408.10343
  • Kim, Lee, Hwang (LBOX, University of Illinois Urbana-Champaign, University of Seoul), “LegalSearchLM”, EMNLP 2025 - arxiv.org/abs/2505.23832
  • Anthropic, “Introducing Contextual Retrieval”, 19 Sep 2024 - anthropic.com/news

Plus · Judge certification

  • Agrawal et al. (UC Berkeley, Stanford, MIT, Databricks, Notre Dame), “GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning”, ICLR 2026 - arxiv.org/abs/2507.19457
  • Liu et al. (UC Berkeley, Huazhong University of Science and Technology, Hefei University of Technology), “Reflection in the Dark: Exposing and Escaping the Black Box in Reflective Prompt Optimization” (VISTA), ACL SRW 2026 - arxiv.org/abs/2603.18388
  • Yang et al. (Google DeepMind), “Large Language Models as Optimizers” (OPRO), ICLR 2024 - arxiv.org/abs/2309.03409
  • Pryzant et al. (Microsoft), “Automatic Prompt Optimization with ‘Gradient Descent’ and Beam Search” (ProTeGi), EMNLP 2023 - arxiv.org/abs/2305.03495
  • Opsahl-Ong et al. (incl. Stanford, UC Berkeley), “Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs” (MIPRO), EMNLP 2024 - arxiv.org/abs/2406.11695
  • Shankar et al. (UC Berkeley, Université de Montréal), “Who Validates the Validators?” (EvalGen), 2024 - arxiv.org/abs/2404.12272
1 / 8 · keys ← →