Tasks: First-party design system¶
Each task must reference one or more
FR-*/NFR-*/AC-*IDs fromspec.md. CI'sspec_validator.pyenforces that every requirement inspec.mdis referenced by at least one task.
Conventions¶
- Status:
[ ]todo /[~]in-progress /[x]done. - Owner: GitHub handle or
@copilot/@agent:<role>. - Each task lists exact files to touch and how to verify.
T-001 — Land CSS tokens¶
- Refs: FR-1, FR-2, NFR-A11Y-1, AC-1
- Owner: @copilot
- Status:
[ ] - Files:
frontend/ui/tokens.css(new)frontend/app/globals.cssfrontend/__tests__/ui/tokens.test.ts(new)- Steps:
- Create
frontend/ui/tokens.csswith the locked table in plan §2 (including--accentalias →--accent-practice). - Import it from
frontend/app/globals.cssand map variables through@theme. Keep@import "tailwindcss"and existing--background/--foregroundas aliases of--bg/--textso unmigrated screens do not flash. - Assert required names in
tokens.test.ts. - Verify:
make test-frontendincludes the new test.- Contrast of
--text/--text-mutedon--bgmeets AA (document ratios in the test or README).
T-002 — Extract semantic CSS and wire lsat-static¶
- Refs: FR-3, NFR-PERF-1, AC-1, AC-2
- Owner: @copilot
- Status:
[ ] - Files:
frontend/ui/semantic.css(new)lsat-static/app/globals.cssMakefile(only if the copy fallback is required)- Steps:
- Move atoms (
.btn*,.card*,.choice*,.pill*,.empty,.wrap,.sr-only,:focus-visible) intosemantic.css, referencing tokens not hex. - Import tokens + semantic from
lsat-static/app/globals.css; delete duplicated:roothex. - Leave template CSS (drill, passage, stats, header layout) in the static app.
- If Next rejects the cross-app
@import, add the copy fallback from the plan (R-2). - Verify:
lsat-staticproduction build succeeds inside Docker (or the existing make target) and the output CSS has no Tailwind runtime.- Overview/Drill still show amber primary buttons.
T-003 — React primitives¶
- Refs: FR-4, NFR-A11Y-1, NFR-SEC-1
- Owner: @copilot
- Status:
[ ] - Files:
frontend/ui/components/Button.tsx(new)frontend/ui/components/Card.tsx(new)frontend/ui/components/Input.tsx(new)frontend/ui/components/Badge.tsx(new)frontend/ui/components/Pill.tsx(new)frontend/ui/components/Empty.tsx(new)frontend/ui/index.ts(new barrel)- Steps:
- Implement primitives on tokens / semantic classes.
Buttonvariants:default|primary|danger.Badgevariants:ok|warn|no|muted. classNamemerge via a tiny local helper (noclsx/cvaunless already a dependency — they are not; keep it to template strings).- Focus ring on every interactive primitive.
- Verify:
npx tsc --noEmitviamake typecheck.- No new runtime npm dependencies in
frontend/package.json.
T-004 — Choice primitive (keyboard radiogroup)¶
- Refs: FR-4, NFR-A11Y-2, AC-3
- Owner: @copilot
- Status:
[ ] - Files:
frontend/ui/components/Choice.tsx(new)frontend/__tests__/ui/Choice.test.tsx(new)- Steps:
- Port the radiogroup behavior from
lsat-static/components/QuestionCard.tsxintoChoice(list of{label, text}, selected, submitted, correct label). - Visual states use
.choice/.choice-selected/.choice-correct/.choice-wrong. - Verify:
- RTL: arrow keys move, Enter submits, correct/incorrect classes appear.
T-005 — Disclaimer primitives + proof migration¶
- Refs: FR-4, FR-5, FR-9, AC-4, NFR-A11Y-1
- Owner: @copilot
- Status:
[ ] - Files:
frontend/ui/components/LegalDisclaimer.tsx(new)frontend/components/LegalDisclaimer.tsx(re-export)frontend/components/NavBar.tsxlsat-static/components/QuestionCard.tsxfrontend/__tests__/ui/LegalDisclaimer.test.tsx(new)tests/test_ui_tokens.py(new — AC-4 grep on proof files)- Steps:
- Move Banner/Footer into
frontend/ui; keep existing import paths working. - NavBar: token utilities / Button; no raw hex; keep behavior (mobile drawer, active route). Do not "fix" the Local pill here (follow-up).
- QuestionCard: render
Choice; keep attempt recording and announcements. - Structural test: proof files contain no
#rrggbb/rgb(. - Verify:
- Existing
frontend/__tests__/LsatLab.test.tsxand NavBar-related tests still pass if present. make test-frontend+python3 tests/test_ui_tokens.py(or pytest via the repo smoke suite).
T-006 — Catalog + design-sync consumer¶
- Refs: FR-6, FR-8
- Owner: @copilot
- Status:
[ ] - Files:
frontend/ui/README.md(new)docs/ui-ux.md.design-sync/ds/styles.src.css.design-sync/NOTES.md.design-sync/conventions.md- Steps:
- Catalog every primitive, accent role, and "do not import shadcn".
- Update
docs/ui-ux.md"Governance target" to "Current layout" once files exist. - Point design-sync stylesheet at
frontend/ui/tokens.css+semantic.css; drop duplicated:root. - NOTES: DS consumes
frontend/ui/; do not hand-edit compiled colors. - Verify:
- Links in README resolve (case-exact;
tests/test_docs.pyscan).
T-007 — Accept ADR 0006 and align locked docs¶
- Refs: FR-7, NFR-DOCS-1, NFR-AUDIT-1, NFR-HITL-1, AC-6
- Owner: @bamr87 (human) + @copilot
- Status:
[ ] - Files:
docs/adr/0006-first-party-design-system.md(status → accepted)docs/adr/README.mddocs/constitution.md§2, §9AGENTS.md(frontend stack + Important Context Files +frontend/ui/in the tree)README.mdstack linePRD.mdfrontend bullet (pointer, not a rewrite)tests/test_docs.py(docs/ui-ux.mdinREQUIRED_DOCS)- Steps:
- Human accepts ADR 0006.
- Amend constitution §2 frontend line per the ADR; add §9 bullet for
docs/ui-ux.md. - Align AGENTS.md / README; do not claim Next 15 or shadcn.
- Verify:
rg -n shadcn AGENTS.md docs/constitution.md README.mdis empty (PRD/Proposal historical text may keep a pointer).python3 tests/test_docs.pyequivalent viamake testsmoke.
T-008 — Primitive test suite gate¶
- Refs: FR-9, AC-5, NFR-A11Y-1
- Owner: @copilot
- Status:
[ ] - Files:
frontend/__tests__/ui/*.test.tsx- Steps:
- Fill remaining primitive tests (Button variants, Empty, Banner heading).
- Run the full frontend suite in Docker.
- Verify:
make test-frontendmake lint/make typecheckpython3 scripts/spec_validator.py specs/039-design-systempython3 scripts/backlog_lint.py
Done-When (Definition of Done)¶
- All tasks
[x]. - All
AC-*fromspec.mdcovered by passing tests. make lint && make typecheck && make test-frontendgreen.- LegalBench delta: 0 pp (N/A — no reasoning change).
- ADR 0006 accepted; constitution §2 no longer lists shadcn/ui.
## Follow-ups Discoveredsection below populated.
Follow-ups Discovered¶
Append-only. Mirror each item into BACKLOG.md with a
BL-YYYYMMDD-NNid.
- BL-20260830-01 — tech-debt, med — Unused frontend deps (
@tanstack/react-query,framer-motion,lucide-react,@xyflow/react) declared with zero imports. - BL-20260830-02 — refactor, med — Decompose
LsatLab.tsx(~1611 lines) andAgentDashboard.tsx(~1460 lines) ontofrontend/uiprimitives. - BL-20260830-03 — doc-gap, low — Homepage STACK copy still says FastAPI · Next.js 15; hero GitHub chip href is
https://github.comnot the repo. - BL-20260830-04 — feature, low — Unify
LsatTimerandlsat-staticSectionTimeronto a shared Timer primitive. - BL-20260830-05 — feature, low — NavBar status pill is hardcoded
v0.1.1 · Local(always green) and the brand mark reads "LG". - BL-20260830-06 — tech-debt, low — Homepage renders a marketing footer in addition to
LegalDisclaimerFooter(double footer).