This file provides project-specific conventions for AI coding agents working in this repository.
tsb is a TypeScript port of pandas, built from first principles.
- Package name:
tsb— all imports usetsb - Runtime: Bun
- Language: TypeScript (strictest mode)
- Never modify
README.mdunless specifically asked to. - Never modify
.autoloop/programs/**unless specifically asked to. - Strict TypeScript only — no
any, noascasts, no@ts-ignore, no escape hatches. - Zero core dependencies — implement everything from scratch.
- 100% test coverage required — unit + property-based (fast-check) + fuzz where applicable.
- Every feature gets a playground page in
playground/. - One feature per commit — keep changes small and targeted.
src/
index.ts — package entry point, re-exports all features
types.ts — shared type definitions
core/ — core data structures (Series, DataFrame, Index, Dtype)
io/ — I/O utilities (read_csv, read_json, etc.)
groupby/ — groupby and aggregation
reshape/ — pivot, melt, stack, unstack
merge/ — merge, join, concat
window/ — rolling, expanding, ewm
stats/ — statistical functions
tests/
setup.ts — global test setup (loaded via bunfig.toml)
*.test.ts — mirrors src/ structure
playground/
index.html — landing page
*.html — one page per feature
- Create
src/{module}/{feature}.tswith the implementation. - Export from
src/index.ts. - Create
tests/{module}/{feature}.test.tswith full coverage. - Create
playground/{feature}.htmlwith an interactive tutorial. - Update
playground/index.htmlto mark the feature as complete.
bun install # install devDependencies
bun test # run all tests
bun run lint # check linting
bun run typecheck # TypeScript strict checkThis project is built by Autoloop, an iterative optimization agent.
- Long-running branch:
autoloop/build-tsb-pandas-typescript-migration - State file:
build-tsb-pandas-typescript-migration.mdonmemory/autoloopbranch - Issue #1 is the program definition — do not modify it.