docs: file loose dated records and close the docs index gaps - #1436
Conversation
Organisation pass over the documentation surface and the orientation maps. No product code, schema, or retrieval/ranking surface is touched. Five dated point-in-time docs were sitting loose at the docs/ top level even though docs/README.md documents where they belong: - audit-handover-2026-07-14.md, audit-remediation-plan-2026-07-14.md and design-audit-2026-07-17.md move to docs/audit/ - rag-scalability-wip-remediation-2026-07-17.md (self-labelled "Superseded historical record") and rag-scalability-wip-review-handover-2026-07-15.md move to docs/archive/ Relative links inside the moved files are re-anchored to ../, and the two inbound references are updated in docs/operator-backlog.md and docs/archive/design-qa-2026-07-15.md. Contents are otherwise unchanged apart from Prettier's table reflow. The root codex-cloud-review/ directory moves to docs/prompts/codex-cloud-review/, where review prompts already live; .prettierignore and .cursorindexingignore are repointed so those verbatim inputs stay unformatted and unindexed. docs/README.md gains the seventeen docs it never listed — including search-chrome-behaviour.md, which AGENTS.md requires reading before search-chrome work — plus a subdirectory map for rag-behaviour/, prompts/, codex/, evidence/, audit/, redesign/, superpowers/ and archive/. CLAUDE.md and docs/codebase-index.md now document the top-level directories they omitted. Root data/ is the notable one: seven src/lib modules load it at runtime and it is easily confused with src/data/. scripts/check-docs-links.mjs gains a VERBATIM_DIRS skip for codex-cloud-review/. Relocating that directory under docs/ brought it into the default scan, where two of its internal references point at a path that never existed; the files are kept byte-for-byte as provided, so the reference cannot be corrected. This mirrors the existing archive/ and audit/ skip, and --all still sweeps them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:45 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds Codex review prompt documentation, expands documentation indexes and repository maps, corrects relative links, adds audit and handover records, updates documentation link scanning, and reorganizes review ledger entries. ChangesDocumentation and review tooling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/archive/rag-scalability-wip-review-handover-2026-07-15.md`:
- Around line 275-276: Update the copy-paste prompt in the handover document to
reference the archived path
docs/archive/rag-scalability-wip-review-handover-2026-07-15.md instead of the
nonexistent docs/rag-scalability-wip-review-handover-2026-07-15.md, leaving the
Track A remediation instructions unchanged.
In `@docs/branch-review-ledger.md`:
- Line 148: Update the merge-readiness entry for commit
b660dbc5a10d7ca3da03541028017f0abc6b5bd3 so the outcome field contains a
concrete READY or NOT READY disposition followed by the relevant finding(s),
rather than only “findings,” while preserving the existing check details.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bd385d3d-efb8-4401-8732-7819fdeea981
📒 Files selected for processing (17)
.cursorindexingignore.prettierignoreCLAUDE.mddocs/README.mddocs/archive/design-qa-2026-07-15.mddocs/archive/rag-scalability-wip-remediation-2026-07-17.mddocs/archive/rag-scalability-wip-review-handover-2026-07-15.mddocs/audit/audit-handover-2026-07-14.mddocs/audit/audit-remediation-plan-2026-07-14.mddocs/audit/design-audit-2026-07-17.mddocs/branch-review-ledger.mddocs/codebase-index.mddocs/operator-backlog.mddocs/prompts/codex-cloud-review/1-codex-full-stack-master-review-prompt.mddocs/prompts/codex-cloud-review/2-codex-full-stack-master-prompt-review-and-stress-test.mddocs/prompts/codex-cloud-review/3-codex-agents-md-companion.mdscripts/check-docs-links.mjs
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/archive/rag-scalability-wip-review-handover-2026-07-15.md`:
- Around line 275-276: Update the copy-paste prompt in the handover document to
reference the archived path
docs/archive/rag-scalability-wip-review-handover-2026-07-15.md instead of the
nonexistent docs/rag-scalability-wip-review-handover-2026-07-15.md, leaving the
Track A remediation instructions unchanged.
In `@docs/branch-review-ledger.md`:
- Line 148: Update the merge-readiness entry for commit
b660dbc5a10d7ca3da03541028017f0abc6b5bd3 so the outcome field contains a
concrete READY or NOT READY disposition followed by the relevant finding(s),
rather than only “findings,” while preserving the existing check details.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bd385d3d-efb8-4401-8732-7819fdeea981
📒 Files selected for processing (17)
.cursorindexingignore.prettierignoreCLAUDE.mddocs/README.mddocs/archive/design-qa-2026-07-15.mddocs/archive/rag-scalability-wip-remediation-2026-07-17.mddocs/archive/rag-scalability-wip-review-handover-2026-07-15.mddocs/audit/audit-handover-2026-07-14.mddocs/audit/audit-remediation-plan-2026-07-14.mddocs/audit/design-audit-2026-07-17.mddocs/branch-review-ledger.mddocs/codebase-index.mddocs/operator-backlog.mddocs/prompts/codex-cloud-review/1-codex-full-stack-master-review-prompt.mddocs/prompts/codex-cloud-review/2-codex-full-stack-master-prompt-review-and-stress-test.mddocs/prompts/codex-cloud-review/3-codex-agents-md-companion.mdscripts/check-docs-links.mjs
🛑 Comments failed to post (1)
docs/archive/rag-scalability-wip-review-handover-2026-07-15.md (1)
275-276: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fix the handover document path.
This file lives at
docs/archive/rag-scalability-wip-review-handover-2026-07-15.md, but the copy-paste prompt points todocs/rag-scalability-wip-review-handover-2026-07-15.md. The next agent will be directed to a nonexistent path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/archive/rag-scalability-wip-review-handover-2026-07-15.md` around lines 275 - 276, Update the copy-paste prompt in the handover document to reference the archived path docs/archive/rag-scalability-wip-review-handover-2026-07-15.md instead of the nonexistent docs/rag-scalability-wip-review-handover-2026-07-15.md, leaving the Track A remediation instructions unchanged.
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. ❌ Cannot run autofix: This PR has merge conflicts. Please resolve the conflicts with the base branch and try again. Alternatively, use |
…docs, and the cross-worktree pre-commit hook Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…e counts The index claimed ~135 files and ~166 npm entries against an actual 188 and 203, and 53 top-level scripts were unnamed — including ones AGENTS.md tells agents to run by name: branch-review-ledger.mjs (the only sanctioned way to read or write the review ledger), reconciliation-preflight.mjs, test-focused.mjs, check-hosted-migration-role.mjs and sync-open-pr-branches.mjs. Every one of the 168 top-level .mjs/.ts/.cjs scripts is now named, grouped by purpose in the doc's existing style rather than itemised per file, with new subsections for the review ledger/branch/skill tooling, live and staging verification, and browser and performance capture. The headline counts keep the exact '(N files)' / '(N entries)' shape and use the recursive scripts/ file count, because in-flight tooling in the primary checkout rewrites that sentence by regex; a note above the sentence records that contract so it is not reworded back into prose. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… open Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
BigSimmo
commented
Jul 30, 2026
@Cursorsgent fix merge conflict |
BigSimmo
commented
Jul 30, 2026
@cursoragent fix merge conflict |
Merge conflict on PR #1436 is resolved and pushed. Conflict: only Result:
PR: #1436 |
Resolve docs/scripts-index.md by keeping this branch's gate-set listing and main's Codex Cloud setup notes. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/outstanding-issues.md`:
- Around line 85-86: Update the outstanding-issues ledger markers near the
duplicate next-ID comments: assign unique IDs to the new issue rows below,
remove both existing 138 and 141 markers, and retain exactly one marker with
next ID 144 in docs/outstanding-issues.md.
- Around line 163-165: Resolve the duplicate ledger entries in
docs/outstanding-issues.md by determining whether rows `#135`–#137 are
replacements for the later copies or distinct issues. Remove the later duplicate
rows if they are replacements; otherwise renumber these three rows to `#141`–#143
and update the ledger marker to `#144`, preserving monotonic unique IDs.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8ef90170-a638-40e7-a2c4-1a5de9f8b3eb
📒 Files selected for processing (5)
CLAUDE.mddocs/README.mddocs/branch-review-ledger.mddocs/outstanding-issues.mddocs/scripts-index.md
🚧 Files skipped from review as they are similar to previous changes (3)
- CLAUDE.md
- docs/branch-review-ledger.md
- docs/README.md
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #6895 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
BigSimmo
commented
Jul 30, 2026
@cursoragent resolve merge conflict |
Merge conflict on PR #1436 is resolved and pushed. Conflict: only
Result: merge commit PR: #1436 |
Uh oh!
There was an error while loading. Please reload this page.
…ocs content The three conflicts were all the squash-merge ancestry break: this branch was stacked on the pre-merge #1436 head, so its copies of docs/codebase-index.md, docs/scripts-index.md and docs/outstanding-issues.md collided with main's squashed version. Resolutions: kept this branch's corrected scripts-index counts (191/206 against main's stale 188/203) and its three new root-directory rows; took main's outstanding-issues wholesale because main renumbered the rows on merge (#135 became #144, next-id 145) and its ids are authoritative, then re-applied the #143 correction on top. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs: file loose dated records and close the docs index gaps Organisation pass over the documentation surface and the orientation maps. No product code, schema, or retrieval/ranking surface is touched. Five dated point-in-time docs were sitting loose at the docs/ top level even though docs/README.md documents where they belong: - audit-handover-2026-07-14.md, audit-remediation-plan-2026-07-14.md and design-audit-2026-07-17.md move to docs/audit/ - rag-scalability-wip-remediation-2026-07-17.md (self-labelled "Superseded historical record") and rag-scalability-wip-review-handover-2026-07-15.md move to docs/archive/ Relative links inside the moved files are re-anchored to ../, and the two inbound references are updated in docs/operator-backlog.md and docs/archive/design-qa-2026-07-15.md. Contents are otherwise unchanged apart from Prettier's table reflow. The root codex-cloud-review/ directory moves to docs/prompts/codex-cloud-review/, where review prompts already live; .prettierignore and .cursorindexingignore are repointed so those verbatim inputs stay unformatted and unindexed. docs/README.md gains the seventeen docs it never listed — including search-chrome-behaviour.md, which AGENTS.md requires reading before search-chrome work — plus a subdirectory map for rag-behaviour/, prompts/, codex/, evidence/, audit/, redesign/, superpowers/ and archive/. CLAUDE.md and docs/codebase-index.md now document the top-level directories they omitted. Root data/ is the notable one: seven src/lib modules load it at runtime and it is easily confused with src/data/. scripts/check-docs-links.mjs gains a VERBATIM_DIRS skip for codex-cloud-review/. Relocating that directory under docs/ brought it into the default scan, where two of its internal references point at a path that never existed; the files are kept byte-for-byte as provided, so the reference cannot be corrected. This mirrors the existing archive/ and audit/ skip, and --all still sweeps them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(ledger): record the docs organisation review for PR #1436 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * issues: capture the root-dir coverage gap, the four unfileable dated docs, and the cross-worktree pre-commit hook Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * issues: keep the hook path out of the docs link checker Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(scripts-index): name every top-level script and correct the stale counts The index claimed ~135 files and ~166 npm entries against an actual 188 and 203, and 53 top-level scripts were unnamed — including ones AGENTS.md tells agents to run by name: branch-review-ledger.mjs (the only sanctioned way to read or write the review ledger), reconciliation-preflight.mjs, test-focused.mjs, check-hosted-migration-role.mjs and sync-open-pr-branches.mjs. Every one of the 168 top-level .mjs/.ts/.cjs scripts is now named, grouped by purpose in the doc's existing style rather than itemised per file, with new subsections for the review ledger/branch/skill tooling, live and staging verification, and browser and performance capture. The headline counts keep the exact '(N files)' / '(N entries)' shape and use the recursive scripts/ file count, because in-flight tooling in the primary checkout rewrites that sentence by regex; a note above the sentence records that contract so it is not reworded back into prose. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * issues: record the pre-commit fail-open mitigation and why #137 stays open Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: record final organization review * docs: format reconciled issue ledger * docs: correct historical CI readiness verdict * feat(gates): make docs:check-index cover tracked repo-root directories check-codebase-index-coverage.mjs exists to catch "a module that never gets added to the map, silently staling it", but it only looked inside src/ and at supabase/schema.sql. Nothing looked at repo-root directories, which is how root data/ came to be loaded at runtime by seven src/lib modules while appearing in neither CLAUDE.md nor docs/codebase-index.md — and how it stayed easy to confuse with the unrelated src/data/. The new root pass discovers directories from `git ls-files`, not the filesystem: the index documents the repository rather than one machine, so an untracked local scratch directory or node_modules can never fail the gate. Run red-then-green: the gate first reported .cursor, .design-sync and .vscode as unindexed — three real gaps — and passes once documented, covering 49 top-level entries where it previously covered 31. Also corrects two stale counts. docs/scripts-index.md said 188 files and 203 npm entries against an actual 191 and 206, having drifted within the hour as main merged new scripts. CLAUDE.md's hardcoded "~160 files backing 194 npm scripts" is removed rather than restated, because a hand-maintained count in a second place is what produced the drift; it now points at the scripts index. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * issues: correct #137 — the hook was committed all along, the MSYS ref:path check lied Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(ledger): record the docs:check-index root-coverage review for PR #1458 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: clarify untracked hook mitigation * docs: record reconciled PR #1458 review * docs: format archived issue record --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>


