agentleFS
yannelliyannelli/pi-rust/AGENTS.md

pi-rust

AGENTS.md32 starsChanged 44 days agoMITView on GitHub

All documents are listed in docs/INDEX.md.

The file

We split this AGENTS.md into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After code changes run cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings, and the tests of the crates you changed.

    line 4
  2. Very specific:

    Keep comments short and only where the code cannot say it.

    line 7
  3. Very specific:

    Commit messages use Conventional Commits (feat(scope): ..., fix: ..., feat!: for breaking changes).

    line 9
  4. Distinctive:

    Never commit unless asked.

    line 10
  5. Very specific:

    When you port an upstream commit, write upstream <sha> with the 9-character SHA in the commit message, for example fix(ai): recover from …

    line 15
  6. Distinctive:

    All documents are listed in docs/INDEX.md.

    line 34
  7. Distinctive:

    Ask before adding a dependency, pushing to main, merging, or changing GitHub settings.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Development Rules

  • Rust-only port of the TypeScript pi harness. Keep JSON field names, session files, and config paths compatible with upstream pi.
  • After code changes run cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings, and the tests of the crates you changed. Before a PR run cargo test --workspace --locked --no-fail-fast. Fix every warning.
  • Tests must not use real provider APIs or keys: use pi_ai::providers::faux or a local mock HTTP server.
  • Providers emit events only through pi_ai::MessageBuilder, and every stream must end with Done or Error.
  • Keep comments short and only where the code cannot say it. No unsafe code.
  • Regenerate crates/pi-ai/models.json from upstream catalog data instead of editing many entries by hand.
  • Commit messages use Conventional Commits (feat(scope): ..., fix: ..., feat!: for breaking changes); the release workflow derives versions and CHANGELOG.md from them. Never edit versions or CHANGELOG.md by hand; use cargo xtask.
  • Never commit unless asked.

Parity with upstream

  • Upstream is earendil-works/pi on GitHub. docs/parity/upstream.json records the upstream commit this port has caught up to.
  • When you port an upstream commit, write upstream <sha> with the 9-character SHA in the commit message, for example fix(ai): recover from Copilot request-size overflow (upstream 73f8de80b). The parity report marks a commit as ported only on that exact text, so do not write upstream <sha> for a commit you did not port.
  • Record accepted differences in docs/parity/allowlist.json with a reason, and open gaps in docs/parity/GAPS.md. User-facing differences also go in the README section "Differences from upstream pi".
  • cargo xtask parity --upstream <checkout> writes the gap report. The Parity workflow runs it daily and updates the issue labeled parity-report.

Playbooks

TaskRead
Find gaps, port upstream commitsdocs/parity/README.md
Change edit diffs, patches, or word highlightsdocs/parity/jsdiff.md
Close a Node API gap in the extension runtimedocs/agents/node-compat.md
Diagnose a CI failure or a flaky testdocs/agents/ci-triage.md
Ship a changedocs/agents/release.md
Run the scheduled gap reviewdocs/agents/daily-gap-check.md
Change the Cursor or Google Antigravity providerdocs/providers/subscription-providers.md
Change a fancy-regex markdown rule in pi-tuicrates/pi-tui/docs/fancy-regex.md
Change Markdown code block detection or Mermaid streamingcrates/pi-tui/docs/marked-code-blocks.md
Change RSA in node:cryptocrates/pi-js/docs/rsa.md

All documents are listed in docs/INDEX.md.

Shared state

  • Ask before adding a dependency, pushing to main, merging, or changing GitHub settings. Opening a PR from a branch is fine when the task asks for one.
  • One change per PR. Name the upstream commits or unsupported.rs entries it closes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.