chore: move CLAUDE.md into .claude/ and update every reference to it - #1393
Conversation
The repo root held 13KB of internal agent instructions, visible to every GitHub visitor alongside the README. `.claude/` is where the rest of that machinery already lives — hooks, skills, agents, settings — so the doc belongs with them. Verified before moving, because a wrong answer here would silently disable every project rule with no error: Claude Code loads project memory from BOTH `./CLAUDE.md` and `./.claude/CLAUDE.md` (per the official memory docs, which name the two as equivalent). So the TDD, package-boundary, query-safety and credential rules keep loading. Two references were load-bearing rather than prose and would have broken: - `app/src/lib/__tests__/docs-accuracy.test.ts` reads the doc by path and asserts its claims — the path-existence check, the MIGRATE_ON_START claim and the tenant-guard path. It would have failed on a missing file. - `package.json`'s `review:local` passes `-c CLAUDE.md` to the CodeRabbit CLI. The remaining mentions were comments and skill/agent prose; those now point at the new path so nobody goes looking for a root file that no longer exists. Also adds #1376 and #1377 to the [Unreleased] section, including the two bugs that surfaced during that work: the reassignment being invisible to the optimistic lock, and the import's unassigned-widget count counting markdown and iframe widgets. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR adds ChangesClaude guidance and documentation alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…d-into-dot-claude # Conflicts: # package.json
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 @.claude/CLAUDE.md:
- Line 126: Update the encryption guidance near the key-management documentation
to require the repository’s AES-256-GCM envelope encryption scheme, including
data-key wrapping, instead of stating that envelope wrapping is not used.
Preserve the documented ENCRYPTION_KEY and key-rotation requirements where
compatible, and align the wording with the canonical “AES-256-GCM envelope
scheme” guidance.
- Line 131: Update the tenant-enforcement guidance in CLAUDE.md to require
tenant filtering at the ORM or middleware level for every database query, rather
than relying primarily on per-route filters. Remove the statement that
app/src/lib/db/index.ts lacks enforcement, and retain route-level filtering only
as an additional requirement where applicable.
In `@CHANGELOG.md`:
- Line 88: Update the changelog entry to state that write cursors drain results
to completion while retaining at most MAX_ROWS+1 rows, clarifying that the limit
bounds retained memory or displayed results rather than write execution. Remove
the claim that MAX_ROWS+1 bounded only what was displayed if it conflicts with
this behavior.
🪄 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 Plus
Run ID: 5fcec66b-0758-4212-9f47-1ab174e2b251
📒 Files selected for processing (10)
.claude/CLAUDE.md.claude/agents/project-architect.md.claude/hooks/check-boundaries.sh.claude/hooks/check-migration-guard.sh.claude/skills/next/SKILL.mdCHANGELOG.mdapp/src/__tests__/test-environment-boundary.test.tsapp/src/lib/__tests__/docs-accuracy.test.tsapp/src/lib/db/__tests__/tenant-scope.test.tspackage.json
| - The login form's submit is gated on React hydration. Before hydration a click ran the browser's native form submit — a GET that put the email and plaintext password in the URL, and therefore in browser history and any access log (#1321) | ||
| - Any authenticated user could permanently wedge a connector's query scheduler by submitting a whitespace-only query: `runQuery` returned without invoking a terminal callback, so the slot never freed. After `maxConcurrent` such requests every subsequent query on that connection failed with 408/503 until the process restarted. The shared SDK helper now always settles the caller (#1301) | ||
| - Write queries buffered the entire result set into the Node heap before the row limit was applied, so `MAX_ROWS+1` bounded only what was *displayed*. One Form submit against a large table could exhaust the heap shared by every tenant on the process. Both connectors now drain writes through a cursor (#1298, #1326) | ||
| - Write queries buffered the entire result set into the Node heap before the row limit was applied, so `MAX_ROWS+1` bounded only what was _displayed_. One Form submit against a large table could exhaust the heap shared by every tenant on the process. Both connectors now drain writes through a cursor (#1298, #1326) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Correct the MAX_ROWS+1 wording.
Write cursors drain results to completion and retain only up to the row limit; this bounds memory, not write execution. The changelog should not claim that MAX_ROWS+1 bounds execution.
🤖 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 `@CHANGELOG.md` at line 88, Update the changelog entry to state that write
cursors drain results to completion while retaining at most MAX_ROWS+1 rows,
clarifying that the limit bounds retained memory or displayed results rather
than write execution. Remove the claim that MAX_ROWS+1 bounded only what was
displayed if it conflicts with this behavior.
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: 3
🤖 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 @.claude/CLAUDE.md:
- Line 126: Update the encryption guidance near the key-management documentation
to require the repository’s AES-256-GCM envelope encryption scheme, including
data-key wrapping, instead of stating that envelope wrapping is not used.
Preserve the documented ENCRYPTION_KEY and key-rotation requirements where
compatible, and align the wording with the canonical “AES-256-GCM envelope
scheme” guidance.
- Line 131: Update the tenant-enforcement guidance in CLAUDE.md to require
tenant filtering at the ORM or middleware level for every database query, rather
than relying primarily on per-route filters. Remove the statement that
app/src/lib/db/index.ts lacks enforcement, and retain route-level filtering only
as an additional requirement where applicable.
In `@CHANGELOG.md`:
- Line 88: Update the changelog entry to state that write cursors drain results
to completion while retaining at most MAX_ROWS+1 rows, clarifying that the limit
bounds retained memory or displayed results rather than write execution. Remove
the claim that MAX_ROWS+1 bounded only what was displayed if it conflicts with
this behavior.
🪄 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 Plus
Run ID: 5fcec66b-0758-4212-9f47-1ab174e2b251
📒 Files selected for processing (10)
.claude/CLAUDE.md.claude/agents/project-architect.md.claude/hooks/check-boundaries.sh.claude/hooks/check-migration-guard.sh.claude/skills/next/SKILL.mdCHANGELOG.mdapp/src/__tests__/test-environment-boundary.test.tsapp/src/lib/__tests__/docs-accuracy.test.tsapp/src/lib/db/__tests__/tenant-scope.test.tspackage.json
🛑 Comments failed to post (2)
.claude/CLAUDE.md (2)
126-126: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
Document the required envelope encryption scheme.
This line explicitly rejects envelope/data-key wrapping, conflicting with the repository’s required AES-256-GCM envelope scheme. Keep the canonical guidance aligned with the mandated key-management architecture to avoid incompatible or unsafe implementations.
As per coding guidelines, “No credentials logged or stored in DB (AES-256-GCM envelope scheme in use).”
🧰 Tools
🪛 LanguageTool
[grammar] ~126-~126: Ensure spelling is correct
Context: ...text format isiv:authTag:ciphertext(base64). Key rotation is supported via `ENCRYPTI...(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 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 @.claude/CLAUDE.md at line 126, Update the encryption guidance near the key-management documentation to require the repository’s AES-256-GCM envelope encryption scheme, including data-key wrapping, instead of stating that envelope wrapping is not used. Preserve the documented ENCRYPTION_KEY and key-rotation requirements where compatible, and align the wording with the canonical “AES-256-GCM envelope scheme” guidance.Source: Coding guidelines
131-131: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
Align tenant enforcement with the required ORM/middleware guarantee.
The document currently makes per-route filtering the primary requirement and states that ORM/middleware enforcement does not exist. That contradicts the required tenant filter at the ORM/middleware level and preserves a cross-tenant leakage gap if a route forgets its filter.
As per coding guidelines, “Every DB query MUST include tenant filter at ORM/middleware level.”
🤖 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 @.claude/CLAUDE.md at line 131, Update the tenant-enforcement guidance in CLAUDE.md to require tenant filtering at the ORM or middleware level for every database query, rather than relying primarily on per-route filters. Remove the statement that app/src/lib/db/index.ts lacks enforcement, and retain route-level filtering only as an additional requirement where applicable.Source: Coding guidelines
|



The repo root held 13KB of internal agent instructions, visible to every GitHub
visitor alongside the README.
.claude/is where the rest of that machinery alreadylives — hooks, skills, agents, settings — so the doc belongs with them.
Verified before moving
A wrong answer here would have silently disabled every project rule with no
error. Claude Code loads project memory from both
./CLAUDE.mdand./.claude/CLAUDE.md; the official memory docs name the two as equivalentproject-level locations. So the TDD, package-boundary, query-safety and credential
rules keep loading.
Two references were load-bearing, not prose
Both would have broken on the move:
app/src/lib/__tests__/docs-accuracy.test.tsreads the doc by path andasserts its claims — the path-existence check, the
MIGRATE_ON_STARTclaim, andthe tenant-guard path. It would have failed on a missing file.
package.json'sreview:localpasses-c CLAUDE.mdto the CodeRabbit CLI.The rest were comments and skill/agent prose. Those now point at the new path so
nobody goes looking for a root file that no longer exists.
Also
Adds #1376 and #1377 to
[Unreleased], including the two bugs that surfaced duringthat work — the reassignment being invisible to the optimistic lock, and the
import's unassigned-widget count including markdown/iframe widgets.
Verification
npm run verifyexit 0 — app 3466, component 1712, connection 406, cli 69. The 8docs-accuracytests, which are the ones that actually read the file, pass againstthe new path. The 2 lint warnings are pre-existing in
widget-editor-modal.tsx.No E2E: no application code changed — a file move, a test path, a script arg, and
comments.
Summary by CodeRabbit
New Features
Bug Fixes