The Compounding Loop
Relevant source files
The following files were used as context for generating this wiki page:
The Compounding Loop is the core architectural and product mechanism in Noesis designed to turn ordinary user work into evidence for self-improvement. It enables the system to autonomously author, evaluate, and activate capability revisions—spanning prompts, skills, and tools—based on interaction history and corrections. The loop ensures that later work is demonstrably better because earlier work occurred, maintaining a causal link between learning and performance.
Sources: plans/noesis-autonomous-compounding-implementation-plan.html:43-47, plans/noesis-high-leverage-correction-plan.html:84-87, AGENTS.md:5-7
Architecture and Data Flow
The Compounding Loop operates as an integrated lifecycle that begins with user messages and ends with served adaptations in future turns. The process is governed by a strict boundary between generated content (which proposes changes) and a protected control plane (which activates them).
High-Level Lifecycle
The loop follows a specific sequence of stages to transform signals into active capabilities:
- Signal Detection: Ordinary work generates signals (corrections, recurring failures, explicit requests).
- Reflection: An LLM-based reflector generates an experiment brief or determines "no change."
- Authoring: A candidate
CapabilityRevisionis authored, coupling prompts, skills, and tools. - Preflight: The revision is tested against a baseline in a comparative loop using blind judging.
- Activation: A low-risk revision is staged and atomically activated via the protected control plane.
- Observation: Real-world feedback is monitored to keep, revise, or revert the adaptation.
Sources: plans/noesis-autonomous-compounding-implementation-plan.html:62-72, plans/compounding-partnership-product-loop.html:433-443
The following diagram illustrates the flow from initial user interaction through the reflection and activation phases:
Component Roles and Responsibilities
The system divides labor across several specialized packages and "principals" to maintain isolation and safety.
Principal Isolation
| Principal | Responsibility | Context Access |
|---|---|---|
| Foreground | Executes the active turn with user-approved grants. | Active revisions, current artifacts. |
| Reflector | Interprets signals and proposes experiment briefs. | Signal history, evidence citations. |
| Revision Author | Generates concrete implementations (code/prompts). | Hypothesis, source cases. |
| Blind Judge | Compares baseline vs. candidate trial outputs. | Randomized A/B arms, evaluation rubrics. |
| Promoter | Activates qualified versions via protected authority. | Preflight reports, activation pins. |
Sources: plans/noesis-first-complete-iteration.html:362-364, plans/noesis-autonomous-compounding-implementation-plan.html:652-664
Causal Spine Components
- WorkspaceStore: The single authority for operational state (SQLite) and declarative definitions (editable files). It manages
FrozenTurnPlanadmission. - FrozenTurnPlan: An immutable record pinning exact prompt, tool, and skill revisions before turn execution to ensure served-plan identity.
- EffectGateway: A protected boundary through which all side effects and authority transitions must pass. It verifies
AuthorityReceiptmemberships.
Sources: plans/noesis-high-leverage-correction-plan.html:204-219, AGENTS.md:25-30, plans/noesis-autonomous-compounding-implementation-plan.html:450-464
Evaluation and Measurement
Compounding is validated through Effect-free paired shadow replay. This mechanism materializes contemporaneous baseline and served arms from a frozen turn plan to measure improvement without re-running live effects.
Key Performance Metrics
| Metric | Purpose | Target Trend |
|---|---|---|
| Served-revision win rate | Paired blind-judged wins of served revision over baseline. | Durably above chance. |
| Scope leakage rate | Share of turns where an adaptation was served to unrelated scope. | Trends toward zero. |
| Context tax | Measures injected-context tokens and prompt-layer growth. | Flat or falling. |
| Correction recurrence | Rate at which the same correction signature repeats post-activation. | Falls after activation. |
Sources: plans/noesis-high-leverage-correction-plan.html:104-142
Preflight Sequence
The evaluation lab executes the following sequence to qualify a revision for activation:
Implementation Constraints
The loop is subject to strict engineering invariants to prevent self-modification from compromising system integrity.
- One Authority Per Datum: Derived data (FTS, embeddings) must always cite an authoritative SQLite row or file revision. Dual-writing is forbidden.
- Immutable Snapshots: Activation, inspection, and revert operations must resolve to byte-stable snapshots, never mutable working-file bytes.
- Fail-Closed Reservations: Dangerous effects must reserve costs and grants transactionally in SQLite before execution. If an outcome is ambiguous, the system fails closed rather than retrying.
- Role Isolation: Only
packages/runtime-piis permitted to import Pi-specific types, maintaining an adapter-neutral core.
Sources: AGENTS.md:25-34, packages/domain/test/architecture.test.ts:223-231, plans/noesis-high-leverage-correction-plan.html:204-219
The significance of "The Compounding Loop" lies in its ability to transform Noesis from a static agent into a self-improving system that earns its capabilities through evidence. By anchoring every adaptation in a falsifiable win-rate over baseline, it ensures that the agent's evolution is driven by measurable utility rather than unproven scope broadening.