AGENTS.md directory

Ghostty

Fast, cross-platform terminal emulator with native UI and GPU acceleration.

Thirty-nine lines: build commands, three directories and two absolute rules.

By the numbers

39
Lines
214
Words
about 1 min read
1.4kB
File size
5
Headings
19
Bullet rules
0
Code blocks
0
Links to other docs
61.1k
Repo stars

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

What kind of file this is

The shortest file in the directory. It covers how to build, how to run a subset of tests, where the three main source trees are, and what the agent may not open on GitHub.

Techniques in this file

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

A prohibition with a defined response

Contribution etiquette

Never create an issue, never create a PR. The rule then specifies what to do if the user asks anyway: write a line into the diff. The effect is that the instruction shows up in the change rather than in a GitHub action.

The cost of the test suite, stated

Verification by change type

Targeted tests are preferred because the full suite is slow, and the filter flag is given twice, once for the main suite and once for the vt library.

A build flag for work the agent does not need

On macOS, a flag skips the app bundle when it is not needed, which speeds up compilation.

One portability rule where it applies

Every C enum in the public header directory takes a max-value sentinel to force integer sizing, with pre-C23 portability given as the reason.

Takeaways for your own repo

  • State which test command to use and why the obvious one is wrong.
  • For a rule that must not bend, define what happens when the user asks anyway.
  • Note the build flags that skip work the agent does not need.
  • A short file that is current beats a long one that is not. This one is 39 lines.

How the file is organized

  1. 01Commands
  2. 02libghostty-vt
  3. 03Directory Structure
  4. 04Issue and PR Guidelines
Read the full file on GitHub

Context your AGENTS.md cannot carry

Ghostty'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.