Contributing
Contributions welcome. Whether you are fixing a bug, adding tests, or proposing a feature, this is where to start.
Setup
git clone https://github.com/TokenDanceLab/TokenDanceCode.git
cd TokenDanceCode
pnpm install
pnpm build
Three commands and you are in. The project uses TypeScript in strict mode and runs tests with Vitest.
Build commands
| Command | What it does |
|---|---|
pnpm build | Compile all packages (core, sdk, cli) |
pnpm test | Run Vitest across all packages |
pnpm verify | Typecheck + lint + test + contract check |
pnpm pack:smoke | Pack tarballs and verify they import |
pnpm release:next:check | Pre-release dry-run checklist |
Opening a PR
- Run
pnpm verifyand confirm it passes. - If you changed a public API surface, update the types and doc comments.
- Add or update tests covering the new behavior.
- Breaking changes need a design note — explain what changed, why, and the migration path.
- If the change is part of a release candidate, run
pnpm release:next:checkas well.
Not sure if a change fits? Open an issue first. It saves time.
Code style
- TypeScript strict across all packages. No exceptions.
- Exported symbols need JSDoc comments.
- Use
@tokendance/code-corefor shared runtime types. Do not copy type definitions between packages. - File naming:
kebab-case.tsfor modules,index.tsfor barrel exports. - Throw typed errors (
TokenDanceCodeErrorsubclasses), not bare strings.
Release
Collaboration and release orchestration happen on AgentHub. npm publish is done manually by the release owner after pnpm release:next:check passes.