cy0307's picture
Sync awesome-loop-engineering
9ec4919 verified
|
Raw
History Blame Contribute Delete
6.59 kB

Pattern Matrix

A side-by-side comparison of every loop in the pattern library. Use it to pick a pattern, compare trade-offs, or check that your own loop names the same parts.

How To Read This Matrix

  • Best for is the symptom or job the loop solves. If you know the symptom, start from Choose Your Loop.
  • Trigger / cadence is what starts a run: a schedule, an event, or a manual bootstrap.
  • Intake is where the loop finds work each run.
  • Durable state is what survives between runs, outside the model.
  • Verification gate is the deterministic check that decides done, not the model's opinion.
  • Budget is the hard stop on retries or runtime.
  • Escalation is the moment a human takes over.
  • Runtime fit suggests where the loop tends to run well; see the runtime selection guide for the full comparison. It is a starting point, not a constraint.

Every pattern links to its full write-up and a schema-valid contract in examples/.

Matrix

Pattern Best for Trigger / cadence Intake source Durable state Verification gate Budget Escalation Runtime fit
PR babysitter A PR stalls on comments, CI, or conflicts Schedule + PR events PR metadata, reviews, checks PR progress comment, last SHA Required checks pass, comments resolved 3 retries / 60 min Architectural or force-push decisions Claude Code routines, Codex automations, gh-aw
CI repair loop CI keeps failing on a mechanical cause Event: required check fails Failing check, logs, artifacts Failing command, attempted fixes Original failing command passes 3 retries / 60 min Test-infra or out-of-scope failures Codex automations, gh-aw, shell/cron
Docs drift collector Docs may be stale versus code Schedule: weekly Changed files, docs, examples, CLI help Verified drift items, false positives Examples run, links pass 2 retries / 60 min Product behavior or generated-docs calls Claude Code routines, gh-aw
Deploy verifier A rollout needs watching Event: deploy starts; poll 5-15 min Dashboards, logs, traces, flags Rollout phase, anomalies, decisions Synthetic checks and thresholds hold 2 retries / rollout window Threshold breach or missing telemetry Shell/cron, custom durable runtime
Feedback clusterer Feedback is noisy and unsorted Schedule: daily or weekly Issues, tickets, threads, reviews Processed IDs, cluster definitions Clusters cite sources, frequency vs severity 1 retry / 90 min Security, legal, or prioritization conflicts Claude Code routines, Codex automations
Dependency triage loop Dependency updates pile up Schedule: weekly + bot PRs Update PRs, advisories, lockfile diff Processed updates, deferral reasons Tests, typecheck, build, audit pass 2 retries / 60 min Major versions, advisories, migrations gh-aw, Codex automations, shell/cron
Evaluation regression loop Agent evals regressed Schedule: nightly + score drop Eval runs, traces, recent commits Run IDs, hypotheses, rerun scores Targeted tasks return to baseline 3 retries / 120 min Scorer bugs or overfitting risk Custom durable runtime, shell/cron
Security review loop Sensitive changes need review Event: sensitive diff; weekly pass Diffs, threat model, scan output Reviewed SHA, findings, false positives Findings cite concrete evidence 2 retries / 90 min Credentials, crypto, exploitability doubt Claude Code routines, gh-aw
Cost-control loop Agent spend is rising Schedule + spend threshold Usage telemetry, traces, billing Baseline spend, proposed changes Quality gates hold on a comparable sample 2 retries / 60 min Quality tradeoffs or routing changes Custom durable runtime, shell/cron
Bug hunting loop Recurring bug discovery Schedule: weekly on active modules Logs, flaky tests, traces, diffs Checked areas, reproductions Reproducible steps or failing test 3 retries / 90 min Production-only or security-sensitive bugs Claude Code routines, shell/cron
Enterprise approval loop A change needs sign-off Schedule + gate/approver events Change request, gates, approvers Approval ledger, gate status Every gate has a recorded human decision 3 retries / SLA window Failed gate or unresponsive approver Custom durable runtime, gh-aw
Incident response loop An incident just paged Event: alert; refresh 2-5 min Alert, dashboards, traces, changes Incident timeline, hypotheses Severity backed by impact evidence 2 retries / incident life Outage, data loss, or mitigation needed Custom durable runtime, shell/cron
Data-quality loop A dataset keeps drifting Event: refresh; or nightly New version, schema, prior baseline Profile metrics, accepted exceptions Hard rules pass before promotion 2 retries / 90 min Schema change or regulated fields Custom durable runtime, shell/cron
Release-note loop Release notes are a chore Event: release branch or tag Merged PRs, issues, commits Processed IDs, draft changelog Every entry links to a source 2 retries / 60 min Security advisories or wording calls gh-aw, Codex automations
Model-routing loop Model choice is ad hoc Schedule + model/price change Per-task telemetry, eval results Task-class metrics, routing log Replays hold quality within tolerance 2 retries / 120 min Privacy tier or quality-cost tradeoffs Custom durable runtime

Notes

  • Runtime fit is advisory. Most patterns run on more than one runtime; the runtime selection guide compares persistence, file access, isolation, and permissions so you can choose deliberately.
  • Budgets are defaults from each pattern's contract. Tune them to your blast radius before running unattended.
  • Read-mostly patterns (deploy verifier, incident response, feedback clusterer, model routing) keep humans on any state-changing action by design.