Lesson 6 of 6
Prove the combined outcome
Add Today view and Clear completed + Undo with two isolated workers, then prove behaviour that only exists when due, tags, search, view, and archive work together.
Combined outcome is more than “both features exist”
Add two independent features and ship them together. Agent-TODAY owns a view control (All / Today). Today shows tasks due today or earlier that are not completed, then applies the active tag filter and search box. Agent-ARCHIVE owns Clear completed (removes completed tasks) and Undo (restores exactly that cleared set). You own the combined outcome: Today composes due + tags + search; clearing completed leaves every view consistent; the overdue count matches what is visible, not the raw list.
Features sitting in one repo is not enough. A green unit file for Today that ignores search fails the module. You may substitute a comparable pair, but keep the shape: two workers, one frozen interface, one behaviour that is only correct after integration. There is no review agent that signs this off.
Freeze a pure interface, then reuse Lessons 1–5
Sequential interface task first. Pure functions are deliberate — Vitest can lock the combination without a DOM runner:
export type View = 'all' | 'today';
export type ViewOptions = {
view: View;
query: string;
tags: string[]; // empty = no tag filter
today: string; // YYYY-MM-DD
};
export function selectVisibleTasks(tasks: Task[], options: ViewOptions): Task[];
export function clearCompleted(tasks: Task[]): { kept: Task[]; cleared: Task[] };
Then: least-privilege subagents and briefs; one worktree/branch/port/placeholder .env.local each; dispatch with handoffs; merge in order and combine src/main.ts. Re-run due/tags/search checks after every merge. The capstone is not finished when the agents finish. It is finished when you have verified the combined result.
Lock the combination in tests, then run the browser script
view.test.ts must cover all/today × query × tags, plus empty inputs. archive.test.ts must cover the kept/cleared split and the round trip: restoring the cleared set returns the original list. Existing due/tags/search tests stay green.
cd ~/agent-lab/task-tracker
npm test && npm run typecheck
npm run dev -- --port 5173 --strictPort
Browser script (write pass/fail per row): add “Pay rent” due yesterday, tag home (overdue badge); add “Read book” due today, tag home (no overdue); add “Ship report” due tomorrow, tag work, complete it; type read (only Read book); select tag home and clear search (Pay rent + Read book); switch to Today (those two, not the completed report); Clear completed (Ship report gone from All); Undo (it returns, still done); overdue count matches the visible list in each view; console has no errors. Tests passing with a stale server on the wrong port is a fail — --strictPort and kill strays.
Definition of done — and what submission actually means
Pass only if all prior evidence files exist; npm test and npm run typecheck pass including combination tests; the browser table is filled with no console errors; every worker was verified by you; every conflict names both intents and the rule; no secret or out-of-scope edit is on the integration branch; git log --oneline shows interface, features, and integration merges. Any unchecked box is done, unverified, which is not a pass.
The project form stores a public HTTPS URL, an explanation, and the checks you ran. Nothing fetches that URL to certify it. Saving the form means self-reported, pending review, not a certificate, not instructor sign-off, and not an automated pass. Redact keys, .env values, and session links. Do not submit localhost.