|
14 | 14 | <meta property="og:image" content="https://raw.githubusercontent.com/cobusgreyling/loop-engineering/main/assets/visuals/loop-engineering-social-banner.jpg"> |
15 | 15 | <link rel="stylesheet" href="{{ site.baseurl }}/assets/css/showcase.css"> |
16 | 16 | <link rel="icon" href="https://raw.githubusercontent.com/cobusgreyling/loop-engineering/main/assets/visuals/loop-engineering-logo.svg"> |
| 17 | + <script type="module"> |
| 18 | + import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs"; |
| 19 | + mermaid.initialize({ |
| 20 | + startOnLoad: true, |
| 21 | + theme: "dark", |
| 22 | + securityLevel: "loose", |
| 23 | + themeVariables: { |
| 24 | + background: "#111a28", |
| 25 | + primaryColor: "#132235", |
| 26 | + primaryTextColor: "#e8edf5", |
| 27 | + primaryBorderColor: "#3ee8c5", |
| 28 | + lineColor: "#5b9dff", |
| 29 | + secondaryColor: "#0d1420", |
| 30 | + tertiaryColor: "#111a28", |
| 31 | + textColor: "#e8edf5", |
| 32 | + clusterBkg: "#0d1420", |
| 33 | + clusterBorder: "#2a3b52", |
| 34 | + edgeLabelBackground: "#111a28", |
| 35 | + fontFamily: "SF Pro Display, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif", |
| 36 | + }, |
| 37 | + }); |
| 38 | + </script> |
17 | 39 | </head> |
18 | 40 | <body> |
19 | 41 |
|
|
38 | 60 | <ul class="nav-links"> |
39 | 61 | <li><a href="#patterns">Patterns</a></li> |
40 | 62 | <li><a href="#primitives">Primitives</a></li> |
| 63 | + <li><a href="#architecture">Architecture</a></li> |
41 | 64 | <li><a href="#interactive">Picker</a></li> |
42 | 65 | <li><a href="#start">Get Started</a></li> |
43 | 66 | <li><a href="https://github.com/cobusgreyling/loop-engineering/blob/main/docs/QUICKSTART.md">Quickstart</a></li> |
@@ -173,6 +196,150 @@ <h3>State</h3> |
173 | 196 | </p> |
174 | 197 | </section> |
175 | 198 |
|
| 199 | +<section id="architecture" class="wrap"> |
| 200 | + <p class="section-label">Deeper architecture</p> |
| 201 | + <h2 class="section-title">How one run actually moves</h2> |
| 202 | + <p class="section-desc">The actor-level sequence within a run, the states it passes through, how the three autonomy levels relate, and how the tools in this repo map onto the primitives above.</p> |
| 203 | + <div class="diagram-list"> |
| 204 | + <div class="pattern-card diagram-card"> |
| 205 | + <div class="tag">Sequence</div> |
| 206 | + <h3>One loop cycle</h3> |
| 207 | + <pre class="mermaid"> |
| 208 | +sequenceDiagram |
| 209 | + actor Eng as Engineer |
| 210 | + participant Sched as Scheduler |
| 211 | + participant Skill as Triage Skill |
| 212 | + participant State as STATE.md / Memory |
| 213 | + participant WT as Worktree |
| 214 | + participant Maker as Implementer Agent |
| 215 | + participant Check as Verifier Agent |
| 216 | + participant MCP as MCP / Git / Tickets |
| 217 | + participant Gate as Human Gate |
| 218 | + |
| 219 | + Sched->>Skill: Fire pattern (e.g. daily-triage) |
| 220 | + Skill->>State: Read goals + last run + budget |
| 221 | + State-->>Skill: Context snapshot |
| 222 | + Skill->>WT: Create isolated worktree |
| 223 | + WT-->>Skill: worktree path |
| 224 | + Skill->>Maker: Task with skills + constraints |
| 225 | + Maker->>Maker: Implement change in worktree |
| 226 | + Maker->>Check: Hand off patch |
| 227 | + Check->>Check: Run tests + policy gates |
| 228 | + |
| 229 | + alt Verify pass and budget OK |
| 230 | + Check->>MCP: Open PR or update ticket |
| 231 | + MCP-->>Gate: PR link + summary |
| 232 | + Gate->>Gate: Safe and allowlisted? |
| 233 | + alt Safe auto-path |
| 234 | + Gate->>MCP: Approve merge or leave L1 report |
| 235 | + MCP->>State: Write run outcome |
| 236 | + else Risky or ambiguous |
| 237 | + Gate->>Eng: Escalate with full context |
| 238 | + Eng->>MCP: Decide / override |
| 239 | + MCP->>State: Write decision + outcome |
| 240 | + end |
| 241 | + else Verify fail or budget exceeded |
| 242 | + Check->>State: Log failure mode |
| 243 | + Check->>Eng: Report only, no auto-merge |
| 244 | + end |
| 245 | + </pre> |
| 246 | + </div> |
| 247 | + <div class="pattern-card diagram-card"> |
| 248 | + <div class="tag">State</div> |
| 249 | + <h3>Run lifecycle</h3> |
| 250 | + <pre class="mermaid"> |
| 251 | +stateDiagram-v2 |
| 252 | + [*] --> Scheduled |
| 253 | + Scheduled --> LoadingContext: cadence fire |
| 254 | + LoadingContext --> BlockedBudget: budget exceeded |
| 255 | + LoadingContext --> RunningTriage: context OK |
| 256 | + RunningTriage --> WorkingInWorktree: task selected |
| 257 | + RunningTriage --> IdleNoop: nothing to do |
| 258 | + WorkingInWorktree --> Verifying: implementer done |
| 259 | + Verifying --> AwaitingHumanGate: verify pass + risky |
| 260 | + Verifying --> Failed: verify fail |
| 261 | + AwaitingHumanGate --> Applied: human or allowlist approve |
| 262 | + AwaitingHumanGate --> Rejected: human reject |
| 263 | + Applied --> Logged |
| 264 | + Failed --> Logged |
| 265 | + Rejected --> Logged |
| 266 | + BlockedBudget --> Logged |
| 267 | + IdleNoop --> Logged |
| 268 | + Logged --> [*] |
| 269 | + </pre> |
| 270 | + </div> |
| 271 | + <div class="pattern-card diagram-card"> |
| 272 | + <div class="tag">State</div> |
| 273 | + <h3>Autonomy levels L1-L3</h3> |
| 274 | + <pre class="mermaid"> |
| 275 | +stateDiagram-v2 |
| 276 | + [*] --> L1_ReportOnly |
| 277 | + L1_ReportOnly --> L2_Assisted: audit score up + human OK |
| 278 | + L2_Assisted --> L3_Unattended: denylist + budget + gates proven |
| 279 | + L3_Unattended --> L2_Assisted: incident or cost spike |
| 280 | + L2_Assisted --> L1_ReportOnly: kill switch |
| 281 | + L3_Unattended --> L1_ReportOnly: kill switch |
| 282 | + </pre> |
| 283 | + </div> |
| 284 | + <div class="pattern-card diagram-card"> |
| 285 | + <div class="tag">Architecture</div> |
| 286 | + <h3>Stack: primitives + tools</h3> |
| 287 | + <pre class="mermaid"> |
| 288 | +flowchart TB |
| 289 | + subgraph Human["Engineer / Owner"] |
| 290 | + Design[Design LOOP.md patterns] |
| 291 | + Gate[Human gate + kill switch] |
| 292 | + Review[Read PRs + reports] |
| 293 | + end |
| 294 | + |
| 295 | + subgraph Control["Control plane"] |
| 296 | + Sched[Automations / Scheduling] |
| 297 | + Patterns[patterns/registry.yaml] |
| 298 | + Cost[loop-cost: estimate spend] |
| 299 | + end |
| 300 | + |
| 301 | + subgraph Memory["Durable memory"] |
| 302 | + State[STATE.md] |
| 303 | + LoopDoc[LOOP.md] |
| 304 | + Context[loop-context: prune, inject, circuit breaker] |
| 305 | + Sync[loop-sync] |
| 306 | + end |
| 307 | + |
| 308 | + subgraph Execution["Execution plane"] |
| 309 | + WT[loop-worktree: isolated attempts + locks] |
| 310 | + Maker[Implementer sub-agent] |
| 311 | + Verifier[Verifier sub-agent] |
| 312 | + end |
| 313 | + |
| 314 | + subgraph Tooling["CLIs + connectors"] |
| 315 | + Init[loop-init: scaffold] |
| 316 | + Audit[loop-audit: readiness score] |
| 317 | + MCP[MCP server: read-only policy + tools] |
| 318 | + end |
| 319 | + |
| 320 | + Design --> Patterns |
| 321 | + Init --> State |
| 322 | + Init --> LoopDoc |
| 323 | + Sched --> Patterns |
| 324 | + Patterns --> Cost |
| 325 | + Cost --> Context |
| 326 | + Patterns --> WT |
| 327 | + State <--> Sync |
| 328 | + WT --> Maker |
| 329 | + Maker --> Verifier |
| 330 | + Verifier --> Context |
| 331 | + Context --> Gate |
| 332 | + Verifier --> MCP |
| 333 | + Gate --> Review |
| 334 | + Audit --> Design |
| 335 | + </pre> |
| 336 | + </div> |
| 337 | + </div> |
| 338 | + <p style="text-align: center; margin-top: 24px;"> |
| 339 | + <a href="https://github.com/cobusgreyling/loop-engineering/blob/main/docs/architecture-diagrams.md">Copy-friendly Mermaid source →</a> |
| 340 | + </p> |
| 341 | +</section> |
| 342 | + |
176 | 343 | <section id="patterns" class="wrap"> |
177 | 344 | <p class="section-label">Copy & run</p> |
178 | 345 | <h2 class="section-title">Production patterns</h2> |
|
0 commit comments