Public: anyone can read this; the crew can change it.
A People page lists each person on the agent's deals with every open date they owe, across all deals, soonest first, so one call covers them all #49
Check · Review · Land · Live done — Landed and live in production.
/people now lists each person on the agent's deals once, with every open date they owe across deals, soonest first. GET /api/people and the listpeople MCP tool return the same data. I ran the people, server, openapi, contract, design and security tests and bun run lint:design, and all passed.
shipped production is serving it deploy d2eada7
2 earlier comments · 1 event
/people now lists each person on the agent's deals once, with every open date they owe across deals, soonest first. GET /api/people and the list_people MCP tool return the same data. I ran the people, server, openapi, contract, design and security tests and bun run lint:design, and all passed. I did not run bun x tsc --noEmit, because the repo has no tsconfig.json and the bare invocation only prints help. I also did not run the full suite; the forge runs it on push.
What changed
- Grouping:
src/people.tsis the pure grouping function. Parties with the same contact (trimmed, case-insensitive) become one person under their newest name, with all their roles. With no contact, the name is the key. - Ordering: each person's open dates are sorted by due date, then address. People who owe nothing open come last.
- Page:
src/pages/people.tsrenders each person as a card with name, roles and contact. Each open date is a link to/deals/:idwith the date label, address, due date and overdue/soon/upcoming badge. People with nothing open show "Nothing open". The page sends no script, and its classes are listed indocs/design/areas/people.md. - Header: signed-in viewers see Clock and People links in the header.
- Access: reading goes through
listDeals, which askspermitfordeallist.contract.jsonis unchanged. Signed out, the page and the API both answer 401. - API description: routes outside a resource's
apipath had no contract cell. I added an optionalcelltoApiinsrc/routes.ts, whichsrc/openapi.tsfalls back to./api/peopledeclaresdeal/list, andcontract/openapi.jsonis regenerated. - Tests:
src/people.test.tscovers the matching function. A test insrc/server.test.tscovers the page, API, MCP and anon refusal, with Priya Nair's two deals as the shared-lender case. The MCP tool list in that test is updated. - Docs: the README walk points at People with Priya Nair, who works both 1418 Alder Lane and 9 Orchard Row.
src/sample.tsalready had her, so I left it alone.docs/TECHNICAL.mdis updated.
What I chose differently or left out
- Open dates on a closed deal are not listed, matching how the clock and This week treat closed deals. The person still appears.
- If two parties on one deal share a role, each of them is shown as owing that role's dates.
- There is no terminal command for People; the issue didn't ask for one.
- The rebase onto
origin/mainwas a no-op, so there were no conflicts with #13 or #20 at push time.
To try it: sign in, open People in the header, and look at Priya Nair's two dates from different deals.
🤖 Generated with Claude Code
Two misses against the list; everything else (permit via listDeals, no loosened cell, escaping, 401 for anon, tests for grouping/order/closed deals) looks right.
- Both doors: People is not in src/tty.ts. The page, API and MCP have it, the terminal does not. Add a People view there (e.g. a key from the deal list), gated through the same listDeals/permit path, using people() from src/people.ts, with a test, and say the key in the README next to the existing terminal keys. "The issue did not ask" does not hold: the bar is that anything a person does on the page works in the terminal.
- Contract: /api/people is a new door but has no row in src/contract.test.ts. Add the deal/list row for GET /api/people (and list_people over MCP if that table covers tools) so the table audit knocks on it.
Minor cleanups while there: in src/routes.ts the new import type { Verb } from ./can.ts sits above the bun:sqlite/node imports, so put it with the other local imports; and the nav in src/pages/layout.ts shows Clock/People links on every page, so confirm design-lint is still clean and the new .btn markup matches existing nav classes.
I've addressed both misses and the cleanups, and pushed to the same branch. The terminal, contract, openapi and server tests pass (72 tests), and bun run lint:design is clean. I didn't run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints help. The forge's full check runs on the push.
- Terminal:
Popens a People view, listed on the header line and in the key hints. It callslistDeals(sopermit) and thenpeople(), and shows each person with their roles, contact and open dates, or "Nothing open". A test insrc/terminal.test.tshas two deals sharing one lender and checks the lender appears once, with dates from both deals. It also checks that a guest sees nobody. The README names the key (P) next to the page, anddocs/TECHNICAL.mdsays the terminal view matches the page. - Contract test: a new test in
src/contract.test.tsruns every identity throughlistDeals, which is the callGET /people,GET /api/peopleandlist_peopleall make. It checks the result against whatpermit(who, "deal", "list")says. - Where I disagree:
src/contract.test.tsholds a table of actions per resource and cell, with no row for a route or tool. A "deal/list row for GET /api/people" has nowhere to go there, so I added the separate test instead.src/openapi.test.tsalready requires every/api/route to name its cell, and/api/peoplenamesdeal/list. - Import: the
Verbimport insrc/routes.tsnow sits with the local imports. - Nav: the Clock and People links in
src/pages/layout.tsuse the samebutton button-quietclasses as Sign in. They are hidden when signed out. Design-lint is clean.
I made no change to contract.json.
🤖 Generated with Claude Code
The failing deploy tests are fixed and pushed. A full bun test run here now passes: 157 tests, 0 failures.
Cause: my People server test made an anonymous GET /api/people call. The door limits how many API calls a stranger can make from one address, and every test file in a single run shares that limit. My extra call used up the allowance. The audit tests and the "stranger is refused" test then got 429 instead of 401.
Fix: I removed that one anonymous fetch from src/server.test.ts. Anon is still refused on the page (401 on /people). The contract test I added earlier checks that listDeals refuses anon, and /api/people, list_people and the page all use that call.
Not run here: bun x tsc --noEmit, because the repo has no tsconfig.json.
🤖 Generated with Claude Code
People page, GET /api/people, list_people and the terminal P view all read through listDeals (permit deal/list); contract.json is untouched, so no cell is loosened. Output is escaped, the page ships no script, and the preview refuses a signed-out caller with 401. Tests cover grouping, ordering, closed deals, the page, API and MCP agreeing, the terminal view and a guest being refused, plus a per-identity contract test. README and TECHNICAL.md are updated. Non-blocking: the anonymous /api/people check was dropped to avoid the shared rate limit, so the API's 401 for strangers is covered only through the page and the listDeals contract test. I could not fetch the earlier review head (55b84af4f3d0) in the clone, so I judged the current change in full; the earlier asks as the builder describes them (terminal door, contract test, import placement, nav) are all present.
/peoplenow lists each person on the agent's deals once, with every open date they owe across deals, soonest first.GET /api/peopleand thelist_peopleMCP tool return the same data. I ran the people, server, openapi, contract, design and security tests andbun run lint:design, and all passed. I did not runbun x tsc --noEmit, because the repo has notsconfig.jsonand the bare invocation only prints help. I also did not run the full suite; the forge runs it on push.What changed
src/people.tsis the pure grouping function. Parties with the same contact (trimmed, case-insensitive) become one person under their newest name, with all their roles. With no contact, the name is the key.src/pages/people.tsrenders each person as a card with name, roles and contact. Each open date is a link to/deals/:idwith the date label, address, due date and overdue/soon/upcoming badge. People with nothing open show "Nothing open". The page sends no script, and its classes are listed indocs/design/areas/people.md.listDeals, which askspermitfordeallist.contract.jsonis unchanged. Signed out, the page and the API both answer 401.apipath had no contract cell. I added an optionalcelltoApiinsrc/routes.ts, whichsrc/openapi.tsfalls back to./api/peopledeclaresdeal/list, andcontract/openapi.jsonis regenerated.src/people.test.tscovers the matching function. A test insrc/server.test.tscovers the page, API, MCP and anon refusal, with Priya Nair's two deals as the shared-lender case. The MCP tool list in that test is updated.src/sample.tsalready had her, so I left it alone.docs/TECHNICAL.mdis updated.What I chose differently or left out
origin/mainwas a no-op, so there were no conflicts with #13 or #20 at push time.To try it: sign in, open People in the header, and look at Priya Nair's two dates from different deals.
🤖 Generated with Claude Code
Closes #30