These instructions mirror the workflow Claude Code already follows in Conductor so every coding agent behaves consistently.
- Monorepo managed with npm workspaces. Core Hono + Workers code, routes, middleware, templates, plugins, utils, and DB lives in
packages/core/src. - Shared templates/components:
packages/templates/. CLI scaffolder:packages/create-app/. Helper scripts:packages/scripts/. - Marketing/docs site is
www/(Next.js + MDX). Long-form docs, AI plans, and architecture notes live indocs/. - E2E specs use Playwright in
tests/e2e/(configs intests/playwright*.config.ts). Postman and smoke docs sit undertests/. my-sonicjs-app/is the sand-boxed sample install; recreate freely and use it to exercise migrations (npm run setup:dbproduces a fresh branch-specific D1 DB).
- Understand & Plan – Read the issue and affected modules, skim relevant docs, and outline a plan/todo list before heavy editing. Keep changes minimal and targeted.
- Prep Environment – From
my-sonicjs-app/, runnpm run setup:dbfor a clean Cloudflare D1 database tied to the worktree. Runnpm installat repo root if dependencies changed. - Implement – Match existing TypeScript/Hono patterns (server templates, plugins, Drizzle schema, HTMX UI). Keep types explicit and favor async/await.
- Add Tests – Unit tests go beside the feature in
packages/core/src/__tests__. Every change also needs an accompanying Playwright spec undertests/e2e/##-description.spec.ts. - Verify – Run
npm run type-check,npm test, andnpm run e2elocally. Usenpm run e2e:smokeornpm run e2e:uionly for debugging, but ensure the full suite passes before sign-off. - Document – Update README/docs or AI plans when APIs, migrations, or workflows change. Mention any fixtures or DB prep needed in the PR/test plan.
- Install deps:
npm install - Build core only:
npm run build:core; full build + sample app:npm run build - Dev servers:
npm run dev(proxies tomy-sonicjs-app),npm run dev:www(marketing) - Type safety:
npm run type-check - Unit tests:
npm testornpm run test:watch - Playwright E2E:
npm run e2e, smoke subset vianpm run e2e:smoke, headed/UI vianpm run e2e:ui - Sample-app DB reset:
npm run db:reset(ornpm run setup:dbinsidemy-sonicjs-app)
- TypeScript-first ES modules. Keep exported/public signatures fully typed; lean on Zod validation where applicable.
- Use established folder conventions for routes (
packages/core/src/routes), templates (packages/core/src/templates), plugins (packages/core/src/plugins), and Drizzle schema (packages/core/src/db). - Naming:
camelCasevariables/functions,PascalCaseclasses/components, dash-case filenames and migrations (NNN_description.sql). - Tests end with
.test.tsor.integration.test.ts; Playwright specs are numerically prefixed (##-flow-name.spec.ts). - Favor small, composable functions and glass-morphism UI patterns already defined in admin templates.
- Unit coverage: Write explicit assertions (avoid brittle snapshots) in
packages/core/src/__tests__. Cover both success and edge cases. - E2E coverage: Every feature/fix must add or update a Playwright spec in
tests/e2e/. Include happy path + critical error handling. Use helpers liketests/e2e/utils/test-helpers.tsfor login/setup. - Regression focus: When fixing bugs, first reproduce with a failing test (unit or e2e) before applying the fix.
- Document any required seed data or setup in the PR/test plan so reviewers and CI know how to run it.
- Branches are created by Conductor; keep names descriptive (
fix-auth-timeout,feat-media-upload). - Follow the Claude Code commit template:
Types:
<type>: <short description> - Bullet summary of key changes Fixes #<issue-number> Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>fix,feat,refactor,test,docs,chore. - Before creating a PR run:
npm run type-check && npm test && npm run e2e. CI repeats these plus deploys a Workers preview with a fresh D1 instance. - PR body should mirror
.github/pull_request_template.md: include summary, linked issue, detailed change bullets, and explicit test commands + outcomes (unit + E2E). - Keep docs in sync (
docs/,www/src/app/*.mdx, READMEs). Mention any migrations or plugin contract changes.
Specialized agents are defined in .claude/commands/. All agents are prefixed with sonicjs- for namespacing.
For detailed documentation, see docs/ai/claude-agents.md.
| Agent | Purpose |
|---|---|
/sonicjs-fullstack-dev |
Full stack development with planning, testing, and documentation |
/sonicjs-pr-fixer |
Fix PRs: cherry-pick forks, enable Dependabot e2e, fix conflicts/tests |
/sonicjs-pr-maker |
Create PRs, monitor CI/CD, analyze failures, auto-fix issues |
/sonicjs-release-engineer |
Manage releases and versioning |
| Agent | Purpose |
|---|---|
/sonicjs-release-announcement |
Generate release announcements |
/sonicjs-seo |
SEO expert for optimization recommendations |
/sonicjs-seo-blog |
Generate SEO-optimized blog posts |
/sonicjs-seo-audit |
Audit website for SEO improvements |
/sonicjs-seo-keywords |
Keyword research for content |
/sonicjs-seo-sitemap |
Generate/update sitemaps |
/sonicjs-seo-discord-sync |
Sync Discord content for searchability |
/sonicjs-social-post |
Generate social media posts |
/sonicjs-blog-image |
Generate blog images via DALL-E |
- Claude Desktop memory is shared via
docs/ai/claude-memory.json. Copy.claude/settings.shared.jsonto.claude/settings.local.jsonand install the@modelcontextprotocol/server-memoryMCP server if you need consistent AI context. - Graphiti MCP integration is documented in
docs/graphiti-setup.md; update API keys there and restart Claude Desktop when tooling changes. - Maintain
docs/ai/project-plan.mdand related AI plans as living documents—log new strategies or testing insights there when relevant.