Skip to content

docs: split root CLAUDE.md into router, scoped rules and package notes - #581

Merged
Winify merged 8 commits into
mainfrom
docs/split-claude-md
Nov 26, 2026
Merged

Winify merged 8 commits into
mainfrom
docs/split-claude-md

Conversation

@Winify

@Winify Winify commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

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

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Polish (an improvement to an existing feature)
  • Breaking change (existing behavior changes for users)
  • x] Documentation
  • Internal (build, CI, dependencies, tooling)

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.ts updated, and tables regenerated with pnpm docs:capabilities, if this adds or changes user-facing behaviour

Notes for reviewers

Screenshots / recordings

@vercel

vercel Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
devtools Ready Ready Preview Nov 26, 2026 10:48am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; the previous download-guidance finding is fixed.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the previous download-guidance finding is fixed.

Summary

Splits the root CLAUDE.md into a shorter guide, path-scoped rules, and package notes.

  • The root guide points readers to rules for the files they are working on.
  • Package and example notes keep local design details beside the code they describe.

Reviews (7) · Last reviewed commit: "docs: scope the hosted-player rule to th..." · Reviewed by Greptile

Comment thread .claude/rules/mirror-vectors.md Resolved
Comment thread .claude/rules/capture-invariants.md Resolved
Comment thread examples/CLAUDE.md Resolved
Comment thread .claude/rules/network-capture.md Resolved
Comment thread .claude/rules/hosted-player.md Resolved
Winify and others added 4 commits November 26, 2026 13:20
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.
vishnuv688 and others added 3 commits November 26, 2026 13:32
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 security 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>
@Winify
Winify merged commit ebdbaf8 into main Nov 26, 2026
17 checks passed
@Winify
Winify deleted the docs/split-claude-md branch November 26, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants