chore(agents): add AGENTS.md with best-practices fetch and testing policy - #2116
albertoelias-crossmint wants to merge 20 commits into
Conversation
…licy Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…etch Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Alberto Elias
|
|
|
[Low risk] Adds documentation and a helper script for development guidance. The PR should not merge until fetch failures stop silently leaving sessions without the required best-practices rules. Reviews (1) · Last reviewed commit: "chore(agents): add Claude Code SessionSt..." |
Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…pt offline Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…e PR evidence Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…est cache offline Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…e old cache only when it holds the requested stack Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…ed as stacks; accept the previous fetcher's cache for any stack list Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…ed stacks Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
… in the legacy fallback Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…cy fallback Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…status Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
Require the full-snapshot header before a cache counts as fresh or as an offline fallback, treat a malformed checked timestamp as stale, fall back to crossbit's all-files .claude cache, use gh credentials when git has none, and serve the cache when the cache dir is read-only. Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…s; only trust finished legacy caches Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…into AGENTS.md Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
…fetches Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
Description
Connects this repo to
Paella-Labs/best-practices, the central source of truth for how we write and review code (code, testing, documentation, deployments, operations). Agents follow it when they write code here, and Devin checks changes against it in review. Greptile enforces the same repo through its own config.AGENTS.mdis the agent-agnostic entry point. At session start it runs./scripts/fetch-best-practices.sh typescript.mdand follows the result. For PR reviews it adds: "check changes against the fetched best-practices doc and cite the specific rule when flagging".scripts/fetch-best-practices.shis the same file in every consumer (canonical copy: crossbit-main). It fetches every file in best-practicesmanifest.txt(all required), then the stack files passed as arguments (skipped on 404). The result is cached under${XDG_CACHE_HOME:-~/.cache}/paella-best-practices/, keyed by commit SHA and stack list, and GitHub is checked at most every 24h. If a refresh fails, the script serves a cache only when it was built for the same stack list. It never exits 0 with a partial doc. A cache from the previous~/.claudefetcher is still printed, but it exits 1 unless it is the old all-files snapshot and contains the requested stacks.AGENTS.md(the repo had none): purpose, pnpm/turbo/biome commands, and unit-test commands.CLAUDE.mdimports it with@AGENTS.md..claude/settings.jsonadds an optionalSessionStarthook that runs the same script..gitignorenow ignores only.claude/settings.local.jsoninstead of all of.claude, so shared agent config is committed.test-conventions.mdfor naming, BDD structure, tags and folders. The default evidence is the Playwright report from theapps/wallets/quickstart-devkitPOM tests, plus a recorded run against the staging sandbox. It states that the E2E-first policy applies to new code, that existing suites stay, and which artifact to link in the PR as evidence the feature works.Gap: the Playwright config keeps video only when a test fails, so recording every run needs a config change (follow-up).
Pairs with https://github.com/Paella-Labs/best-practices/pull/25. Until that merges, best-practices
mainhas nomanifest.txt, so the script falls back to fetching every.mdfile there, and stack files are skipped as 404s.Test plan
bash -npasses. I ran the script against a fakeghthat serves the best-practices PR branch. These scenarios passed: complete fetch; a required manifest file returning 404 (cold, and with a last good cache); an optional stack returning 404; no manifest upstream; offline with a matching, mismatched or missing cache; a transient content failure; each legacy cache format (the old all-files snapshot with and without the requested stack, keyed, root-generated, unrecognized); a manifest entry also passed as an argument; filenames containing spaces; 10 concurrent runs; an unwritable cache dir.Package updates
None (no package code changed, so no changeset).
Link to Devin session: https://crossmint.devinenterprise.com/sessions/7983bb75c26246418063bfe0d695e3c1
Open in Devin Desktop: https://crossmint.devinenterprise.com/desktop/session/7983bb75c26246418063bfe0d695e3c1?variant=devin
Requested by: @albertoelias-crossmint