Skip to content

docs: add agent guides (AGENTS.md, CLAUDE.md, path-scoped rules)#379

Merged
AprilNEA merged 3 commits into
masterfrom
docs/agent-guides
Jul 13, 2026
Merged

docs: add agent guides (AGENTS.md, CLAUDE.md, path-scoped rules)#379
AprilNEA merged 3 commits into
masterfrom
docs/agent-guides

Conversation

@AprilNEA

Copy link
Copy Markdown
Owner

Summary

Give coding agents (Claude Code, Codex, and anything else that reads AGENTS.md) a first-class, committed picture of this repo: what it is, how it is built and verified, the Rust standards it holds itself to, and the git/GitHub/release conventions that were previously carried only by example.

Changes

  • AGENTS.md (root) — the tool-agnostic contract: crate/architecture map, the devenv/direnv build gate (cargo is not on the bare PATH; hooks need direnv exec), type-system-first Rust standards distilled from the workspace lints and past audits, commit/branch/PR/merge conventions extracted from 172 merged PRs and 300 master commits, release-plz rules, and an index of subsystem rule files.
  • CLAUDE.md (root) — @AGENTS.md import plus Claude-specific notes (auto-loaded rules, local gpui skills).
  • .claude/rules/ — five path-scoped rules that lazy-load when matching files are touched: gui.md (theme duality, gpui lock pins, capability-gated panels), i18n.md (ordered key parity across 20 locales), ipc-protocol.md (append-only tarpc/bincode wire format + golden tests), hidpp.md (vendored fork, four device-kind vocabularies), hook.md (CGEventTap freeze hazard).
  • crates/openlogi-gui/src/platform/ — the existing macOS-FFI guide is renamed to AGENTS.md (nested-AGENTS.md convention) with a thin CLAUDE.md importing it; content unchanged.
  • .gitignore — narrowed /.claude/ to /.claude/* with a !/.claude/rules/ carve-out so the rules are tracked while worktrees/local settings stay ignored.

Testing

  • prek builtin hooks (whitespace/EOF/large-file checks) passed on both commits; no Rust code touched, so fmt/clippy were correctly skipped.
  • Verified git status shows only .claude/rules/ as trackable after the gitignore change (worktrees and settings.json remain ignored).

AprilNEA added 2 commits July 13, 2026 08:15
Rename the macOS-FFI directory guide from CLAUDE.md to AGENTS.md so
agents that follow the nested-AGENTS.md convention pick it up, and keep
a thin CLAUDE.md that imports it for Claude Code.
AGENTS.md is the tool-agnostic contract: architecture map, the
devenv/direnv build gate, Rust type-system standards, git/GitHub and
release conventions, and an index of subsystem rules. CLAUDE.md imports
it and adds Claude Code specifics. The .claude/rules/ files carry the
deep per-subsystem constraints (GUI theming and pins, i18n key parity,
append-only IPC wire format, HID++ vocabularies, hook freeze hazard)
and are now tracked via a narrowed .gitignore carve-out.
@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds committed guidance for coding agents across the repo.

  • Root AGENTS.md and CLAUDE.md document architecture, workflows, standards, and release conventions.
  • .claude/rules/ adds path-scoped guidance for GUI, HID++, hooks, i18n, IPC, and xtask areas.
  • The macOS platform FFI guide moves into a nested AGENTS.md with a thin CLAUDE.md import.
  • .gitignore now keeps local Claude state ignored while allowing rules to be tracked.

Confidence Score: 4/5

This is close, but the nested platform guide import should be fixed before merging.

  • The platform guide content was preserved in the new nested AGENTS.md.
  • The nested CLAUDE.md can still load the root guide when imports are resolved from the repo root or current working directory.
  • That can leave agents editing platform FFI code without the local ownership and unsafe-code rules.

crates/openlogi-gui/src/platform/CLAUDE.md

Important Files Changed

Filename Overview
AGENTS.md Adds root agent guidance and an index of subsystem rule files.
CLAUDE.md Adds Claude-specific notes that import the root agent guide.
.claude/rules/gui.md Adds GUI-specific guidance for GPUI, themes, capabilities, icons, and app verification.
.claude/rules/hidpp.md Adds HID and HID++ guidance for protocol typing, device vocabularies, and enumeration behavior.
.claude/rules/hook.md Adds input-hook guidance for macOS event taps and non-macOS implementations.
.claude/rules/i18n.md Adds locale guidance for ordered key parity and compile-time YAML checks.
.claude/rules/ipc-protocol.md Adds IPC wire-format guidance for append-only tarpc and bincode changes.
.claude/rules/xtask.md Adds xtask and packaging guidance for tooling, icons, package contents, and scripts.
.gitignore Updates Claude ignore rules so path-scoped rules can be tracked while local state stays ignored.
crates/openlogi-gui/src/platform/AGENTS.md Adds the moved macOS platform FFI guide.
crates/openlogi-gui/src/platform/CLAUDE.md Replaces the inline platform guide with a bare import that can resolve to the wrong guide.

Fix All in Codex Fix All in Claude Code

Reviews (2): Last reviewed commit: "docs: add xtask/packaging rule to the ag..." | Re-trigger Greptile

Comment thread crates/openlogi-gui/src/platform/CLAUDE.md
Point at xtask/README.md as the crate contract and add what it doesn't
cover: workspace lints apply to xtask too, the committed-PNG icon
pipeline (no CDN fetch, Dock icon cache), declarative nfpm/WiX package
manifests, and why cargo-run-macos.sh and the release-notes tool stay
outside xtask.
Comment thread crates/openlogi-gui/src/platform/CLAUDE.md
@AprilNEA AprilNEA merged commit f7a054e into master Jul 13, 2026
9 checks passed
@AprilNEA AprilNEA deleted the docs/agent-guides branch July 13, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant