📝 docs(claude): add per-package CLAUDE.md files and monorepo.md - #49
Conversation
Adopt the qwksearch-research-agent layout: a root CLAUDE.md operating manual
backed by .claude/architecture/ deep notes, plus one CLAUDE.md per package.
- .claude/architecture/{overview,build,monorepo,documentation,conventions}.md
- CLAUDE.md in all 8 packages/ directories and in grab-help-docs
- .claude/settings.json pre-approving the repo's own build/test commands and
denying reads of .env / .dev.vars
The notes record what is specific to this repo rather than restating the README:
this is a monorepo in layout but a single published package in practice, npm is
the package manager (not bun, unlike its siblings), most packages/* are private
internals compiled into grab-url's dist, all tests live in the root test/ folder,
and CI never runs the build so a broken vite.config.ts passes.
build.md documents the packaging decisions that look removable and are not —
externalizing extract-webpage and React, restoring "use client" in
generateBundle after terser, and the shebang banner the bins depend on.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EoGK1G8bnF6riGQekWLtYr
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
…tually is The first pass called the root `docs/` folder "a small static landing page for grab.js.org". It is a GitHub Pages Jekyll stub — a `_config.yml` and an `index.html` redirect, kept because `/docs` is the only folder name Pages accepts besides the repository root — and its own README says so. The omission that mattered: that folder is what the Vercel project's Root Directory still points at, and it is why every deploy fails. Turbo resolves no package from `docs/` (it matches neither workspace glob), so no `.next` is produced and Vercel reports the missing `docs/.next/routes-manifest.json`. The fix is a dashboard setting — Root Directory `grab-help-docs`, with the Install/Build Command overrides cleared so `grab-help-docs/vercel.json` supplies them — so no commit here can fix it, and an agent should not go hunting for it in turbo.json or vercel.json. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EoGK1G8bnF6riGQekWLtYr
Two things: the Vercel check, and an overlap with #481. The Vercel deploy is also failing, and also not because of this PREvery one of the project's last 20 deployments is The cause is that the Vercel project's Root Directory is This is not my finding;
It is a dashboard setting, not a diff — set Root Directory to I have pushed So both red checks on this branch are inherited from 2. This PR substantially duplicates #48I opened this before noticing #48, which landed 27 minutes earlier and does the same thing: a root They are not equivalent, though:
This one is close to a superset, so the cheapest resolution is probably to take one and close the other rather than untangle a merge. That is the maintainer's call, not mine — I am not touching #48, and I would rather not have both merge and leave the repo with two accounts of the same architecture. Worth noting alongside: #47 deletes Generated by Claude Code |
Correction: it's 11 failures, not 1 — and my proposed patch was not sufficientI read the They fall into four groups, and together they say the 1. Seven — the 3 × 2. Two — 3. One — 4. One — the stale exit-code message ( Group 3 is the interesting one: it is not a wording drift but a behaviour mismatch — either Still not this PR'sUnchanged, and now verified by content rather than inference — both files involved are byte-identical to My branch's entire diff against So I'm withdrawing the proposed patch rather than narrowing it: reconciling this file with Generated by Claude Code |
Rescoped after #47 and #48 merged. This originally added the root
CLAUDE.mdand five.claude/architecture/notes. #48 landed four of those first, and the master merge (6820dbd) resolved every shared file to #48's version. That is the right outcome — so what is left here is only the layer #48 did not carry.What this adds
CLAUDE.mdpackages/*plusgrab-help-docs— the rules and traps specific to working inside each one.claude/architecture/monorepo.md.claude/settings.json.env/.dev.varsPlus four loose ends the merge left, fixed here:
.gitignorehad both PRs'.claudeblocks stacked. Collapsed to one, keeping the un-ignore for.claude/settings.jsonand the local-only excludes (settings.local.json,CLAUDE.local.md).CLAUDE.mdground rule 4 said 🔥 chore: delete the vestigial docs/ folder #47 "removes"docs/. It has merged; the folder is gone. The Detailed-notes table now also points atmonorepo.mdand at the per-package files, which nothing referenced.grab-help-docs/CLAUDE.mdstill describeddocs/as a live landing page. Rewritten: it is deleted, and what matters now is that Vercel's Root Directory still points at the missing folder — the note sends the reader todocumentation.mdfor the dashboard fix.packages/grab-api/CLAUDE.mdnow carries the zero-runtime-dependencies claim docs: add architecture guides and agent orientation #48 raised to a repo-wide ground rule.What the per-package files say
Each records what an agent needs to know to work in that package, not how to use it:
grab-api— this isgrab-url; its public API is the published one. Zero runtime deps. Anything the slim entry imports must stay externalizable orgrab-url/slimquietly stops being slim.grab-url-cli— the shebang comes from the build's banner, not source.extract-webpagemust stay a runtimeimport(). Path traversal from a server-supplied filename is the classic failure mode.archiver-web— zip slip and zip bombs, doubly so because two of its three entries are executable bins.quantum-sphere-loading-animation— the two build rules that look removable: React externalized ("Invalid hook call"), and"use client"re-applied ingenerateBundlebecause terser discards it.loading-animations—src/svg/index.tsis a generated barrel; edit the SVGs and re-runnpm run make:icons.api2client— the"grab-url"alias invite.config.tsis what stops the bundle carrying two copies of the client.log-json— colors must degrade off a TTY, or a piped JSON stream breaks every parser downstream.native-app-wrapper— outside the workspace globs; its own CI; a sidecar name wrong on one OS fails only after packaging.grab-help-docs— deploys as a static export viabuild-static-pages.mjs, notnext build; one page is generated from the skill.CI
Both red checks are inherited from
masterand documented in the comments above — neither is fixable from this branch:test— 11 failures intest/page-archive.test.ts, red onmastersince ✨ feat(cli): archive a page into a folder with --page #45 added that file. Verified:test/andpackages/grab-url-cli/src/are byte-identical to master on this branch.docs, now a deleted folder. A dashboard setting; every deployment including production has failed for days.Documentation only — no code, config or dependency changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EoGK1G8bnF6riGQekWLtYr