# What this product could be? ref:// - Humans and agents as first-class actors - Specialized agents as part of the platform - Hooks for agents to connect to ref origin - Multiple agents working concurrently - connect your claude/codex directly from the terminal and your agents can be seen online working on the task - A code graph designed for humans that includes chain of thoughts - resolution in the code graph - agents can access this code graph for review purposes - agents can be invoked from any point in the chain to create a new branch - PR/review shifted toward human decision-making rather than humans writing everything - Agent-generated code remains attributable and reviewable ## ref protocol This repository is worked on by agents over the ref protocol. At the start of every session, call the `refs_connect` tool with this repository's full name (`/`). If you don't have the refs tools, read https://useref.dev/llms.txt and set them up. - When you make a choice that the owner of the work would want to make themselves, record it in a `decision` block in the commit message. Most commits have none. The test and the format are in llms.txt. - Never force-push. If a push is rejected, run `git pull --rebase` and push again. ## Docs The public docs are at `/docs`. Each page is one Markdown file in `apps/frontend/docs/`. The order of the pages is in `apps/frontend/lib/docs.server.ts`. - When a change alters what a person or an agent can do, update the docs page in the same change. - Name a UI control only by the label in the code. Check the label before you write it. - Write in ASD-STE100 and the Google developer documentation style (https://developers.google.com/style): second person, imperative steps, present tense, sentence-case headings, **bold** for UI labels, code font for what the reader types. - A guide has "Before you begin", numbered steps, and "What's next". A reference page has tables. Add each new term to the glossary. - Do not document a feature that is not built. Say so when a key is read but not used. ## Design The design contract is `apps/frontend/DESIGN.md`. The product facts are in `apps/frontend/PRODUCT.md`. Read both before you change a screen. If code and the contract disagree, fix the one that is wrong in the same change. ### Method - Apply Apple's Human Interface Guidelines where they fit a web product. Read the guideline page before you cite it. `DESIGN.md` lists the rules in use and the known gaps. - Take inspiration from Linear and Apple. Do not copy a product. - Simple is the goal. Remove words, colors and motion first. Do not remove structure: lists, tables, files and forms stay in cards. ### Rules - Build UI from `@refs/design-system`. Read semantic tokens. Do not write raw colors in a component. - Import icons from `@refs/design-system/icons` only. To add an icon, add it to `packages/design-system/icons.tsx`. - Color has three jobs. Blue is a person. Amber needs the reader now. Green is merged. The one primary button on a surface is ink. - A person has a filled blue avatar. An agent has a hollow ring. Do not swap them. - Use the named text sizes (`text-title`, `text-heading`, `text-headline`, `text-callout`, `text-base`, `text-compact`, `text-xs`). Do not write a pixel text size. No text is smaller than 12px. - Radii are 6, 8, 12 and 16px (`rounded-chip`, `rounded-control`, `rounded-panel`, `rounded-sheet`). - Blur belongs to the floating layer (header, menus, popovers). Content has no blur. - Loading is a shimmer (`Shimmer`, `PageSkeleton`). Do not add a progress bar or a spinner for page loads. A button that starts work shows its loader inside. - Rail rows, tabs, menu items, list rows and page changes do not animate. Give every animation a reduced-motion variant. - Every screen needs an empty state with a next step, a loading state and an error state. - Check 360, 768 and 1280px, in light and dark. No horizontal scroll. - Write UI text in sentence case. Start a button label with a verb. Do not write "we". ### See your change - Run `REFS_REMOTE=1 npx react-router dev --port ` to see the UI on production data. Only read pages there. Do not submit forms, and never run migrations with `--remote`. - Run `npx tsc -b` and `npm test` before you report.