@teakit/money LLM Contract
@teakit/money is a TypeScript money-domain library being designed for precise amounts, currency-aware operations, explicit rounding, and safe serialization.
Generation Rules
- Read
docs/proposals/v1-proposal.mdbefore proposing v1 API or behavior. - Treat
src/index.tsand the currentaddexport as placeholder implementation until replaced by real money APIs. - Keep generated examples aligned with real exports from
src/index.ts. - Update
README.md,skills/index.mdx, and this file when the public API changes. - Keep proposed APIs in proposals or specs until implementation exists.
- Document only real public APIs and supported workflows.
Current Public Surface
v1 Direction
- Model money as amount, currency, and scale rather than plain numbers.
- Prefer scaled integer representation and strict decimal-string parsing.
- Make rounding, allocation, and serialization choices explicit.
- Keep API examples small, deterministic, and TypeScript-first.
- Include agent-facing rules for common money mistakes once the APIs are implemented.
Project Workflow
- Read
AGENTS.mdbefore modifying the repository. - Read
docs/knowledge/index.mdanddocs/memory/index.mdwhen context is needed. - If API, behavior, commands, or agent-facing usage changes, update nearby tests and docs.