plans/010-root-manifest-hygiene.md
Executor instructions: Follow this plan step by step. Run every verification command and confirm the expected result before moving to the next step. If anything in the "STOP conditions" section occurs, stop and report — do not improvise. When done, update the status row for this plan in
plans/README.md— unless a reviewer dispatched you and told you they maintain the index.Drift check (run first):
git diff --stat 42bfbe3ed..HEAD -- package.json yarn.lockIfpackage.jsonchanged since this plan was written, re-verify each dependency below is still present and still unused before proceeding.
lint-staged, which 007 does not use)42bfbe3ed, 2026-06-10The root package.json carries devDependencies that nothing uses. They add install weight, npm audit noise, and — worse — imply tooling that doesn't exist: lint-staged@^8 (released 2019) suggests pre-commit linting, but there is no husky setup, no .lintstagedrc, no lint-staged config block, and no active git hook in .git/hooks — it has been dead weight for years. zlib@^1.0.5 is an abandoned 2010s npm package that is always shadowed by Node's built-in zlib module (the only zlib import, in dev/inc/bundlesize.mjs, resolves to the builtin). @types/styled-components has no corresponding styled-components dependency and no imports anywhere in the repo.
Root /Users/matt/Sites/motion/package.json devDependencies (verified at planned-at commit):
"@types/styled-components": "^5.1.25", // line ~45 — no styled-components dep, no imports found
"lint-staged": "^8.0.4", // line ~67 — no husky, no config, no hooks; dead
"zlib": "^1.0.5", // line ~86 — shadowed by Node builtin everywhere
Verification already performed by the advisor (re-run yourself):
grep -rn "styled-components" packages dev --include="*.tsx" --include="*.ts" → no source imports..husky/ directory; .git/hooks/ contains only .sample files; no lint-staged key in any package.json.zlib usage is in dev/inc/bundlesize.mjs, where bare "zlib" resolves to the Node builtin regardless of the npm package's presence.Package manager: Yarn 3.6.4 ("packageManager": "[email protected]"). Build: yarn build (turbo). Bundle-size check: yarn measure runs dev/inc/bundlesize.mjs — this is the one script touching zlib, so it is the critical post-removal gate.
| Purpose | Command | Expected on success |
|---|---|---|
| Re-verify unused | grep -rn "from [\"']zlib|require([\"']zlib|styled-components|lint-staged" packages dev scripts --include="*.ts" --include="*.tsx" --include="*.js" --include="*.mjs" | only dev/inc/bundlesize.mjs zlib hit (builtin) |
| Install | yarn install | exit 0, lockfile updated |
| Build | yarn build | exit 0 |
| Bundle-size script | yarn measure | exit 0 (this exercises bundlesize.mjs and its zlib import) |
| Unit tests | yarn test | passes (ignore documented pre-existing flakes: framer-motion SSR "TextEncoder not defined", use-velocity) |
In scope (the only files you should modify):
package.json (root) — remove the three linesyarn.lock — regenerated by yarn installplans/README.md — status updateOut of scope (do NOT touch):
lerna, turbo, cypress, typescript, prettier, or eslint here. Toolchain upgrades are large, release-pipeline-risky migrations and are deliberately separate decisions (see plans/README.md, "considered and rejected" notes).dev/inc/bundlesize.mjs — its import("zlib") correctly hits the Node builtin; no change needed.package.json files.advisor/010-manifest-hygieneRun the re-verify grep from the table. Expected: the only match is the zlib import in dev/inc/bundlesize.mjs (Node builtin). If lint-staged or styled-components shows up anywhere outside package.json/yarn.lock, STOP.
Verify: grep output matches expectation.
Edit root package.json: delete the "@types/styled-components", "lint-staged", and "zlib" lines from devDependencies. Run yarn install to update yarn.lock.
Verify: yarn install → exit 0. grep -c "styled-components\|lint-staged\|\"zlib\"" package.json → 0.
Verify: yarn build → exit 0. Then yarn measure → exit 0 (proves bundlesize.mjs still resolves zlib via the builtin). Then yarn test → no new failures beyond the documented pre-existing ones.
No new tests — removal of unused entries. Gates: install, build, yarn measure (the only zlib consumer), full unit suite.
grep -c "styled-components\|lint-staged\|\"zlib\"" package.json → 0yarn install exit 0; yarn.lock no longer contains top-level resolutions for these three packages (grep -c "^\"zlib@\|^\"lint-staged@\|^\"@types/styled-components@" yarn.lock → 0)yarn build exit 0yarn measure exit 0yarn test — no failures beyond documented pre-existing onespackage.json, yarn.lock, plans/README.md modified (git status)plans/README.md status row updatedStop and report back (do not improvise) if:
yarn install fails or wants to make unrelated lockfile changes beyond removing these packages' subtrees.yarn measure fails after removal (would mean the environment's Node resolves bare zlib to the npm package — contrary to expectation; restore the entry and report).lint-staged current (v15+) together with husky and a config in one PR — don't resurrect v8.engines fields in published packages) was audited and deliberately not planned here: each touches the release pipeline (lerna publish, turbo cache, CI images) and needs the maintainer's go-ahead. They're recorded in plans/README.md under rejected/deferred findings.