← Back to All Products
Experiments & Research · Self-Enhancing DevResearch Prototype · Open Source
🌀

Pi-Loop-Dev · Multi-Agent Self-Enhancing Dev Runtime

Cybernetics-Based Autonomous AI Software-Engineering Convergence Runtime

PLD (Pi-Loop-Dev) is a development runtime that upgrades "multi-agent collaboration" into a "self-enhancing closed loop": starting from a DESIGN.md, it iterates continuously through a Builder → Tester → Analyzer cybernetic loop, stably converging any OpenAI-compatible model (no Claude / GPT quota needed) to an engineering artifact of "all tests pass + spec aligned." It treats the LLM as an uncontrollable actuator and wraps it with a reliable control system via feedback loops — the core methodology Xianma has crystallized in AI engineering.

Core Philosophy

PLD does not pursue a smarter LLM, but uses an engineered control loop to make LLM output verifiable, convergent, traceable, and rollbackable.

🧩

Weak Model + Strong Constraints > Strong Model + None

CORE PRINCIPLE

No top-tier model or quota needed. Any OpenAI-compatible interface runs; what truly decides the result is the constraint system and feedback loop around the actuator.

🔁

Cybernetic Closed Loop

CLOSED LOOP

Goal (DESIGN.md) → controller → actuator (Builder / LLM) → controlled object (code) → sensor (Tester + Analyzer) feedback to controller, continuously driving convergence.

🛡️

Five Cybernetic Guarantees

5 GUARANTEES

Reliable feedback, constrainable actuator, stable system, observable, controllable — oscillation detection + circuit breaker + degradation rollback + dual-convergence judgment + Failure Fingerprint.

♻️

Self-Improving Loops

SELF-IMPROVEMENT

Auto-scan repeated work patterns, crystallize into batchable, parallelizable Loops, compounding R&D experience rather than consuming it once.

Industry Pain Points · PLD's Answers

Between "looks right" and "truly usable," AI code-writing spans seven chasms; PLD gives an engineering answer to each.

🎯

Uncontrollable Code

LLM generates "looks right" but hides bugs, and self-assessment almost always says "fine." PLD trusts only test-pass-rate (ground truth) + spec-alignment dual verification.

🔄

No Convergence Guarantee

AI tools either loop forever, fix A and break B, or fake-converge. PLD gives convergence guarantee via 6-mode state machine + breaker + dual judgment.

🌑

Missing Provenance

AI-generated artifacts become "dark matter" in the codebase, untraceable. PLD's Provenance protocol + event stream make every artifact auditable, verifiable.

🧱

Wasted Repeated Work

Every endpoint / data model reinvents the wheel. PLD's Loops module auto-discovers repeated patterns and batch-parallelizes.

🔌

High Multi-Model Switch Cost

Tools bind a single model; switching often rewrites the integration layer. PLD configures each agent independently, one-line backend switch, Advisor cross-validation.

🐢

Lack of Early Feedback

Syntax errors surface only when pytest starts, wasting 10-30s per round-trip. PLD's TTSR + LSP intercept during / right after generation.

🎭

AI Shortcuts (Gaming)

Hardcode return values, mock out logic, tweak tests to pass — 100% tests but unusable code. PLD counters systematically with four defense layers.

Core Capabilities

A cybernetic runtime that turns "AI writes code" from a probability game into an engineering system

🎛️

Convergence Control Engine

6-mode RepairMode state machine (INITIAL / TEST_FIX / SPEC_COMPLETION / OSCILLATION_BREAK / REGRESSION_RECOVERY / FINAL_VERIFICATION), auto-switched by test_pass_rate; Hysteresis debounce + Circuit Breaker.

🚫

Formal Guards

Auto-reject bare except / return expected / @pytest.mark.skip / mock in prod code / test-file deletion — blocking "shortcut" patches at the source.

Three-Tier Early Feedback

TTSR intercepts in the token stream + LSP Sensor pre-test diagnosis (1-2s) + incremental test (full calibration every 3 rounds), compressing feedback from 10-30s to <2s.

🔍

Provenance Full Trace

Integrates the Proofpress provenance protocol, generating an immutable capsule per artifact (model / iteration / pass_rate / convergence); 20 event types persisted to EventStore.

🔀

Dual Backend + Multi-Model

opencode (default lightweight) / omp (Rust runtime, LSP/TTSR/Advisor/DAP) one-line switch; each agent independently configured; Advisor second model cross-validates.

🧩

Loops Self-Improve + DAG

pld scan discovers patterns → spec generates → loop-run batch executes → run-dag parallel schedules, turning repeated engineering tasks into reusable, parallelizable automation assets.

Convergence Loop: From Spec to Artifact

Not one-shot generation, but an autonomous Builder → Tester → Analyzer iteration loop until dual convergence.

Engineering Flow
1
DESIGN.md Spec Input
Developer writes a spec doc as the loop's "goal" and ground-truth source.
2
Builder Code Gen / Fix
LLM (via opencode / omp backend) generates or fixes code per current RepairMode, under patch-amplitude constraints.
3
Tester Verification
Independent pytest runs in Sandbox, outputs test_pass_rate; incremental tests run only affected subset, full calibration every 3 rounds.
4
Analyzer Spec Alignment
diff-only structured deviation analysis judges whether code truly meets spec (not just passes tests).
5
RepairMode Switch
Controller switches among 6 repair modes via Hysteresis on trend / oscillation / rollback signals.
6
Dual-Convergence Judgment
CONVERGED = all tests pass AND spec aligned; else back to Builder until convergence or breaker exit.
No Self-Trust
Ground truth comes from pytest's objective output, not the LLM's subjective judgment of its own code.
Anti-Oscillation & Rollback
Oscillation detection (triple fingerprint) + A/B rollback (regression >15% rolls back best snapshot), ensuring stable convergence not infinite jitter.
Observable & Replayable
ConvergenceMetrics (15+ fields) + full event file storage; convergence trajectory analyzable, reviewable afterward.

Key Results · Engineering Asset

Crystallize "AI writes code" capability into a measurable, reusable runtime asset.

226
Unit Tests Pass
Convergence runtime self-test all green
6 Modes
RepairMode State Machine
Adaptive repair-strategy switching
<2s
Early-Feedback Latency
TTSR + LSP real-time intercept
4 Layers
Gaming Defense
Guards + TTSR + Advisor + Analyzer

Key Breakthroughs

The difficulty is not single-point algorithms, but engineering "multi-agent collaboration" stably and reusably into a self-enhancing loop.

🔁

Cybernetic Loop Architecture

Treat the LLM as actuator not decision-maker, driving stable convergence via negative-feedback loops — any OpenAI-compatible interface runs, no top-tier model or quota bound.

Dual-Convergence Judgment

Test-pass-rate + spec-alignment dual judgment, with FINAL_VERIFICATION against fake convergence, making "done" an engineering guarantee not a claim.

🛡️

Four-Layer Gaming Defense

Formal Guards formal rejection + TTSR generation-time intercept + Advisor second-model watch + Analyzer spec review, cross-validating to sharply cut missed detections.

♻️

Self-Improving Loops

Auto-mine repeated patterns from history and crystallize into batchable Loops, compounding R&D experience rather than losing it at project end.

Business Value

Convert technical capability into quantifiable, reusable business value.

Improvements Delivered
Wrap a weak model in a reliable control loop, making its output verifiable, convergent, traceable, rollbackable — from "looks right" to "proven right."
No trust in LLM self-assessment, only test-pass-rate (ground truth), fundamentally dissolving AI code-writing's uncontrollability and fake convergence.
Per-iteration amplitude limit + breaker + A/B rollback thoroughly eliminate infinite loops and "fix A break B" oscillation.
Open-sourced under MIT (georgewangchn/pi-loop-dev), runs on any OpenAI-compatible interface — the public carrier of Xianma's AI-engineering research.
Applicable Scenarios
Tested backend / API dev: best when spec is clear and tests easy to write.
Utility libraries / auto bug-fix: with a reproduction test, auto-converge to correct implementation.
Enterprise R&D efficiency: crystallize repeated engineering patterns into batchable, parallelizable Loops.
AI-engineering research: cybernetic loop, gaming defense, provenance-protocol methodology validation and teaching.
📌

Content Under Active Update

Product content has been published based on internal materials. The following areas are planned for further development:

Online demo and system-effect validation test report (georgewangchn.github.io/pi-loop-dev)
omp Rust backend (LSP / TTSR / Advisor / DAP) deep integration and measured data
More industry landing cases and real iteration-trajectory replays
Integration with existing CI / dev platforms (GitHub Actions, etc.)
Contact Us

Start AI Partnership

Whether in government, finance, manufacturing, consumer, or content, we can customize vertical AI agent solutions for you.

📍

Address

Xiamen, Fujian · Wuhan OPC (planned)

🌐

Xianma AI

Xiamen Xianma Intelligent Technology Co., Ltd.

© 2024-2026 Xiamen Xianma Intelligent Technology Co., Ltd. · AI Agent Solutions · www.xianma.top

Products: 15active projects