diff --git a/.agents/memory/imports-aliases-barrels.md b/.agents/memory/imports-aliases-barrels.md index e00b8d9..3655159 100644 --- a/.agents/memory/imports-aliases-barrels.md +++ b/.agents/memory/imports-aliases-barrels.md @@ -55,3 +55,20 @@ so they never reach package consumers. Relative imports inside one directory (`./sibling.ts`) are fine, with the `.ts` extension written out. + +## `scripts/` is flat (user rule, 2026-10-16) + +- `scripts/` has no subfolders and no `index.ts`. Barrels and `index.ts` + entries exist only inside `src/`; delete any `index.ts` outside it. +- Each tool is one file, `scripts/.ts`, imported directly by file: + `import { decorators } from "./scripts/decorators.ts";` in + `vite.config.ts`. +- Code in a former `scripts//` folder is merged or renamed into flat + `scripts/.ts` files. Non-TS assets (HTML, images, fixtures) move to + where they belong (next to the tool's output, `.agents/`, or a gitignored + scratch dir). A subfolder that is really an app moves under `src/` as an + aliased folder. +- import-check 0.10.0+ checks folder layout only where the importer or the + target sits in a `#`-aliased folder, so `vite.config.ts` → + `./scripts/x.ts` passes without any override. Remove overrides that only + dodged import-check. diff --git a/.agents/memory/lint-overrides-policy.md b/.agents/memory/lint-overrides-policy.md index f94a10d..2b552c9 100644 --- a/.agents/memory/lint-overrides-policy.md +++ b/.agents/memory/lint-overrides-policy.md @@ -11,7 +11,9 @@ practice. off for `src/rules/index.ts`, the rule registry, which must import every rule. It is not a precedent for apps. - **`scripts/**`:** a narrow override is allowed when a tooling script truly - needs it, e.g. `no-console` in a CLI script. + needs it, e.g. `no-console` in a CLI script. Never one that only dodges + import-check (e.g. `no-relative-bypass` for `vite.config.ts`); import-check + ignores folders no `#` alias owns. - **Generated files:** list them in `ignorePatterns`, never `overrides`. - **Anything else needs the user's approval first.** When the user is away, don't add it: refactor, or leave the violation failing and log the question. diff --git a/.agents/skills/migrate-deno-repo/SKILL.md b/.agents/skills/migrate-deno-repo/SKILL.md index 79338e7..36e4373 100644 --- a/.agents/skills/migrate-deno-repo/SKILL.md +++ b/.agents/skills/migrate-deno-repo/SKILL.md @@ -40,6 +40,9 @@ with everything. - [ ] Decorators stay standard with `accessor`; add `scripts/decorators.ts` if the repo has any. Lit repos: `scripts/lit-check.ts` + `npm run lit-check`. +- [ ] `scripts/` is flat: no subfolders, no `index.ts` (barrels live only in + `src/`); `vite.config.ts` imports `./scripts/.ts` directly. A + scripts subfolder that is really an app moves under `src/`. **Lint** diff --git a/AGENTS.md b/AGENTS.md index 122938c..54775b3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,6 +23,8 @@ type-checks, and `vp test` runs Vitest. Unit tests sit next to the code as and `scripts/` import each other relatively. If one is ever added, it may point only at a direct subfolder of `src/` (its `index.ts`, or a `#x/*` pattern inside it); never at `src/` itself, a deeper folder, or anything outside `src/`. +`scripts/` is flat: one file per tool, no subfolders and no `index.ts` +(barrels live only in `src/`), imported directly by file path. The only config files are `package.json`, `tsconfig.json`, and `vite.config.ts`, plus `package-lock.json`. Repo-local lint rules and the rule