|
1 | 1 | # LOOP.md — Loop Engineering Reference |
2 | 2 |
|
3 | | -This file documents how the **loop-engineering** reference repository itself is (or will be) operated with loop engineering patterns. |
| 3 | +This file documents how the **loop-engineering** reference repository is operated with loop engineering patterns. |
4 | 4 |
|
5 | | -The goal of this repo is to be the canonical, copyable, high-signal collection of patterns, starters, and tooling. It should therefore eat its own dogfood aggressively. |
| 5 | +The goal of this repo is to be the canonical, copyable, high-signal collection of patterns, starters, and tooling. It eats its own dogfood aggressively. |
6 | 6 |
|
7 | | -## Intended Loops (phased) |
| 7 | +## Active Loops |
8 | 8 |
|
9 | | -### Daily Triage (L1 → L2) |
10 | | -- Cadence: 1d (or 2h during active development) |
11 | | -- Skill: loop-triage (from `starters/minimal-loop`) |
12 | | -- State: STATE.md (or this file + issues) |
13 | | -- Current phase: Report-only. Human reviews the report each day and decides what to action. |
| 9 | +### Daily Triage (L1 — automated + report) |
| 10 | +- Cadence: 1d weekdays (`/.github/workflows/daily-triage.yml`) |
| 11 | +- Skill: `loop-triage` (from `skills/` and `starters/minimal-loop`) |
| 12 | +- State: `STATE.md` (updated by workflow; human reviews weekly issue) |
| 13 | +- Phase: Report-only. Human reviews and decides actions. |
14 | 14 | - Handoff: Design decisions, large refactors, new pattern acceptance. |
15 | 15 |
|
16 | | -### PR Babysitter (future, L2) |
17 | | -- Cadence: 10–15m during active hours |
18 | | -- Uses the `pr-babysitter` starter + worktrees for any suggested fixes. |
19 | | -- Will live primarily in the GitHub Actions + comments on PRs. |
20 | | -- Strong verifier + explicit allowlist for auto-merge (very small safe changes only). |
| 16 | +### PR Babysitter (L2 — assisted, manual trigger) |
| 17 | +- Cadence: 10–15m during active hours (maintainer `/loop` or future Action) |
| 18 | +- Starter: `starters/pr-babysitter` (Grok, Claude Code, Codex) |
| 19 | +- Worktrees for suggested fixes; verifier required; no auto-merge by default. |
21 | 20 |
|
22 | | -### Dependency Sweeper (L2, just added) |
| 21 | +### Dependency Sweeper (L2 — patch-only) |
23 | 22 | - Cadence: 6h–1d |
24 | | -- New pattern + starter added in this iteration. |
25 | | -- Focus: patch + low-risk CVE only for the first 30 days. |
26 | | -- Verifier = full `npm ci && npm test` (or the build that exists) in worktree. |
27 | | -- Human gate on anything that touches core packages or majors. |
| 23 | +- Starter: `starters/dependency-sweeper` |
| 24 | +- Patch + low-risk CVE only for first 30 days |
| 25 | +- Verifier = full `npm ci && npm test` in worktree |
| 26 | +- Human gate on majors and denylisted packages |
28 | 27 |
|
29 | 28 | ### CI Sweeper / Post-Merge (opportunistic) |
30 | | -- The `validate-patterns.yml` + `audit.yml` workflows in `.github/workflows/` are the beginning of dogfooding these patterns. |
31 | | -- Future: a sweeper that reacts to failing validate/audit runs with minimal doc or link fixes. |
| 29 | +- `validate-patterns.yml` + `audit.yml` dogfood pattern validation and readiness scoring |
| 30 | +- `audit.yml` posts loop readiness scores on PRs |
| 31 | +- Future: sweeper reacting to failing validate/audit runs |
| 32 | + |
| 33 | +## Multi-loop coordination |
| 34 | + |
| 35 | +See [docs/multi-loop.md](docs/multi-loop.md). Priority: CI Sweeper → PR Babysitter → Dependency Sweeper → Post-Merge → Daily Triage (report). |
32 | 36 |
|
33 | 37 | ## Worktrees |
34 | 38 |
|
35 | | -- Any unattended code-change experiment (dependency sweeper, PR babysitter fixes) runs in an **isolated git worktree** per attempt. |
| 39 | +- Any unattended code-change experiment runs in an **isolated git worktree** per attempt. |
36 | 40 | - One worktree per fix; discard after verifier REJECT or human escalation. |
37 | | -- Starters document worktree usage per tool — see `starters/minimal-loop-claude/LOOP.md` and `starters/minimal-loop-codex/LOOP.md`. |
38 | 41 |
|
39 | 42 | ## Connectors (MCP) |
40 | 43 |
|
41 | | -- **MCP not required** for L1 daily triage on this reference repo. |
42 | | -- Optional: GitHub MCP for issue/PR discovery when moving to L2 PR babysitter. |
43 | | -- Scope connectors to read + comment until the loop is trusted. |
| 44 | +- Optional for L1 daily triage — see [examples/mcp/](examples/mcp/) |
| 45 | +- GitHub MCP read-only for issue/PR discovery |
| 46 | +- Scope connectors to read + comment until the loop is trusted |
44 | 47 |
|
45 | 48 | ## Safety & Gates (this repo) |
46 | 49 |
|
47 | | -- No auto-merge on main for anything except the most trivial dependency patches (and even those are behind allowlist + verifier today). |
48 | | -- Denylist for this reference: anything touching the showcase HTML/CSS, the core primitives docs, or the audit scoring logic without human review. |
49 | | -- Live loop state: `STATE.md` at repo root (dogfooded). Starters still ship `.example` files for consumers. |
50 | | - |
51 | | -## How to run the loops here (for contributors / the maintainer) |
| 50 | +- No auto-merge on main except trivial dependency patches (allowlist + verifier) |
| 51 | +- Denylist: showcase HTML/CSS, core primitives docs, audit scoring logic without human review |
| 52 | +- Live loop state: `STATE.md` at repo root |
52 | 53 |
|
53 | | -See the individual pattern docs and the GitHub Actions. |
54 | | - |
55 | | -Quick local check: |
| 54 | +## How to run locally |
56 | 55 |
|
57 | 56 | ```bash |
58 | 57 | node tools/loop-audit/dist/cli.js . --suggest |
| 58 | +npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok # after npm publish |
| 59 | +bash scripts/before-after-demo.sh |
59 | 60 | ``` |
60 | 61 |
|
61 | | -After changes to patterns, starters, or docs, the `validate-patterns` + `audit` workflows will run automatically on PRs. |
62 | | - |
63 | 62 | ## Evolution |
64 | 63 |
|
65 | | -We will raise the L level of this repo itself over time and record the journey in `stories/`. |
66 | | - |
67 | | -Current target for the reference: solid L2 with excellent observability and zero "I had to hand-hold the loop for an hour" stories. |
| 64 | +Journey recorded in `stories/`. Target: solid L2 with excellent observability. |
68 | 65 |
|
69 | 66 | --- |
70 | 67 |
|
71 | | -*This file is both documentation and the seed for the loops that will maintain the reference.* |
| 68 | +*This file is both documentation and the seed for the loops that maintain the reference.* |
0 commit comments