Imported from Adityan-R/Hypernym (
AGENTS.md). Install upstream withnpx skills add Adityan-R/Hypernym. Copyright stays with the author.
Superset Monorepo Guide
You're running inside a Superset workspace — an isolated git-worktree copy of this repo. "Workspace" in any user message refers to this, not VS Code/editor workspaces.
Question Tool
When you need to ask the user ANY question — including simple yes/no, confirmations, and clarifications — ALWAYS use the ask_user tool. Never ask questions in plain text. The Superset UI renders ask_user calls as an interactive overlay with clickable option buttons; plain-text questions will not be surfaced to the user in the same way.
Guidelines for agents and developers working in this repository.
Structure
Bun + Turbo monorepo: apps/ (web, marketing, admin, api, desktop, docs, mobile) and packages/ — see ls apps/ packages/ for the full list.
- Add shadcn components:
npx shadcn@latest add <component>(run inpackages/ui/)
Tech Stack
- Package Manager: Bun (no npm/yarn/pnpm)
- Next.js: Version 16 - NEVER create
middleware.ts. Next.js 16 renamed middleware toproxy.ts. Always useproxy.tsfor request interception.
Common Commands
Standard scripts live in the root package.json (bun dev, bun test, bun run lint:fix, bun run typecheck, ...).
# Releases (desktop + host-service + cli share one version; see scripts/release/README.md)
bun run release # interactive: desktop release or CLI hotfix
bun run release desktop # desktop app release (draft by default)
bun run release cli # interim CLI hotfix (<desktop>-N prerelease)
bun run check:versions # assert versions are unified
Cut releases on a dedicated release branch (not main); bun run release desktop <version> <commit> provisions one from a commit. Full runbook: scripts/release/README.md.
Code Quality
Biome runs at root level (not per-package) for speed — use bun run lint:fix to fix all issues automatically.
Agent Rules
-
Type safety - avoid
anyunless necessary -
Prefer
ghCLI - when performing git operations (PRs, issues, checkout, etc.), prefer the GitHub CLI (gh) over rawgitcommands where possible -
Shared command and skill source - keep command definitions in
.agents/commands/and skill definitions in.agents/skills/..claude/commandsand.cursor/commandsshould be symlinks to../.agents/commands;.claude/skillsshould be a symlink to../.agents/skills. (packages/chatdiscovers slash commands from.claude/commands.) Skills aren't a cross-agent format yet, so non-Claude agents (Codex, Cursor, OpenCode) should read the relevant.agents/skills/*/SKILL.mdfile directly when its description matches the task. -
Workspace MCP config - keep shared MCP servers in
.mcp.json;.cursor/mcp.jsonshould link to../.mcp.json. Codex uses.codex/config.toml(run withCODEX_HOME=.codex codex ...). OpenCode usesopencode.jsonand should mirror the same MCP set using OpenCode'sremote/localschema.Mistral Vibe compatibility: Vibe reads
AGENTS.md+.agents/skills/natively (trust granted via--trust; no.agents/commandssupport). Configure it via.vibe/config.toml; it consumes MCP servers as[[mcp_servers]]TOML entries (not.mcp.json). -
Mastra dependencies - use the published upstream
mastracodeand@mastra/*packages. Do not add fork tarball overrides or custom patch steps unless explicitly requested. -
Plan & doc placement - implementation plans go in
plans/(cross-cutting) orapps/<app>/plans/(app-scoped); shipped plans move toplans/done/. Architecture/reference docs go in<app>/docs/. Never drop*_PLAN.mdat an app root or insidesrc/. -
Always fix lint warnings before pushing - CI fails on Biome warnings, not just errors (the lint script treats warnings as errors). Run
bun run lint:fixafter edits and verifybun run lintexits 0 beforegit push. Never push code that produces lint output, even auto-fixable formatting. -
Linear ticket format - all tickets (creation, drafting, grooming) follow
.agents/skills/ticket-format/SKILL.md. Read that file before creating or grooming a ticket. -
TanStack DB / Electric live queries are cache-first -
useLiveQuerycan return persisted rows indatawhile the collection is still notisReady. Always render existing rows first. UseisReadyonly to decide what to show when no row/data exists yet: no data + not ready = loading/skeleton/null; no data + ready = empty/not-found. Never hide, blank, or replace existingdatajust becauseisReadyis false orisLoadingis true. This cache-first rendering rule does not apply to write/seeding side effects: wait for strict readiness before deriving missing rows or writing defaults, unless the write is provably idempotent. -
PR titles are conventional commits - PRs are squash-merged using the PR title as the commit subject, so every title needs a conventional-commit type and scope, e.g.
feat(desktop): add copy-logs button to failed CI checksorfix(host-service): guard against missing PR. -
Mobile is iOS-only for the time being -
apps/mobiletargets iOS only. Don't add Android fallbacks or platform guards for iOS-only APIs (e.g.@expo/ui/swift-ui), and don't treat Android incompatibility as a blocker until Android is explicitly put in scope.
Project Structure
All projects in this repo should be structured like this:
app/
├── page.tsx
├── dashboard/
│ ├── page.tsx
│ ├── components/
│ │ └── MetricsChart/
│ │ ├── MetricsChart.tsx
│ │ ├── MetricsChart.test.tsx # Tests co-located
│ │ ├── index.ts
│ │ └── constants.ts
│ ├── hooks/ # Hooks used only in dashboard
│ │ └── useMetrics/
│ │ ├── useMetrics.ts
│ │ ├── useMetrics.test.ts
│ │ └── index.ts
│ ├── utils/ # Utils used only in dashboard
│ │ └── formatData/
│ │ ├── formatData.ts
│ │ ├── formatData.test.ts
│ │ └── index.ts
│ ├── stores/ # Stores used only in dashboard
│ │ └── dashboardStore/
│ │ ├── dashboardStore.ts
│ │ └── index.ts
│ └── providers/ # Providers for dashboard context
│ └── DashboardProvider/
│ ├── DashboardProvider.tsx
│ └── index.ts
└── components/
├── Sidebar/
│ ├── Sidebar.tsx
│ ├── Sidebar.test.tsx # Tests co-located
│ ├── index.ts
│ ├── components/ # Used 2+ times IN Sidebar
│ │ └── SidebarButton/ # Shared by SidebarNav + SidebarFooter
│ │ ├── SidebarButton.tsx
│ │ ├── SidebarButton.test.tsx
│ │ └── index.ts
│ ├── SidebarNav/
│ │ ├── SidebarNav.tsx
│ │ └── index.ts
│ └── SidebarFooter/
│ ├── SidebarFooter.tsx
│ └── index.ts
└── HeroSection/
├── HeroSection.tsx
├── HeroSection.test.tsx # Tests co-located
├── index.ts
└── components/ # Used ONLY by HeroSection
└── HeroCanvas/
├── HeroCanvas.tsx
├── HeroCanvas.test.tsx
├── HeroCanvas.stories.tsx
├── index.ts
└── config.ts
components/ # Used in 2+ pages (last resort)
└── Header/
- One folder per component:
ComponentName/ComponentName.tsx+index.tsfor barrel export - Co-locate by usage: If used once, nest under parent's
components/. If used 2+ times, promote to highest shared parent'scomponents/(orcomponents/as last resort) - One component per file: No multi-component files
- Co-locate dependencies: Utils, hooks, constants, config, tests, stories live next to the file using them
Exception: shadcn/ui Components
The src/components/ui/ and src/components/ai-elements directories contain shadcn/ui components. These use kebab-case single files (e.g., button.tsx, base-node.tsx) instead of the folder structure above. This is intentional—shadcn CLI expects this format for updates via bunx shadcn@latest add.
Database Rules
** IMPORTANT ** - Never touch the production database unless explicitly asked to. Even then, confirm with the user first.
- Schema in
packages/db/src/ - Use Drizzle ORM for all database operations
DB migrations
- Never run a migration yourself, and NEVER manually edit files in
packages/db/drizzle/(.sqlfiles,meta/_journal.json, snapshots — all auto-generated). Only modify schema files inpackages/db/src/schema/and ask the user to rundrizzle-kit generate. - Workflow (Neon branch setup, drizzle-kit invocation): see
.agents/skills/db-migrations/SKILL.md.