the signals and their derived score are provisional and subject to change.
validate manually before sharing.
2f967e3a6ab231188c29a97fb422e479a254e97c6417d3023e572 weeks agoCo-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>72e5434351032 weeks agoCo-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>438d584f06691 month agoClaude-Session: https://claude.ai/code/session_01EFZKUd9WPnnojj5RiDeA1za7cf951ebe451 month agoClaude-Session: https://claude.ai/code/session_01H2NEUyBqXoyVpDXjXkqh8pa141f9bdb3af1 month agoClaude-Session: https://claude.ai/code/session_01H2NEUyBqXoyVpDXjXkqh8p4eb3088316b71 month agoClaude-Session: https://claude.ai/code/session_01PQKfAq9x9wJG5Vfy31Um65ef7edc4a24cf1 month agoClaude-Session: https://claude.ai/code/session_01RsfB3eoSTLfnKa6zi25teN607d59b0e8ef1 month agoClaude-Session: https://claude.ai/code/session_019aW9GqQj7USLWhmzNhuE34ff5b87e4dbef1 month agoClaude-Session: https://claude.ai/code/session_019aW9GqQj7USLWhmzNhuE34623106cc4ea91 month agoDeveloped with AI assistance (Claude Code). The bug was found byaafacb1cb9401 month agoCo-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>3baff3a069cb2 months agoClaude-Session: https://claude.ai/code/session_01QfzQME46DQXwMWa43bQaa3caf48a41ee5c2 months agoClaude-Session: https://claude.ai/code/session_01QfzQME46DQXwMWa43bQaa37a171895ddf72 months agoCo-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>b112f3954ce72 months agoCo-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>daab08ec01582 months agoCo-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>e5b65a2ce3164 months agoThis PR was largely generated by Claude Code and fully reviewed/refined2e5ad917eb4e5 months ago🤖 Generated with [Claude Code](https://claude.com/claude-code)9910a1a4753c5 months agoCo-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>0708f932a51d5 months agoCo-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>0b6d91e531a15 months agoCo-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>14d9e600acf25 months agoCo-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>88d30bb30a025 months agoCo-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>5ea45919d7095 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>14c06312d5416 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2e169c42e8336 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>2bdc6bb1f7f26 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>335d7f01db657 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>c5bb97bcbda87 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>81e21e4d0a4e7 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>68378a0bb8a67 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>ce99300513df7 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>deeda46186917 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>a35f84db32e87 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>d5aef6e845ed7 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>f9d3b1aafb417 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>74c6ffe78e4b7 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>014873e539a67 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>4df71bcad75a7 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>c5092b09ded67 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>7d31d9b57f707 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>c1e616c6cda47 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>f2773d42c1c47 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>5ef2da8127507 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>909e733120677 months agoCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>0af9938ad2f27 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a6cd1b08af247 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cfedda1a0e917 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4885a53a98387 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7777dedd5f357 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>19feaa058b338 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>34473b069bd78 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6da660a9a5eb8 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>96f8f0d93c198 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2a41401463c38 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b65261eb66438 months agoCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>32562e0c983c9 months agoCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>2d9c83dbb7ee10 months ago🤖 Generated with [Claude Code](https://claude.com/claude-code)# Terminal Binary Snapshot
- Apply the robustness principle: "be conservative in what you do, be liberal
in what you accept from others."
- Validate on encode
- Gracefully degrade on decode, for example invalid styles degrade to
ignoring the style.
# Inspector Subsystem
The inspector is a feature of Ghostty that works similar to a
browser's developer tools. It allows the user to inspect and modify the
terminal state.
- See the full C API by finding `dcimgui.h` in the `.zig-cache` folder
in the root: `find . -type f -name dcimgui.h`. Use the newest version.
- See full examples of how to use every widget by loading this file:
<https://raw.githubusercontent.com/ocornut/imgui/refs/heads/master/imgui_demo.cpp>
- On macOS, run builds with `-Demit-maco# Terminal Compression
Guidance for the codecs and the compressed page representation
(`Page.zig`) in this directory. These compress terminal page backing
memory (`terminal.Page`).
## Priorities
When making tradeoffs, in order:
1. **Compression ratio on page-shaped data.** Encoded bytes are retained
scrollback memory, and raw `terminal.Page` backing memory is the only
thing we actually compress. Ratio on text files or synthetic data is a
secondary signal.
2. **Decompression throughput.** Pages # AFL++ Fuzzer for Libghostty
- Build all fuzzer with `zig build`
- The list of available fuzzers is in `build.zig` (search for `fuzzers`).
- Run a specific fuzzer with `zig build run-<name>` (e.g. `zig build run-parser`)
- Corpus directories follow the naming convention `corpus/<fuzzer>-<variant>`
(e.g. `corpus/parser-initial`, `corpus/stream-cmin`).
- Do NOT run `afl-tmin` unless explicitly requested — it is very slow.
- After running `afl-cmin`, run `corpus/sanitize-filenames.sh`
before committing# macOS Ghostty Application
- Use `swiftlint` for formatting and linting Swift code.
- If code outside of `macos/` directory is modified, use
`zig build -Demit-macos-app=false` before building the macOS app to update
the underlying Ghostty library.
- Use `macos/build.nu` to build the macOS app, do not use `zig build`
(except to build the underlying library as mentioned above).
- Build: `macos/build.nu [--scheme Ghostty] [--configuration Debug] [--action build]`
- Output: `macos/build/<configurati# Agent Development Guide
A file for [guiding coding agents](https://agents.md/).
## Commands
- **Build:** `zig build`
- If you're on macOS and don't need to build the macOS app, use
`-Demit-macos-app=false` to skip building the app bundle and speed up
compilation.
- **Test (Zig):** `zig build test`
- Prefer to run targeted tests with `-Dtest-filter` because the full
test suite is slow to run.
- **Test filter (Zig)**: `zig build test -Dtest-filter=<test name>`
- **Formatting (Zig)**: `zig# Example Libghostty Projects
Each example is a standalone project with its own `build.zig`,
`build.zig.zon`, `README.md`, and `src/main.c` (or `.zig`). Examples are
auto-discovered by CI via `example/*/build.zig.zon`, so no workflow file
edits are needed when adding a new example.
## Adding a New Example
1. Copy an existing example directory (e.g., `c-vt-encode-focus/`) as a
starting point.
2. Update `build.zig.zon`: change `.name`, generate a **new unique**
`.fingerprint` value (a random `u64` he# libghostty-vt C API
- C API must be designed with ABI compatibility in mind
- Zig tagged unions must be converted to C ABI compatible unions
via `lib.TaggedUnion`.
- Any functions must be updated all the way through from here to
`src/terminal/c/main.zig` to `src/lib_vt.zig` and the headers
in `include/ghostty/vt.h`. Specifically:
1. Define the function in `src/terminal/c/<module>.zig`.
2. Re-export it via a `pub const` in `src/terminal/c/main.zig`.
3. Add an `@export` call in `src/lib_vt.zig`# Glyph Protocol
- The specification source of truth is:
<https://github.com/raphamorim/rio/blob/main/specs/glyph-protocol.md>
- A summary of the specification is available in
`src/terminal/apc/glyph.zig` at the top.
- Reference the specification whenever any changes are made to
this folder. Prefer the local specification over fetching the
latest, unless it is lacking information.
# Benchmarking
The benchmark tools are split into two roles:
- `ghostty-gen` generates synthetic input data.
- `ghostty-bench` consumes existing input data and runs a benchmark.
## Workflow
- For timing comparisons, generate data first and benchmark it later.
- Do not pipe `ghostty-gen` directly into `ghostty-bench` when comparing
performance. That mixes generation cost into the measurement and makes
branch-to-branch comparisons noisy.
- Reuse the exact same generated files when comparing revisions.---
name: writing-commit-messages
description: >-
Writes Git commit messages. Activates when the user asks to write
a commit message, draft a commit message, or similar.
---
# Writing Commit Messages
Write commit messages that follow commit style guidelines for the project.
## Format
```
<subsystem>: <summary>
<reference issues/PRs/etc.>
<long form description>
```
## Rules
### Subject line
- **Subsystem prefix**: Use a short, lowercase identifier for the
area of code changed (e.g., `terminalnone