Repository navigation
docs: split root CLAUDE.md into router, scoped rules and package notes - #581
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Low impact] The PR appears safe to merge; the previous download-guidance finding is fixed. SummarySplits the root
Reviews (7) · Last reviewed commit: "docs: scope the hosted-player rule to th..." · Reviewed by Greptile |
Root CLAUDE.md loaded ~40k tokens into every session, mostly design history that matters only when editing one package. It is now a 198-line router; imperatives move to path-scoped .claude/rules/*.md and history/known debt to packages/<pkg>/CLAUDE.md, both loaded only when a matching file is read. Stale claims found while validating against code are corrected, and numbered CLAUDE.md § references in source comments and lint messages now name the section or rule file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The split left design history in the rule slot: bullets of 1-5 KB where the instruction sat behind measurements, reverted attempts and descriptions of what the code does. Agents could not tell from a loaded rule whether a diff broke it. Each rule is now one imperative with a one-clause why; history stays in git. Globs now list the files where a rule can be broken, so the BiDi gate and assert rules load on adapter session files. Cross-adapter rules live once in capture-invariants.md, single-package ones in that package's CLAUDE.md. docs-sync.md folds into capability-tables.md. Fixes stale claims found on the way: core's "no redaction policy" (input-mask.ts exists), the getBidi race scoped to selenium-webdriver 4.27-style caching, and wrong file paths for about ten symbols. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An audit of every CLAUDE.md and .claude/rules file found claims the code no longer supports: a nonexistent pnpm changeset script, a perf-log rule contradicting doc-start-injection, wrong file locations for several symbols, and size entries that disagreed with eslint's max-lines counts. Fix those, add the missing typecheck/test:ui commands, state that size and any caps are lint warnings rather than a CI gate, complete rule frontmatter paths, and keep duplicated rules in one owning file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main added the declaration-leak rule, the WDIO Cucumber smoke example, secret redaction and the Chrome 156/157 capture ceilings to the root CLAUDE.md after this branch was cut. The split keeps root as a router, so each moves to the file that owns it: bundling and examples-smoke rules, and core's design notes, where redaction replaces the note that typed values are never masked.
cc97d05 to
3c1752d
Compare
The mirror-vectors rule now loads for the TypeScript side of every mirrored function, not only the Python side and the vector files, so a TypeScript-only edit still gets the reminder to add a case. The hosted-player rule covers snapshot.ts and vnode-transform.ts, which set the replay iframe's sandbox and call the replay safety checks. The network rule said to drop a failed call's held Resource Timing entry; the collector keeps it, since it is the request's only record.
# Conflicts: # examples/nightwatch/nightwatch.mobile.conf.cjs
Main added packages/otel and a telemetry DevToolsMode after this branch split the docs; the package map, layering, example default modes and shared notes did not mention either. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
| - "packages/app/src/components/browser/snapshot.ts" | ||
| - "packages/app/src/components/browser/vnode-transform.ts" | ||
| - "packages/app/src/controller/trace-link.ts" | ||
| - "packages/app/src/controller/trace-open.ts" |
There was a problem hiding this comment.
Download checks lose their guidance
The paths list omits packages/app/src/controller/trace-download.ts, where the player checks which URLs ?trace= may fetch. The rule points to trace-open.ts, which only calls those checks. With the guidance removed from the root guide, editing the download checks alone no longer loads it. Add trace-download.ts to the scope and name it in the download rule.
How this was verified: TraceOpenController.openUrl passes the linked URL to traceUrlFrom, while trace-download.ts checks its scheme, origin, credentials and redirect destination.
trace-open.ts only calls traceUrlFrom and downloadTrace; the scheme, origin, credential and redirect checks live in trace-download.ts, so editing them alone did not load the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Root CLAUDE.md loaded ~40k tokens into every session, mostly design history that matters only when editing one package. It is now a 198-line router; imperatives move to path-scoped .claude/rules/*.md and history/known debt to packages//CLAUDE.md, both loaded only when a matching file is read. Stale claims found while validating against code are corrected, and numbered CLAUDE.md § references in source comments and lint messages now name the section or rule file.
What & why
Type of change
Packages touched
shared(types and contracts)core(framework-agnostic capture/reporting)elements(published element/snapshot API —@wdio/elements)service(WebdriverIO adapter)nightwatch-devtools(Nightwatch adapter)selenium-devtools(Selenium adapter)selenium-devtools-py(Selenium Python adapter)backend(server)app(UI)script(page-injected runtime)trace(Trace mode)Capability matrix
packages/conformance/src/features.tsupdated, and tables regenerated withpnpm docs:capabilities, if this adds or changes user-facing behaviourNotes for reviewers
Screenshots / recordings