docs: add AGENTS.md with repo map, verification, and PR conventions - #510
Open
nichochar wants to merge 1 commit into
Open
docs: add AGENTS.md with repo map, verification, and PR conventions#510nichochar wants to merge 1 commit into
nichochar wants to merge 1 commit into
Conversation
nichochar
force-pushed
the
docs/agents-guide
branch
from
July 29, 2026 17:29
e230c5a to
4d6aef1
Compare
nichochar
force-pushed
the
graphite-base/510
branch
from
July 29, 2026 17:29
da062be to
38a54fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Top of the stack, on #509.
A short guide for agents (and new contributors) working in this repo.
CLAUDE.mdis a symlink, stored by git as mode120000, so there's one file to maintain.What's in it
A map, so the search phase starts from a hypothesis instead of a grep. A table of the ten places that matter, plus the two facts that are genuinely surprising: notebooks aren't in sqlite (each is a real npm project on disk), and
packages/webimports@srcbook/componentsby deep source path rather than through its entry point.Verification. The full check is one line —
pnpm build && pnpm lint && pnpm check-format && CI=true pnpm test.CI=trueis called out because the api test script is barevitestand otherwise sits in watch mode, and--forceis mentioned because turbo's cache will happily hand back a stale build. Also how to boot the real app, and a note to clean up~/.srcbookafterwards.Code style, kept short since the rule is mostly "match the file you're editing". The one thing spelled out is the comment bar: why not what, delete anything that restates the code, keep it to a couple of lines, and don't address the reviewer in a comment.
PR conventions, including the filetree requirement — every PR body opens with a plain-text tree grouped by directory with per-file diff counts, generated from
git diff --numstat <base>...HEAD. The tree at the top of this PR is the format.Graphite, now the documented workflow. The guide says to use
gtrather than manualgit rebaseand explains why: this repo squash-merges, which breaks patch-id matching for any branch with more than one commit, so vanilla rebase replays already-merged changes and conflicts. That's exactly what would have happened restacking #508 by hand after #507 merges.It points at
DECISIONS.mdfor the why,REVIEW.mdfor the known-broken list, andtasks/for the queue, rather than duplicating any of them.Setup done
gt repo initwith trunkmain, and all three open branches tracked with their parents, sogt lsshows the real stack.gt submitfails with "You can only submit to repos synced with Graphite" —srcbookdev/srcbookneeds enabling at app.graphite.com/settings/synced-repos. Local commands (gt ls,gt sync,gt restack,gt create) already work; only PR submission is blocked. This PR went up viaghin the meantime.