Skip to content

feat: catalog-to-proof pipeline + loop-engine domain generalization (Phase A, U9–U10) - #8

Merged
wjlgatech merged 14 commits into
mainfrom
feat/catalog-proof-pipeline
Jun 16, 2026
Merged

wjlgatech merged 14 commits into
mainfrom
feat/catalog-proof-pipeline

Conversation

@wjlgatech

@wjlgatech wjlgatech commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Two phases of work land together on this branch:

Catalog-to-proof pipeline (plan-003, U1–U8) — turns real clianything.cc /
printingpress.dev CLIs into verified before/after loop proofs by adopting them
as refine-only baselines, proving the loop's own value (not the generators it
wraps). Includes the SHA-pinned, credential-pruned catalog adopter; the
refine-only loop entrypoint; the ProofPack builder + store-backed compounder;
the demo proof CLI; arxiv/hackernews/wikipedia proof targets; and a
provider-agnostic fallback-chain LLM refiner (NIM/Groq/Gemini/Ollama) for
quota-free refine.

Loop-engine domain generalization, Phase A (plan-004, U9–U10) — widens the
loop core so a target can be any domain, not just code, with no new states
or branches in loop/controller.py
:

  • U9 — new Domain plugin protocol (binds Factory|adopt-baseline + Judge
    per target); persisted nullable iterations.score column threaded through the
    store + controller. Every domain projects onto both score (primary) and a
    non-null grade letter, so the controller / LoopOutcome / NOT-NULL schema
    are untouched (KTD1).
  • U10Budget.target_score score-based convergence with a per-domain
    variance band: safety stays first and unbypassable; a score target skips the
    letter ladder; is_improvement decides on the score delta inside a letter
    band; is_plateaued(on_score=) ranks the persisted score (gated, so the
    software letter path is byte-identical, R2).

Invariants preserved

  • Wrap, don't fork · protocol-only controller (untouched) · safety is
    unbypassable
    (score path is reached only past the BLOCKED_SAFETY gate).

Testing

pytest -q190 passed, 2 skipped (the 2 skips are the gated sim/quota
e2e). Regression-critical test_router.py / test_convergence.py /
test_loop_controller.py / test_memory_store.py stay green.

🤖 Generated with Claude Code

@wjlgatech

Copy link
Copy Markdown
Owner Author

Update: refine is no longer gated on the `claude -p` quota

Added a provider-agnostic, claude-free refiner so a real before/after proof can run today on a free backend (no waiting for the 2026-07-01 quota window).

  • src/loopeng/adapters/llm_refiner.pyFallbackLLMRefiner: any OpenAI-compatible endpoint with a free-tier fallback chain (NVIDIA NIM → Groq → Gemini → local Ollama, per the free-llm design), stdlib urllib (no new dependency). Edits applied as jailed full-file rewrites (within_workspace); model output never executed.
  • loop-anything demo proof <id> --refiner claude|llm. Preflight's refine gate drops the compound-engineering requirement for llm; the gated e2e accepts LOOPENG_PROOF_REFINER=llm with a free provider key.
  • The Refiner is a protocol, so the controller is unchanged — compound-engineering stays the documented default; the LLM refiner is an opt-in quota-free alternative.

Decision record: docs/solutions/pluggable-refiner.md. Tests: +12 (LLM refiner + refine-gate). Suite: 167 passing, 2 skipped.

wjlgatech and others added 3 commits June 15, 2026 20:51
…dea notes

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Widen the loop contracts for domain generalization with zero controller
changes (KTD1): new `Domain` plugin protocol binds Factory|adopt-baseline +
Judge per target; `iterations` gains a nullable `score` column threaded
through the store and controller. Every domain projects onto both score
(primary) and a non-null grade letter, so controller/LoopOutcome/schema are
untouched. Software loop unregressed (full suite green).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Phase A U10

Budget.target_score lets a domain converge on a continuous score after the
unbypassable safety gate, skipping the letter ladder; is_improvement decides on
the score delta inside a letter band; is_plateaued(on_score=) ranks the
persisted score column (gated, so the software letter path is byte-identical,
R2). Variance probe documented as the multi-seed band source for stochastic
referees. Full suite green (190 passed, 2 gated-skip).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wjlgatech wjlgatech changed the title feat: catalog-to-proof pipeline — verified before/after loop proofs from real catalog CLIs feat: catalog-to-proof pipeline + loop-engine domain generalization (Phase A, U9–U10) Jun 16, 2026
@wjlgatech
wjlgatech merged commit b4ba72e into main Jun 16, 2026
4 checks passed
@wjlgatech
wjlgatech deleted the feat/catalog-proof-pipeline branch June 16, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant