This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
---
|
||||
name: migrate-deno-repo
|
||||
description: Checklist for moving a Deno repo (or a leftover Deno part of one) to Node 22+ + Vite+ with npm, same behavior, full lint parity, one PR
|
||||
---
|
||||
|
||||
Template: `cunarist/eslint-plugin-explicit-types` on `main`. Read its
|
||||
`AGENTS.md`, `vite.config.ts`, `scripts/project-lint.ts`, `package.json`, and
|
||||
CI before starting, and copy their shape. Never ask the user mid-way when
|
||||
they're away: decide by the memories, record the choice in the PR.
|
||||
|
||||
Branch `node-migration` (apps) or `initial-port` (new plugin repos); one PR
|
||||
with everything.
|
||||
|
||||
**Inventory first**
|
||||
|
||||
- [ ] List every `deno.json` task, import-map entry, lint rule (tags,
|
||||
includes, `@hugoalh`, custom plugins), test, `Deno.*` call, JSON/CSS/SVG
|
||||
import, and every place the output is consumed (Rust, HTML,
|
||||
Containerfile, CI).
|
||||
|
||||
**Toolchain**
|
||||
|
||||
- [ ] `package.json` in the required key order, `engines.node ">=22"`, no
|
||||
`packageManager`, no `peerDependencies`; `npm install`; commit
|
||||
`package-lock.json`.
|
||||
- [ ] `tsconfig.json` from the template; `vite.config.ts` with `fmt:
|
||||
{ sortPackageJson: false }` and the category-based `lint` block.
|
||||
- [ ] Delete `deno.json`, `deno.lock`, and Deno-only files. `mod.ts` →
|
||||
`index.ts`; `deno.json` imports → `package.json` `imports` (`#x/*`
|
||||
patterns for trailing-slash mappings); `jsr:`/`npm:` → npm packages.
|
||||
|
||||
**Code**
|
||||
|
||||
- [ ] Only `.ts` files; no non-`.ts` imports: CSS via `<link>`, JSON and SVG
|
||||
as `.ts` modules, icons in memona's style.
|
||||
- [ ] `Deno.*` → `node:*` / `process`. Generated JS written as `.ts`, built,
|
||||
gitignored.
|
||||
- [ ] Decorators stay standard with `accessor`; add `scripts/decorators.ts`
|
||||
if the repo has any. Lit repos: `scripts/lit-check.ts` + `npm run
|
||||
lit-check`.
|
||||
|
||||
**Lint**
|
||||
|
||||
- [ ] `scripts/project-lint.ts` copied; old local Deno lint rules ported into
|
||||
it; parity mapping for every former rule; `id-match`; no disable
|
||||
comments; no source `overrides`; refactor size-rule hits.
|
||||
|
||||
**Tests**
|
||||
|
||||
- [ ] `Deno.test` → Vitest (codemod, then finish TODOs); unit tests next to
|
||||
code, integration in `tests/`; no case dropped.
|
||||
|
||||
**Build, ship, CI**
|
||||
|
||||
- [ ] `vp build` in app mode with the same output paths, or `vp pack` for
|
||||
packages. Containerfile node stage on `node:24-alpine`. CI with
|
||||
`setup-vp`: `vp check`, build, `vp test` (+ lit-check). Packages:
|
||||
release-triggered `publish.yml`.
|
||||
- [ ] `AGENTS.md` with the damem header, `.agents/` notes from the damem kit,
|
||||
README updated (Node.js 22+, no Deno instructions). `damem doctor`
|
||||
clean.
|
||||
|
||||
**Finish**
|
||||
|
||||
- [ ] `vp check`, `vp test`, build all pass locally; the app runs.
|
||||
- [ ] Commit in plain imperative sentences; open the PR (summary, changes,
|
||||
parity mapping, deviations/risks, "CI fails until @cunarist/eslint-plugin-*
|
||||
are published" if relevant, verification, footer line).
|
||||
- [ ] Run `review-cycle`. Never merge, publish, or archive.
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: review-cycle
|
||||
description: After opening a PR, run review rounds until fully approved; @bot on Capsulizers Gitea repos, an adversarial subagent review posted as a PR comment elsewhere; then hand to the user, never merge
|
||||
---
|
||||
|
||||
Every PR gets reviewed before the user sees it. Repeat rounds until the
|
||||
review is a full approval (cap: 6 rounds; if still not approved, stop and
|
||||
report what remains). Never approve to finish early, and never merge.
|
||||
|
||||
## Capsulizers repos (git.capsulizers.com) with `.gitea/workflows/agents.yml`
|
||||
|
||||
1. Comment `@bot` on the PR through the Gitea API, as the user's own account
|
||||
(credentials from the user's environment, sourced in a subshell, never
|
||||
printed).
|
||||
2. Wait for the review from the `bot` account (poll about every 2 minutes,
|
||||
up to about 30 minutes per round).
|
||||
3. For each point: fix valid ones with commits on the PR branch; reply
|
||||
briefly with reasons to ones that are wrong.
|
||||
4. Re-run `vp check`, the build, and `vp test`, push, and comment `@bot`
|
||||
again. Done when the bot approves.
|
||||
|
||||
## Other repos (GitHub, or Gitea without the bot)
|
||||
|
||||
1. Have a separate subagent review the **full PR diff** adversarially:
|
||||
correctness, behavior changes, missed Deno APIs, broken build paths, lint
|
||||
parity, and violations of the repo's `.agents/memory` rules.
|
||||
2. Post the review as a PR comment headed `Automated review (round N)`,
|
||||
ending with exactly one verdict line: `VERDICT: APPROVED` or
|
||||
`VERDICT: CHANGES REQUESTED`.
|
||||
3. Address every point with commits, re-run checks, push, and reply to the
|
||||
review comment summarizing the fixes.
|
||||
4. Next round reviews from scratch, not just the fixes. Done when a round's
|
||||
verdict is `APPROVED`.
|
||||
|
||||
## After approval
|
||||
|
||||
- Ask the user to review (or, when the user is away, list the PR and any open
|
||||
questions in the report and the questions file). Don't wait idle.
|
||||
- The user merges (squash). Don't merge even after approval unless the user
|
||||
explicitly allowed it for this PR.
|
||||
Reference in New Issue
Block a user