Skip to content

Move nine root entries to the directories that own them - #6466

Merged
max-sixty merged 2 commits into
mainfrom
tidy-root
Nov 19, 2026
Merged

max-sixty merged 2 commits into
mainfrom
tidy-root

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

GitHub lists every root entry above the README, and the repository page had 43 of them. This moves nine that need no place at the root, leaving 34: typos' config becomes [tool.typos] in pyproject.toml; knip's and dependency-cruiser's configs and the asset pin move to .config/, with each pre-commit hook naming its config; types/leaf-state.d.ts joins the hooks module that declares it; the website's Dockerfile and its ignore file move into worker/; TODO.md moves to notes/; and the root SOUL.md symlink goes, with AGENTS.md importing skills/leaf/SOUL.md directly.

Worth weighing: the deploy path. Wrangler now reads worker/Dockerfile with image_build_context = "..", so every route still builds from the repository root, and publish-site builds and pins the image as before. The two moves that change what a visitor sees are SOUL.md and TODO.md leaving the root listing. AGENTS.md's repository map gains a .config/ entry stating where a new tool config goes.

Max asked for this. Codex reviewed the commit and found no missed consumer. Checked: pre-commit over the change, typos, knip and dependency-cruiser over the whole tree, pnpm run check:worker, claude plugin validate ., the asset and preview tests in dev/tests, and Wrangler's reading of wrangler.toml.

This was written by Claude Code on behalf of max-sixty

GitHub lists every root entry above the README, so the repository page made a
visitor scroll past 43 rows to reach it. Nine of them needed no place at the
root, which now lists 34:

- `_typos.toml` becomes `[tool.typos]` in `pyproject.toml`, where typos looks by
  default (it doesn't look in `.config/`).
- `knip.config.js` and `.dependency-cruiser.mjs` move to `.config/`; only their
  pre-commit hooks run them, and each hook now names its config.
- `leaf-assets.json` moves to `.config/`. `assets_lock` becomes `assets_checkout`,
  returning the checkout rather than the pin, since the pin's parent is no longer
  the checkout root.
- `types/leaf-state.d.ts` moves beside the hooks module that declares it.
- `Dockerfile.website` and its ignore file move into `worker/` as `Dockerfile` and
  `Dockerfile.dockerignore`. Wrangler gets `image_build_context = ".."`, so the
  image still builds from the repository root, and `publish-site` builds
  `worker/Dockerfile`; its `worker/**` path filter now covers the image.
- `TODO.md` moves to `notes/TODO.md`.
- The root `SOUL.md` symlink goes; `AGENTS.md` imports `skills/leaf/SOUL.md`,
  the file it pointed to.

The asset-pin tests write the pin at its new path; no behavior they protect
changed. Checked: pre-commit over the changed files, typos, knip and
dependency-cruiser over the whole tree, `pnpm run check:worker`, `claude plugin
validate .`, the asset and preview tests, and Wrangler's reading of
`wrangler.toml` (the Dockerfile and build context it resolves, and a pushed
digest in place of the Dockerfile).
@max-sixty
max-sixty merged commit 90f9ee5 into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the tidy-root branch November 19, 2026 03:21
max-sixty added a commit that referenced this pull request Nov 19, 2026
#6468)

The website image copies `.tmp/site-install`, the prepared installation
the site build ran its pages with, so that tree holds the build host's
`.venv` and `__pycache__`. `worker/Dockerfile.dockerignore` kept them
out only when Docker was given the Dockerfile's path. Wrangler passes
the Dockerfile on stdin (`-f -`), so the dev image
`worker/deploy-dev.sh` deploys copied both in, and `leaf-dev site
verify` copied the ignore file to its context root to cover its own
Wrangler build. `COPY --exclude` leaves them out however Docker gets the
Dockerfile, so the ignore file and that copy step go.

Worth weighing: `--exclude` needs Dockerfile syntax 1.19 (1.18 refuses
it), so the Dockerfile now starts with `# syntax=docker/dockerfile:1`,
and each build fetches that frontend from Docker Hub rather than using
the engine's built-in one.

Max asked for this as a follow-up to #6466. Checked: a stdin build with
the same `COPY` line leaves out `.venv` and `__pycache__` at the top of
the tree and nested; `docker build --check`; `pnpm run check:worker`.
This PR's `test` job builds the site and the image and serves it through
`wrangler dev`.

> _This was written by Claude Code on behalf of max-sixty_
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