chore(docs): correct false claims in CLAUDE.md and ARCHITECTURE.md (#1235) - #1238
Conversation
…1235) CLAUDE.md is loaded as ground truth by agent sessions, so stale claims there become wrong assumptions in generated code. - chart-registry -> chart-plugin-registry (app/src/lib/chart-registry.ts does not exist; the registry is lib/plugin/chart-plugin-registry.ts + plugins/) - multi-tenancy: describe the actual per-query enforcement instead of claiming ORM/middleware-level enforcement that does not exist; link #1226 - migrations: MIGRATE_ON_START=0, not a nonexistent --skip-migrations flag - ARCHITECTURE.md counts: 38 ui primitives (was 33), BaseChart + 14 chart modules (was 12) Adds app/src/lib/__tests__/docs-accuracy.test.ts to guard against recurrence: path references must resolve, stated counts must match the filesystem, and a reworded claim fails loudly rather than silently going unchecked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughUpdates ChangesDocumentation accuracy
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)
✨ 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 |
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/launch.json:
- Around line 9-11: Update the Storybook launch command in the launch
configuration to remove the developer-specific hardcoded nvm Node path and align
Node selection with the repository’s supported Node version/source. Ensure the
command validates or selects a supported Node executable before running npm run
storybook, rather than silently falling back to another PATH version.
In `@app/src/lib/__tests__/docs-accuracy.test.ts`:
- Around line 90-95: Strengthen the assertion in the “CLAUDE.md documents
MIGRATE_ON_START, not a --skip-migrations flag” test so it requires the
canonical statement that no `--skip-migrations` CLI flag exists, rather than
only rejecting one exact phrase. Keep the existing MIGRATE_ON_START assertion
and ensure guidance recommending that flag cannot satisfy the test.
In `@CLAUDE.md`:
- Line 128: The documented database-client reference and documentation scanner
resolve different paths. Update CLAUDE.md to reference app/src/lib/db/index.ts,
and update docs-accuracy.test.ts to resolve supported app-local paths such as
lib/ under app/src/ or require repository-relative paths; apply the
corresponding changes at both listed sites.
🪄 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: e463fc92-7d7e-4d61-988e-b1f5fcee6dae
📒 Files selected for processing (4)
.claude/launch.jsonARCHITECTURE.mdCLAUDE.mdapp/src/lib/__tests__/docs-accuracy.test.ts
| "export PATH=\"$HOME/.nvm/versions/node/v22.21.1/bin:$PATH\"; exec npm run storybook" | ||
| ], | ||
| "port": 6006 |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== tracked launch.json =="
fd -a 'launch\.json$' .claude || true
if [ -f .claude/launch.json ]; then
nl -ba .claude/launch.json | sed -n '1,120p'
fi
echo
echo "== node version declarations =="
for f in package.json .nvmrc .node-version; do
if [ -f "$f" ]; then
echo "--- $f ---"
sed -n '1,160p' "$f"
fi
done
echo
echo "== node-related scripts/config files =="
rg -n '"node"|"engines"|nvm|v22\.21\.1|`@nextcloud`' -S package.json .claude . (glob:!node_modules) || true
echo
echo "== Bash fallback semantics probe =="
tmpdir="$(mktemp -d)"
cat > "$tmpdir/make_path_scenario.sh" <<'BASH'
#!/usr/bin/env bash
HOME="$TMPDIR" PATH="$TMPDIR/bin:$TMPDIR/missing-subdir:$TMPDIR/lib:$PATH" sh -c 'export PATH="$HOME/.nvm/versions/node/v22.21.1/bin:$PATH"; type -a npm; [ -x "$(command -v npm 2>/dev/null || true)" ] && npm --help >/dev/null 2>&1'
BASH
TMPDIR="$tmpdir" bash "$tmpdir/make_path_scenario.sh"Repository: alfredo1996/neoboard
Length of output: 263
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== .claude/launch.json =="
python3 - <<'PYTHON'
from pathlib import Path
p=Path('.claude/launch.json')
if p.exists():
for i,line in enumerate(p.read_text().splitlines(),1):
if 0 < i < 140:
print(f"{i:4d}: {line}")
else:
print("missing")
PYTHON
echo
echo "== node version declarations =="
for f in package.json .nvmrc .node-version; do
if [ -f "$f" ]; then
echo "--- $f ---"
python3 -c "from pathlib import Path; print(Path('$f').read_text())"
fi
true
done
echo
echo "== node-related mentions =="
python3 - <<'PYTHON'
from pathlib import Path
for p in Path('.').rglob('*'):
if p.is_file() and p not in (Path('.git'), Path('.github'), Path('node_modules'), Path('.claude')) and any(part in ('node_modules','.git') for part in p.parts):
pass
if p.is_file() and p != Path('.claude/launch.json'):
txt = p.read_text(errors='ignore')
if any(s in txt for s in ['"node"', 'nvm', 'v22.21.1', '.claude/launch.json']):
print(f"\n--- {p} ---")
for i,line in enumerate(txt.splitlines(),1):
if any(s in line for s in ['"node"', 'nvm', 'v22.21.1']):
print(f"{i:4d}: {line}")
PYTHON
echo
echo "== Bash export fallback semantics probe =="
tmpdir="$(mktemp -ด)"
mkdir -p "$tmpdir/bin"
cat > "$tmpdir/bin/npm" <<'BASH'
#!/usr/bin/env bash
printf 'npm-version-fallback\n'
BASH
chmod +x "$tmpdir/bin/npm"
(
HOME="$tmpdir" PATH="$tmpdir/bin" bash -c 'export PATH="$HOME/.nvm/versions/node/v22.21.1/bin:$PATH"; printf "npm: "; command -v npm; command -v npm >/dev/null && npm'
)
rm -rf "$tmpdir"Repository: alfredo1996/neoboard
Length of output: 50377
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== .claude/launch.json =="
python3 - <<'PYTHON'
from pathlib import Path
p=Path('.claude/launch.json')
if p.exists():
for i,line in enumerate(p.read_text().splitlines(),1):
if 0 < i < 140:
print(f"{i:4d}: {line}")
else:
print("missing")
PYTHON
echo
echo "== node version declarations =="
for f in package.json .nvmrc .node-version; do
if [ -f "$f" ]; then
echo "--- $f ---"
python3 -c "from pathlib import Path; print(Path('$f').read_text())"
fi
true
done
echo
echo "== node-related mentions =="
python3 - <<'PYTHON'
from pathlib import Path
for p in Path('.').rglob('*'):
if p.is_file() and p != Path('.claude/launch.json') and any(part in ('node_modules','.git') for part in p.parts) == False:
txt = p.read_text(errors='ignore')
if any(s in txt for s in ['"node"', 'nvm', 'v22.21.1']):
print(f"\n--- {p} ---")
for i,line in enumerate(txt.splitlines(),1):
if any(s in line for s in ['"node"', 'nvm', 'v22.21.1']):
print(f"{i:4d}: {line}")
PYTHON
echo
echo "== Bash export fallback semantics probe =="
tmpdir="$(mktemp -d)"
mkdir -p "$tmpdir/bin"
cat > "$tmpdir/bin/npm" <<'BASH'
#!/usr/bin/env bash
printf 'npm-version-fallback\n'
BASH
chmod +x "$tmpdir/bin/npm"
(
HOME="$tmpdir" PATH="$tmpdir/bin" bash -c 'export PATH="$HOME/.nvm/versions/node/v22.21.1/bin:$PATH"; printf "npm: "; command -v npm; command -v npm >/dev/null && npm'
)
rm -rf "$tmpdir"Repository: alfredo1996/neoboard
Length of output: 41181
Avoid hardcoding the Storybook Node version in .claude/launch.json.
NODE is currently 20, not 22.21.1, and the path is developer-specific. If that directory is missing, npm falls back to whatever is found next on PATH, so Storybook may start with the wrong node. Align this with the repo’s Node source or check a supported node version before exec npm run storybook.
🤖 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/launch.json around lines 9 - 11, Update the Storybook launch command
in the launch configuration to remove the developer-specific hardcoded nvm Node
path and align Node selection with the repository’s supported Node
version/source. Ensure the command validates or selects a supported Node
executable before running npm run storybook, rather than silently falling back
to another PATH version.
Local editor config swept in by git add -A; unrelated to the docs fix and not previously tracked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- CLAUDE.md: use the repo-relative `app/src/lib/db/index.ts` so the new path scanner actually validates it (bare `lib/` is outside the checked prefixes — the guard was silently skipping its own reference) - docs-accuracy: assert the canonical debunk wording is present instead of blocklisting one phrasing; "use --skip-migrations" would have slipped past the negative regex Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
…) (#1242) The TypeScript incremental-build cache was tracked, so every build dirtied the working tree and got swept into unrelated commits by git add -A (it polluted both #1238 and #1239 and had to be reverted by hand). - ignore *.tsbuildinfo and untrack app/tsconfig.tsbuildinfo - ignore .claude/launch.json (per-developer local config, previously untracked-but-not-ignored, i.e. the same accident waiting to happen) - app/next-env.d.ts stays TRACKED on purpose: the CI typecheck job runs tsc --noEmit with no prior next build, so nothing regenerates it there. Documented inline so it does not get 'tidied' away later. Verified: tsc --noEmit passes for app and component, and the working tree stays clean after a type-check run. Co-authored-by: alfredorubin96 <alfredo.rubin@neotechnology.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>



Closes #1235. Part of the v1.4 documentation-audit findings.
Problem
An internal docs audit cross-checked the repo's own documentation against the code and found load-bearing statements that are simply false. This matters more than ordinary drift because
CLAUDE.mdis loaded as ground truth by every agent session — a wrong claim there propagates into generated code.Fixed
CLAUDE.mdtesting tablechart-registrychart-plugin-registry—app/src/lib/chart-registry.tsdoes not existCLAUDE.mdmulti-tenancyCLAUDE.mdmigrations--skip-migrationsflag exists"MIGRATE_ON_START=0— no such flag existsARCHITECTURE.mdARCHITECTURE.mdThe tenancy wording is the important one: an agent reading "enforced at ORM level" will confidently write a route with no tenant filter.
Guard against recurrence
app/src/lib/__tests__/docs-accuracy.test.ts:MIGRATE_ON_STARTmust be documented, and the flag must not be asserted to exist (naming it to debunk it is allowed — readers search for it)Verified RED before the fix (3 failures: 33≠38, 12≠14, flag claim) and GREEN after (6/6).
Tests
npm -w app run test -- src/lib/__tests__/docs-accuracy.test.ts— 6 passed. Docs-only change otherwise; no runtime code touched.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Tests