Repository navigation
docs: add .greptile/rules.md review conventions - #505
RicainvLovemr wants to merge 2 commits into
Conversation
Drafted from the conventions Greptile enumerated in metaDAOproject#504 (build chain, program-version map, review priorities, env/keypair hygiene, workflow review policy). Maintainers should tune freely - this is a starting point so future reviews re-derive less context per PR.
|
@greptile this is the rules file drafted from your enumeration in #504. Review notes:
|
|
This is an excellent rules file - well-structured, accurate, and genuinely useful. I verified the technical details against the actual repo: Program-version map: ✅ Matches Environment variables: ✅ All keys from One minor note on line 30: The rule says Build chain & priorities: All accurate based on the repo structure I can verify. Tone & format: The "summary-first format" and direct style match how I actually structure reviews. No conflicts with my evaluation behavior - this codifies exactly what I already look for. The file will make reviews faster and more consistent. Nice work transcribing this from #504. |
| - `scripts/v0.3`–`v0.5` paths not listed in sync-types.sh are legacy: summarize, | ||
| do not line-review. |
There was a problem hiding this comment.
Fund-moving scripts skip review
This blanket skip rule covers scripts that still send spending transactions. For example, scripts/v0.5/squads/useSpendingLimit.ts builds a Squads spending transaction and sends it with the operator's wallet. sync-types.sh only lists generated type copies; it does not establish that older scripts are safe to skip.
Keep functional changes to these scripts in scope for line review, including under the contributor-history shortcut. Otherwise changes to amounts, recipients, or signing accounts could miss a detailed review.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| - PRs adding a version must update `sync-types.sh`, `sdk/package.json` exports, | ||
| and `sdk/src/index.ts`. |
There was a problem hiding this comment.
Version checklist targets wrong files
Adding a version of an existing program does not normally require changing either export file. sdk/package.json already exposes versioned paths through wildcards, and sdk/src/index.ts exports each program's unversioned entry point.
Require those files to change only when their exports change. Point reviewers to the program's own index.ts when changing its default version. Otherwise the rule requests unrelated edits while missing the file that selects the default.
| - PRs adding a version must update `sync-types.sh`, `sdk/package.json` exports, | |
| and `sdk/src/index.ts`. | |
| - PRs adding a version must update `sdk/sync-types.sh`. Update SDK exports only | |
| when they change; changing a program's default version requires updating its | |
| own `sdk/src/<program>/index.ts`. |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Per greptile's review: - Fix version-addition rule to point at the program's own index.ts - Keep fund-moving scripts in scope for line review (remove the blanket skip for scripts/; retain only for docs/comments/renames)
|
@greptile pushed a fix for both P2s in the latest commit:
Let me know if the wording captures your intent correctly. |
|
Perfect - both fixes are correct: Version rule (lines 17-18): Now accurately reflects the actual workflow:
Fund-moving scripts (lines 19-20, 46-47): The explicit "always line-review fund-moving scripts" rule at line 46-47 correctly takes precedence over the contributor-history shortcut. The parenthetical examples (spending limits, useSpendingLimit) make it concrete for reviewers. The wording captures the intent exactly. This is ready from my side. |
What
Adds
.greptile/rules.mdencoding this repo's review conventions, drafted from the conventions Greptile itself enumerated while reviewing #504 (it suggests this customization in its review tips).Contents
./rebuild.sh,./test.shflags, symlink note)sdk/sync-types.sh(which script paths are current vs legacy)WALLET_PATH,LAUNCH_AUTHORITY_KEYPAIR_PATHpatterns from.env.example)Why
Greptile currently re-derives all of this on every review (its words in #504). A rules file makes reviews consistent and faster, and gives new contributors the house style in one place.
Feel free to close if the team prefers no rules file - it was offered as a follow-up there and drafting it cost nothing since the enumeration was already done.
Refs #504
The PR appears safe to merge, with two non-blocking improvements to the review guidance.
Findings
Summary
Adds
.greptile/rules.mdwith build commands, program versions, Rust priorities, secret checks, and workflow review guidance.Reviews (1) · Last reviewed commit: "docs: add .greptile/rules.md review conv..." · Reviewed by Greptile