feat(preswarm): 3-lens pre-swarm check as a relayflow - #123
Conversation
|
Warning Review limit reachedNext included review available in 39 minutes. View limit detailsLimit details: You’ve used the included review currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds a local ChangesPre-swarm review checks
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to This PR adds a local three-lens pre-swarm check and supporting documentation without a supplied merge-blocking correctness, security, availability, or deployment risk; it is merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Workflow as preswarm-check workflow
participant Runner as lens-runner.sh
participant Git
participant LensCLI as selected lens CLI
Workflow->>Runner: Run maintainability, history, or structure lens
Runner->>Git: Read main..HEAD diff
Runner->>LensCLI: Send lens prompt and diff
LensCLI-->>Runner: Return review output
Runner-->>Workflow: Return pass or failure status
Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
maintainability lens — PASSMaintainability review — PR #123 (preswarm-check)The runner is legible, boundaries are stated, and the fail-closed reasoning around Concerns
Notes
The code is safe to iterate on. The concerns are real but each is documented as a known follow-up. REVIEW_PASSED |
history lens — FAILBlockers:
Concerns, not blockers: prompt consolidation, empty-diff refusal, and a classifier harness are explicitly documented deferrals and are acceptable for scaffolding. REVIEW_FAILED |
structure lens — PASS→ Read AGENTS.md Structure lens reviewShape assessment. The diff adds three files entirely outside The No product-in-kernel, no primitive-added. The runner shells out to Concerns
Notes
No structural blockers. The three limitations are documented loudly and deferrals are named, matching AGENTS.md's no-speculative-abstraction stance. REVIEW_PASSED |
|
[superseded — head 46f5356, iter 2: PASSED requires CLI_RC==0 + self-modification warning] |
3f83952 to
46f5356
Compare
maintainability lens — PASSDiff reviewed against AGENTS.md + RFC-0001. Two new files ( ConcernsC1 — C2 — Empty-diff PASSES silently is dangerous for a pre-flight tool. C3 — Prompt drift is present at merge, not just theoretical. The history-lens prompt in C4 — Zero tests for the classifier, in a file explicitly framed as a review gate. README Notes
Scaffolding-first PR that is honest about its debts, single-purpose files well under the 500-line smell, matches AGENTS.md standards. Nothing rises to a blocker under maintainability alone — the code is readable in six months — but C1+C4 together mean it will be hard to safely change in six months, which is precisely the lens question. Recommend fixing at least C2 (cheap, prevents false green) and C4 (short shell harness) before this becomes load-bearing. REVIEW_PASSED |
history lens — FAILBlockers
The documented prompt-drift, classifier-test, and empty-diff deferrals are concerns, not additional blockers under the scaffolding carve-out. REVIEW_FAILED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md $ git log --oneline -40 $ ls -la && echo "---OPS---" && ls -la ops/ 2>/dev/null && echo "---WORKFLOWS---" && ls -la workflows/ 2>/dev/null → Read workflows/review-swarm.yaml Structure review — PR #123 (
|
|
[superseded — head 038d0ff, iter 3: structural self-judge refusal + accepted-as-limitation deterministic-vs-llm] |
46f5356 to
038d0ff
Compare
maintainability lens — PASSMaintainability review — PR #123 (pre-swarm-check)Scaffolding-first PR that documents its own deferrals explicitly. The runner is well-commented, the classifier reasoning is spelled out, and known limitations are enumerated in the README. Concerns below are real but none rise to a stranger-can't-change-this-safely blocker. Concerns
Notes
Scaffolding lands cleanly; the concerns above are next-PR work, not gate-blocking. REVIEW_PASSED |
history lens — FAILBlockers
Concern, not an additional blocker The branch-local runner judges a diff that may modify that runner itself. The diff acknowledges this and directs users to the main-owned post-push swarm as authoritative (README.md lines 71–80, lens-runner.sh lines 86–101). Given its explicitly advisory preflight scope, I do not treat this as a new RFC-0001 decision-6 contradiction, but “safe to push” should remain carefully distinguished from an authoritative gate. The documented classifier tests, empty-diff policy, timeout coupling, and prompt consolidation are acceptable scaffolding deferrals. REVIEW_FAILED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md Structure-lens review — PR #123 (pre-swarm-check)I read AGENTS.md, RFC-0001, Concerns
Notes
No blocker: the shape honors the closed-vocabulary / fail-closed / file-size rules; the concerns are deferred-but-named scaffolding debt. REVIEW_PASSED |
|
[superseded — head f691a90, iter 4: serial-not-parallel corrected + numstat pasted verbatim] |
038d0ff to
f691a90
Compare
maintainability lens — FAILReview — MAINTAINABILITY lens on PR #123 (pre-swarm-check) The diff is scoped scaffolding with unusually candid deferral notes. Most of the design is defensible on maintainability grounds — fail-closed classifier, self-judge refusal, verbose comments that explain the why of Blockers
Concerns
Notes
REVIEW_FAILED |
history lens — FAILBlocker — commit-message untruthThe commit message claims the workflow has “three parallel deterministic steps.” The README repeats that execution finishes in roughly the slowest lens’s duration ( This is demonstrably not an ambiguous prediction: preserved branch head Concerns — non-blockingThe LLM-backed steps are knowingly mislabeled Likewise, self-judgment is explicitly non-authoritative and refused by default, with the main-owned post-push swarm retained as the real gate ( REVIEW_FAILED |
structure lens — FAIL→ Read AGENTS.md Structure lens reviewBlocker — LLM work typed
This is not cosmetic. Hiding an LLM behind a shell script typed Concerns
Notes (correct, worth preserving) The classifier's fail-closed ordering is the best shape in the diff: FAILED checked before PASSED; PASSED gated on REVIEW_FAILED |
|
[superseded — head 39b967a, iter 5: committed-diff-not-working-tree fixed, stray parallel claim removed, numstat updated] |
f691a90 to
39b967a
Compare
maintainability lens — PASSMaintainability review — PR #123 (pre-swarm-check)Overall shape. The diff is well-commented scaffolding: every design choice Concerns (not blockers)
Notes
REVIEW_PASSED |
history lens — FAILBlocker
Concerns
Notes
REVIEW_FAILED |
structure lens — FAIL$ cat AGENTS.md 2>/dev/null | head -120; echo "===== RFC ====="; cat docs/RFC-0001-everything-is-a-relayflow.md 2>/dev/null | head -200 Standards for every agent working in this repoYou are building the base a company stands on, presented at YC on 2026-09-15. Code standards — clean and tight, enforced
Rails
ObservabilityPrefer launching runs through It is not a correctness requirement, and a local run is not a defect. This paragraph previously said every run MUST join the canonical workspace and Evidence is captured, not narratedSix consecutive review rounds on one PR rejected on claims about evidence Therefore:
The code being right does not rescue a report that is wrong. A reviewer can RFC-0001: Everything is a Relayflow
1. ThesisA Relayflow is a deterministic script that composes agentic primitives — an LLM call, an agent, a virtual filesystem, memory, identity, and authorization — into anything from a one-shot pipeline to a resident harness to an entire application. The product thesis in one line: we are taking prompting and making it reliable, with natural rails and gates. The primitives form a ladder, and every rung is a legal relayflow:
The three covenantsEvery gate, surface, and SDK is bound by three covenants, born from real cofounder friction with the current engine: Covenant 1 — easy to write, easy to read. A relayflow's spec reads like the plan it came from. The measure is the cofounder test: a technical founder writes their first working relayflow in under ten minutes without reading engine docs, and can read a stranger's flow aloud and say what it does. Error messages name the author's mistake in the author's vocabulary, never engine internals. Sage is the zero-syntax on-ramp (conversation → spec). Authoring friction is a gate-blocking defect, not a docs problem. Covenant 2 — no unexpected failures. A relayflow may fail only in ways it declared. Two mechanisms enforce this:
Covenant 3 — goals, not babysitting. A flow given a goal runs to completion or to a declared human gate — it never stops to ask permission for work inside its scope, and it never ends a report with "want me to start it?" (if the next step is in scope, it is already started). Human approval exists only where the flow declared it ( The engine underneath must be competitive with Temporal and Inngest as durable execution, and agentic-leading where those engines are structurally blind:
The kernel remains what the charter's phase 4 specified: step journal, idempotency keys, one lease primitive, durable timers, retry with backoff + jitter, built against a simulated clock, with 2. The method: rewrite relayflows using relayflowsThe rewrite is not a project about relayflows; it is a program of relayflows. Every capability below ships as a relayflow, and the acceptance gate for each relayflow is that it supports the use case it exists to achieve — not that its tests pass, not that a demo runs once, but that the real consumer (a persona, the garden, chief) runs on it. Rules of the program:
The Relayflow LeadYes — immediately, and it is the first consumer of this document. The Relayflow Lead is a chief-shaped system fully dedicated to relayflows: it encodes RFC-0001 as its constitution, runs long-lived in the cloud, and Khaliq speaks to it directly. It coordinates the entire product lifecycle — sequencing the gates, dispatching gate work to the Garden/factory machinery that exists today, running the review swarm and the rulebook flows, tracking design-partner acceptance evidence, and reporting state honestly. Per gate 4 it is not a long-running agent but a system: a loop of ephemeral agents over durable state (this RFC, the journal, the repo, its memory). It bootstraps now on the existing persona/chief machinery — the 0825 charter already appointed a Gate dependency orderGates 5–8 are horizontal capabilities that start as soon as gate 1 holds and are consumed by 2–4. Gate 9 closes the loop and depends on 5 + 8. 3. The nine gatesGate 1 — a relayflow can runProves: the kernel. Journal + memoization, resume without re-execution of completed steps, deterministic and agent steps, verification as control flow. Forces into existence: Done when: the canonical hello ladder — (a) a pure deterministic flow with zero agents (legalizing what today's validator rejects), (b) the same flow plus a bare Exists today: Gate 2 — a relayflow can power a proactive agentProves: triggers are entry conditions, not schedulers. Webhook ( Persona import is first-class: Done when: Exists today: cloud webhook router binds Gate 3 — a relayflow can power a factory → Software GardenProves: the flagship DAG. Discover → implement → review → merge-gate → close, on kernel leases instead of factory's ~10 hand-rolled claim protocols ( The rebrand is part of the gate: Software Garden is the presentation layer a customer authors against without ever meeting a lease, a journal, an attempt counter, or a dedupe key (charter phase 8). Factory's Done when: a labeled issue flows to a reviewed PR end-to-end with every claim/lease/retry served by the kernel, the merge gate holding (no auto-merge without opt-in), and the run legible in the journal — while the customer-facing config surface mentions none of it. Gate 4 — a relayflow can run chief (a relayflow can be a harness)Proves: resident runs, not resident processes. Chief is not a single long-running agent — it is a system: a loop of many agents, none of them long-running, over durable state. No agent outlives its step; what persists is the run — the journal, the backed filesystem (the relayfile mount), and memory (gate 5). "Chief" names the loop, not a process. That is how it runs for months or years: there is nothing to keep alive, only state to keep consistent. Done when: chief's loop — surface intent → dispatch → checkpoint → approval — runs for a week of real use (design target: indefinitely) with every participating agent ephemeral, waking on triggers and sleeping between them, and the whole system restartable at any moment from journal + mount + memory alone: kill every process, resume, no lost or duplicated dispatches. Skip attaches as a client of the run/event API, proving harness = relayflow + renderer. The context answer. A chief-like entity does not have a context problem, because it does not have a session. History and context are different things: history is the append-only journal (complete, auditable, never fed wholesale to a model); context is a view assembled per wake — the current epoch summary (structural compaction: everything still live, with the full segment archived losslessly), the triggering event and its surface thread (relayfile), and task-relevant memory packs retrieved from relayhistory, token-budgeted and charged to the step. The model's window bounds the view, never what the system knows. The hard part moves rather than vanishes — from "impossible: window limit" to "tractable: retrieval quality" — which is gate 5's acceptance test and why evals are first-class. The corollary is a product: what the market sells as "an agent" — Viktor, Tembo, Tasklet, Warp — is in relayflows terms a small system: triggers (gate 2) + ephemeral agent steps + a backed filesystem + memory (gate 5) + identity (gate 8) + performance review (gate 9). It self-improves and never dies because it was never alive. Once gate 4 holds, "build an agent" is an afternoon of authoring, not a product category we have to chase. Gate 5 — a relayflow has memory: for the script, and per agentProves: memory is a kernel-adjacent concept with two scopes:
Done when: a step can declare Exists today: relayhistory (Rust, SQLite/FTS5, MCP server, Gate 6 — integrations are first-class via relayfile, with no
|
|
[superseded — head c453ffc, iter 6: FINAL-verdict-token classifier + explained-not-blocked llm-migration blocker] |
39b967a to
c453ffc
Compare
maintainability lens — PASSReviewing through the maintainability lens. ReviewOverall shape. The diff is well-documented and honest about its scope, limitations, and follow-ups. The runner is dense but the comments earn their keep — they explain non-obvious why (deliberately no Concerns (worth fixing, not blocking)1. 2. Classifier has no test that pins FAIL-first ordering — 3. Rulebook drift between preswarm and review-swarm partially defeats the preflight — 4. Self-judge regex is narrower than its documented promise — Notes (not action items)
REVIEW_PASSED |
history lens — FAILBlocker — repeats a recorded review-swarm mistake. Concerns — non-blocking under the scaffolding carve-out.
Notes. The commit’s one-commit scope, four touched files, and numstat counts match the actual diff. I found no false test claim or other commit-message untruth. REVIEW_FAILED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md $ ls -la && echo "---OPS---" && ls -la ops/ 2>/dev/null && echo "---WORKFLOWS---" && ls -la workflows/ 2>/dev/null && echo "---SCRIPTS---" && ls -la scripts/ 2>/dev/null $ git log --oneline -15; echo "---BRANCH---"; git branch --show-current 2>/dev/null; git log --oneline main..HEAD 2>/dev/null | head -20 → Read workflows/review-swarm.yaml STRUCTURE lens — PR #123 (preswarm-check)Shape verdict: clean on the three explicit criteria; one vocabulary mismatch sits very close to the blocker line. The three named sins — none present
Positives worth naming
Concerns (close to blocker)
BLOCKERS: none that rise to the three structural sins. REVIEW_PASSED |
|
[superseded — head aee77b2, iter 7: rewrote classifier comment to describe ONLY current behavior] |
maintainability lens — PASSMaintainability Review — PR #123SummaryThe diff introduces a self-contained preflight (README + shell runner + workflow spec) with unusually candid documentation of its own limits. Nearly every subtle contract in Concerns
Notes
The diff is scaffolding-quality with self-aware limits. A six-month reader has enough breadcrumbs to change it safely. REVIEW_PASSED |
history lens — FAILBlocker — commit-message untruth. The sole commit says its The commit message also describes the classifier as “FAILED first, then PASSED” and calls that ordering plus a Concern, not an additional blocker — all three flow steps are typed No previously fixed behavior appears reintroduced in the executable classifier. Correct the commit message’s counts and classifier description before approval. REVIEW_FAILED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md $ ls ops/ workflows/ 2>/dev/null; echo "---"; ls kernel/ 2>/dev/null workflows/:
|
|
[superseded — head 9db3779, iter 8: numstat refreshed, classifier description matches implementation, README stale ordering claim removed] |
c453ffc to
aee77b2
Compare
Dogfoods gate 1: a real relayflow (workflows/preswarm-check.yaml)
with three deterministic steps, invoked as
`flows run workflows/preswarm-check.yaml`. Each step runs a lens
(maintainability/history/structure) locally against the committed
branch diff versus `main`; the kernel's implicit `exit_code == 0`
gate on deterministic steps is the sole correctness authority.
Purpose: catch the class of commit-message-truth issues (count off,
"verbatim" not really verbatim, path wrong, fail-open-called-
fail-closed) locally, before the post-push review-swarm burns a
~4-minute cycle surfacing them.
WHAT SHIPS (against main, one commit). Numbers from
`git diff main..HEAD --numstat`, pasted after staging and before
writing this message:
2 0 .gitignore
117 0 ops/preswarm-check/README.md
259 0 ops/preswarm-check/lens-runner.sh
53 0 workflows/preswarm-check.yaml
Behavioral summary
- `workflows/preswarm-check.yaml` — 3 deterministic steps, one per
lens. All three declare `dependsOn: []` so all three are runnable
when the flow starts. The current kernel dispatches deterministic
steps SERIALLY within a run, so wall-clock is ~sum of the three
lens durations, not ~max. `timeoutMs: 930000` gives the runner
(LENS_TIMEOUT=900s default) 30s headroom to classify NO_VERDICT
before the step ceiling fires — in the COMMON path; see known
limitations for the exceptions.
- `ops/preswarm-check/lens-runner.sh`:
1. Detects `timeout` / `gtimeout` (macOS ships neither by default)
and falls back to uncapped with a stderr warning.
2. Reads `git diff $BASE_REF..HEAD` (BASE_REF defaults to `main`)
with stderr split to a separate temp file so git warnings do
not contaminate the diff.
3. REFUSES with exit 3 when the diff modifies the pre-swarm-check
itself — self-judging gate, RFC-0001 settled decision 6.
PRESWARM_ALLOW_SELF_JUDGE=1 overrides with the understanding
that the local outcome is not authoritative.
4. Empty diff → stderr warning + exit 0 (footgun documented).
5. Prompt passed on STDIN (not argv) so a large refactor does not
exceed ARG_MAX (~256KB on macOS).
6. Classification: extracts the LAST anchored REVIEW_PASSED /
REVIEW_FAILED line in the CLI output and dispatches on that
single value. Never uses "any FAILED in the tail" — a review
that quotes an earlier rejection while itself concluding PASSED
resolves as PASSED (the DRIVE-LOG entry f59d9cd fix preserved).
Fail-closed shape: LAST_VERDICT missing OR PASSED-with-non-zero-
CLI-exit both degrade to NO_VERDICT (exit 1).
- `ops/preswarm-check/README.md` — usage, environment, known
limitations (self-judging refusal, `deterministic`-vs-`llm`
vocabulary mismatch, serial-not-parallel dispatch, rulebook
drift, empty-diff footgun, no classifier test).
- `.gitignore` — ignore `.relayflowd/` and `.relayflowd-*/`.
KNOWN LIMITATIONS (documented in the README)
- **Self-judging refusal**: this shipping version REFUSES to run
when the diff touches its own files; overridable with
PRESWARM_ALLOW_SELF_JUDGE=1. The post-push swarm running from main
IS the authoritative check for a self-touching PR.
- **`type: deterministic` on LLM-shell-out steps**: RFC-0001 §2
reserves `deterministic` for pure scripts. The SDK's LlmStepSpec
ships (`prompt` / `model` / `cli`) and preflight probes CLI
existence + auth health, but `llm` steps embed a STATIC prompt at
spec-write time — the pre-swarm-check needs to inject the
CURRENT diff at run time. Until the SDK supports prompt
templating in `llm` steps, a `deterministic` step that shells out
to a runner that builds the prompt with the live diff is the
only shape available. Named as a follow-up.
- **Serial dispatch, not parallel**: the kernel currently runs the
three declared-independent steps one at a time. Wall-clock is
roughly the sum, ~10-15 min total. Parallel dispatch inside a
single flow run is a kernel follow-up.
- **Rulebook drift**: prompts here are similar to but not identical
to `workflows/review-swarm.yaml` (the history-lens local prompt
adds a "scaffolding PRs PASS" carve-out the post-push swarm YAML
does not). Consolidating both into a single source file is the
fix; not done here.
- **Empty-diff PASSES with a stderr warning**. `--require-diff`
flag is a follow-up.
- **No classifier test**. The final-verdict-token discipline is
load-bearing but not pinned by a test. A canned-output shell
harness would pin it; deferred.
- **`LENS_TIMEOUT` vs `timeoutMs` interaction**: two ceilings that
must move together. When neither `timeout` nor `gtimeout` is
present the runner runs uncapped and can hit the kernel's 930s
step ceiling before classifying. Named in README.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
aee77b2 to
9db3779
Compare
maintainability lens — PASSMaintainability review — PR #123 (pre-swarm-check)BlockersNone. Scope is preflight scaffolding, boundaries stay outside the kernel, and the known-limitations list is honest. Concerns
Notes
REVIEW_PASSED |
history lens — FAILBlocker — commit message is materially untrueCommit Thus the message misstates both scope and evidence—the exact failure class it says this feature prevents. The affected files actually span The commit message also says “FAILED-before-PASSED and Concern — non-blocking scaffolding deferral
NoteThe verdict implementation does not repeat the DRIVE-LOG’s earlier whole-transcript/substr-match mistake: it correctly uses the last anchored verdict. The self-judgment path also refuses by default and labels its override non-authoritative. REVIEW_FAILED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md Structure lens review — PR #123 Boundaries / kernel. No kernel code is touched (the diff is ops shell + YAML surface; the kernel is Concerns (not blockers):
Notes. The shape is sound and fail-closed throughout; the one genuine RFC deviation is honest, bounded, and has a concrete migration path. REVIEW_PASSED |
maintainability lens — PASSMaintainability review — PR #123 (pre-swarm-check)Overall the diff is unusually well-commented and the fail-closed discipline is right. Real concerns clustered around implicit contracts, silent classifier failure modes, and untested gate code. Concerns
Notes
None of these rise to "a stranger cannot safely change this in six months" — the code is legible and the fail-closed shape is correct. The CRLF classifier fragility and the untested classifier are the two I would want fixed before this is trusted as a preflight; both are cheap. REVIEW_PASSED |
history lens — PASSNo blockers. The diff does not repeat the DRIVE-LOG’s prior verdict-classification mistake: RFC-0001 decision 6 is respected for authoritative review. The commit message’s scope and counts are truthful: the four files and numstat values exactly match the diff, its serial-dispatch statement matches Concerns, not blockers:
REVIEW_PASSED |
structure lens — PASS→ Read docs/RFC-0001-everything-is-a-relayflow.md $ ls -la /Users/khaliqgant/AgentWorkforce/flows-ops && echo "---OPS---" && ls -la /Users/khaliqgant/AgentWorkforce/flows-ops/ops 2>/dev/null && echo "---WORKFLOWS---" && ls -la /Users/khaliqgant/AgentWorkforce/flows-ops/workflows 2>/dev/null → Read workflows/review-swarm.yaml $ cd /Users/khaliqgant/AgentWorkforce/flows-ops && git log --oneline -15 && echo "---BRANCH---" && git branch --show-current Structure lens review — PR #123 (flows)What the diff is: a surface-only addition — a pre-flight runner script ( No product logic in the kernel. The diff adds nothing to Fail-closed discipline is exemplary. The classifier in Self-judge refusal is decision #6 done right. Concern (the one shape mismatch): the flow types its three lens steps Notes. REVIEW_PASSED |
|
🎯 review-swarm: PASSED (M:pass H:pass S:pass) Lens transcripts posted as sibling comments above. |
Real relayflow (
workflows/preswarm-check.yaml) that runs the same three lens shape as the post-push review-swarm — LOCALLY, before pushing — so the swarm doesn't have to spend ~4 minutes per iter surfacing the class of commit-message-truth issues that burned 9 iters on PR #122.Read the commit message for the full behavioral summary, the eight iterative fixes the pre-swarm-check caught on itself during dogfood, and the known-limitations list. This body covers the shape.
What it is
workflows/preswarm-check.yaml— 3 parallel deterministic steps, one per lens (M/H/S).ops/preswarm-check/lens-runner.sh— per-lens invocation script.ops/preswarm-check/README.md— usage + known limitations..gitignore— ignore.relayflowd/+.relayflowd-*/.Gate
No
output_containsgate. The kernel's implicitexit_code == 0on deterministic steps is the sole authority — the runner exits 0 onREVIEW_PASSED, 1 onREVIEW_FAILEDorNO_VERDICT. Earlier iterations addedoutput_contains: "PRESWARM_<lens>: REVIEW_PASSED"but the maintainability lens caught that as fail-open (the lens body can quote the marker string from the diff itself). Fixed.Self-dogfood record
Pre-swarm-check reviewed its own PR while I was building it. In ~15 minutes it caught ~10 real issues (see the "Design decisions I got wrong first and then fixed" section of the commit body). Each of those would have been a ~30-minute post-push swarm cycle. This is the value proposition working, on the first-ever run.
Test plan
flows check workflows/preswarm-check.yaml→CHECK PASSED(with expectedunprovable_effectswarnings on shell-out commands, matchinghello-deterministic.flow.yaml)flows run --data-dir .relayflowd-preswarm workflows/preswarm-check.yamlexecuted on the branch's own diff; kernel dispatched the deterministic step, ran the lens, correctly failed onREVIEW_FAILEDexit codesh ops/preswarm-check/lens-runner.sh maintainabilityverified the lens produces reviews AND emits thePRESWARM_<lens>: REVIEW_PASSED/FAILEDmarker line