anartia is a JavaScript-optional public web frontend for Bluesky, built with SvelteKit and Vite, deployed to Cloudflare Workers.
- Node.js and pnpm is managed by mise
- install dependencies with
pnpm install - run dev server with
pnpm dev - build with
pnpm build - preview production build with
pnpm preview - format via
pnpm format(Prettier) - lint via
pnpm lint(Prettier check) - typecheck via
pnpm check(svelte-check) - check
pnpm view <package>before adding a new dependency
- new files should be in kebab-case
- use tabs for indentation, spaces allowed for diagrams in comments
- use single quotes for strings; use template literals for localization strings (user-facing strings, error messages)
- add trailing commas
- prefer arrow functions, but use regular methods in classes unless arrow functions are necessary
(e.g., when passing the method as a callback that needs
thisbinding) - use braces for control statements, even single-line bodies
- use bare blocks
{ }to group related code and limit variable scope - avoid barrel exports (index files that re-export from other modules); import directly from source
- use
// #region <name>and// #endregionto denote regions when a file needs to contain a lot of code - a parameter should be optional only when callers genuinely split between passing a value and relying on the default; if every caller passes a value, make it required; if no caller would ever change it, it should not be a parameter at all
- avoid optional parameters that change behavioral modes or make the function do different things based on presence/absence; prefer a separate function with a clearer name instead
- avoid type assertions (
as Type,as const) unless TypeScript actually errors without them; when it does error, prefer finding a solution that satisfies the type system naturally before resorting to an assertion
- documentations include README, code comments, commit messages
- any writing should be in lowercase, except for proper nouns, acronyms and 'I'; this does not apply to public-facing interfaces like web UI
- only comment non-trivial code, focusing on why rather than what
- write comments and JSDoc in lowercase (except proper nouns, acronyms, and 'I')
- add JSDoc comments to new publicly exported functions, methods, classes, fields, and enums
- JSDoc should include proper annotations:
- use
@paramfor parameters (no dashes after param names) - use
@returnsfor return values - use
@throwsfor exceptions when applicable - keep descriptions concise but informative
- use
.research/directory in the project root serves as a workspace for temporary experiments, analysis, and planning materials. create if not present (it's gitignored). this directory may contain cloned repositories or other reference materials that can help inform implementation decisions- this document is intentionally incomplete; discover everything else in the repo
- don't make assumptions or speculate about code, plans, or requirements without exploring first; pause and ask for clarification when you're still unsure after looking into it
- in plan mode, present the plan for review before exiting to allow for feedback or follow-up questions
- when debugging problems, isolate the root cause first before attempting fixes: add logging, reproduce the issue, narrow down the scope, and confirm the exact source of the problem
- Explore subagent may not be accurate; verify findings as needed
- never spawn subagents to read and return file contents; read files directly in the main context. subagents should perform searches or answer specific questions, not act as file I/O proxies
use @oomfware/cgr to ask questions about external repositories:
npx @oomfware/cgr ask [options] <repo>[#branch] <question>
options:
-m, --model <model> model to use: opus, sonnet, haiku (default: haiku)
-d, --deep clone full history (enables git log/blame/show)
-w, --with <repo> additional repository to include, supports #branch (repeatable)
useful repositories for development:
github.com/bluesky-social/atprotofor AT Protocol reference implementation, lexicons, XRPCgithub.com/bluesky-social/social-appfor Bluesky app patterns, API usage examplesgithub.com/bluesky-social/proposalsfor AT Protocol proposals and specificationsgithub.com/bluesky-social/atproto-websitefor AT Protocol spec documentationgithub.com/mary-ext/atcutefor the AT Protocol client library used in this projectgithub.com/sveltejs/kitfor SvelteKit framework internals and patternsgithub.com/sveltejs/sveltefor Svelte 5 runes, components, and runtime
broad questions work for getting oriented; detailed questions get precise answers. include file/folder paths when you know them, and reference details from previous answers in follow-ups.
run npx @oomfware/cgr --help for more options.