From ccfb08f4d5c4b5ab4c63d973f41862b00ffbff50 Mon Sep 17 00:00:00 2001 From: Danny Kim Date: Sun, 18 Oct 2026 14:37:49 +0000 Subject: [PATCH] Document that package.json aliases may target only direct subfolders of src (#21) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to #20, which was merged before this landed. bot-agents has no `package.json` `imports` aliases (`src/` is flat and everything imports relatively), so no code changes. This records the new rule in the docs: - `.agents/memory/imports-aliases-barrels.md`: aliases may target only a direct subfolder of `src/` (its `index.ts` or a `#x/*` pattern); nothing outside `src/`, not `src/` itself, not deeper folders; such code imports relatively. - `.agents/memory/tests-layout-vitest.md`: `tests/` reach the public entry through a relative import, not a `#plugin` alias. - `.agents/skills/migrate-deno-repo/SKILL.md` and `AGENTS.md`: same rule. `vp check`, `vp test`, and `damem doctor` pass. ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://git.capsulizers.com/commons/bot-agents/pulls/21 Reviewed-by: bot Co-authored-by: Danny Kim Co-committed-by: Danny Kim --- .agents/memory/app-containers-and-ci.md | 36 -- .agents/memory/app-generated-js-as-ts.md | 20 - .agents/memory/app-lint-and-local-rules.md | 41 -- .agents/memory/app-vite-build-output.md | 43 -- .agents/memory/bot-agents-lint-opt-outs.md | 25 +- ...s.md => bot-agents-migration-decisions.md} | 21 +- .agents/memory/bot-agents-runtime-no-build.md | 12 +- .agents/memory/bot-agents-tests-root-only.md | 7 +- .../memory/decorators-standard-accessor.md | 44 -- .agents/memory/deno-to-node-migration.md | 45 -- .agents/memory/git-pr-workflow.md | 1 - .agents/memory/icons-memona-style.md | 43 -- .agents/memory/imports-aliases-barrels.md | 104 +++- .agents/memory/lint-config-shape.md | 25 +- .agents/memory/lint-overrides-policy.md | 36 +- .agents/memory/lint-parity-never-shrinks.md | 2 +- .agents/memory/lit-analyzer-ts6.md | 40 -- .agents/memory/package-json-shape.md | 45 +- .agents/memory/project-lint-plugin.md | 9 +- .agents/memory/publishing-ci-only.md | 37 -- .agents/memory/tests-layout-vitest.md | 13 +- .agents/memory/toolchain-node-vite-plus.md | 20 +- .agents/memory/ts-only-files-and-imports.md | 39 +- .agents/skills/migrate-deno-repo/SKILL.md | 69 --- AGENTS.md | 31 +- package-lock.json | 3 - package.json | 6 +- scripts/project-lint.ts | 96 ++-- src/agent-claude.ts | 119 ----- src/agent-codex.ts | 174 ------- src/agent-opencode.ts | 46 -- src/agents.ts | 30 -- src/auth.test.ts | 2 +- src/auth.ts | 19 +- src/isolation.test.ts | 2 +- src/isolation.ts | 20 +- src/post-artifacts.ts | 114 ----- src/post.test.ts | 2 +- src/post.ts | 287 +++++++----- src/prepare.ts | 4 +- src/profiles.ts | 19 +- src/run-context.ts | 79 ---- src/run.ts | 443 +++++++++++++++--- src/runtime.test.ts | 2 +- src/runtime.ts | 55 +-- src/testing.ts | 23 - src/testing/index.ts | 47 ++ tests/entrypoints.test.ts | 11 +- tests/workflow.test.ts | 66 +-- tsconfig.json | 2 +- vite.config.ts | 7 - 51 files changed, 1000 insertions(+), 1486 deletions(-) delete mode 100644 .agents/memory/app-containers-and-ci.md delete mode 100644 .agents/memory/app-generated-js-as-ts.md delete mode 100644 .agents/memory/app-lint-and-local-rules.md delete mode 100644 .agents/memory/app-vite-build-output.md rename .agents/memory/{app-repo-specific-decisions.md => bot-agents-migration-decisions.md} (64%) delete mode 100644 .agents/memory/decorators-standard-accessor.md delete mode 100644 .agents/memory/deno-to-node-migration.md delete mode 100644 .agents/memory/icons-memona-style.md delete mode 100644 .agents/memory/lit-analyzer-ts6.md delete mode 100644 .agents/memory/publishing-ci-only.md delete mode 100644 .agents/skills/migrate-deno-repo/SKILL.md delete mode 100644 src/agent-claude.ts delete mode 100644 src/agent-codex.ts delete mode 100644 src/agent-opencode.ts delete mode 100644 src/agents.ts delete mode 100644 src/post-artifacts.ts delete mode 100644 src/run-context.ts delete mode 100644 src/testing.ts create mode 100644 src/testing/index.ts diff --git a/.agents/memory/app-containers-and-ci.md b/.agents/memory/app-containers-and-ci.md deleted file mode 100644 index 58f77cc..0000000 --- a/.agents/memory/app-containers-and-ci.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -description: Containerfiles build the frontend in a node:24-alpine stage with npm ci and vp build; CI uses setup-vp and runs vp check, vp build, vp test (plus lit-check) ---- - -## Containerfiles - -- The frontend build stage is `docker.io/library/node:24-alpine`, replacing - `denoland/deno:alpine`. Vite+ publishes `linux-x64-musl` binaries, so Alpine - works. (`ghcr.io/voidzero-dev/vite-plus` is a glibc alternative that would - need a pinned digest; not used.) -- The stage copies `package.json` and `package-lock.json` first, runs - `npm ci`, then copies the sources and configs and runs `npx vp build`. -- The runtime stage copies the built `js/` and `css/` directories (not single - files) from the node stage. -- No Deno binary, `deno install`, or `deno task` remains in any stage. - -```dockerfile -FROM docker.io/library/node:24-alpine AS frontend -WORKDIR /src/frontend -COPY frontend/package.json frontend/package-lock.json ./ -RUN npm ci -COPY frontend/ ./ -RUN npx vp build -``` - -## CI - -- GitHub repos (temeddix): `.github/workflows`. Capsulizers repos (Gitea): - `.gitea/workflows`. Don't move a repo's CI between hosts. -- Install with `voidzero-dev/setup-vp`, then run `vp check`, `vp build`, and - `vp test`; Lit repos also run `npm run lit-check` - ([[lit-analyzer-ts6]]). -- Repos that ran CI on a self-hosted runner keep it. -- Until `@cunarist/eslint-plugin-*` are on npm, `npm ci` fails in CI. That is - expected and stated in the PR; run `npm install` once they are published - and commit the refreshed lockfile. diff --git a/.agents/memory/app-generated-js-as-ts.md b/.agents/memory/app-generated-js-as-ts.md deleted file mode 100644 index 39b0b4a..0000000 --- a/.agents/memory/app-generated-js-as-ts.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -description: Code that must ship as standalone JS (memona framed_find.js, brain stream-recovery.js) is written as .ts, compiled at build time, and its output gitignored ---- - -Some apps ship plain JavaScript that runs outside the main bundle: memona's -`framed_find.js` and brain's `stream-recovery.js`. Under the TS-only rule -([[ts-only-files-and-imports]]) they are handled like this (2026-10-16): - -- The source is a `.ts` file, linted and type-checked like everything else. -- The `.js` is produced at build time by the existing build (a Vite input or - a build step in `vite.config.ts` or `scripts/`), never committed. -- The output path is gitignored and, if it lands in a linted folder, listed - in `lint.ignorePatterns`; never in `overrides`, never with disable comments. -- Whatever loads the file (Rust `include_str!`, a container `COPY`, an HTML - `