You are the Lead Software Architect (Cursor Agent). Your resource is the Creative Director (Gemini CLI). Your goal is to build a high-quality "Todo List" app, orchestrating asset generation, engineering, and Rigorous QA Testing.
- Repo:
vrt-todo-r2(viagh repo create). - Stack:
pnpm,Zustand,IndexedDB,Tailwind CSS,clsx,date-fns,@hello-pangea/dnd. - Testing:
vitest(Unit),playwright(E2E),@axe-core/playwright(A11y). - Design: "Nook Exchange" Aesthetic (Generated Assets + CSS).
- Collaboration: You (Cursor) write code/tests; You invoke
geminiCLI for assets. - DevOps:
standard-version, GitHub Actions.
For EACH Step, follow the "Verify & Merge Routine":
- Branch:
git checkout -b feature/<step-name> - Work: Implement changes. Delegate asset creation to Gemini CLI where specified.
- Lint & Fix:
pnpm exec eslint . --fix(No semicolons). - Test & Build:
- Run
pnpm test(Unit Tests) if applicable. - Run
pnpm build(Must Pass).
- Run
- Commit:
git commit -m "feat(<scope>): <message>" - Push:
git push -u origin feature/<step-name> - PR:
gh pr create ... - Merge:
gh pr merge --merge --auto --delete-branch - Sync:
git checkout main && git pull
- Branch:
feature/setup - Action:
- Scaffold repo & install runtime deps.
- Install Test Deps:
pnpm add -D vitest @testing-library/react jsdom @playwright/test @axe-core/playwright. - Setup
.editorconfig,.env,vite.config.ts.
- Protocol: Verify & Merge.
- Branch:
feature/logic - Action:
- DB Schema & Store Logic (
addTodo,reorderTodos, etc.).
- DB Schema & Store Logic (
- Protocol: Verify & Merge.
- Branch:
feature/ui-core - Action:
- Components:
TodoList,TodoItem,SearchBar. - A11y Requirement (CRITICAL):
- All interactive elements must have semantic tags (
<button>,<input>). - Icon-only buttons MUST have
aria-label(e.g.,aria-label="Delete todo"). - Ensure keyboard navigation focus states (
focus-visible).
- All interactive elements must have semantic tags (
- Components:
- Protocol: Verify & Merge.
- Branch:
feature/assets - Action:
- Execute
geminiCLI forbg-pattern.png,favicon-source.png,og-image.png. - (Same commands as previous version).
- Execute
- Protocol: Verify & Merge.
- Branch:
feature/design - Action:
- Integrate Gemini assets (CSS background, favicon).
- Apply "Nook Exchange" Tailwind theme.
- Protocol: Verify & Merge.
- Branch:
feature/qa - Action:
- Unit Tests (
vitest):- Create
src/stores/__tests__/todoStore.test.ts. - Test: adding a todo, toggling completion, deleting, and filtering logic.
- Create
- E2E Tests (
playwright):- Update/Create
tests/app.spec.ts. - Scenario 1 (Flow): Open app -> Add "Buy Turnips" -> Verify list -> Check done -> Refresh (Persist check).
- Scenario 2 (A11y): Inject
axe-corein Playwright to scan for accessibility violations (contrast, labels).// Example A11y check in Playwright import { test, expect } from '@playwright/test'; import { injectAxe, checkA11y } from 'axe-playwright'; test('should not have any automatically detectable accessibility issues', async ({ page }) => { await page.goto('/'); await injectAxe(page); await checkA11y(page); });
- Update/Create
- Execution: Run
pnpm exec playwright installand then run the tests to verify.
- Unit Tests (
- Protocol: Verify & Merge (Commit:
test: add unit and e2e suites with a11y checks).
- Branch:
feature/release - Action:
- Setup CI/CD (
deploy.yml,ci.yml- includepnpm test). - Cleanup: Remove unused assets, keep Gemini assets.
- Setup CI/CD (
- Protocol: Verify & Merge.
- Branch:
feature/docs - Action:
- Update
README.mdwith Test commands (pnpm test,pnpm e2e).
- Update
- Protocol: Verify & Merge.
- Testing Standard: - Unit tests must cover core business logic (Store).
- E2E must cover critical user paths.
- Zero A11y Violations: The app must pass automated
axechecks.
- Orchestration: Cursor drives, Gemini designs.
- Code Style: No semicolons, Mobile-First.
Analyze this plan. If understood, start executing Step 1 immediately.