docs: per-folder navigation guides for resources/ and server/#522
docs: per-folder navigation guides for resources/ and server/#522kriszyp wants to merge 1 commit into
Conversation
Add resources/DESIGN.md with a section index for the 4744-line Table.ts (grouped by responsibility: setup, authz, read, write, search, pub/sub, validation, stats, history) and a Resource.ts member table with line numbers. Add server/DESIGN.md mapping the three HTTP stacks (native HTTP, Operations API on Fastify, legacy Custom Functions on Fastify), the http.ts section index, and middleware ordering. Expand AGENTS.md with a repository map for all 19 top-level folders and a "Detailed navigation" pointer table to the new docs. Correct the existing "two HTTP stacks" claim to three. Goal: reduce the overhead of starting a task in this repo. Agents spending time grepping the wrong folders or top-to-bottom reading megafiles can now jump to the right place via path + line number. Generated by Claude Opus 4.7 (1M context). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Reviewed; no blockers found. |
|
line-based guides like this creates a new maintenance burden. How do we ensure these will be updated when someone (or some agent) modifies source code? Unless there is a process to ensure that these docs are always correct (as to not misguide future agents), I'd rather documents like this stop at the higher-level what stuff is in what files. Then it's the agent's responsibility to read the source when its making a contribution. But not necessarily read everything to figure out where. |
This is the intended procedure for how we ensure that it is maintained (that all Harper engineers should use for PRs): Do you think that's sufficient? |
Summary
Adds two new per-folder navigation docs and expands
AGENTS.mdso agents can find code without grepping blindly or reading 4744-line files top-to-bottom.resources/DESIGN.md— section index forTable.ts(grouped by responsibility: setup, authz, read path, write path, search, pub/sub, validation, stats, history) and aResource.tsmember table with line numbers. Includes a "Where is X" cheat sheet.server/DESIGN.md— clarifies that three HTTP stacks coexist (nativehttp.ts, Operations API on Fastify inoperationsServer.ts, legacy Custom Functions on Fastify infastifyRoutes.ts). Adds anhttp.tssection index, file-by-file map of every server file, and notes on middleware ordering.AGENTS.md— adds a repository map for all 19 top-level folders, a "Detailed navigation" pointer table to the new docs, and updates the "two HTTP stacks" wording to three.Goal
Reduce the overhead of starting a task in this repo. Pain points (raised by the user): agents spend time grepping the wrong folders and reading large files unnecessarily.
Where to put attention
AGENTS.mdsaid two; I split outoperationsServer.tsas a separate stack since it boots its own Fastify instance independently offastifyRoutes.ts. If you'd prefer to keep these grouped as one "Fastify layer", let me know — it's a one-paragraph change._writeUpdateat 1589,search()at 2022,subscribe()at 2640,getFromSourceat 4062, etc.), but they will drift asTable.tsis edited. If we want these to stay accurate long-term we may want a CI check, or to switch from line numbers to anchor comments in the source. Open to suggestions.resources/analytics/vsharper-pro/analytics/— the docs call out that these are different (request telemetry vs CPU profiling). Worth confirming I have the boundary right.Test plan
Resource.ts:41,461,475,688,735;Table.ts:1589,1942,2022,2640,4062,4607;http.ts:274,299,582,625,662,743)server/DESIGN.mdGenerated by Claude Opus 4.7 (1M context) via the
harper-engineering-guidelinesskill.