docs: close stale hook and script-count records - #1458
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>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…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>
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>
# Conflicts: # docs/scripts-index.md
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>
…:path check lied 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: 23 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 (3)
📝 WalkthroughWalkthroughThe coverage checker now includes tracked repository-root directories, validates their documentation, supports root-specific allowlisting, and has expanded tests. Related index, script-count, repository-layout, review-ledger, and issue-ledger documentation were updated. ChangesRepository index coverage
Outstanding issue record correction
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Git
participant CoverageChecker
participant CodebaseIndex
participant Allowlist
Git->>CoverageChecker: provide tracked repository paths
CoverageChecker->>CoverageChecker: discover root, module, and route groups
CoverageChecker->>CodebaseIndex: extract documented coverage spans
CodebaseIndex-->>CoverageChecker: documented entries
CoverageChecker->>Allowlist: check suppressed gaps
CoverageChecker-->>CodebaseIndex: report remaining missing entries
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Comment |
…1458 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…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>
|
@cursoragent resolve merge conflict |
|
Merge conflict on PR #1458 is resolved and pushed. Commit: Conflicts resolved:
Verified: PR: #1458 |
Resolve conflicts in docs/codebase-index.md (keep root-dir rows + main's rag-coverage-gate entry), docs/scripts-index.md (keep corrected 191/206 counts), and docs/outstanding-issues.md (take main's #144/#135–#137 updates; keep this PR's MSYS-corrected #143 text). Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/check-codebase-index-coverage.mjs (1)
135-145: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUpdate the success message for root coverage.
discoverGroups()now addskind: "root"groups, but the success path at Line 163 still describes the total as “top-level modules/routes.” Use “top-level directories/modules/routes” or “coverage groups” so successful output accurately reflects the new scope.Proposed fix
- `${INDEX_PATH} coverage OK: all ${groups.length} top-level modules/routes and ${tables.missing.length + tables.stale.length === 0 ? "all" : "checked"} schema tables are indexed.`, + `${INDEX_PATH} coverage OK: all ${groups.length} top-level directories/modules/routes and ${tables.missing.length + tables.stale.length === 0 ? "all" : "checked"} schema tables are indexed.`,🤖 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 `@scripts/check-codebase-index-coverage.mjs` around lines 135 - 145, Update the success message in the coverage reporting path that consumes discoverGroups() so it no longer describes the total only as “top-level modules/routes”; refer to “top-level directories/modules/routes” or “coverage groups,” while preserving the existing success behavior and formatting.
🤖 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`:
- Line 163: The issue description redundantly repeats the primary-checkout state
and does not identify the affected artifact. Update issue `#143`’s “Why this is
not a fix” text to state clearly that the fail-open hook copy used by the shared
core.hooksPath is untracked in the primary checkout, so the mitigation is not
version-controlled or distributed. Remove the duplicated sentence while
preserving the surrounding distribution and merge-status details.
---
Outside diff comments:
In `@scripts/check-codebase-index-coverage.mjs`:
- Around line 135-145: Update the success message in the coverage reporting path
that consumes discoverGroups() so it no longer describes the total only as
“top-level modules/routes”; refer to “top-level directories/modules/routes” or
“coverage groups,” while preserving the existing success behavior and
formatting.
🪄 Autofix (Beta)
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: 32c5d0ac-2329-48a3-adc6-19dfa883d0f5
📒 Files selected for processing (7)
CLAUDE.mddocs/branch-review-ledger.mddocs/codebase-index.mddocs/outstanding-issues.mddocs/scripts-index.mdscripts/check-codebase-index-coverage.mjstests/codebase-index-coverage.test.ts
…ording Another session merged main into this branch and reworded #143 concurrently. Both revisions carry the MSYS ref:path correction; this keeps the local wording, which additionally records that copying the primary checkout's untracked hook over that branch's version would have silently reverted its mixed-inputs guard. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…esson (#1511) Two gaps: work was done and not recorded. - docs/branch-review-ledger.md had no row for claude/root-dir-coverage-gate-v2 (#1458), claude/pre-commit-fail-open (#1494) or claude/ledger-relanding (#1508). AGENTS.md requires one per reviewed branch; appended retrospectively with the merged heads. - #154 records why three separate "did it land" checks returned false answers this session: title greps (reworded concurrently), id greps (ids reallocated in parallel branches), and PR state fields (squash merges, and a MERGED PR whose content had not reached the fetched ref). Resolve the blob and grep for distinctive prose instead. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>


Summary
RAG impact: no retrieval behaviour change — this is documentation and issue-ledger maintenance only.
Verification
Not run
No provider-backed, Supabase, OpenAI, browser, build, or deployment checks were run; this final diff is documentation-only.
Risk
Low. The issue-ledger table is temporarily re-padded by the repository formatter; PR #1479 is the separate queued change that removes that conflict-prone padding.