← All apps
🧮

tts-tax-app

Professional tax preparation software for small/mid accounting firms

README

No README.

STATUS

# TTS Tax App — Status

## Last updated
2026-06-11

## Currently in progress
- **`SPRINT_SCOPE.md` (repo root) is now the AUTHORITATIVE work queue**
  (Ken, 2026-06-10 ~11:00). It supersedes the master prompt's "1040 WORK
  QUEUE" section AND the build order confirmed earlier this morning;
  everything else in the master prompt still stands. Read it at every
  session start, immediately after this file. Its DoD checklists are the
  completion bar for every topic regardless of what already exists.
- **Topic 1 (1040 Spine): ALL SIX BUILD LEGS ✅.** Leg 1 constants + tax
  method `2be87ad` · Leg 2 std-ded chain `11bf356` · Leg 3 line plumbing
  `40b5556` · Leg 4 diagnostics `01d6043` · Leg 5 input-leg UI `cf5eaea`
  · **Leg 6 render leg ✅ (PM #10, see recap)** — all 55 seeded lines
  mapped + position-asserted, 1040 HEADER_MAP repaired (was
  systematically wrong since the 2025 form redesign), std-ded checkbox
  block + dependents grid + preparer block render, cross-form render
  collision fixed. `line_status_1040.md` created at repo root
  (Quality Rule 4).
- **TOPIC 1 (1040 Spine) IS COMPLETE — tagged `1040-spine-complete`.**
  PM #11 cleared all DoD residue (Ken Q&A): digital-asset question
  BUILT, D_1040_004 conservative interim KEPT, **TY2026 constants walk
  DONE — Ken approved all four packet items** (spine blessed, 8812
  explicit 2026 entry per RP 2025-32 §4.05, Sch 1-A blessed,
  derived-2026-Tax-Table interim accepted).
- **TOPIC 2 (Schedules 1/2/3) IS COMPLETE — tagged `1040-sch123-complete`
  (2026-06-11).** All six legs green: Seed `72d7b17` · Compute `b5dd025`
  · Render `4a70fbc` · Input `bc2e8e4` · Diagnostics `34297fe` ·
  Assertions wired (59 active in `flow_assertions_1040.json`; both
  pending files empty). Dev DB fully seeded (forms + 14 D_SCH rules);
  build.sh carries all seeds. `line_status_1040.md` current.
- **TOPIC 3 (Interest, Dividends & QDCGT) IS COMPLETE — tagged
  `1040-intdiv-complete` (2026-06-11).** All six legs green:
  SEED `8e3422

…(truncated for upload size)

DECISIONS

# TTS Tax App — Architecture Decisions & Standards

## Tech Stack (Locked)
- Backend: Django 5.2 LTS + Django REST Framework
- Frontend: Vite + React 19 + TypeScript (SPA)
- Styling: Tailwind Plus (no hardcoded colors)
- Database: Supabase Postgres 17.6 (session pooler, IPv4)
- Hosting: Render.com (Virginia)
- Serving: Django + WhiteNoise (same origin)
- Dependencies: Poetry (Python 3.13), npm (client)
- PDF: ReportLab + pypdf + pymupdf
- AI: Gemini (IRS-grounded RAG)
- Grid: Hand-rolled Tailwind tables (no third-party grid library)
- Web-only. No Electron. No Docker. No SQLite in production.

## Architecture Decisions
Do not change without discussing with Ken first.

### 2026-06-11 — Topic 5 render-leg representations (Form 5329 + SS worksheet)

**Decision 1 — The Form 5329 render gate reuses the compute helper
`form_5329_generated`, never a re-derivation.** `render_5329` rebuilds
`RetirementAgg(docs)` from the 1099-R documents and reads
`Taxpayer.exception_amount_5329`, then calls the SAME pure
`form_5329_generated(agg, exception_amount)` the compute leg owns (R-5329-03:
generate when an exception is claimed OR an early code is S/J OR more than one
early doc contributes; the pure single-code-1 full-amount case reports line 4
directly on Schedule 2 line 8 with NO Form 5329). One source of truth — the
printed form and the Sch-2-line-8 routing cannot diverge (the line-7b-box /
checkbox-derivation convention carried forward from Topic 3). **Road not
taken:** persisting a `form_5329_generated` boolean FormFieldValue at compute
and reading it at render — a second representation that could drift from the
gate; the helper is cheap and the docs are already loaded.

**Decision 2 — Form 5329 registers in `ACROFORM_FORM_IDS` only, NOT
`form_code_to_id`.** Form 5329 is a 1040 SIBLING (its FormFieldValue rows hang
off the parent 1040 TaxReturn with `form_line.section.form.code == "5329"`) and
is rendered standalone by `render_5329`, which calls `render(form_id="f5329")`
directl

…(truncated for upload size)

MEMORY

# TTS Tax App - Project Memory

## 2026-06-11 — Topic 5 build leg 6 (assertions leg) → TOPIC 5 COMPLETE ✅

### Standing facts established this session

- **Topic 5 (Retirement Income) is COMPLETE, tagged `1040-retirement-complete`.**
  All legs green: spec + seed + compute + render + input + diagnostics +
  assertions. The flow gate (`tests/test_flow_assertions.py`) is now **99
  passed**; the active `flow_assertions_1040.json` carries **77** assertions (the
  7 FA-1040-RET-01..07 merged in, 70 → 77). Both 1040 pending files are empty.
- **`_run_retirement_assertion` is the Topic 5 flow runner** (the
  `_run_intdiv_assertion` precedent): PURE re-derivation through
  `compute_retirement` (`doc_taxable`, `RetirementAgg`, `compute_5329_part_i`,
  `compute_ss_worksheet`, `ss_base_and_tier`) + source inspection of
  `compute_retirement_aggregation` / `compute_ss_worksheet_db`, with a
  `_FakeRetDoc` stand-in. Wired into ALL THREE entry points keyed on
  `form in ("1040_RETIREMENT", "5329")` — BOTH forms route to the one runner.
  Kinds: sum_check (4b/5b/25b rosters), formula_check (5329 L4; SS ws_18),
  constants_check (§86 base/tier), gating_check (the 6 blockers).
- **SOURCE-PIN GOTCHA (recurring): a multi-line `_set_field_value(` call breaks
  a single-line substring check.** `compute_retirement_aggregation` writes 4a/5a
  and 25b on one line (`_set_field_value(tax_return, "4a", ...)`) but 4b/5b are
  split (`_set_field_value(\n  tax_return, "4b",\n  ... if ... else "")`). The
  source pin must match `'tax_return, "4b"'` (the args land on one line), NOT
  `'_set_field_value(tax_return, "4b"'`. When source-inspecting a write, match
  the arg fragment, not the call-open + args, unless you know it's single-line.
- **RET-07 gating_check validates BOTH `red_fires` AND `result_blank` per
  blocker.** Each of the 6 blockers maps to a registered D_RET RED
  (`_RET_BLOCKER_RULE`: box2a→001, nua→002, code→003, lump_sum→004, ira_ss→005,
  5329_exc→006) — asserting the rule is in

…(truncated for upload size)

CLAUDE.md

# TTS Tax App — Project Instructions
*Last updated: 2026-04-24*

## Owner
Ken — CPA, The Tax Shelter, Athens, Georgia. ~3,000 clients/year, ~9 preparers.
Building a unified tax practice platform (Sherpa) to replace fragmented SaaS tools
and potentially sell to other firms by ~2027.

## This Repo
`tts-tax-app` — The income tax preparation module. This is the **primary
development focus** of the entire Sherpa platform.

Local path: `D:\dev\tts-tax-app`

## Current Stack (What Actually Exists — Do Not Change Without Discussion)
| Layer | Technology |
|-------|-----------|
| Server | Django 5.2 LTS + Django REST Framework |
| Database | Supabase Postgres 17.6 |
| Web Client | Vite + React + TypeScript (SPA served by Django) |
| Styling | Tailwind UI / Tailwind Plus |
| Hosting | Render.com (Django + WhiteNoise serves SPA) |
| Dependency Mgmt | Poetry (Python 3.13) |
| AI Help | Gemini (IRS-grounded RAG + broad search) |
| PDF Rendering | ReportLab + pypdf + pymupdf over official IRS templates |

## Project Rules (enforced)
- **No PII in committed code** — never put real SSNs, names, addresses, or other
  client PII into source files, test fixtures, migrations, seed data, or git
  history. Use synthetic/fake values for anything checked in.
- **Dev environment shares the production DB.** `server/.env` points Django at the
  Supabase project `tmqypsbmswishqkngbrl`, which is shared with the sherpa-1099
  production app and already contains ~700 real clients (as of 2026-04-21). Treat
  any DB write as a production operation. When importing new test data, prefer
  sanitization (fake SSNs/names, real dollar amounts) over raw imports to limit
  blast radius from dev-time mistakes. See Cowork memory `project_tts_dev_points_at_prod.md`
  for full context.
- **No secrets in repo** — all credentials via `.env` (which is gitignored).
- **Migrations required** — every model change needs a migration.
- **Tests required** — every ticket must include tests; tests must pass before merge.

…(truncated for upload size)

Diary mentions

No recent diary mentions.

Render

  • Service: tts-tax-app
  • Status: live
  • Last deploy: 2026-06-12T00:23:21.426222Z