aae4d42229
Adds the agent-facing workspace and a 20-task plan for migrating the site to Astro. Nothing here implements the refactor; these are briefs, rules and templates that the task agents read. - .agents/ holds context, rules, checklists, skills, specialist agents, component/page/config templates and gate scripts. It is vendor-neutral so MiniMax, Gemini and Codex can all read it; CLAUDE.md just points at AGENTS.md. - .husky/ plus .lintstagedrc.json wire the three gate tiers. gate.sh locks on the shared git-common-dir so parallel worktrees serialise, and guards the assertion count in scripts/verify.mjs against a coverage drop. - plans/astro-refactor/ carries the phase graph, per-task briefs and the model-routing recommendation. These files must be tracked before fanning out: a worktree only checks out tracked files, so an untracked plan is invisible to every agent working in one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
45 lines
1.9 KiB
Markdown
45 lines
1.9 KiB
Markdown
# Task 19 — Re-point the verification contract
|
|
|
|
**Agent**: `verification-engineer` · **Model**: Codex
|
|
**Depends on**: 15, 16 · **Parallel with**: 18
|
|
**Worktree**: `.agents/scripts/worktree.sh start 19 verify-repoint`
|
|
|
|
## Goal
|
|
|
|
All 42 assertions pin the same user-visible facts against the new architecture.
|
|
Coverage does not fall.
|
|
|
|
You are the only role permitted to remove an assertion, and every removal needs
|
|
a written reason.
|
|
|
|
## The three kinds
|
|
|
|
| Kind | Example | What to do |
|
|
| --- | --- | --- |
|
|
| Content presence | `data-phase="plan"` | re-point at `dist/full-guide/index.html`; the token should survive rendering. If it does not, a component dropped content — **stop and report** |
|
|
| Implementation detail | `const phases`, `renderTree`, `from './catalog.js'` | obsolete as written, but each pins a **feature**. Replace with an output-level assertion of that feature. Never drop |
|
|
| Asset version | `app.js?v=20260904-vote-widget` | Astro hashes assets — assert the built HTML references a hashed asset |
|
|
|
|
## Steps
|
|
|
|
1. `npm run build`, then re-point `read()` calls at `dist/`.
|
|
2. Work through all 42 in order. For each: does the fact it pins still exist?
|
|
Yes → re-point. No → content was lost; escalate.
|
|
3. Add rendered-text snapshot assertions for all ten routes so this class of
|
|
regression is caught structurally, not by string luck.
|
|
4. Confirm `check-tokens.mjs` and the extended `audit-ui.mjs` are in
|
|
`npm run verify`.
|
|
|
|
## Done when
|
|
|
|
- [ ] `grep -c 'throw new Error' scripts/verify.mjs` ≥ the `origin/main` baseline
|
|
- [ ] Every removal has a one-line reason in this file
|
|
- [ ] Snapshot assertions cover all ten routes
|
|
- [ ] `npm run gate` green, and it **fails** when you deliberately delete a
|
|
paragraph from a component (prove the net works, then revert)
|
|
|
|
## Do not
|
|
|
|
Do not weaken an assertion to make it pass. If it cannot pass, something is
|
|
broken — that is the assertion doing its job.
|