docs/backend-migration/plans/2026-04-23-assistant-module-verification-plan.md
Coordinator-owned. Executed by a small TEAM (coordinator + frontend-dev + e2e-tester; backend-dev on demand). Teammates follow the plan section assigned to them.
Steps use checkbox (
- [ ]) syntax.
Goal: Verify the Assistant module's backend migration (already done as a side effect of the Skill-Library pilot) preserves pre-migration behavior end-to-end.
Architecture: Verification track, not a fresh migration. Three-teammate team (coordinator + frontend-dev + e2e-tester), serialized on a single AionUi working tree. backend-dev only spawned if Class D/F failures surface.
Tech Stack: Vitest 4 + Playwright + axum backend binary from
aionui-backend repo (already current via ~/.cargo/bin/aionui-backend).
| Branch | Repo | Base | Owner |
|---|---|---|---|
feat/backend-migration-coordinator | AionUi | (reused from Skill pilot) | coordinator |
feat/backend-migration-assistant-verify | AionUi | origin/feat/backend-migration | fe + e2e |
feat/extension-assistant-fix (on demand) | aionui-backend | origin/feat/backend-migration | backend-dev |
git -C /Users/zhoukai/Documents/github/AionUi fetch origin
git -C /Users/zhoukai/Documents/github/aionui-backend fetch origin
cd /Users/zhoukai/Documents/github/AionUi
git checkout -b feat/backend-migration-assistant-verify origin/feat/backend-migration
git merge origin/kaizhou-lab/test/e2e-coverage --no-edit
git push -u origin feat/backend-migration-assistant-verify
Expected: branch at origin/feat/backend-migration tip + e2e-coverage merged.
If conflicts: resolve (prefer e2e-coverage for tests/e2e/ paths, prefer base
for src/ paths), commit, push.
Read-only verification:
grep -n "assistant" /Users/zhoukai/Documents/github/AionUi/src/common/adapter/ipcBridge.ts | head -15
grep -n "assistant-rule\|assistant-skill\|assistants" /Users/zhoukai/Documents/github/aionui-backend/crates/aionui-extension/src/routes.rs /Users/zhoukai/Documents/github/aionui-backend/crates/aionui-extension/src/skill_routes.rs 2>/dev/null | head -15
Expected — 7 endpoint pairs match:
ipcBridge.extensions.getAssistants ↔ GET /api/extensions/assistantsipcBridge.fs.readAssistantRule ↔ POST /api/skills/assistant-rule/readipcBridge.fs.writeAssistantRule ↔ POST /api/skills/assistant-rule/writeipcBridge.fs.deleteAssistantRule ↔ DELETE /api/skills/assistant-rule/{id}ipcBridge.fs.readAssistantSkill ↔ POST /api/skills/assistant-skill/readipcBridge.fs.writeAssistantSkill ↔ POST /api/skills/assistant-skill/writeipcBridge.fs.deleteAssistantSkill ↔ DELETE /api/skills/assistant-skill/{id}If any mismatch: STOP and SendMessage user. Do not proceed.
cd /Users/zhoukai/Documents/github/aionui-backend
git checkout feat/extension-skill-library # latest backend work
ls -la ~/.cargo/bin/aionui-backend # must exist
stat -f "%Sm" ~/.cargo/bin/aionui-backend # must post-date any recent backend change
If missing or stale:
cargo install --path crates/aionui-app
Lesson from Skill pilot: stale out/renderer/ breaks e2e silently.
cd /Users/zhoukai/Documents/github/AionUi
bunx electron-vite build
stat -f "%Sm" out/renderer/index.html # must be fresh (today)
TeamCreate { team_name: "aionui-assistant-verify", description: "Assistant module backend migration verification" }
Register tasks:
Block-by chain: B blocked by A; C blocked by B; D inserted between A/B or after B as needed.
cd /Users/zhoukai/Documents/github/AionUi
git checkout feat/backend-migration-coordinator
git add docs/backend-migration/specs/2026-04-23-assistant-module-verification-design.md docs/backend-migration/plans/2026-04-23-assistant-module-verification-plan.md
git commit -m "docs(backend-migration): add assistant module verification spec and plan"
git push
Owner: frontend-dev. Depends on: Task 0 complete.
Files (to be touched only if Vitest flags issues):
tests/unit/assistantHooks.dom.test.ts (likely needs auto-unwrap mock fix, same as SkillsHub)tests/unit/assistantUtils.test.tstests/unit/assistantPresets.i18n.test.tsPre-activation (coordinator):
cd /Users/zhoukai/Documents/github/AionUi
git checkout feat/backend-migration-assistant-verify
git pull --ff-only
TaskUpdate(taskId:"<A>", owner:"frontend-dev", status:"in_progress")SendMessage to coordinator: "frontend-dev alive, starting Assistant verification".Bash: verify branch.cd /Users/zhoukai/Documents/github/AionUi
bunx tsc --noEmit
bun run lint --quiet
Expected: both pass. If not: fix atomically per AGENTS.md rules.
bun run test -- --run tests/unit/assistantHooks.dom.test.ts tests/unit/assistantUtils.test.ts tests/unit/assistantPresets.i18n.test.ts
Expected: all green. If any fail due to HTTP auto-unwrap mock pattern (same as SkillsHub ab06d3a3b), fix atomically:
Commit pattern: test(assistant-hooks): unwrap ipcBridge mocks for HTTP bridge auto-unwrap
Push per commit.
bun start
Test cases (take screenshots of each; save to /tmp/assistant-verify/ — do NOT commit screenshots):
If any step fails: write docs/backend-migration/incidents/2026-04-23-assistant-<symptom-slug>.md, commit, push, SendMessage coordinator.
If all pass: proceed.
Create docs/backend-migration/modules/assistant.md:
# Assistant Module Migration Record — 2026-04-23
## Status: Migration complete (pre-existing, via Skill-Library pilot)
## Endpoints migrated
<7 endpoints with backend commit SHAs>
## Renderer touched (this verification)
<files changed, if any>
## Known caveats
<anything surfaced>
Commit: docs(backend-migration): record assistant module verification.
Push.
docs/backend-migration/handoffs/frontend-dev-assistant-verify-2026-04-23.md
following the pilot's Step 5.1 template. Commit + push.
SendMessage coordinator: "Task A complete. Branch <sha>. Released working tree."
TaskUpdate(taskId:"<A>", status:"completed").
Owner: e2e-tester. Depends on: Task A complete.
Files (only doc writes):
docs/backend-migration/e2e-reports/2026-04-23-assistant.md (create)docs/backend-migration/handoffs/e2e-tester-assistant-verify-2026-04-23.md (create)Pre-activation (coordinator):
stat check).Same as Task A. Claim task, alive message, branch verify.
cd /Users/zhoukai/Documents/github/AionUi
git log --oneline -5
which aionui-backend
export PATH="$HOME/.cargo/bin:$PATH"
stat -f "%Sm" ~/.cargo/bin/aionui-backend out/renderer/index.html
Both timestamps must be from today.
ls tests/e2e/features/assistants/
grep -c "^\s*test(" tests/e2e/features/assistants/*.e2e.ts
grep -n "invokeBridge\|subscribe-" tests/e2e/helpers/assistantSettings.ts
Expected: 3 files, ~50 tests total. Expect 0 legacy IPC matches in the helper (unlike skills, which had 9).
SendMessage coordinator with start time + ETA BEFORE running:
bun run test:e2e tests/e2e/features/assistants/
ETA estimate: 30-60 min for ~50 tests (at ~30-60s per test with 60s timeout, single worker).
Same categories:
docs/backend-migration/e2e-reports/2026-04-23-assistant.md with:
curl for Class D/F hypothesesCommit: docs(backend-migration): e2e verification report for assistant module. Push.
Same pattern. Commit + push.
coordinator: "Assistant e2e verification clean (or with test-authoring
residual only)." TaskUpdate completed.coordinator
with per-failure routing suggestion; coordinator spawns backend-dev for
Class D/F fixes, then B loops back to rerun.Spawned only if Task B reveals Class D or Class F failures.
Brief to backend-dev:
cargo test + cargo build --release + cargo install.coordinator with SHA.Depends on: Task B completed.
cd /Users/zhoukai/Documents/github/AionUi
git checkout feat/backend-migration-coordinator
git merge origin/feat/backend-migration-assistant-verify --no-edit
git push
docs/backend-migration/handoffs/coordinator-assistant-verify-2026-04-23.md
capturing: final outcome, lessons (esp. any "we can skip pilot for modules
already migrated as side effect" patterns), open tickets.
Commit + push.
SendMessage shutdown_request to frontend-dev, e2e-tester, and backend-dev (if spawned). TaskUpdate Task C completed.
Based on outcome: either declare Assistant module done and start the next module per spec §3 ordering, OR note remaining blockers for the user.
Update docs/backend-migration/post-pilot/2026-04-23-skill-library-followups.md
with any new items uncovered during verification.