···11+# AGENTS.md - synthes.is
22+33+## Project Overview
44+**Hypothesis clone built on AT Protocol** - Web annotation system similar to Hypothesis but using ATProto/Bluesky infrastructure.
55+66+## Future Architecture Plans
77+- **via.seams.so proxy**: Need to build a proxy service (like Hypothesis's via.hypothes.is) for annotation injection
88+- **slices.network integration**: Backend for loading all annotations from a page - not yet configured
99+- Current implementation is extension-only; backend integration pending
1010+1111+## Commands
1212+- **Dev**: `pnpm dev` (or `wxt`) - Start development server for browser extension
1313+- **Build**: `pnpm build` (or `wxt build`) - Build extension for production
1414+- **Package**: `pnpm zip` (or `wxt zip`) - Create extension zip file
1515+- **No test suite configured** - Extension is manually tested in browser
1616+1717+## Architecture
1818+Browser extension built with **WXT** (web extension framework) for AT Protocol web annotations:
1919+- **entrypoints/**: Background script (context menus, auth), content script (page interaction), sidepanel UI
2020+- **lib/**: Core logic - `oauth.ts` (AT Protocol auth), `pds.ts` (PDS integration), `highlights/` and `selectors/` (annotation logic), `types/` (TypeScript interfaces)
2121+- Uses `@atcute/oauth-browser-client` for AT Protocol OAuth flow and `@atproto/api` for Bluesky integration
2222+- Browser extension APIs: `browser.identity` (OAuth), `browser.contextMenus`, `browser.sidePanel` (Chrome only), `browser.storage`
2323+2424+## Code Style
2525+- **TypeScript**: Strict mode enabled, ES2020 target, ESNext modules
2626+- **Imports**: ES6 imports, prefer named imports from `@atcute/oauth-browser-client` and `@atproto/api`
2727+- **Types**: Define interfaces in `lib/types/`, use TypeScript strict type checking
2828+- **Naming**: camelCase for functions/variables, PascalCase for types, SCREAMING_SNAKE_CASE for constants (e.g., `OAUTH_SESSION_KEY`)
2929+- **Error handling**: Use try/catch with console.error for logging, propagate errors upward
3030+- **Browser APIs**: Use `browser.*` namespace (not `chrome.*`) for cross-browser compatibility
3131+- **Environment**: Nix-based development, uses `pnpm` for package management