Skip to content

KanakMalpani/Loop-Engineering

Repository files navigation

Loop Engineering

The discipline of designing systems that continuously improve through feedback.

Not prompt tricks. Not single agents. Closed loops — observe, act, evaluate, update, repeat — made measurable, comparable, and engineerable.


License: MIT LSS 1.0 LES 1.0


Read the manifesto · Install the stack · Learning paths


The shift

Era What got optimized The ceiling
2020–2023 Prompt engineering Single turn — no closure
2023–2024 Context engineering Static information — no iteration
2024–2025 Agent engineering Autonomous actors — no system-level improvement
2025+ Loop engineering Self-improving systems at scale

Prompt engineering optimizes a single interaction.
Agent engineering optimizes autonomous actors.
Loop engineering optimizes systems that get better through feedback.


What Loop Engineering offers

Pillar What you get
Theory 13 fundamentals, 6-level taxonomy, 14 patterns
Method D-D-M-I-S framework — Design, Diagnose, Measure, Improve, Scale
Standards LSS 1.0 — declare loops in YAML · LES 1.0 — score them on 8 dimensions
Evidence Case studies — AlphaGo, GitHub PRs, Toyota, coding agents
Runnable stack Specs, dataset, runtime, and public benchmarks — all open source

This repo is the narrative home: manifesto, patterns, case studies, and learning paths.
Machine-readable specs live in Loop Core Engineering — the canonical source.


The published stack

Everything below is live on GitHub and PyPI (v0.1):

flowchart TB
  DOCS["<b>Loop Engineering</b><br/><i>you are here</i><br/>manifesto · patterns · case studies"]
  CORE["Loop Core Engineering<br/>LSS · LES · validators"]
  NET["LoopNet<br/>500 trajectories"]
  GYM["LoopGym<br/>pip install loopgym"]
  BENCH["LoopBench<br/>pip install loopbench"]

  DOCS -.-> CORE
  CORE --> NET
  CORE --> GYM
  NET --> GYM
  GYM --> BENCH
  CORE --> BENCH
Loading
Repository One line Link
Loop Core Engineering Specs & governance — the constitution GitHub →
LoopNet Dataset — ground truth for loops GitHub → · Hugging Face →
LoopGym Runtime — run loops in sim, live, or replay GitHub → · pip install loopgym
LoopBench Benchmarks — public scoreboard GitHub → · pip install loopbench

Full install map: ECOSYSTEM.md · Canonical source policy: CANONICAL-SOURCE.md


The loop, formally

Every loop is a closed dynamical system:

observe → decide → act → evaluate → update state → repeat

Formalized as L = (S, A, O, T, E, M, τ) — state, actions, observations, transitions, evaluators, memory, termination.

What is a loop?

Declare it in LSS:

loop_name: code-repair-loop
version: "1.0"
objective: "Fix failing tests with minimal diff"
workers:
  - role: implementer
evaluators:
  - type: test_suite
termination_conditions:
  - type: all_tests_pass
  - type: max_iterations
    value: 10

LSS 1.0 (canonical)


Where to start

You are… Path Time
Curious ManifestoFundamentals ~2 hours
Building Patternspip install loopgym loopbenchfirst benchmark run ~1 hour
Researching Case studiesLoopNet dataset ~1 day
Leading a team D-D-M-I-S frameworkLES scoring ~2 hours

Inside this repo

Section Contents
manifesto/ Founding principles
fundamentals/ 13-topic theoretical foundation
taxonomy/ Six-level loop classification
patterns/ 14 design patterns with LSS specs
framework/ D-D-M-I-S methodology
case-studies/ AlphaGo, GitHub PRs, Toyota, coding agents
loop-library/ Production-ready loop YAML
implementations/ Python, LangGraph, CrewAI examples
research/ Open problems and roadmap

Loop library preview

Loop Level Use case
Research Agent 2 Literature synthesis
Coding Agent 3 Feature implementation
Autonomous Debugger 3 Test-driven repair
Startup Validator 2 PMF experiments

Full library


Tools

Tool Purpose
les_calculator.py Structural LES estimate (local mirror)
loop_validator.py LSS validation (prefer canonical validator)
loop_diagram_generator.py Mermaid from LSS

Contributing

New patterns, case studies, implementations, and benchmark results welcome.

CONTRIBUTING.md · GOVERNANCE.md


Citation

@misc{loop-engineering-2026,
  title={Loop Engineering: The Discipline of Self-Improving Systems},
  author={Loop Engineering Community},
  year={2026},
  url={https://github.com/KanakMalpani/Loop-Engineering}
}

Feedback is the fundamental unit of intelligence.
Loop Engineering makes it engineerable.


MIT License

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors