How Preflight works
One request fans out to five agents and collectors on Cloudflare's edge. Deterministic code decides everything it can; models only extract rules, judge what code cannot, and coach. Every claim in the report points at a quote or a piece of collected evidence.
Why it is built this way
- Rules come from the event, not from us. Every hackathon words its requirements differently. The rules agent reads the event's own overview and rules pages and returns typed requirements, each routed to one of 12 checkers or, as "other", to the judge.
- Quote grounding. Each extracted requirement must carry a verbatim quote. Preflight searches for it in the page text (exact, then a token-window match at 85%). Quotes that are not on the page are dropped and listed in the report. Numbers the checkers rely on (a 3-minute video limit, a team size of 4) are only kept if that number is in the quote.
- Code decides first. Repository visibility, license, README setup, video length, live URL health, build window from the event's structured dates, team size, language and screenshots are all decided by plain code. The judge model only sees what code could not decide.
- Quote or it doesn't count. The judge gets numbered evidence and must copy a verbatim span from what it cites; code looks for that span and downgrades the verdict to "check by hand" if it is not there. A fail by absence must name the items it searched. A coach fix without an evidence id is dropped.
- The judge can look things up. When a rule names a file or page (an agent manifest, a runtime file, a LICENSE), round 1 may answer
need_morewith up to 4 reads. Code serves them only from the submission's own repository tree or the demo's own origin, adds them as new evidence (E-file-N,E-page-N), and round 2 decides those items. - Submissions are untrusted input. README, Devpost and site text reach the models inside
<untrusted_document>delimiters, and a pattern check flags text that tries to instruct an AI grader. "Ready" is only shown when no mandatory item failed and none is left unverified. - Degrade, don't crash. Each stage reports start / done / error on the stream. Model calls run through a chain (
gpt-oss-120b→gpt-oss-20b→llama-4-scout) with a timeout and one repair turn for invalid JSON. If every model is out of quota, rules fall back to a keyword extractor and the judge hands items to a human. GitHub rate limits fall back to raw files. Hosts that block Workers egress go through an allowlisted relay; if that is down too, the user can paste the rules text. - Cheap to run. Rules are cached per event for 6 hours and repository facts for 10 minutes in Workers KV. Identical audits within 15 minutes replay the stored report. Organizer screening skips the coach and runs two projects at a time.
Stage contracts
| Stage | Input | Output | On failure |
|---|---|---|---|
| Scout | Devpost project URL | repo, live URL, video, hackathon | user-supplied links only |
| Rules agent | event pages | grounded requirements + rubric | keyword extraction, or pasted rules |
| Repo collector | GitHub URL | visibility, license, tree, README, commit dates | raw.githubusercontent fallback |
| Site / video probes | URLs | status, latency, title, placeholder; oEmbed, length | verdict "unknown" with reason |
| Checkers | requirements + facts | verdicts with evidence ids | pass the item to the judge |
| Judge | undecided items + evidence (+ requested reads) | verdicts with verified support quotes | "check by hand" |
| Coach | rubric + results + evidence | weighted, cited fixes | section omitted with a note |
Security
- Outbound fetches refuse localhost, private and link-local addresses, including after redirects, and cap body size and time.
- The relay only fetches
devpost.com,*.devpost.comand YouTube watch pages, requires a shared token, and is rate limited. - Judge reads are limited to files listed in the repository tree (via raw.githubusercontent.com) and paths on the demo's own origin, 4 per audit, size-capped.
- Each visitor can start 15 fresh audits an hour (hashed IP); replays and permalinks are free.
- All page and model text is escaped before it reaches the DOM.