Summary
Repository organisation pass over the documentation surface and the orientation maps. No product code, no schema, no retrieval or ranking surface is touched — this is filing and indexing only.
Filed five dated point-in-time docs into the directories that already exist for them.
docs/README.mdstates the convention (dated records are historical; audits live inaudit/, superseded material inarchive/) but these five were still sitting loose at thedocs/top level:audit-handover-2026-07-14.md,audit-remediation-plan-2026-07-14.md,design-audit-2026-07-17.md→docs/audit/rag-scalability-wip-remediation-2026-07-17.md(self-labelled "Superseded historical record"),rag-scalability-wip-review-handover-2026-07-15.md→docs/archive/Relative links inside the moved files were re-anchored (
](foo.md)→](../foo.md)), and the two inbound references were updated indocs/operator-backlog.mdanddocs/archive/design-qa-2026-07-15.md. Verified content-identical apart from those link prefixes and Prettier's table reflow.Moved the root
codex-cloud-review/directory todocs/prompts/codex-cloud-review/. It held three verbatim Codex review prompt inputs, was absent from every layout map, anddocs/prompts/is already the home for review prompts. The.prettierignoreand.cursorindexingignoreentries were repointed to the new path so the files stay unformatted and unindexed as before.Closed the
docs/README.mdindex gaps. Seventeen docs were unlisted, includingsearch-chrome-behaviour.md— a load-bearing contract thatAGENTS.mdrequires reading before touching search chrome. Added the maintained ones to their existing sections, the dated ones under point-in-time records, and added a subdirectory map coveringrag-behaviour/,prompts/,codex/,evidence/,audit/,redesign/,superpowers/, andarchive/, none of which were described.Documented the top-level directories the orientation maps omit. Root
data/is loaded at runtime by sevensrc/libmodules (differentials, forms, medications, services, specifiers) yet appeared in neitherCLAUDE.mdnordocs/codebase-index.md, and is easily confused withsrc/data/. Also documentedmockups/,plugins/,eslint-rules/,.agents/,.claude/, and.githooks/.scripts/check-docs-links.mjs: added aVERBATIM_DIRSskip forcodex-cloud-review/. Relocating that directory underdocs/brought it into the checker's default scan, where two of its internal references point at a path that never existed. Those files are retained byte-for-byte as provided, so the reference cannot be corrected; the checker already has this exact mechanism forarchive/andaudit/, and--allstill sweeps them.Verification
npm run docs:check-links—docs link check passed: 1368 repo path references resolve.(baseline before this branch: 1348 passing; the increase is the new index entries)npm run docs:check-scripts—docs script-ref check passed: 378 npm-run reference(s) resolve to real scripts.npm run docs:check-index—docs/codebase-index.md coverage OK: all 31 top-level modules/routes and all schema tables are indexed.npm run format:check(whole tree, since.prettierignorechanged and that alters the verdict for files this diff never touched) —All matched files use Prettier code style!, exit 0.npm run verify:cheap— all 26 static gates andlint/typecheckpassed; the unit suite reportedTest Files 1 failed | 433 passed (434)/Tests 1 failed | 4562 passed | 3 skipped (4566), so the gate exited 1.The single failure is pre-existing and Windows-only, unrelated to this diff:
scripts/branch-review-ledger.mjs:209builds the archive path withpath.join, which yields backslashes on Windows while the test asserts the POSIX form. Neither that script nor that test is in this diff, and CI runs Linux, so it is green there. Left alone deliberately — ledger tooling is its own change, not something to fold into a docs tidy.The advisory deep sweep
npm run docs:check-links -- --allreports 36 missing paths, up from 34. Both additions are the verbatim-input references described above; every other entry is pre-existing and points at source files that historical docs referenced when they were written (src/lib/rag.tsand similar). No missing path in this diff traces to a link that was re-anchored.RAG impact: no retrieval behaviour change — no file under
src/lib/rag/**, clinical-search, ranking-config, answer-ranking, the eval harness, or the golden fixture is touched;scripts/pr-policy.mjsclassifies this diff asclinicalRisk: false,operationalRisk: false, and non-RAG-ranking.Deliberately not in scope
Four more loose dated docs stay at the
docs/top level because moving them means editing source and migrations rather than docs:capacity-review.md(cited fromscripts/soak-test.ts),tenancy-defense-in-depth-review.md(src/lib/owner-scope.ts,tests/owner-scope-guard.test.ts, two migrations,SECURITY.md),operator-apply-july8-batch.md(three migrations plussupabase/schema.sql),scale-readiness-review.md(one migration).forward-codify-retrieval-rpcs-workorder.mdis indexed as completed but live is still ahead of the repo on those RPCs, so archiving it would be misleading.No gate catches an undocumented repo-root directory —
check-codebase-index-coverage.mjscovers routes,src/libmodules and schema tables only, which is exactly how rootdata/stayed invisible in both orientation maps. Extending that checker is the durable fix and deserves its own PR rather than widening a blocking gate here.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores