Skip to content

Deepleaper/loop-engineering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loop Engineering

Milestone-driven engineering loop with binary gates.

里程碑驱动的工程闭环系统,用二值 Gate 消除"差不多完成了"。

Why / 为什么

Large coding tasks drift when one conversation tries to research, design, implement, and test at the same time. Loop Engineering fixes this with:

复杂编程任务在一个对话里同时做设计、实现、测试,必然跑偏。Loop Engineering 用以下方式解决:

  1. 4 Core Workstations — Orchestrator, Architect, Implementer, Test Evaluator
  2. Binary Gates — Every check is 1 or 0. No "mostly done"
  3. Milestone Contract — Define what "done" means before you start
  4. Reject & Return — Fail = return to same role, not advance with tech debt

4个核心工位,1/0 二值验收,先定义完成标准再开工,不通过就打回。

How It Works / 怎么用

Orchestrator defines Milestone Contract
  → Architect designs (boundaries, interfaces, risks)
    → Orchestrator gate check (1/0)
  → Implementer codes (changed files, verification, tests)
    → Orchestrator gate check (1/0)
  → Test Evaluator validates (SOP, pass/fail/not_run)
    → Orchestrator gate check (1/0)
  → Milestone complete ✅

Any gate failure → reject back to that role with specific reason.

任何 gate 失败 → 打回该角色并附具体原因。

Core Workstations / 核心工位

Workstation Role Does Does NOT
Orchestrator 流程控制 + 验收 Create contract, gate check, reject/advance Judge design quality or code correctness
Architect 技术设计 Boundaries, interfaces, data flow, risks, trade-offs Write code
Implementer 代码实现 Code changes, verification commands, test results Design architecture
Test Evaluator 独立验证 SOP evaluation of entire milestone, pass/fail/not_run Only check changed files

Extension Workstations / 扩展工位

Not every milestone needs all 8 roles. Start with 4 core, add as needed:

不是每个 milestone 都需要 8 个角色。先用 4 个核心,按需加:

Extension When to Add
Researcher New domain, unfamiliar tech stack
Product PRD User-facing features, scope ambiguity
Code Context Large codebase, complex dependencies
Reviewer High-risk changes, audit requirements

Key Principles / 核心原则

  • Binary completionrole_completion_status is 1 or 0. Never "partial" or "with residual risk"
  • Evidence required — Claims without evidence = status 0
  • No scope creepmust_not_claim list prevents roles from claiming unrelated work
  • Orchestrator doesn't think for roles — Checks format, evidence, alignment. Not design quality
  • Two rejects = escalate to human — Prevents infinite loops

Quick Start / 快速开始

  1. Copy contracts/milestone-contract-template.md, fill in your milestone
  2. Use workstations/{role}/assignment-template.md to assign work
  3. Roles complete using workstations/{role}/completion-template.md
  4. Orchestrator validates using workstations/orchestrator/gate-template.md
  5. Gate pass → next role. Gate fail → reject with reason

Platform Integration / 平台适配

Loop Engineering is platform-agnostic. It works with:

  • OpenClawsessions_spawn per role, orchestrator in main session
  • Codex — One conversation per role, copy-paste handoff
  • Claude Code — Separate sessions per role
  • Any AI coding assistant — Templates are plain markdown

See docs/integration/ for platform-specific guides.

Project Structure / 项目结构

loop-engineering/
├── contracts/                    # Milestone contract template
│   └── milestone-contract-template.md
├── workstations/                 # 4 core workstations
│   ├── orchestrator/
│   ├── architect/
│   ├── implementer/
│   └── test-evaluator/
├── extensions/                   # Optional workstations
│   ├── researcher/
│   ├── product-prd/
│   ├── code-context/
│   └── reviewer/
├── examples/                     # Example milestones
└── docs/                         # Guides & integrations

Philosophy / 理念

If a role's output doesn't let the next role guess one step less, or doesn't help the Orchestrator judge milestone completion more accurately, that output is not qualified.

如果一个角色的产出不能让下一个角色少猜一步,或者不能让 Orchestrator 更准确判断 milestone 是否完成,这个产出就不合格。

License

MIT

About

Built by Deepleaper — AI Agent infrastructure for business decisions.

About

Milestone-driven engineering loop with binary gates. 4 core workstations, platform-agnostic.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors