AGENTS.md directory

Fresh

The Deno web framework built on Preact.

Nine numbered steps of the request lifecycle, with the owning file at each hop.

By the numbers

156
Lines
848
Words
about 4 min read
6.4kB
File size
14
Headings
36
Bullet rules
0
Code blocks
0
Links to other docs
13.8k
Repo stars

File measured on main at commit 86d6cde. Analysis written 2026-09-14. Star count is a snapshot from September 2026.

What kind of file this is

Over half its length is architecture: how a request becomes HTML, how islands hydrate on the client, how the two build paths differ. Rules are the minority of the file.

Techniques in this file

Quoted lines are verbatim from the file. Open one to see it where it sits.

The request lifecycle, numbered

Architecture as narrative

Nine steps from handler to response, naming the file at each hop: routing, context creation, the middleware chain built as nested closures, layout composition, render, the boot script, and the response headers.

The island mechanism, both halves

On the server a diff hook wraps island components in HTML comment markers and collects their props into an array. On the client, boot walks the DOM for those markers and hydrates each one. The marker format is given, which is the contract the two halves share.

Three git rules covering irreversible operations

Hard prohibitions

Never amend, never force push, always create new commits. Lockfile changes are not committed unless the PR is about dependencies, with the reason given as noisy and environment-specific diffs.

One command standing in for CI

A single task runs formatting, linting, type checking and tests, and is named as the thing to run before pushing. The CI section below lists the eight steps the pipeline runs, so the coverage of the shortcut is visible.

A known-bad situation with its upstream issue

Lockfile hashes pointing at a moving branch go stale, and the normal reload command cannot fix them. The file states that the hash is edited by hand in that case and links the upstream issue.

Takeaways for your own repo

  • Write the request lifecycle as numbered steps with the owning file at each hop.
  • Give the agent one command that stands in for CI, and list what it covers.
  • State the irreversible git operations as absolute prohibitions.
  • Where a normal command cannot fix a known problem, say so and link the upstream issue.

How the file is organized

  1. 01Repository Overview
  2. 02Packages
  3. 03Git Workflow
  4. 04Development
  5. 05Architecture
  6. 06Routing
  7. 07Build system
  8. 08Partials
  9. 09CI
Read the full file on GitHub

Context your AGENTS.md cannot carry

Fresh's file tells an agent how the codebase works. It cannot tell it which bug three customers hit this week. Modem keeps that context current and attaches it to the work.