Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
This report summarizes scanner evidence for cobusgreyling/loop-engineering, a TypeScript project with 11,675 GitHub stars. SynthScan examined 40,853 lines of code across 506 source files, recording 46 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 3.1 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 22 finding(s).
Are imports declared and package/API names verified? 3 finding(s).
Are wrappers, guards, and repeated structures necessary? 26 finding(s).
Which changes need focused human review? 46 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 46 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tools/loop-drill/src/drill.ts | 109 | // ── Glob → concrete sample path ──────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-drill/src/drill.ts | 135 | // ── Gate drills (Over-Reach) ─────────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-drill/src/drill.ts | 265 | // ── Circuit breaker drills (Infinite Fix Loop / Token Burn) ──────── | COMMENT |
| MEDIUM | tools/loop-drill/src/drill.ts | 458 | // ── Report assembly ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/mcp-server/src/index.ts | 34 | // ── Resources ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/mcp-server/src/index.ts | 138 | // ── Resource Templates (dynamic) ─────────────────────────────────── | COMMENT |
| MEDIUM | tools/mcp-server/src/index.ts | 200 | // ── Tools ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/mcp-server/src/index.ts | 549 | // ── Start ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-context/src/context-manager.ts | 85 | // ── Config validation ────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-context/src/context-manager.ts | 129 | // ── Error normalization ──────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-context/src/context-manager.ts | 180 | // ── Circuit breaker ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-context/src/context-manager.ts | 316 | // ── Pruning ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-context/src/context-manager.ts | 364 | // ── Summarization ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tools/loop-context/src/context-manager.ts | 427 | // ── Injection ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …ources/ky-cut-surface-philosophy-v0_1/TERMINAL_ART.txt | 1 | ┌──[ KUNST-TERMINALEN // KY CUT SURFACE v0.1 ]──────────────────────────────┐ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tools/loop-swarm/README.md | 18 | See [Quickstart](../../docs/QUICKSTART.md#multi-agent-consensus-sandboxing-loop-swarm) for workflow examples and command | CODE |
| MEDIUM | tools/loop-sync/README.md | 52 | # Preview what --auto-fix would scaffold/change, without writing anything | COMMENT |
| MEDIUM | tools/loop-audit/src/auditor.ts | 887 | // Proof that guardrails fire, from loop-drill --record. | COMMENT |
| MEDIUM⚡ | tools/loop-audit/src/cli.ts | 99 | console.log(' # Or scaffold automatically:'); | CODE |
| MEDIUM⚡ | tools/loop-audit/src/cli.ts | 108 | console.log(' # IMPORTANT (v1.4): After scaffolding, actually RUN a loop (report-only) and commit the updated STATE | CODE |
| MEDIUM⚡ | tools/loop-audit/src/cli.ts | 111 | console.log(' # L3: prove the guardrails fire, not just exist, then commit the record'); | CODE |
| MEDIUM | docs/QUICKSTART.md | 17 | Not sure which loop? Use the [interactive pattern picker](https://cobusgreyling.github.io/loop-engineering/#interactive) | CODE |
| MEDIUM | docs/QUICKSTART.md | 17 | Not sure which loop? Use the [interactive pattern picker](https://cobusgreyling.github.io/loop-engineering/#interactive) | CODE |
| MEDIUM | docs/QUICKSTART.md | 355 | # Run multi-agent consensus across 3 sequential sandboxes | COMMENT |
| MEDIUM | docs/safety.md | 136 | - `loop-swarm`: Multi-agent consensus sandboxing across sequential `loop-sandbox` runs. Requires byte-identical patch co | CODE |
| MEDIUM | docs/RELEASE.md | 104 | # goal-init (scaffold goal engineering setups) | COMMENT |
| MEDIUM | examples/codex/issue-triage.md | 36 | Install `issue-triage` per [Codex Agent Skills](https://developers.openai.com/codex/skills) — scaffold with `loop-init` | CODE |
| MEDIUM | examples/github-actions/ci-sweeper.yml | 1 | # CI Sweeper — event-driven on workflow failure | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | starters/minimal-loop-codex/.codex/agents/verifier.toml | 0 | you are the checker in a maker/checker split. default stance: reject until proven otherwise. checklist (all must pass fo | STRING |
| HIGH | starters/ci-sweeper/.codex/agents/verifier.toml | 0 | you are the checker in a maker/checker split. default stance: reject until proven otherwise. checklist (all must pass fo | STRING |
| HIGH | starters/pr-babysitter/.codex/agents/verifier.toml | 0 | you are the checker in a maker/checker split. default stance: reject until proven otherwise. checklist (all must pass fo | STRING |
| HIGH | starters/issue-triage/.codex/agents/verifier.toml | 0 | you are the checker in a maker/checker split. default stance: reject until proven otherwise. checklist (all must pass fo | STRING |
| HIGH | starters/post-merge-cleanup/.codex/agents/verifier.toml | 0 | you are the checker in a maker/checker split. default stance: reject until proven otherwise. checklist (all must pass fo | STRING |
| HIGH | starters/dependency-sweeper/.codex/agents/verifier.toml | 0 | you are the checker in a maker/checker split. default stance: reject until proven otherwise. checklist (all must pass fo | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tools/loop-audit/src/cli.ts | 105 | console.log(' # or: npx @cobusgreyling/harness-foundry init --from loop-engineering:daily-triage'); | CODE |
| MEDIUM | examples/github-actions/daily-triage.yml | 2 | # Invokes your agent harness with a triage prompt. Adapt the "Run agent" step | COMMENT |
| MEDIUM | examples/github-actions/issue-triage.yml | 3 | # issue-triage-state.md. Wire the "Run triage agent" step to your harness. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/loop-init/src/cli.ts | 254 | function cheaperinferenceInterfaceYaml(model: string): string { | CODE |
| LOW | tools/loop-context/src/budget-resolver.ts | 13 | export function assertValidBudgetScenario(scenario: string): asserts scenario is BudgetScenario { | CODE |
| LOW | tools/loop-context/src/budget-resolver.ts | 106 | export async function resolveTokenBudgetFromPattern(input: BudgetFromPatternInput): Promise<number> { | CODE |
| LOW | tools/loop-context/src/budget-resolver.ts | 126 | export async function resolveDailyBudgetFromPattern(input: BudgetFromPatternInput): Promise<number> { | CODE |
| LOW | tools/loop-context/src/context-manager.ts | 95 | export function assertSimilarityThreshold(value: unknown, label = 'similarityThreshold'): asserts value is number { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/generate-star-history.py | 13 | CODE | |
| LOW | scripts/generate-audit-demo-gif.py | 4 | CODE | |
| LOW | scripts/generate-audit-demo-gif.py | 7 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/loop-sandbox/src/sandbox.ts | 81 | // Cleanup must run on every exit path, including Ctrl+C mid-run, and | COMMENT |