@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.md before proposing v1 API or behavior.
  • Treat src/index.ts and the current add export 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

NeedPrefer
Placeholder methodadd(a, b)
Source entrysrc/index.ts
Teststests/index.test.tsx
Docs site entryskills/index.mdx

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.md before modifying the repository.
  • Read docs/knowledge/index.md and docs/memory/index.md when context is needed.
  • If API, behavior, commands, or agent-facing usage changes, update nearby tests and docs.