diff --git a/.agents/memory/agents-md-and-damem.md b/.agents/memory/agents-md-and-damem.md new file mode 100644 index 0000000..d2f091c --- /dev/null +++ b/.agents/memory/agents-md-and-damem.md @@ -0,0 +1,39 @@ +--- +description: Every repo has AGENTS.md starting with the damem recall header; durable context lives in .agents/memory (flat, one fact per file) and .agents/skills +--- + +Standing convention (2026-10-12): every repo has an `AGENTS.md` whose first +lines are exactly the damem header (cunarist/damem): + +```markdown +At the start of every new session, run `damem recall` in the terminal and treat +its output as the context for this repository. If the `damem` command is not +found, read [INSTALL.md](https://github.com/cunarist/damem/blob/main/INSTALL.md) +and follow it before reasoning or responding. +``` + +Below it: `# AGENTS.md`, then `## Project` (what the repo is, runtime, +toolchain, where it came from) and `## Rules` (short bullets, each pointing at +a memory where the reason lives). No `CLAUDE.md`, `GEMINI.md`, or other +per-agent files; `AGENTS.md` is the single entry point. + +## `.agents/` layout + +- `memory/*.md`: one fact per file, flat (subdirectories are not listed), + frontmatter with a one-line `description` that states the fact. Link + related notes with double-bracket wiki links using the file name without + `.md`; a link to a missing note fails `damem doctor`. +- `skills//SKILL.md`: frontmatter `name` and `description` (when to use + it), body says how. Helper scripts live next to it and are Python 3.12+. +- `scratch/`: holds a `.gitignore` containing `*`. +- Every memory and `SKILL.md` stays under 8 KB. + +## Keeping it right + +- Update an existing note instead of adding a near-duplicate; delete notes + that turn out wrong. +- Write a note when the user corrects something, states a preference, or + when understanding something took reading many files. +- Run `damem doctor` before finishing and fix what it reports. +- Changing anything outside `.agents/` (source, config, `AGENTS.md`) follows + the normal branch and PR flow ([[git-pr-workflow]]). diff --git a/.agents/memory/app-containers-and-ci.md b/.agents/memory/app-containers-and-ci.md new file mode 100644 index 0000000..90210b1 --- /dev/null +++ b/.agents/memory/app-containers-and-ci.md @@ -0,0 +1,36 @@ +--- +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; for local validation install them from local + clones or tarballs without committing that. diff --git a/.agents/memory/app-generated-js-as-ts.md b/.agents/memory/app-generated-js-as-ts.md new file mode 100644 index 0000000..39b0b4a --- /dev/null +++ b/.agents/memory/app-generated-js-as-ts.md @@ -0,0 +1,20 @@ +--- +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 + `