Commit Graph

13 Commits

Author SHA1 Message Date
5c5c777837 Add POST /api/semantic-diff endpoint for AI-powered code change explanations
Uses Anthropic claude-sonnet-4-6 server-side to explain the semantic meaning
of code diffs in the budget app domain (paychecks, bills, financing, actuals).
Input validation rejects empty or oversized (>50KB) diffs. Tests mock the
Anthropic client via direct method replacement (same pattern as db.pool.query).

Nightshift-Task: semantic-diff
Nightshift-Ref: https://github.com/marcus/nightshift
2026-03-20 01:53:45 -04:00
e9f5a48f2d Add unit testing infrastructure with Vitest
Set up Vitest for both server (Node + Supertest) and client (jsdom + React
Testing Library). Extract Express app into app.js for testability. Add example
tests covering bills validation, bills route CRUD, ThemeContext, and App nav
rendering. Update CLAUDE.md with testing docs and requirement to write tests
with features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 21:03:29 -04:00
10f8debdf5 Clarify td approve requires a separate session, not just a sub-agent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 20:43:09 -04:00
6e771ad20b Fix variable bill amount lost on paid toggle; revert gross/net protection
- PATCH paycheck-bills/:id/paid: variable bills now preserve amount_override
  rather than overwriting it with b.amount (which may be null/0). Fixed bills
  continue to lock in b.amount on paid and clear on unpaid.
- generatePaychecks: revert gross/net protection — refresh always updates
  gross/net from current settings as originally intended.
- CLAUDE.md: remove gross/net protection note; add td approve sub-agent rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 20:41:57 -04:00
119d53c33a Add start_date to financing plans and protect paid paychecks from refresh
- Migration 004: adds start_date column to financing_plans (DEFAULT CURRENT_DATE)
- generatePaychecks: skips financing plans whose start_date is after the target month
- buildVirtualPaychecks: same start_date guard for virtual previews (already applied)
- generatePaychecks upsert: preserves gross/net when paycheck has any paid bills
- financing.js POST/PUT: accept and store start_date
- Financing.jsx: add Start Date field to create/edit form (defaults to today)
- CLAUDE.md: document start_date guard and paid-paycheck refresh protection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 20:37:37 -04:00
72c2e0a0c7 Enforce doc updates and single td commands per invocation in CLAUDE.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 20:30:07 -04:00
be827f6d92 Update CLAUDE.md with variable bills, lazy generation, and financing docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 20:29:07 -04:00
c132e1a5fe Update CLAUDE.md with theming, charts, and bill locking notes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:59:14 -04:00
16ba4166f2 Document td concurrency rule in CLAUDE.md and AGENTS.md
Sub-agents must never call td commands directly. Concurrent writes
from parallel agents corrupt the SQLite database. Only the
orchestrator manages td task lifecycle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:33:21 -04:00
8a9844cf72 Add paycheck-centric main view
Two-column monthly view showing bills, amounts, paid status,
and remaining balance per paycheck. Month navigation included.
Also adds PATCH /api/paycheck-bills/:id/paid endpoint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:09:51 -04:00
83abac52f6 Add Docker Compose project scaffold
Sets up the full monorepo structure with:
- Multi-stage Dockerfile (client-build + production stages)
- docker-compose.yml for production, docker-compose.dev.yml overlay for development
- Express server (port 3000) with pg pool, health route, and SPA static file serving
- React 18 + Vite client with react-router-dom v6, nav bar, and placeholder page components
- .env.example with PostgreSQL and app config
- Empty db/migrations/ directory for future migrations
- CLAUDE.md updated with development workflow commands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:02:17 -04:00
24d22ad850 Add agent workflow rules to CLAUDE.md
Document commit-per-task, documentation hygiene, and td lifecycle requirements
for all agents working in this repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 18:57:48 -04:00
0a88bb3d12 Add project docs and initial configuration
- PRD.md: full product requirements for the budget app
- CLAUDE.md: repo guidance including td task management workflow
- AGENTS.md: session startup instructions
- .gitignore: comprehensive ignore rules for Node/React/Docker/editor artifacts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 18:56:20 -04:00