| name | fantasia-final-cleanup |
| description | End-of-batch ship workflow for Fantasia Archive: run full yarn testbatch:verify (not dev scoped gate), fix failures, sync README/AGENTS/rules/skills from Git changes, update in-app changelog, split conventional commits, and git push. Use when the user says final cleanup, doing final cleanup, run final cleanup, wrap up and ship, or similar end-of-session handoff language. |
Final cleanup — ship the current batch
Execute in this exact order. Do not skip, merge, or reorder unless user interrupts with narrower instruction.
Final cleanup = explicit handoff: may commit and push without per-commit approval (unlike default in git-conventional-commits). Still conventional type: subject + logical splits.
Step 1 — Full verify quality gate
One terminal — full gate only here (not default after ordinary edits; see dev-scoped-verify.mdc):
yarn testbatch:verify
- Stop on first failure; report what failed + where
- Debug individual steps from testing-terminal-isolation.mdc, then re-run full chain
- Do not append Playwright, Electron prod build, or Storybook unless user asked
yarn testbatch:ensure:nochange or yarn testbatch:ensure:change
Step 2 — Fix issues
- Step 1 failed → fix root causes, re-run
yarn testbatch:verify until green
- Step 1 passed → step 3
- No changelog/commit until verify green (except rare changelog-only repair — testing-terminal-isolation.mdc)
Step 3 — Sync maintainer docs from Git
Inspect working tree + diff (git status, git diff, git diff --staged):
| Area | When to update |
|---|
README.md | New scripts, test commands, architecture, contributor workflows |
AGENTS.md | New subsystems, rules, skills, testing expectations, repo layout |
.cursor/rules/*.mdc | New enforced policies or rule corrections |
.cursor/skills/**/SKILL.md | New playbooks or materially changed workflows |
docs/database/** | .faproject schema, migrations, project IPC, electron-store persistence |
- Match existing tone/structure; no drive-by rewrites unrelated to diff
- Omit doc edits when batch trivial + already covered elsewhere
- Synced maintainer docs (
README.md, AGENTS.md, .cursor/rules/, .cursor/skills/) use caveman style per AGENTS.md maintainer doc policy (caveman-compress)
docs: commits may group README + AGENTS + rules + skills when same batch
Step 4 — Changelog
Before product commit:
- Re-read package.json
version (never auto-bump)
- fantasia-changelog-en-us + changelog-en-us.mdc
- User-facing
src/components/**: Storybook aligned (storybook-stories.mdc)
- Prefer same commit as substantive work; user bullets only — no QA/Git meta
Mirror i18n/*/documents/changeLog.md in other locales only when user explicitly asks; default = en-US only.
Step 5 — Commit in logical batches
git status + full diff review
- Ordered commit plan (type, subject, paths). Show plan briefly, then execute unless user objects
- Split:
feat / fix / test / chore / refactor / docs per git-conventional-commits
- Typical order:
chore/refactor before feat/fix; product + tests + changelog together; docs: for maintainer-only; VRT PNGs with UI change
- Never commit secrets; never
--no-verify unless user asks
- After each commit:
git status until clean
Step 6 — Push
When commits done + tree clean:
git push
-u origin <branch> when no upstream. Push fails → report + stop; no force-push main/master unless user asks.
Reporting
Summarize in execution order: verify gate → fixes → docs/changelog touched → each commit → push result.
Related
Types
Shared types → types/. See types-folder.mdc.