diff --git a/docs/plans/2026-09-05-recurring-costs-anchored-model.md b/docs/plans/2026-09-05-recurring-costs-anchored-model.md new file mode 100644 index 0000000..f77d5b8 --- /dev/null +++ b/docs/plans/2026-09-05-recurring-costs-anchored-model.md @@ -0,0 +1,1687 @@ +# Recurring Costs: The Anchored Model — Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** A `lastCharge` recurring cost stops having slots — its next due date is derived from the latest actual charge, so it can be charged any number of times per cycle and each charge restarts the clock. + +**Architecture:** `occurrencesOf` splits on `cost.anchoring` into two walks that share only `stepFrom`. `calendar` keeps the shipped grid, byte-for-byte. `lastCharge` gains an anchored walk with no slots, no confirmation lookup, and no possibility of stepping backwards — which lets three guards be deleted. Two additive UI changes ride along: a real split editor for recurring costs, and a recurring-cost control in the purchase dialog. + +**Tech Stack:** Bun (runtime, test runner, bundler, package manager), TypeScript, React 19, Tailwind 4, shadcn/ui. No new dependencies. + +**Spec:** `docs/specs/2026-09-05-recurring-costs-anchored-model.md` — read it before Task 1. Where plan and spec disagree, the spec wins and the plan is wrong. + +## Global Constraints + +Copied from `AGENTS.md`. Every task's requirements implicitly include these. + +- **Bun only.** `bun test`, `bun install`, `bun run