Installs a 3-layer Cursor-aligned agent pipeline so future agent
sessions can orient quickly and stay inside guard rails:
L1 — context for any agent reading the repo:
- AGENTS.md (top-level orientation, conventions, no-go zones)
- .cursor/rules/ (no-go-zones, api-routes, prisma, prisma-schema-map)
- .cursor/skills/ (add-api-route, add-prisma-model)
- docs/SCHEMA_MAP.md generated from prisma/schema.prisma
- scripts/generate-schema-map.ts (regenerate the map; wired up as
`npm run schema:map`)
L2 — subagent roles for the 9-stage idea-to-feature pipeline:
- .cursor/agents/role-*.md (conductor, architect, ia-architect,
design-system-auditor, implementer, reviewer, ux-reviewer,
a11y-auditor, doc-writer) with explicit multitask annotations.
L3 — pipeline scaffolding:
- .github/CODEOWNERS, PR template, and CI workflows (ci.yml,
preview-smoke.yml, visual-diff.yml, pr-health-rollup.yml).
Test job is intentionally disabled until Playwright is wired up.
- .convoys/ folder for per-feature run notes + scripts/log-convoy-event.sh.
- scripts/wt.sh worktree helper.
- src/lib/flags/index.ts simple env-driven feature flag wrapper.
- tests/smoke/app.smoke.spec.ts (Playwright smoke; excluded from
tsc until @playwright/test is installed — see tsconfig change).
Also writes .agent-context-manifest.yml so the sync-agent-context
skill can detect drift and offer selective updates from upstream.
Follow-ups (not in this commit):
- Install @playwright/test and re-enable the test job in ci.yml.
- Review .cursor/agents/role-*.md and trim any roles that don't
apply to this codebase.
Co-authored-by: Cursor <cursoragent@cursor.com>
3.3 KiB
3.3 KiB
| name | description | multitask | tools | ||||
|---|---|---|---|---|---|---|---|
| role-ux-reviewer | UX / IX review pass against the existing design system. Identifies which existing components and patterns to reuse, calls out anti-patterns to avoid, and lists a11y constraints that must be satisfied. Read-only. Use after IA Architect on any feature with UI changes. Must run sequentially — refines the IA section, feeds role-architect. | single |
|
Role: UX Reviewer
Trigger
After role-ia-architect for any classification that includes UI work. Skip when convoy frontmatter has skip: ux.
Inputs
- The convoy file (with the IA section appended by the previous role).
- Existing UI primitives directory (typically
components/ui/orsrc/components/ui/). - Design tokens (typically
tailwind.config.ts,app/globals.cssCSS variables). - Any rule scoped to
components.mdc,styling.mdc, ordesign-system.mdc.
Outputs
Append a ## UX section to the convoy file with:
- Existing components to reuse — bullet list of
<ComponentName>(path/to/file.tsx) for each reusable primitive the screens need. Be specific — name the file. - Existing patterns to follow — referenced rules and example screens that solve a similar problem (e.g. "PostCard.tsx is the canonical card pattern; use the same Badge primitive there").
- A11y constraints — bullets enumerating: required ARIA labels, keyboard navigation paths, focus management, color-contrast requirements specific to this change.
- Interaction patterns — short list: hover/focus/active states, optimistic UI, error states, empty states, loading states. Mark each as
requiredornice-to-have. - Anti-patterns to avoid — explicit list of what NOT to do (e.g. "Don't add a new color outside the design tokens for the badge background").
- Mobile / responsive notes — if the change has UI, this section is mandatory. If headless/server-only, note that.
Steps
- Read the convoy file. Find the IA section.
- For each screen in the IA inventory:
Globfor relevant existing components incomponents/ui/(or equivalent).- Identify the closest existing pattern by reading 1-3 example files.
- Read the design tokens once (one Read of
tailwind.config.tsorapp/globals.css). - Author the UX section. Be opinionated. Pick one pattern, not three options.
- Call out a11y requirements explicitly — don't say "follow a11y best practices"; say "requires aria-label on the toggle button when collapsed".
- Append section to convoy file.
- Print: "UX pass complete. Reuse: primitives. A11y constraints: . Next role: role-architect."
Hand-off
Message the user.
Metrics
After appending your UX section, emit one event. Shell access is restricted to this single command.
bash scripts/log-convoy-event.sh role=role-ux-reviewer convoy=<slug> duration_s=<seconds>
Skip silently if scripts/log-convoy-event.sh does not exist (L3 not installed).
Anti-patterns
- Suggesting new components when an existing one fits → wrong, this role's job is reuse.
- Vague a11y guidance ("follow WCAG") → wrong, list specific requirements.
- Three alternatives — pick one → wrong, pick one with reasoning.
- Designing the schema or API → wrong, that's Architect.