docs: make AGENTS.md canonical and correct its drifted claims - #164
Merged
Conversation
The repo only had CLAUDE.md, so Codex, Cursor and anything else reading
AGENTS.md got nothing. Next.js' own generator treats AGENTS.md as the real
file and CLAUDE.md as a one-line `@AGENTS.md` import, and its managed block
prefers whichever file already hosts it — so hosting the block in AGENTS.md
also stops `next dev` from writing to CLAUDE.md. Block verified
byte-identical via `hasCurrentAgentRules()`.
Corrections, each checked against the code rather than carried over:
- Both design docs it called "the authoritative reference"
(2026-05-09-ledgr-design.md, -testing-architecture-design.md) do not
exist. Replaced with an honest pointer to docs/superpowers/ and a note
that the code wins on conflict.
- SimpleFIN is a full sync path (src/lib/simplefin/: client, schemas, sync,
queries, recurring), not the Plaid-only story the stack table told.
- The MCP server (src/lib/mcp/ with tools, OAuth, widget apps), the cron
scheduler (src/lib/scheduler/) and the .well-known OAuth routes were
absent entirely.
- Encryption keys are versioned (ENCRYPTION_KEY_V<n>), not a single key.
- 30 tables, not 29. categorization/ has no orchestrator.ts.
- Commands were missing test:changed, test:mutate:diff, build:mcp-widgets,
reset-password and two backfills.
Adds what this session cost us to learn: the UI primitives are Base UI and
not Radix; `shadcn add` emits `import { cn } from "cn"` and downgrades
recharts in package.json; ui/chart.tsx carries two deliberate local edits a
regenerate would clobber; vitest is node-only so component tests need a
config change; and CI reds on the self-hosted runners are often contention
rather than the diff.
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.
The repo only had
CLAUDE.md, so Codex, Cursor and anything else that readsAGENTS.mdgot nothing at all. There was noAGENTS.mdto update — none in the tree, none anywhere in git history.Next.js' own generator (
node_modules/next/dist/server/lib/generate-agent-files.js) treatsAGENTS.mdas the real instructions file andCLAUDE.mdas a one-line@AGENTS.mdimport. Its managed rules block goes to whichever file already hosts it, so moving the block intoAGENTS.mdis also what stopsnext devfrom writing intoCLAUDE.mdon every run. The block is byte-identical — verified by calling the generator's ownhasCurrentAgentRules(), which returnstrue.Claims that had drifted
Each checked against the code rather than carried across:
docs/superpowers/specs/2026-05-09-ledgr-design.mdand-testing-architecture-design.mdare both missing — dead links at the top of the file agents are told to read first. Replaced with a pointer todocs/superpowers/and a note that the code wins when a doc disagrees.src/lib/simplefin/is a complete sync path (client, schemas, sync, queries, recurring), but the stack table said Plaid-only and the conventions said "Plaid is the primary feature."src/lib/mcp/— tools, OAuth, widget apps), the cron scheduler (src/lib/scheduler/), and the.well-knownOAuth metadata routes.ENCRYPTION_KEY, thenENCRYPTION_KEY_V2…), not a single key.categorization/has noorchestrator.ts.test:changed,test:mutate:diff,build:mcp-widgets,reset-password, and two backfills.Added
Things that cost real time to discover in the session that produced #162:
ToggleGrouptakesvalue: string[],PopoverTriggertakesrender, and so on.shadcn addemitsimport { cn } from "cn"and tries to install a package by that name, and rewritespackage.jsonversions it should leave alone (it downgradedrechartson every run).components/ui/chart.tsxcarries two deliberate local edits a regenerate would clobber.ChartContainer; Recharts' bare<Tooltip>is a hardcoded white box that is unreadable in dark mode.environment: "node"matching*.test.tsonly, so React component tests are not currently possible without a config change — worth knowing before someone tries to write one.NOT NULLadds ship without a backfill, and hand-editing a journalwhentimestamp makes older Docker images replay and crash-loop.One judgment call to check
AGENTS.mdstates thatdocs/superpowers/specs/2026-07-07-ledgr-hosted-beta-design.mddescribes a direction that was abandoned, and that self-hosting is the only deployment model. That comes from a maintainer decision, not from anything in the repo — the README backs the self-hosted framing throughout, but the abandoned-spec claim is worth a second look before merge.Testing
pnpm lintandpnpm typecheckpass. No code changes.🤖 Generated with Claude Code