@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

  • Target Node.js >=22.2.0.
  • Use /Users/billgo/.agents/skills/billgo-skills/SKILL.md when available to select the workflow skill for non-trivial work.
  • Apply code-guidelines as the always-on behavioral layer for code and documentation changes.
  • Apply teakit and typescript-guidelines when changing this package's setup, source, tests, docs, or release flow.
  • Read docs/proposals/v00-money.md before proposing v1 API or behavior.
  • 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
Main entry@teakit/money / src/index.ts
Currency entry@teakit/money/currencies / src/currencies/index.ts
BigInt entry@teakit/money/bigint / src/bigint/index.ts
BigInt currency entry@teakit/money/bigint/currencies / src/bigint/currencies/index.ts
Node target>=22.2.0
Teststests/** with bun:test
Main concept referenceskills/teakit-money/references/main-concept.md
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.
  • Use skills/teakit-money/SKILL.md for repository-specific agent instructions.
  • Use skills/teakit-money/references/main-concept.md for the current money concept boundary.
  • Use proposals for direction, specs for testable contracts, and implementation only after the behavior is clear.
  • If API, behavior, commands, or agent-facing usage changes, update nearby tests and docs.