________ ______ _______ __ __ __
β± β β± β² β± β² β± ββ± β β± β
$$$$$$$$β±______ __ __ β±$$$$$$ β ______ $$$$$$$ β$$β± $$ β ______ _$$ β_
$$ β β± β² β± β² β± β $$ β $$β± β± β² ______ $$ β__$$ ββ± β$$ β β± β² β± $$ β
$$ β $$$$$$ β$$ β²β±$$β± $$ β β±$$$$$$ ββ± β$$ $$β± $$ β$$ ββ±$$$$$$ β$$$$$$β±
$$ β β± $$ β $$ $$< $$ β __ $$ β $$ β$$$$$$β± $$$$$$$β± $$ β$$ β$$ β $$ β $$ β __
$$ ββ±$$$$$$$ β β±$$$$ β² $$ β²__β± β$$ β²__$$ β $$ β $$ β$$ β$$ β²__$$ β $$ ββ± β
$$ β$$ $$ ββ±$$β± $$ β______$$ $$β± $$ $$β± $$ β $$ β$$ β$$ $$β± $$ $$β±
$$β± $$$$$$$β± $$β± $$β±β± β$$$$$$β± $$$$$$β± $$β± $$β± $$β± $$$$$$β± $$$$β±
$$$$$$β±
Local-first, privacy-preserving personal tax software
An engineering-focused system for modeling tax rules, storing tax-relevant data, and deterministically calculating outcomes using transparent, verifiable logic.
This is not tax advice software.
Getting Started Β· Architecture Β· Documentation Β· Contributing
Most consumer tax software hides its logic, can't reproduce historical results, and stores your data in the cloud. Tax Co-Pilot takes the opposite approach:
| Traditional Tax Software | Tax Co-Pilot | |
|---|---|---|
| Calculation logic | Hidden / proprietary | Open, versioned YAML rule packs |
| Reproducibility | Results change silently | Immutable runs with full audit trace |
| Data storage | Cloud-based, opaque | Local SQLite, optional AES-256 encryption |
| Traceability | Inputs and outputs blended | Every number traceable to its source |
- Rules-as-Data β Tax logic lives in versioned YAML rule packs, not application code. Past results never silently change.
- Full Audit Trace β Every calculation produces rule ID, inputs, intermediates, rounding policy, and human-readable explanation.
- Adaptive Workspace UI β Landing page navigation, latest-run dashboard, dedicated audit-trace review, and light/dark theme support keep long workflows easier to navigate.
- Local-First & Private β Runs entirely on local hardware. Optional AES-256 encryption at rest via SQLCipher.
- Multi-Person & Multi-State β Two-taxpayer filing support (MFJ/MFS) with multiple state jurisdiction modeling.
- What-If Engine β Scenario comparison (e.g., MFJ vs MFS) with compliance-first optimization.
- Integrity Verification β SHA-256 hash chain over immutable run artifacts with tamper detection.
-
Python 3.11+
-
pip
-
System build dependencies (required to compile
pysqlcipher3):Distro Command Fedora / RHEL sudo dnf install gcc python3-devel sqlcipher-develDebian / Ubuntu sudo apt-get install build-essential python3-dev libsqlcipher-devmacOS (Homebrew) brew install sqlcipherWindows note: These build dependencies compile
pysqlcipher3from source on Linux/macOS. The default install has encryption disabled (TAX_COPILOT_ENCRYPTION_ENABLED=false), so Tax Co-Pilot runs on native Windows with no SQLCipher and no C compiler. There is no prebuilt SQLCipher wheel on PyPI for Windows, so if you want encryption at rest on Windows, use WSL or conda, or buildpysqlcipher3from source β see docs/ENCRYPTION.md β Windows for the full instructions. Install a recent Python for Windows and make sure you check "Add python.exe to PATH" in the installer.
macOS / Linux / WSL
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
# Optional: dev tooling (ruff, mypy, pip-audit)
python -m pip install -r requirements-dev.txtWindows (PowerShell or Command Prompt)
py -m pip install --upgrade pip
py -m pip install -r requirements.txt
REM Optional: dev tooling (ruff, mypy, pip-audit)
py -m pip install -r requirements-dev.txtUse the
pylauncher (bundled with the official Windows installer) orpython, whichever resolves on yourPATH. If you prefer an isolated environment, create a virtualenv first withpy -m venv .venvand activate it via.venv\Scripts\activate.
macOS / Linux / WSL
./run.sh
# or: python -m uvicorn main:app --host 127.0.0.1 --port 8000 --reloadWindows
run.bat
REM or: py -m uvicorn main:app --host 127.0.0.1 --port 8000 --reloadYou can also double-click run.bat from File Explorer.
Open http://127.0.0.1:8000 in your browser to reach the landing page and dashboard workspace.
pytest -qβββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser (Server-rendered HTML / Jinja2) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β main.py β app factory, lifespan, middleware β
ββββββββββββββββ¬ββββββββββββββββββ¬βββββββββββββββββ
β β
ββββββββββββββββΌββββββββββββββ βββΌββββββββββββββββββββββββββ
β app/routes/ β β app/route_helpers/ β
β Request handlers β β CSRF / form / DB state β
ββββββββββββββββ¬ββββββββββββββ βββ¬ββββββββββββββββββββββββββ
β β
ββββββββββββββββΌββββββββββββββ βββΌββββββββββββββββββββββββββ
β app/engine/ β β app/services/ β
β Calculator / RuleLoader β β Database / Encryption β
β WhatIfEngine β β CSV / Audit / Pack CRUD β
ββββββββββββββββ¬ββββββββββββββ βββββββββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ
β rule_packs/ β Versioned YAML (federal + state) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Path | Responsibility |
|---|---|---|
| Engine | app/engine/ |
Tax computation only. No persistence, no I/O. Decimal math throughout. |
| Services | app/services/ |
Persistence, encryption, adapters. No tax/business logic. |
| Models | app/models/ |
Pydantic domain models (FilingStatus, W2Data, ReturnRun, TraceNode, etc.) |
| Route Helpers | app/route_helpers/ |
Shared CSRF, form parsing, DB state, and rule-pack cache helpers for the web layer. |
| Web | app/routes/ |
FastAPI route handlers and response orchestration. |
| App Wiring | main.py |
FastAPI app factory, lifespan, middleware, and router registration. |
| Rule Packs | rule_packs/ |
Versioned YAML rule definitions and manifests per jurisdiction/year. |
| Component | Technology |
|---|---|
| Language | Python 3.11+ |
| Backend | FastAPI + Uvicorn |
| Database | SQLite (WAL mode) + optional SQLCipher (AES-256) |
| UI | Server-rendered Jinja2 templates |
| Numeric Type | Decimal (never float) |
| Rule Packs | Versioned YAML |
| CI | GitHub Actions (ruff, mypy, pytest, pip-audit) |
Tax Co-Pilot is stable (1.0.x). The application compatibility promise described under Versioning is in effect.
- Tax years 2023, 2024, and 2025 with federal 1040-style calculations
- W-2 (incl. Medicare wages Box 5/6), 1099-INT, 1099-DIV, 1099-B, 1099-NEC, and SSA-1099 income support
- Preferential LTCG/qualified-dividend rates, self-employment tax, Social Security taxability, and capital-loss carryover
- Credits and surtaxes: EITC (with the combat pay election), CTC + refundable ACTC + ODC, education credits, dependent care, NIIT, Additional Medicare Tax (Form 8959 incl. Part IV withholding), age-65+/blind deductions, military provisions
- Withholding and estimated payments
- Two-person filing (MFJ / MFS / Single / HoH / QSS)
- 15 state packs: GA, CA, NY, PA, IL, NC (with dependent exemptions, state credits, NYC/Yonkers city tax, and the NY recapture) plus 9 no-income-tax stubs
- Multi-state W-2 returns: nonresident wage apportionment and the resident credit for taxes paid to other states
- What-if scenario comparison engine (filing-status and combat-pay-election scenarios)
- Local web UI with landing page, light/dark theme support, and full calculation trace
- JSON and HTML audit export, IRS form-line mapping, encrypted-at-rest storage (SQLCipher)
This project follows Semantic Versioning for application releases. Before 1.0.0, application releases use numeric 0.y.z versions while lifecycle labels such as Beta remain separate status markers. Rule pack manifests use their own independent SemVer line, while editor variant IDs such as custom_v1 are workspace labels that sit alongside the manifest version. For backward compatibility, legacy custom packs with shorthand manifest versions such as 1 continue to load as 1.0.0 and are rewritten to canonical SemVer when edited, cloned, or re-imported. The SQLite schema uses its own integer generation via PRAGMA user_version, independent of both application and rule-pack versions. A stable application compatibility promise begins at 1.0.0.
| Document | Description | |
|---|---|---|
| π | Encryption Guide | Setup, configuration, and password management for AES-256 database encryption |
| π | Rule Pack Authoring | How to write rule packs β rule types, expressions, constants, and worked examples |
| πΊπΈ | State Authoring Guide | Adding a new state tax jurisdiction from template to tests |
| Document | Description | |
|---|---|---|
| π― | Roadmap | Milestones, planned features, and implementation prompts |
| π | Changelog | Release notes and change history |
| π€ | Contributing | Development setup, quality checks, and PR expectations |
| π‘οΈ | Security Policy | Vulnerability reporting and disclosure process |
| Document | Description | |
|---|---|---|
| π | Notice (Third-Party) | Full attribution for all third-party dependencies |
| π | Export Control | Cryptographic export control notice (EAR/TSU) |
| Disclaimer | Warranty disclaimer and user responsibilities |
Tax_Co-Pilot/
βββ .agent_tools/
β βββ 00_master_directives.md
β βββ 01_style_guide.md
β βββ 02_architecture.md
β βββ 03_testing_rules.md
β βββ 04_doc_updater.md
β βββ 05_session_log.md
βββ .claude/
β βββ settings.json
βββ .editorconfig
βββ .github/
β βββ ISSUE_TEMPLATE/
β β βββ bug_report.md
β β βββ config.yml
β β βββ feature_request.md
β β βββ new_state.md
β β βββ tax_calculation_error.yml
β βββ PULL_REQUEST_TEMPLATE.md
β βββ workflows/
β βββ ci.yml
βββ .gitignore
βββ .pre-commit-config.yaml
βββ AGENTS.md
βββ app/
β βββ __init__.py
β βββ config.py
β βββ engine/
β β βββ __init__.py
β β βββ calculator.py
β β βββ rule_loader.py
β β βββ whatif.py
β βββ log.py
β βββ models/
β β βββ __init__.py
β β βββ domain.py
β β βββ forms.py
β βββ route_helpers/
β β βββ __init__.py
β β βββ csrf.py
β β βββ db_state.py
β β βββ form_parsing.py
β β βββ pack_cache.py
β βββ routes/
β β βββ __init__.py
β β βββ calculate.py
β β βββ encryption.py
β β βββ import_export.py
β β βββ navigation.py
β β βββ rule_packs.py
β β βββ runs.py
β βββ services/
β β βββ __init__.py
β β βββ ai_prompt.py
β β βββ audit_export.py
β β βββ csv_import.py
β β βββ database.py
β β βββ encryption.py
β β βββ form_mapper.py
β β βββ ref_catalog.py
β β βββ rule_pack_editor.py
β βββ static/
β β βββ css/
β β β βββ main.css
β β βββ js/
β β βββ ai-assist.js
β β βββ compare.js
β β βββ constant-editor.js
β β βββ forms.js
β β βββ rule-editor.js
β β βββ submit-guard.js
β β βββ theme.js
β βββ templates/
β βββ layouts/
β β βββ base.html
β βββ pages/
β βββ audit_trace.html
β βββ calculate.html
β βββ constant_editor.html
β βββ dashboard.html
β βββ forms_view.html
β βββ home.html
β βββ import_csv.html
β βββ legal.html
β βββ rotate_key.html
β βββ rule_editor.html
β βββ rule_pack_ai_assist.html
β βββ rule_pack_detail.html
β βββ rule_pack_import.html
β βββ rule_packs.html
β βββ run_compare.html
β βββ runs.html
β βββ unlock.html
β βββ whatif.html
βββ CHANGELOG.md
βββ CITATION.cff
βββ CLAUDE.md
βββ CODE_OF_CONDUCT.md
βββ CONTRIBUTING.md
βββ docs/
β βββ DISCLAIMER.md
β βββ ENCRYPTION.md
β βββ EXPORT_CONTROL.md
β βββ NOTICE.md
β βββ ROADMAP_ARCHIVE_v1.md
β βββ RULE_PACK_AUTHORING.md
β βββ STATE_AUTHORING_GUIDE.md
β βββ superpowers/
β βββ plans/
β β βββ 2026-03-15-federal-completeness.md
β β βββ 2026-03-16-state-expansion.md
β β βββ 2026-03-18-forms-support.md
β β βββ 2026-03-18-multi-year-support.md
β β βββ 2026-03-18-qa-remediation.md
β β βββ 2026-03-21-ca-ny-state-packs.md
β β βββ 2026-03-21-itemized-deductions-credits.md
β β βββ 2026-03-22-data-mgmt-dx.md
β β βββ 2026-03-22-hardening-qa.md
β β βββ 2026-03-22-rule-pack-editor.md
β β βββ 2026-03-24-ui-ux-beta-hardening.md
β β βββ 2026-03-29-phase1-structural-hardening.md
β βββ specs/
β βββ 2026-03-15-federal-completeness-design.md
β βββ 2026-03-16-state-expansion-design.md
β βββ 2026-03-22-hardening-qa-design.md
β βββ 2026-03-22-rule-pack-editor-design.md
β βββ 2026-07-03-authoring-for-non-coders-design.md
βββ LICENSE
βββ main.py
βββ pyproject.toml
βββ README.md
βββ README.txt
βββ requirements-dev.txt
βββ requirements.txt
βββ ROADMAP.md
βββ rule_packs/
β βββ federal/
β β βββ 2023/
β β β βββ federal_2023_manifest.yaml
β β β βββ federal_2023_rules.yaml
β β βββ 2024/
β β β βββ federal_2024_manifest.yaml
β β β βββ federal_2024_rules.yaml
β β βββ 2025/
β β βββ federal_2025_manifest.yaml
β β βββ federal_2025_rules.yaml
β βββ state/
β βββ _template/
β β βββ 2024/
β β βββ state_TEMPLATE_2024_manifest.yaml
β β βββ state_TEMPLATE_2024_rules.yaml
β βββ AK/
β β βββ 2024/
β β βββ state_AK_2024_manifest.yaml
β β βββ state_AK_2024_rules.yaml
β βββ CA/
β β βββ 2024/
β β βββ state_CA_2024_manifest.yaml
β β βββ state_CA_2024_rules.yaml
β βββ FL/
β β βββ 2024/
β β βββ state_FL_2024_manifest.yaml
β β βββ state_FL_2024_rules.yaml
β βββ GA/
β β βββ 2023/
β β β βββ state_GA_2023_manifest.yaml
β β β βββ state_GA_2023_rules.yaml
β β βββ 2024/
β β β βββ state_GA_2024_manifest.yaml
β β β βββ state_GA_2024_rules.yaml
β β βββ 2025/
β β βββ state_GA_2025_manifest.yaml
β β βββ state_GA_2025_rules.yaml
β βββ IL/
β β βββ 2024/
β β βββ state_IL_2024_manifest.yaml
β β βββ state_IL_2024_rules.yaml
β βββ NC/
β β βββ 2024/
β β βββ state_NC_2024_manifest.yaml
β β βββ state_NC_2024_rules.yaml
β βββ NH/
β β βββ 2024/
β β βββ state_NH_2024_manifest.yaml
β β βββ state_NH_2024_rules.yaml
β βββ NV/
β β βββ 2024/
β β βββ state_NV_2024_manifest.yaml
β β βββ state_NV_2024_rules.yaml
β βββ NY/
β β βββ 2024/
β β βββ state_NY_2024_manifest.yaml
β β βββ state_NY_2024_rules.yaml
β βββ PA/
β β βββ 2024/
β β βββ state_PA_2024_manifest.yaml
β β βββ state_PA_2024_rules.yaml
β βββ SD/
β β βββ 2024/
β β βββ state_SD_2024_manifest.yaml
β β βββ state_SD_2024_rules.yaml
β βββ TN/
β β βββ 2024/
β β βββ state_TN_2024_manifest.yaml
β β βββ state_TN_2024_rules.yaml
β βββ TX/
β β βββ 2024/
β β βββ state_TX_2024_manifest.yaml
β β βββ state_TX_2024_rules.yaml
β βββ WA/
β β βββ 2024/
β β βββ state_WA_2024_manifest.yaml
β β βββ state_WA_2024_rules.yaml
β βββ WY/
β βββ 2024/
β βββ state_WY_2024_manifest.yaml
β βββ state_WY_2024_rules.yaml
βββ run.bat
βββ run.sh
βββ scripts/
β βββ validate_rule_pack.py
βββ SECURITY.md
βββ tests/
βββ __init__.py
βββ conftest.py
βββ test_additional_medicare.py
βββ test_additional_standard_deduction.py
βββ test_ai_prompt.py
βββ test_authoring_e2e.py
βββ test_calculate_name_validation.py
βββ test_calculator_resolve_ref.py
βββ test_capital_loss_carryover.py
βββ test_chain_integrity.py
βββ test_constants_editor.py
βββ test_data_mgmt.py
βββ test_deep_review_fixes.py
βββ test_dependent_care.py
βββ test_edge_cases.py
βββ test_education_credits.py
βββ test_encoding_guard.py
βββ test_encrypted_database.py
βββ test_eitc.py
βββ test_encryption.py
βββ test_engine_hardening.py
βββ test_error_paths.py
βββ test_federal_corrections.py
βββ test_forms.py
βββ test_golden.py
βββ test_golden2.py
βββ test_golden_m1.py
βββ test_hash_versioning.py
βββ test_itemized_credits.py
βββ test_logging.py
βββ test_ltcg_rates.py
βββ test_matrix_lookup.py
βββ test_medicare_wages.py
βββ test_military.py
βββ test_milestone12_structure.py
βββ test_milestone14_csp.py
βββ test_milestone15_pagination.py
βββ test_milestone6_routes.py
βββ test_multi_year.py
βββ test_multistate.py
βββ test_niit.py
βββ test_ny_recapture.py
βββ test_parse_money.py
βββ test_paste_import.py
βββ test_route_coverage.py
βββ test_rule_pack_editor.py
βββ test_rule_pack_routes.py
βββ test_schedule_8812.py
βββ test_se_tax.py
βββ test_services_hardening.py
βββ test_state_ca_ny.py
βββ test_state_corrections.py
βββ test_state_credits.py
βββ test_state_dependents.py
βββ test_state_expansion.py
βββ test_state_pa_il_nc.py
βββ test_web_hardening.py
Tax Co-Pilot is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See LICENSE for the full text.
Database encryption at rest is powered by SQLCipher (AES-256), Copyright 2008-2024 Zetetic LLC, licensed under BSD-3-Clause. SQLCipher is built on SQLite (public domain).
The cryptography library is used for legacy/compatibility encryption tooling (Apache-2.0 OR BSD-3-Clause), including OpenSSL (Apache-2.0).
| Library | License | Use |
|---|---|---|
| FastAPI | MIT | Web framework |
| Uvicorn | BSD-3-Clause | ASGI server |
| Pydantic | MIT | Data validation |
| Jinja2 | BSD-3-Clause | Template engine |
| PyYAML | MIT | YAML rule pack parsing |
| python-multipart | Apache-2.0 | Form data parsing |
| pysqlcipher3 | zlib/libpng | SQLCipher Python binding |
| keyring | MIT | OS credential storage |
All third-party licenses are permissive and compatible with AGPL-3.0. Full attribution in docs/NOTICE.md.
This software contains cryptographic functionality (AES-256 via SQLCipher, PBKDF2-HMAC-SHA256). Distributed under the TSU exception (EAR 740.13(e)). See docs/EXPORT_CONTROL.md.
This software is provided "as is", without warranty of any kind. Tax Co-Pilot is not tax advice software. All data is stored locally on your device. You are solely responsible for your data, backups, and encryption passwords. See the AGPL-3.0 license sections 15-16 for the full warranty disclaimer.