Entry point for Claude Code working on docs.plus. Read AGENTS.md first — it is the durable source of truth for this repo's invariants and maintainer preferences. This file is a thin index, not a second copy.
- AGENTS.md — durable cross-cutting rules: package manager, git/commit policy, code quality, testing, skills, UI/theme, monorepo toolchain. Treat it as memory: do not deviate without an explicit maintainer instruction. Its §Filed by directory map lists every directory-scoped section and the file that now holds it.
- The per-directory
CLAUDE.mdfor the area you are touching — Claude Code loads it automatically when you work under that path:- apps/webapp/CLAUDE.md — UI systems and document features
- apps/webapp/src/components/TipTap/CLAUDE.md — editor architecture
- apps/webapp/src/components/chatroom/CLAUDE.md — chatroom and messaging
- apps/hocuspocus.server/CLAUDE.md — persistence, HTTP modules, production
- apps/admin-dashboard/CLAUDE.md — admin data path
- packages/supabase/CLAUDE.md — SQL, migrations, RLS, storage
- extensions/CLAUDE.md — extension workflow and per-package rules
- Package-local
AGENTS.mdwhen working inside a package (e.g. extensions/extension-hyperlink/AGENTS.md). Read in addition to the above. - The relevant
.cursor/rules/*.mdcfor the file you are editing (see index below).
Durable memory is at .agents/memory/ (gitignored symlink to the Claude Code store, shared with Cursor); .agents/memory/MEMORY.md is the index. Cursor does not read CLAUDE.md — it gets the same rules through .cursor/rules/agent-rules-and-memory.mdc. Keep that map current when a rule file moves. Local working notes live in Notes/ (gitignored). Current reports sit in Notes/local-docs/. Start at that folder's INDEX.md. Open it for inject-content, Last left, occupancy, restore, REST gaps, scale, auth, composer, extension launch, TOC rail, or chat sash.
If guidance overlaps, project policy in AGENTS.md and .cursor/docs/ wins; .mdc files are reference material for authoring.
These rules cause the most damage when an agent misses them. Full context in AGENTS.md.
- Bun only for repo work. Never run
npm,yarn,pnpm, ornpxin this monorepo. One exception: install lines for extension users in public docs lead withnpm install <pkg>, then name pnpm, Yarn, and Bun (maintainer ruling, 2026-09-22). No@nextsoak lines. See the release-extensions skill §Extension Package Contract. Lockfile isbun.lock. - No commits unless asked. No
git add,git commit,git push,git stash, or--amendinside plan execution. End multi-task plans at a "Review checkpoint". - Stay in the current worktree. Do not switch execution to another path or parallel checkout.
- Never hand-edit generated files:
apps/webapp/src/types/supabase.ts(Supabase CLI output) andpackages/supabase/seed.sql. After any SQL change runbun run --filter @docs.plus/supabase_back typesand include the regenerated file in the same change — full rules in packages/supabase/CLAUDE.md. - Tests are opt-in, not default. Do not add tests unless asked, pinning a real regression, or covering dense branching logic. Prefer Cypress E2E over unit. Never write the banned shapes listed in AGENTS.md §Test Policy.
- Simplified English is mandatory. Short sentences; one name per thing. It binds chat replies, reports, code comments, commit bodies, and every document, for every agent and subagent. The obligation and its subagent-dispatch clause live in AGENTS.md §Simplified English Mandate. The rules and the exempt surfaces live in tech-writer.
- Prose routes through the
tech-writerskill, including its Simplified English standard and the surfaces it exempts. README, CHANGELOG, reports, post-mortems, PR descriptions, JSDoc. - JSDoc/comments ≤ 4 lines, why-not-what. No section banners. No restating signatures.
Each was decided, and in most cases built and reverted. If you want to change one, say which decision you are overturning and bring new evidence. Do not re-derive it from first principles and propose it as new.
- AGENTS.md structure. Split into per-directory
CLAUDE.mdfiles: tried 2026-07-27, reverted; re-applied and kept 2026-08-03. See AGENTS.md §Filed by directory. - TOC channel-map rework. Built, then reverted at maintainer request by commit
9c535100con 2026-07-07 (do not run that hash as a command — reverting the revert re-applies the rework). The TOC is deliberately on the older behaviour. Do not re-propose the data-level type ladder, chat-open accent bar, or scroll-spy wash. - Desktop TOC tick rail. Session-only 32px rail in the pad row so docked chat can go full width. Persist last committed wide width only (
docsy:toc-width, greater than 240). Stored 240 or less is missing and opens at 320. Do not persist 32 or 240. Do not exportTocTickRailfromtoc/index.ts. Do not put the rail beside the wide TOC (that kills full-width chat). Do not inset rail height for the sash. Do not addSideContinuum. Do not hide the preview clone behind a skeleton. Do not drop media because it is taller than the card. Do not drop a whole next heading rank if that leaves a short centered stack. Do not always-center the spy tick. Do not lock a short tick stack to the window mid-line; center it in the live rail. Rail spy tick isbg-primary; wide TOC spy staysmenu-focus/base-300. Preview is an L1 clone card, not the house Tooltip. See apps/webapp/CLAUDE.md §TOC And Heading Actions andCONTEXT.md§Pad outline. - Collab storage design. Delta storage, Yjs V2 encoding, content-addressed rows, time partitioning, and blobs-to-object-storage were each measured against the real corpus and rejected, 2026-07-27. New numbers required. See apps/hocuspocus.server/CLAUDE.md.
- Dark mode mechanism.
color-scheme+light-dark()+ semantic tokens, settled 2026-07-09. Never reintroduce a themingdata-modeattribute or adark:-enumerating@custom-variant— both were built and deleted. The unrelateddata-modeon chat message cards is live and correct. - TOC presence overhang. Rendering presence beyond the TOC column edge was evaluated and rejected; the
overflow: visiblehack breaks column scrolling. See apps/webapp/CLAUDE.md §TOC And Heading Actions. - The
mattpocock-skillsmarketplace plugin. Installed 2026-08-07, then disabled the same day, because it exposes 25 skills, and 21 of them already exist in.agents/skills. So every one of those names resolved twice, with different instructions. The plugin also only works in Claude Code. In contrast,.agents/skillsis tracked in git and symlinked into.cursor/skills. That is the only reason these skills exist in Cursor at all. Refresh the tracked copies instead — see §Skills — project-local. Do not re-enable the plugin; do not add it to the committed.claude/settings.json. - Title write. One client module
apps/webapp/src/utils/titleWrite.ts. Adapters keep their own UI work. The open-pad relay (metadata store plus thedocTitlestateless) runs once inuseUpdateDocMetadata's hook-levelonSuccess, so a queued offline rename still relays after its dialog closes (ruled 2026-09-23). Do not merge Title write with Access mutation. Do not invent a workspace package for the tag strip. Do not fold first-heading admission into this module. A signed-in rename poststitle_changed. History paints the snapshot username. Chat paints the live username. The relay runs only when the renamed id is the open pad. Open document and first-edit ownership live inCONTEXT.md§Document access. SeeCONTEXT.md§Pad outline. - House envelope home.
apps/hocuspocus.server/src/http/envelope.tsownsok/fail/houseEnvelopeHook. Do not force the hook onto link-metadata. See apps/hocuspocus.server/CLAUDE.md §HTTP Modules. - Collab session helpers. Auth and disconnect predicates live in
apps/webapp/src/hooks/collabSession.ts. Do not rewriteHocuspocusProviderconstruction. Do not re-export those helpers from@utils. - Report route storage. The Report action posts to the published contact address in
LEGAL_CONTACT_EMAILand keeps nothing. That was the deliberate scope, taken 2026-09-06 with the launch-legal review. Build storage or triage tooling only when real report volume shows it is needed, and bring the count rather than a design. One canonical home,apps/webapp/src/utils/reportContent.ts— do not add a second report path. Document report is a Settings row for signed-in users on a pad (/[...slugs]). Hide it on Home. Do not restore a pad-title control. The chat message Report row stays atdisplay: false. Contract in apps/webapp/CLAUDE.md §Report Route. - Passkeys are off. Removed 2026-09-07. No sign-in button, no Conditional UI, no Settings card, no
auth.experimental.passkey. Local[auth.passkey] enabled = false. Sign-in is Google or an email link. Do not rebuild the client. A production dashboard toggle that is still on does not restore the UI. - Next product APIs. Health stays on Next. Validate lives on the email router as
POST /api/email/validate. Status does not become a Hono route. Confirm is deleted and stays deleted. Leaveapps/webapp/src/utils/supabase/api.ts. Do not editsrc/proxy.ts, Next health rewrites, Traefik, or Docker HEALTHCHECK. Names live inCONTEXT.md§Product HTTP. - History restore is signed-in only. Visitors may read history. They never see Restore. Do not replace the hidden control with a sign-in toast on the same button. Server refusal is
unauthorized/read-only. See webapp §Document Version History andCONTEXT.md§Document access. - Chat send animation. An iMessage-style send flight was built and reverted at maintainer request on 2026-09-21, and #263 closed with motion rejected. Own sends show only the static pending clock. Do not rebuild any send motion unless the maintainer asks. See apps/webapp/src/components/chatroom/CLAUDE.md.
- Phone mic is hold-only. A tap shows a hint and never sends; release sends the note, alone, once its upload is ready. Maintainer ruling, 2026-09-22. Do not add tap-to-record on a phone. Rules and reasons in apps/webapp/src/components/chatroom/CLAUDE.md.
Reference material that auto-attaches in Cursor. In Claude Code, open the relevant file when you touch the matching surface.
- design-system.mdc — design-system pointer + cardinal rules for all webapp UI work; source of truth is .cursor/docs/design-system.md.
- react-floating-ui.mdc — React 19.2 +
@floating-ui/react0.27 conventions and pitfalls. - supabase.mdc — SQL authoring, Supabase migrations, generated files, RLS. Triggers on
**/*.sql,packages/supabase/**,apps/webapp/src/types/supabase.ts. - tiptap.mdc — Tiptap/ProseMirror reference workflow for editor code under
apps/webapp/src/components/TipTap/**,chatroom/**,extension-*/**,hocuspocus.server/src/**. - scripts-naming.mdc — script and Make-target naming. Triggers on
package.json,Makefile,.github/workflows/**,scripts/**.
- design-system.md — source of truth for the webapp visual language: daisyUI/Tailwind tokens, themes, elevation species, state recipes, and the component catalog.
design-system.mdcand thedesign-systemskill point at it. - scripts-naming-convention.md — timeless source of truth that
scripts-naming.mdcpoints at.
Every skill's name and trigger description is already loaded in each session — browse them there, and open a SKILL.md when its trigger matches. Two sources:
.cursor/skills/— docs.plus-specific skills, symlinked as.claude/skillsso Claude Code loads them..agents/skills/— mattpocock/skills, installed viabunx skills@latest add mattpocock/skills; lockfileskills-lock.json. Run setup-matt-pocock-skills once to wire issue tracker, triage labels, and domain docs.
Refresh the upstream set with bunx skills@latest update -p -y — it rewrites the tracked files in place through skills-lock.json, so the diff is reviewable. This is the only supported way to take new upstream content. Installing the same skills as a Claude Code plugin duplicates every name and loses Cursor. That is why the plugin route is settled above. The CLI prints npx in its hints; ignore it, Bun only. The CLI cannot update tiptap. That skill predates skillPath tracking, and it is a vendored ueberdosis copy living as a real directory in .cursor/skills/. Refresh that one deliberately, never as part of a sweep.
Skills never create branches or worktrees and never commit — they operate in the current directory and branch.