Atlas Plan
Plans004 2026 02 20 Format Layer

Completed

  • T-001: Scaffold @packages/format package
  • T-002: Define Report TypeScript types
  • T-003: Implement DuckDB client helper
  • T-004: revenue.ts — Revenue section reader
  • T-005: orders.ts — Program progress section reader
  • T-006: marketing.ts — Channel marketing section reader
  • T-007: schools.ts — School progress section reader
  • T-008: report.ts — Report assembler
  • T-009: index.ts — CLI entry point
  • T-010: bun install + type-check
  • T-011: End-to-end format verification

In Progress

  • None yet

Blocked

  • None

Pending

  • None

Learnings

  • best_year was implemented per-unit for the same month across years.
  • Report and section types are exported from @packages/format/@source/index.ts for downstream consumers.
  • bun run --filter executes in package context, so DB paths should be resolved from project root.
  • duckdb-async was unstable under Bun in this flow; @duckdb/node-api is stable in-repo.

Questions

  • None yet

Next

  1. Use output/monthly/2026-02-report.json as the handoff input for Plan 006 (Present layer).
  2. Keep @packages/format bindings on @duckdb/node-api unless Bun runtime compatibility changes.

On this page