Agent Skill
2/7/2026

sonamu

Sonamu TypeScript 풀스택 프레임워크 개발 가이드. Entity, Model, API, 테스트, 프론트엔드 연동. Use when developing with Sonamu framework.

C
cartanova
19GitHub Stars
1Views
npx skills add cartanova-ai/sonamu

SKILL.md

Namesonamu
DescriptionSonamu TypeScript 풀스택 프레임워크 개발 가이드. Entity, Model, API, 테스트, 프론트엔드 연동. Use when developing with Sonamu framework.

name: sonamu description: Sonamu TypeScript full-stack framework development guide. Entity, Model, API, testing, and frontend integration. Use when developing with Sonamu framework.

Sonamu Framework Skills

Claude Code skill for developing projects with the Sonamu framework.

CRITICAL: Ask one question at a time

MUST ask questions one at a time. NEVER overwhelm users with multiple questions.

MUST DO

  • One question → wait for user response → next question
  • Keep questions concise
  • Present choices clearly when options are available

NEVER DO

  • List multiple questions at once
  • Ask questions alongside long explanations
  • Output a checklist of confirmation items all at once

Development Flow

PHASE 0: Project creation and initial setup  (create project → identify domains → auth generate → Users sequence setup)
PHASE 1: Domain logic documentation          (write contract/{domain}/*.contract.md per domain → user confirmation)
PHASE 2: Entity design                       (design with user confirmation)
PHASE 3: Entity creation and migration       (entity.json + migration + cone + scaffolding)
PHASE 4: Testing and API implementation      (contract → Claim → AC → implement, repeat)
PHASE 5: Fixture generation                  (generate with LLM after user approval)
PHASE 6: Frontend development                (proceed in batches with user confirmation)

Full details: see .claude/workflow/project_init.md

Starting Point Determination

Begin from the PHASE that matches the user's instruction. Do not always start from PHASE 0.

User instructionStarting PHASEPrerequisites to verify
"Create a new project"PHASE 0
"Write contract" / "Analyze domain"PHASE 1Domain list identified
"Add entity" / "Create entity"PHASE 2Project exists, dev server running, read contract/*/.contract.md, PHASE 1 complete
"Write tests" / "Implement API"PHASE 4entity.json exists, migration complete, scaffolding complete
"Generate fixtures"PHASE 5Tests passing, cone.note exists
"Develop frontend"PHASE 6API implementation complete, contract/*/.contract.md reviewed

Mid-entry rules:

  1. If contract/**/*.contract.md and skills/project/architecture.md exist, read them first.
  2. Verify prerequisites for the target PHASE.
  3. If prerequisites are not met, inform the user and begin from the required step.
  4. Within a PHASE, follow the numbered steps in .claude/workflow/project_init.md in order. Do not skip any step or merge steps on your own judgment.

Project Document System

CRITICAL: Read these before starting any task

Before starting any project task, always read the following documents.

contract/
└── {domain}/
    └── {domain}.contract.md  # PHASE 1: domain rules + decision rationale (permanent; update alongside code changes)

.claude/skills/project/
└── architecture.md      # entity design + system architecture

tmp/claims/              # in-progress Claim YAML (discard after completion)

Code is the ground truth. *.contract.md records the rationale behind code decisions — it is not a spec that precedes the code. When code and *.contract.md conflict, the code takes precedence.

Domain *.contract.md

Documents domain rules in a cohesive form and captures decision rationale that cannot be inferred from code alone.

# {Domain} Business Logic

## Rules

- Refunds allowed only within 7 days of payment [Rationale: PG provider policy]
- Order status transitions: pending → confirmed → shipped → completed

## Workflow

1. ...

Two development paths:

  • New: write *.contract.md → Claim → AC (test name) → implement (TDD)
  • Change: modify code → register Claim → verify/update *.contract.md (record change rationale)

Update rules:

  • When code changes, check affected domain rules and update *.contract.md together
  • Record the reason and decision rationale — this keeps *.contract.md alive

architecture.md

When: designing entities or discussing system architecture Content: entity structure and relationships, database schema, system component structure

Safe after compacting

Documents are persisted as files, so project context is preserved even when the conversation is compacted.


Skills List

SkillFilePurpose
CDD (AC+Claim-based development)cdd.md*.contract.md (domain rules), AC (test names), Claim (work instructions) — 3-artifact system
Project creationcreate-sonamu.mdcreate-sonamu CLI options
Project initializationproject-init.mdProject creation flow and conversation guide
Project configurationconfig.md.env, sonamu.config.ts settings
Databasedatabase.mdDB setup, port conflict resolution, 3-Tier structure
Entity validationentity-validation-checklist.mdStep-by-step entity creation checklist
Entity basicsentity-basic.mdEntity JSON structure, field types
Entity relationsentity-relations.mdBelongsToOne, HasMany, ManyToMany, FK code patterns
Subsetsubset.mdResponse field scope definition
Modelmodel.mdBaseModelClass, CRUD patterns
APIapi.md@api decorator
Puripuri.mdSQL query builder
i18ni18n.mdInternationalization, SD functions
Upsertupsert.mdBatch saving of relation data
Testingtesting.mdVitest tests (test/testAs), fixture generation tips
DevRunnertesting-devrunner.mdsonamu test execution, HMR integration, parallel tests, sonamu.config.ts test settings
Naitenaite.mdNaite.t()/get() tracing system, chaining filters, trace CLI output
Conecone.mdCone metadata generation and management (LLM/template)
Fixture CLIfixture-cli.mdfixture gen/fetch/explore commands, 3-Tier DB usage
Migrationmigration.mdDB schema migration, PK type changes
Authauth.mdbetter-auth system (auto entity generation, Guards, Context)
Auth Migrationauth-migration.mdUser.id type changes for external auth (e.g., better-auth)
Auth Pluginsauth-plugins.mdbetter-auth plugin wrappers (admin, organization, 2fa, passkey, etc. — 10 types), snake_case mapping
Vector searchvector.mdpgvector embeddings (Voyage AI/OpenAI), chunking, hybrid search
Puri query builderpuri.mdSELECT, WHERE, JOIN, FTS, pg_trgm fuzzy search, pgvector
AI Agentsai-agents.mdBaseAgentClass, @tools decorator, ToolLoopAgent, AsyncLocalStorage state
Taskstasks.mdBackground workflows, cron scheduling, durable steps, retry policies
Skill contributionskill-contribution.mdTroubleshooting → skill contribution workflow (matching, decision, format, approval)
Framework changeframework-change.mdCriteria for framework fix vs. project workaround. @upload parameter pattern
Frontendfrontend.mdService, TanStack Query
Scaffoldingscaffolding.mdResolving UI scaffolding errors

Task-to-Skill Reference

CRITICAL: When building a new system from scratch, start with .claude/workflow/project_init.md!

TaskReference Skill
Build an entire system from scratch.claude/workflow/project_init.md (7-phase master guide)
Domain logic documentation / AC+Claim-based developmentcdd.md
Project creationcreate-sonamu, project-init
Project configurationconfig
Sonamu local dev setupconfig
DB setup / port conflictdatabase, config
3-Tier DB structuredatabase, fixture-cli
Cone metadata generation/managementcone
Entity / field definitionentity-basic
Relationship setupentity-relations
BelongsToOne FK code usageentity-relations
API response field compositionsubset
Data query / save logicmodel, puri
API endpointsapi
Batch saving of relation dataupsert
Writing teststesting
Running tests (sonamu test)testing-devrunner
Naite tracing / debuggingnaite
Fixture data generation/managementfixture-cli
Test data generation tipstesting (Fixture data generation tips), fixture-cli (practical tips)
DB schema changesmigration
Auth setup (auth generate, Guards, Context)auth
PK type changes (better-auth, etc.)auth-migration
Adding auth pluginsauth-plugins
Frontend developmentfrontend
Internationalization / translationi18n
Scaffolding errorsscaffolding
Vector search / embeddingsvector
pg_trgm Fuzzy Searchpuri, entity-basic
AI Agent developmentai-agents
Background jobs / schedulingtasks
Troubleshooting → skill contributionskill-contribution
Framework bug / constraint responseframework-change

Skill Selection by CDD Claim Type

For Planners: Use this table to populate required_skills in each Claim blueprint.

surface — Entity / Schema / Shared Type Work

CaseRequired Skills
Add new entityentity-basic, entity-relations, migration, cone, fixture-cli, i18n
Define subsetentity-basic, subset
Add auth entityauth, auth-migration
Add auth pluginauth-plugins
Add batch save structureupsert
Add vector search structurevector, entity-basic
Resolve scaffolding errorsscaffolding

test — Test Writing

CaseRequired Skills
Business logic teststesting, testing-devrunner
Tests requiring fixturestesting, fixture-cli
Debugging / tracingnaite

implement — Business Logic Implementation

CaseRequired Skills
Model CRUD implementationmodel, puri
API endpoint implementationapi, model
File upload implementationapi, framework-change
SQL query writingpuri
Internationalizationi18n
Auth guard / session handlingauth
Auth plugin implementationauth-plugins
Batch save implementationupsert, model
AI Agent implementationai-agents
Background job / schedulingtasks
Vector search implementationvector, puri
Frontend integrationfrontend, scaffolding

Command Execution Path

All pnpm commands are run from the packages/api directory.

cd packages/api
pnpm build
pnpm dev
pnpm sonamu migrate run

Source Code References

  • Sonamu framework: sonamu/modules/sonamu/
  • Example project: sonamu/examples/miomock/
  • Official docs: sonamu/modules/docs/
  • create-sonamu: sonamu/modules/create-sonamu/
Skills Info
Original Name:sonamuAuthor:cartanova