Teakit Finance

Use this skill when working on @teakit/finance.

Core Rules

  1. Keep the package pure ESM TypeScript with no runtime dependencies.
  2. Keep formulas as small pure functions under src.
  3. Export only real public APIs from src/index.ts.
  4. Preserve documented rate conventions and rounding unless the requested change updates tests and docs.
  5. Use bun:test; keep public behavior tests beside source.
  6. Update README.md, skills/llms.md, and skills/index.mdx when public API or usage changes.

Workflow

  1. Read AGENTS.md, README.md, docs/knowledge/index.md, and docs/memory/index.md.
  2. Read docs/knowledge/finance-domain.md for formula conventions.
  3. Edit the smallest relevant source and test files.
  4. Run relevant verification: bun run check:fix, bun run typecheck, bun run test, and bun run build.
  5. For documentation changes, also run bun run docs:build.

Public API Map

FunctionFile
AMsrc/am.ts
CAGRsrc/cagr.ts
CAPMsrc/capm.ts
CIsrc/ci.ts
DFsrc/df.ts
FVsrc/fv.ts
IARsrc/iar.ts
IRRsrc/irr.ts
LRsrc/lr.ts
NPVsrc/npv.ts
PIsrc/pi.ts
PMTsrc/pmt.ts
PPsrc/pp.ts
PVsrc/pv.ts
R72src/r72.ts
ROIsrc/roi.ts
WACCsrc/wacc.ts
XIRRsrc/xirr.ts