# Gift Graph Technical Decisions > Gift Graph - Architecture Decision Records (TDRs): the "why" behind the build on Replit, v0.1 through [[Gift Graph Product Log|{version}]] and the custom domain > Last Updated: 2026-11-21 · Ordered newest first (add new TDRs at the top) · Mirrors `docs/technical-decisions.md` in the repo, with the decisions Agent recorded and the ones I made around it ## Format Each TDR: **Context** → **Options Considered** → **Decision** → **Consequences**, with **Status:** `Accepted` | `Superseded` | `Proposed` | `Open`. ## Decision Map, by Row The Product Log opens on the route, the whole journey on one line; the rows below hold each day in full. Each row reads right to left, newest turn on the left. Copper is chosen, dashed copper is open, dim is declined. ![[gift-graph-decision-map-oct-19.png]] *Oct 19 · v0.7.3 and v0.7.4 · Connections on a page of its own, the light theme, one-offs kept only while they differ from the rule, the tagged Idea heard by no one, Unshare, `only` retired, the spark, and a gift for someone else* ![[gift-graph-decision-map-oct-18.png]] *Oct 18 · v0.7.2 · the hint as the entry, Silent off the connection, the notice, no level on an idea, beta behind a flag, a legacy server on purpose, the request as the yes, and the home on one page* ![[gift-graph-decision-map-oct-17.png]] *Oct 17 · the idea holding the secret and the hint, depth words over trust words, the research memo, two tabs mocked, and the secret made optional* ![[gift-graph-decision-map-oct-16.png]] *Oct 16 · v0.7.1 live, the form bug filed with its redesign, and the depth on the person and the notice left open* ![[gift-graph-decision-map-oct-15.png]] *Oct 15 · the founder account on an email sign-up, the name as a field, and owning the sign-in left for later* ![[gift-graph-decision-map-oct-14.png]] *Oct 14 · the parity test, one domain, a birthday with no year, the preview the server writes, the skill folder, and the mark on 015* ![[gift-graph-decision-map-oct-13.png]] *Oct 13 · every new account hears the founder, one way and locked* ![[gift-graph-decision-map-oct-10.png]] *Oct 10 · v0.7 live, a status as a tag, the ask that asks twice, and fifteen tools* ![[gift-graph-decision-map-oct-09.png]] *Oct 9 · v0.6.4 built · the sealed address, a request with no level, each direction's controls, teal for Secret, parity in the judge, and shares and asks* ![[gift-graph-decision-map-open-oct-08.png|720]] *Open now · the five calls on the table on Oct 8* ![[gift-graph-decision-map-oct-08.png|360]] *Oct 8 · the domain, one account per person again, the faster agent path, and the account page* ![[gift-graph-decision-map-oct-07.png]] *Oct 7 · v0.6.2: the seeded identities, hear, plain technical English, email, Teal ember, the audit* ![[gift-graph-decision-map-oct-06.png]] *Oct 6 · Justin's first use: the card, the page for agents, the vanished hints, whose account* ![[gift-graph-decision-map-oct-05.png]] *Oct 5 · OAuth, Hush, a lost link, one link for many, the release record, agent guidance, the nudge* ![[gift-graph-decision-map-oct-04.png]] *Oct 4 · Neon, the handoff, who labels, the vocabulary grain, the noun, the order of work, no mail* ![[gift-graph-decision-map-oct-03.png]] *Oct 3 · levels, a broad question, surprise-safe, the front door, invites, the self-migrating start, the reset at 006* ![[gift-graph-decision-map-open.png|720]] *Open on Oct 2 · five calls, and the first four have since been settled* ![[gift-graph-decision-map-oct-02.png]] *Oct 2 · copy, example pill, layouts, accounts, demo, uploads, and the state error* ![[gift-graph-decision-map-oct-01.png]] *Oct 1 · the deck restructure, the repo, the live demo, then the v0.2 scope, drop model, judge, sign-in, production, and uptime* ![[gift-graph-decision-map-sep-30.png]] *Sep 30 · from the idea to a deployed v0.1 in one night* ## Considerations Ahead | Consideration | Where it stands | What decides it | | --- | --- | --- | | **Publishing v0.6.3** | Built 2026-10-08, one account per person across domains, migration 012, and half the round trips per agent message | The rehearsal of 012 on a branch of production, then the merge, the publish, and `/health` at `012` | | **Grants and circles** | Designed in `architecture.md`, section 6, as migration 014 | A design session with one-to-many in scope, public lists and reveal requests included | | **A public list behind one link** | Asked 2026-10-04 and 2026-10-05; nothing built | Whether a posted link joins grants as one more kind of audience | | **The account page** | Built 2026-10-09 as v0.6.4, with the address marked Beta (TDR-041) | The publish, and gifting through agents for the address to earn its place | | **The twenty-word cap** | Decided 2026-10-03 and never enforced; real secrets run twenty-five to thirty-five words | Raise it, retire it, or enforce it | | **Discovery as play, and a level between Hint and Secret** | Bookmarked 2026-10-09, with a research memo in the repo and a draft exploration in the vault | My read of the memo, for the blog first | | **The audit's second half** | In the backlog | Each item in its own round: one session gate, the radiogroups, the connect sheet's tabs, the dashboard's command hook, the column drop | | **Personas beyond the pair** | Open | [[Project - Gift Graph/Discovery & Planning/Product Plan#Who It Is For\|Product Plan > Who It Is For]] | ## TDR-078: The Component Folder Holds What a Page Imports **Date:** 2026-11-21 · **Status:** Accepted, built 2026-11-21, in v0.7.5, publish pending ### Context `components/ui` held 55 shadcn files, and no page imported 46 of them. The design review listed them as files that added nothing to the build. That held for the JavaScript. Tailwind reads every file in the folder, imported or unused, and their classes made up 56 kB of a 123 kB stylesheet. ### Decision The folder holds what a page imports. The 46 files are gone, with `use-mobile.tsx`, which only the sidebar imported, the 31 packages only those files imported, and `@hookform/resolvers`, which no file imported. `components.json` stays, and the shadcn command adds a component back when a page needs it. ### Consequences - Nine files stay, the button, the dialog, the dropdown menu, the input, the popover, the skeleton, the toast, the toaster, and the tooltip - The stylesheet is 67 kB, 13 kB gzipped, where it was 123 kB and 21 kB, and the JavaScript is the same in every chunk - The lockfile lost the web app's 32 entries and gained nothing, since the mockup sandbox keeps its own copy of the kit - No file imports `date-fns`, `framer-motion`, `react-icons`, or `zod`, and `index.css` still names the sidebar and chart colours, which wait on my call ## TDR-077: Heard Is a Beta, a Third Page **Date:** 2026-11-21 · **Status:** Accepted, built 2026-11-21 as a beta, in v0.7.5, publish pending ### Context The Hearing panel on a friend's card is the one place I see what that friend shares. A page that gathers every friend's lines has sat in the backlog since 2026-10-19, under a name I had not settled. ### Decision Heard is a third tab at `/owner/heard`, behind `GIFT_GRAPH_BETA`, as themes are. The page holds one card for each person I hear, under the line their Hearing panel carries, with Capture an Idea on every line and the ask on a Hint. It reads the owner state's `heard` and adds no call and no column. ### Consequences - The Hearing panel's lines are one component, drawn by a Connection's card and by the new page - With the switch off, `/owner/heard` shows Ideas - The web server answers a fixed list of pages, and the new page took its line there - The name stays a candidate until I have used it for a week ## TDR-076: Pages Load When They Are Opened, Under One Shape **Date:** 2026-11-21 · **Status:** Accepted, built 2026-11-21, in v0.7.5, publish pending ### Context The build shipped every page in one file of 1,074 kB, which the home had to fetch before it could draw. A signed-in page was blank while the sign-in loaded, then drew one set of blocks for the session and another for its state. ### Decision The home page and the sign-in ride in the first file, and every other page loads when it is opened. A signed-in page waits on its code, the sign-in, the session, and its data, and one component gives all four the same shape, drawn in the frame the page itself uses. ### Consequences - The first file is 716 kB, 207 kB gzipped, and the dashboard is 223 kB of its own - The fonts load from the page's head, and the paper colour shows before the styles arrive - The first file is now mostly the framework, and a home drawn on the server is the next cut ([[Project - Gift Graph/Build & Iterate/Validation Log|Validation Log]]) ## TDR-075: A Change to What a Model Reads Waits on the Judge **Date:** 2026-11-21 · **Status:** Accepted ### Context The lean answers cut `list_secrets` by more than half and a whisper's three answers by half. They change what an agent's model reads, and the hint run taught me that a text can read better and still lose. The judge could not run on the day they were built, since the `claude` command on my PC had lost its sign-in. ### Decision A change to what a model reads, a tool's text or the shape of an answer, waits on a run of the judge. The lean answers sit on the branch `agent-surface-lean` until it runs. Main took only what a model never reads, which is the round trips, the transport, and two lines per tool that no client shows a model. ### Consequences - `list_secrets` on the branch names each person once and, on an Idea, only the people who hear it some other way - A preview drops the list its `show` text repeats, and a confirmation ID is 16 characters where it was 64 - A whisper in two calls and the tool names in the Idea words are next on the same surface, and each needs the judge too ## TDR-074: A Server With No Session Answers in JSON and Refuses a Stream **Date:** 2026-11-21 · **Status:** Accepted, built 2026-11-21, in v0.7.5, publish pending ### Context Gift Graph serves MCP with no session and sends nothing on its own. Each answer went out as an event stream of one event, and a `GET` with a token opened a second stream that stayed open with nothing on it. The sign-in middleware ran on every route, where it read each agent's bearer token on its way past. ### Decision An answer is one JSON object, which every client must accept. A `GET` or a `DELETE` gets 405, the spec's answer from a server with no stream, and the token is not read for it. The sign-in middleware is mounted on `/api/owner` alone. ### Consequences - A client holds no idle connection on the host - `/mcp` and `/health` never touch the sign-in, and a request for the page for agents on a development instance is no longer sent to the sign-in service - A progress message in the middle of a call has no path, and nothing sends one ## TDR-073: The Notice Is One Read, and a Change Takes Fewer Trips **Date:** 2026-11-21 · **Status:** Accepted, built 2026-11-21, in v0.7.5, publish pending ### Context Tool calls sometimes hung for a beat. Every tool result carries the notice, what waits on the owner and what happened for them as a hearer. Reading the news for it took eight trips to the database in a row on every wrapped call, and it marked the news as said before the result existed, which dropped the news when the call failed. A start of the server asked about each migration in turn and then again, 57 queries in a row. ### Decision One statement reads the requests, the open asks, the news, and whether anyone hears the owner. The news mark moves in a second statement, only when there is news, only once the work has succeeded, and only if no other read moved it first. A change opens with its lock and the owner's state in one trip, and commits with the revision and a preview's confirmation in one. A start checks every migration in two queries. ### Consequences - A connect, the tool list, and a first hear cost 10 queries where they cost 31 - A start costs 9 queries where it cost 57, about three seconds against Neon - Each item of news is said once with no lock, and a read that finds nothing writes nothing - A test holds each message to its count of queries ([[Project - Gift Graph/Build & Iterate/Validation Log|Validation Log]]) ## TDR-072: The Hint Guidance Stays, and the Word Check Is the Next Lever **Date:** 2026-11-03 · **Status:** Accepted; the word check waits on my call ### Context I wanted better Hints from an agent, and a way to test a change to the guidance before it ships. A run against the local MCP tested three revisions of the hint guidance on 60 secrets, with one model writing and a second judging blind. ### Decision The guidance stays as it is. On the 20 held-back secrets the production text scored 4.14 against 3.83 and won 14 of 20 pairs, and the rule for the run was to ship only a winner. The server's word check is the next lever, since it refused 12 of 16 baseline hints for an ordinary word shared with the secret. ### Consequences - "Add nothing the owner did not say" ended the invented details, and it is the one line to add on the rerun - Asking for details in new words produced the item in synonyms, and asking for one detail from the owner produced that detail copied - The word check was measured on 2026-11-07. A2, which lets the 2,500 most common English words pass and never a name, is the option to decide on ## TDR-071: A Beta Feature Has a Server Switch, and Themes Are the First **Date:** 2026-10-23 · **Status:** Accepted, built 2026-10-23 as a beta, in v0.7.5, publish pending ### Context On 2026-10-18 I decided that a beta feature renders only behind a server flag, off in production and never tied to an account. The flag had never been built. A gift for the home has no person to tag, and I wanted a theme for it, kept as a beta. ### Decision `GIFT_GRAPH_BETA` names the beta features that are on, as a list separated by commas. Production leaves it unset, and the owner state reports the features that are on. A theme names what an Idea is for when it is not a person, such as Home. The sheet's third choice, For a Theme, offers my own themes, then suggestions, and takes a new name of up to forty characters. An Idea for a theme is heard as usual, with the theme along. ### Consequences - Migration 019 adds one nullable column and its check, and changes no row - An Idea for a person takes no theme, in the server and in a check on the table - Only a page sets a theme while the beta runs, and the agent tools keep their strict shapes - With the beta off, a stored theme shows nowhere and an edit keeps it ## TDR-070: Dustin's Notes From a Phone **Date:** 2026-10-23 · **Status:** Accepted, built 2026-10-23, in v0.7.5, publish pending ### Context Dustin sent three notes with two screenshots from Chrome on Android. The pills on the home read as one thing doing three jobs. Whisper opened its sheet too far down, with the lower half under the keyboard. Who a gift is for sat near the foot of the sheet, after the Hint, the Secret, and the label. ### Decision The sheet reads the visual viewport while it is open and sits on the keyboard, no taller than what shows above it, with the field in use in view. For Me or For Someone Else opens the sheet, since the choice decides whether anyone hears the Idea at all. One kind of control has one shape. A round pill is a place, a filter has small corners and a check, and the page's own action is filled teal. ### Consequences - A phone browser shrinks only the visual viewport when the keyboard rises, and the math for that lives in one file with its own test - On a touch screen the sheet opens with no field in focus, and its fields are 16 px, the size at which a browser stops zooming - The rule from migration 017 stands, and nothing changed on the server ([[Project - Gift Graph/Build & Iterate/User Feedback|User Feedback]], Session-008) ## TDR-069: The Cloud Environment Holds No Secrets, and the Judge Stays Local **Date:** 2026-10-21 · **Status:** Accepted, built 2026-10-21 ### Context I want to build from the PC, the Mac, and the phone without setting each one up. A Claude Code cloud session clones the repository fresh on Ubuntu, and a cached environment keeps files and loses running services. The image ships Node 20 to 22, and Replit runs 24. Anyone using the environment can read its variables and its setup script. ### Decision The SessionStart hook in `.claude/settings.json` readies each session from the repository. It starts the image's Postgres 16, makes the throwaway role and database from `.env.local.example`, writes a `.env.local` with no secrets, installs, and migrates. The setup script, `scripts/cloud/setup.sh` pasted at claude.ai/code, adds only Node 24 and pnpm 10 from nodejs.org, which leaves the variables empty for the round. The round moves into `scripts/local/round.sh` for every machine, and a `CLAUDE.md` carries the project's rules into sessions that cannot see the memory on the PC. ### Consequences - The judge spawns headless `claude` sessions that would need an API key in the environment, and it stays on the PC or the Mac with Neon, the vault mirror, and every production step - A cloud session works on a branch and opens a pull request, and its branch reaches main on GitHub before Replit - Claude attribution is off in the project settings, which holds on every machine ## TDR-068: The Agent Tells a Wish From a Gift **Date:** 2026-10-19 · **Status:** Accepted, built 2026-10-19, published in v0.7.4 on 2026-10-19 ### Context An agent that read "Justin would love a Lamy pen" as my own wish would save it where Justin hears it, and Justin would hear his own gift. The notice listed what waits on me, and an agent still had to look up the IDs each answer takes. ### Decision The agent tells three requests apart. A wish of the owner is their own Idea. A gift for someone else goes in with `for`, which keeps it from everyone, the person included, with the person's ID from `list_connections` and a question first when the person is not a Connection. A question about what a friend would like is `hear`. A whisper or update preview with no `for` whose secret or hint names a Connection asks first in `next`, and the save goes ahead whatever the answer. The check matches a display name, or its first word, as a whole word in any case at three characters or more, across approved, paused, and pending Connections. The Waiting on you lines of the notice carry the IDs their calls take, and a fifth prompt, `whats-waiting`, hands an agent the same lines with nothing left to look up. ### Consequences - People talk in first names, which is why the check takes the first word; a false match costs one question and never a save - The instructions, the whisper description, the whisper flow in `help`, the whisper prompt, and the skill say the three requests plainly - The judge gained P9 to P13; P10, P12, and P13 pass, P11 passes on its rerun, and P9 waits on its first run ([[Project - Gift Graph/Build & Iterate/Validation Log|Validation Log]]) ## TDR-067: A Spark for an Idea, and Hearing for What a Friend Shares **Date:** 2026-10-19 · **Status:** Accepted, built 2026-10-19, published in v0.7.4 on 2026-10-19 ### Context Ideas borrowed the gift, which means a Secret, while the bulb means a Hint. The panel on a friend's card read "From Justin", and it is the only surface where I see what a friend shares, with nothing to do there but read. ### Decision An Idea gets a glyph of its own, a twin spark stylized for this product, chosen from three variants in `docs/mocks/idea-glyph-v1.html`, on the Ideas tab, the Whisper button, and the Hearing header. "From Justin" becomes Hearing. Hearing shows the friend's birthday at the top, a "Plan a gift for Justin" action on each line that opens the whisper form tagged for him with the line's label chosen, and an "Ask your agent" button that copies a prompt to pick a gift from what Gift Graph lets me hear. ### Consequences - Each glyph carries one meaning, the gift for a Secret, the bulb for a Hint, and the spark for an Idea - An Idea captured from Hearing is tagged for the friend, and no one hears it (TDR-064) - A tab that gathers every Idea I hear from every Connection, with Heard as the first candidate for its name, sits in the backlog - The demo was rebuilt in the same release, with Theo hearing Mira at one depth and her Ideas as tiles ## TDR-066: `only` Retires, and the Agent Speaks the Page Rules **Date:** 2026-10-19 · **Status:** Accepted, built 2026-10-19, published in v0.7.4 on 2026-10-19 ### Context My agent noticed in a live chat that `only` took one person and wrote the same rows as `audience` listed with one share, which left two ways to say who an Idea is for. The same chat found no label for a gift for the home as a whole. The preview an agent showed still opened on the Secret, and the agent texts said hush and restore where the pages said Unshare and Share again. ### Decision `only` leaves `whisper`, `update_secret`, the service, and the form messages. `shares` names any number of people, and a call that still sends `only` meets the strict schema's refusal. The preview's `show` takes the Idea shape. It opens on **Idea**, with *For Justin · Unshared* under it on an Idea tagged to a Connection, then the Secret pair when there is a secret, the Hint pair, and the labels, each part in its own block, with No one where no one hears. The instructions, `help`, the whisper prompt, the tool descriptions, the agent page, and the skill say plainly what the pages do. A tagged Idea is unshared, Unshare is `hush_secret`, Share again is `restore`, revoking a shared Secret is Hint only with the shares lifted, a share at the usual depth goes, and removing a person clears their shares and asks. ### Consequences - The tools keep `hush_secret` and `restore` until the rename a release from now - "home" joins `gifts-v2` beside home decor without a bump, since a new kind changes no stored label and every stored label still validates; the list holds sixty-four kinds - A new help flow walks the revoke of a shared Secret - The tests that used `only` moved to `audience` listed with `shares`, with the same hearing asserted - The skill dropped two framing sentences to stay under seven hundred words ## TDR-065: Unshare Is the Word on the Pages **Date:** 2026-10-19 · **Status:** Accepted, built 2026-10-19, published in v0.7.4 on 2026-10-19, with v0.7.3 inside it ### Context Hush named the act of keeping an Idea from everyone, and the pages showed Hushed and Unshared as two buckets, with Not Shared on a tagged Idea as a third word. A person reading the home met three names for one state, an Idea no one hears. ### Decision The word on the pages is Unshare, with a prompt first, and the API keeps hush. Unshared is the one state name, with the muted speaker as its glyph, which also marks Hears Nothing. A shared Secret offers Revoke the Secret, which leaves the Hint, and Unshare the Idea, with the people who hear it listed below. The lock reads "Unshared Secret · Click to share", or "Unshared Secret · For Justin" on an Idea for someone. ### Consequences - Unshared and Hushed merge into one filter - The agent says unshare and share again in the same words (TDR-066) - The four nouns, Idea, Hint, Secret, and Connection, are capitalised on the pages, and the narrative subtext came out in the same round ## TDR-064: A Tagged Idea Is Heard by No One **Date:** 2026-10-19 · **Status:** Accepted, the rule from migration 017 kept, published in v0.7.4 on 2026-10-19, with v0.7.3 inside it ### Context I asked for tagging to leave hearing alone, and it was briefly built as sorting only. That let Justin hear an Idea tagged for him and let other agents read it as something I would like. ### Decision The rule from 017 stands. No one hears an Idea tagged to a person, the person included, and its hearing controls fold away while the tag is on. On a friend's side, hear means what the owner would like, and an Idea tagged for a person is the owner's plan for them. ### Consequences - The sorting-only build came back out in the same session - A tagged Idea says why in a few words, "A gift for Justin · Unshared to keep the surprise" on its band and "Idea for Justin" on its lock - A joint gift for two people and a gift for the home have no tag yet; tags for several people sit on hold, and tags that are not people wait to be explored ## TDR-063: A One-Off Lives Only While It Means Something **Date:** 2026-10-19 · **Status:** Accepted, built 2026-10-19, published in v0.7.4 on 2026-10-19, with v0.7.3 inside it ### Context The one-off states caused logical gaps, loops, and stuck states. A share stored at what a person would hear anyway held back a later change of depth. Removing a person left their shares and asks behind, which let a reconnect bring an old Secret back. An ask kept waiting after its asker already heard the Secret. On the pages, one-off marks and notes sprawled across tiles and rows. ### Decision A share is stored only as a difference from the rule. A share equal to what the person would hear without it is deleted on write, where the connection is approved and the idea is neither hushed nor about a person, which keeps a share made while someone is paused. Removing a person, by the owner or by the person, deletes the shares to them and declines their open asks. An open ask leaves what waits once its asker already hears the Secret, or once its idea is hushed or about a person. The pages name no one-offs. A person carries one icon, and a tap widens it to Hears Secret · Hears Hint · Hears Nothing; the lock opens Share the Secret, and the "+" lists only the people who hear nothing. ### Consequences - A reconnect starts clean, with nothing old to hear - One share control serves four places, the forms among them, and a row reads "1 Hidden" or "1 Secret" in place of the one-off marks - The icon before a secret replaces the Hint only switch, a lock when the secret is kept from everyone and a teal gift when the people who hear secrets have it, and a tap that widens goes through the review - New tests hold a share set back to the usual depth, a removal that clears shares and asks, and an ask that goes quiet once its Secret is heard ## TDR-062: The Site Is Light **Date:** 2026-10-19 · **Status:** Accepted, built 2026-10-19, published in v0.7.4 on 2026-10-19, with v0.7.3 inside it ### Context The dark theme read as glare, with pure white text at 16 to 1 on near-black. On production the page read dark and washed out, and a kept secret was too grey to read as the secret. A first round of softer dark palettes read as dusty. ### Decision The theme is the Light option from the second palette round, a paper-white surface with ink text, teal for the Secret and ember for the Hint, deepened until every text pairing passes AA. Teal, ember, the label grey, and the danger red went deeper than the mock. The meaning of each colour holds. The dark class comes off the page, and dimming is done in colour. ### Consequences - The dark surfaces of Teal Ember retire (TDR-037), and its roles carry over to the light surface - A teal backing behind the sections read like a nursery and came out the same hour - Both rounds stay as mocks, `docs/mocks/palette-v1.html` and `palette-v2.html` - The decision map keeps the vault's copper on dark, since it belongs to the garden ## TDR-061: Connections Gets a Page, and Every Link Names Its Person **Date:** 2026-10-19 · **Status:** Accepted, built 2026-10-19, published in v0.7.4 on 2026-10-19, with v0.7.3 inside it ### Context After a first look at the home on production, Ideas and Connections stacked as two sections under a pinned bar of two pills that scrolled to each. The tabs did nothing a scroll could not do, and a pill and a heading repeated each other. An invite row did not say who its link was for. ### Decision Connections moves to `/owner/connections`, and the two tabs become folder tabs joined to their page, bigger and bolder, with Whisper on the Ideas tab row and Ask by email and Invite on the Connections one. Requests show on Ideas with an Answer button that opens the row on Connections. A new link names its person. The server refuses one without a name, a replacement keeps its old link's name, and the sheet asks for the name on both paths. ### Consequences - The one page of TDR-060 splits into two, and the level control stays on the connection row alone - An invite row says who it waits on - One header serves every page, with fixed pill sizes and one container, measured to the same coordinates on four pages at 1280 and 375 ## TDR-060: The Home Is One Page, and Only the Connection Carries a Level **Date:** 2026-10-18 · **Status:** Accepted, built 2026-10-18, published in v0.7.2 on 2026-10-18; Connections moved to a page of its own on 2026-10-19 (TDR-061) ### Context The signed-off mocks, `home-mobile-v1.html` and `idea-open-v1.html`, put the ideas as tiles above the connections on one page, mobile first. The dashboard still carried a level selector on the form, which hid the hint at Secret (BUG-028). ### Decision The home follows the two mocks. The connection row holds the only level control, Hears secrets or Hears hints, with Pause and Resume. The idea form is hint, secret, labels, and for, with no level, and the hint field never hides. Hint only is a switch on the open tile. The tiles read `hears` and `why` from the server through one mapping, with a test over every state. A review route at `/dev/home` renders the home from fixtures, gated on the build mode. ### Consequences - A gate on the development flag shipped the fixtures in a build made with `NODE_ENV` set to development; the build mode reads production for every `vite build` - Aleks, the founder, sits under Hear nothing yet, since the founder hears no one, a departure from the mock for the product's rule - The demo still walks three levels on one secret and waits its own round ## TDR-059: A Request That Asks for a Change Is the Owner's Yes **Date:** 2026-10-18 · **Status:** Accepted, built 2026-10-18, published in v0.7.2 on 2026-10-18 ### Context The judge of 2026-10-18 found agents stopping at a preview where the request was already the yes, in an invite, a first save, and an approval at Secret. Every text said to confirm only when the owner says yes, which reads as a second word after the preview. ### Decision A request that asks for a change is the owner's yes to it. The agent repeats the call with `confirmationId` and tells the owner what the preview showed. When a preview reaches further than the request, a person or an idea the request did not name, the agent shows it and asks first. A Secret invite keeps its stop. ### Consequences - The server still forces the preview call, and a `confirmationId` covers only what its preview listed, which keeps a widening in two steps - The rerun of S2, S7, and P4 passes - The line rides on every preview result, in the instructions, the rules of `help`, the agent page, and the skill ## TDR-058: A Legacy Server Under the 2026-07-28 Revision, on Purpose **Date:** 2026-10-18 · **Status:** Accepted, no change to the build ### Context The 2026-07-28 revision of the Model Context Protocol removed the initialize handshake and moved version, identity, and capabilities into per-request metadata, with server/discover as the new front door. The research memo of 2026-10-12 left one check open: whether a client on the new revision still receives the server instructions, which the notice rule now leans on at connect. ### Decision Stay on the 1.x SDK line, which speaks up to 2025-11-25 and opens with initialize, the shape the spec now calls legacy. A dual-era client falls back to initialize and receives the instructions as today, and Claude Code connected this way through the session. server/discover carries instructions on the new side, which means the text survives a later move. The move is SDK 2, which serves both eras on one endpoint, and it waits until a client we care about goes modern-only. ### Consequences - A modern-only client fails against the server outright, every tool with it; the one risk, and watched - The discover result on the new side is cacheable and may be public, which means the instructions must read the same for everyone; the per-person lines at connect are a legacy nicety, and the notice on every result, decided with TDR-056, is the shape that survives ## TDR-057: The Owner Never Picks a Level for an Idea **Date:** 2026-10-18 · **Status:** Accepted, built 2026-10-18, published in v0.7.2 on 2026-10-18 ### Context The friction I saw after 017: the agent now judges whether something is a hint alone or a thing with a secret to keep, and the disclosure level is held on the connection, with one-offs on a secret or a hint for one person. The word level still did five jobs on the wire, the cap on an idea, the depth on a connection, a share, the hear item, and the birthday, and the older guides still taught three levels on a secret. ### Decision An idea has a hint and, when there is a thing, a secret, and each person hears the owner hints or the owner secrets, a depth that sits on the connection and nowhere else. The word level leaves every agent-facing text about an idea; hintOnly is the cap on whisper, update_secret, list_secrets, and the REST item, and level on an idea is accepted silently for one more release. list_secrets carries hears in place of disclosures, one entry per approved or paused person with what they hear and why, in the rule order: hushed, for, paused, share, only, kept, rule. An idea carries createdAt and updatedAt, the whole timestamp. Migration 018 adds the two columns, backfilled once from approved_at, hushes every idea at silent at the usual cap, and marks itself with its last constraint. A fourth prompt, whats-coming-up, carries the skill routine. ### Consequences - Hint only, for, and a share are exceptions the owner asks for; the whisper flow never offers them - The judge scenes whisper with hint and secret and no level, and its checks name a depth on a connection, an invite, or a share - The pages round builds the signed-off home on this contract, with the form losing its level selector, which closes BUG-028 ## TDR-056: An Idea Is a Hint With an Optional Secret **Date:** 2026-10-18 · **Status:** Accepted, built 2026-10-18, published in v0.7.2 on 2026-10-18 ### Context Justin's case, "I will always like camping gifts", has no secret behind it, and the form demanded one. My framing: something at the hint level is a hint, a vibe, an impression, a thought to share with others that carries no specificity a person would want to protect, for security, for privacy, or for a surprise. The secret is that specificity, and it exists only when there is a thing to protect. Silent on a connection graded the person and duplicated Pause. An ask from Justin reached no one, since the data for it rode every result and no rule told an agent to speak it. ### Decision The hint is the entry and the secret is optional (migration 017). The rule gains two lines: an idea with no secret is heard as its hint at every depth, and an idea about a person, `for_id`, is silent for everyone. The idea's level column stays as the cap, secret by default and hint for "Hint only", and the API stops asking for it. Silent leaves the connection; Pause is the nothing, and rows at silent become paused. Every result that carries a request, an ask, or news carries a notice in words and in bold, and the instructions, `help`, and the skill say to tell the owner first. ### Consequences - The per-person depth stays on the connection until circles move it into a grant; the shares table is where a circle becomes one more kind of counterpart - The object stays `secret` in the tool names for one release; the pages and the skill move to idea, hint, and secret - The rehearsal reports the silent connections paused and the two dead columns gone ## TDR-055: The Name People See Is the Account's Own **Date:** 2026-10-15 · **Status:** Accepted, built 2026-10-15, released 2026-10-16 in v0.7.1 ### Context The founder account, an email sign-up, showed its email's local part as its name: the sign-in holds no name for an email sign-up, and the server fell back to that. The Clerk instance is Replit's, and the dashboard where name fields turn on is behind Replit's Pro tier. ### Decision The account page's Name row is a field. The sign-in's name fills the stored name the first time an account is seen, as before, and the page writes it from then on. The account route returns the stored name and the sign-in's apart. ### Consequences - Every email sign-up can fix its name without a change to the sign-in - Nothing is backfilled; each person writes their own - Owning the sign-in instance stays a future item, with a migration of every user as its cost ## TDR-054: The Skill Holds What the Tool Text Cannot Say **Date:** 2026-10-14 · **Status:** Accepted, built 2026-10-14; the manifests held ### Context A skill loads its name and description alone until it triggers, under a hundred tokens standing. The server's fifteen tool descriptions are the real cost of every session, and a skill that repeats them pays twice and drifts. A plugin is a wrapper around the folder plus a connector pointer, and wrapping text that still moves means a person on an old plugin reads stale instructions against a new server. ### Decision One skill folder to the open Agent Skills standard, at `skills/gift-graph`: when to reach for Gift Graph, how to act in the owner's name, the preview layout for a client with no `show`, and the weekly routine to offer, which reads and never confirms. The flows and the fields stay on the server, in the tool text and `help`. A test checks that every tool the skill names exists and that the text stays short. The plugin manifests, Claude's and the open one, wait until the text stops moving. ### Consequences - Any client that loads a skill takes the folder by hand today; the manifests add the one-install path later - A change to a tool's name lands with the skill in the same commit, and the test says so - The public repo waits on a yes ## TDR-053: The Server Writes the Preview an Agent Shows **Date:** 2026-10-14 · **Status:** Accepted, built 2026-10-14, released 2026-10-16 in v0.7.1 ### Context Each agent wrote its own prose around the preview's data, and one wrote "Saved words (only you see these)" over the Secret, which I found unclear. ### Decision A whisper or update preview carries `show`, five lines at most in one layout: the Secret and who hears it, the Hint and who hears it only, the labels. The tool text and `help` say to show it as it is. ### Consequences - The layout holds across Claude, Muse, and any client, for a few words on the tool list - The agent has nothing to invent over a preview ## TDR-052: A Birthday on the Account, With No Year **Date:** 2026-10-14 · **Status:** Accepted, built 2026-10-14, released 2026-10-16 in v0.7.1 ### Context A routine that speaks up unprompted needs a date, and the birthday is the first one. A birthday with a year is an identifier, and a gift never needs the year. ### Options Considered - A secret with a date kind, the month as its Hint and the day as its Secret - A field on the account, beside the address, with a level of its own ### Decision The account holds one birthday, month and day, sealed the way the address is, under the same key with a context of its own, with its level in a plain column beside the blob, Hint by default. A person hears the lower of that level and the connection's: the month at Hint, the month and the day at Secret. There is no field for a year, and the save refuses one by name; the card says so in a No year tag. A save that lets anyone hear more previews first; a narrowing applies at once. The owner's agent has no tool for it. Migration 016. ### Consequences - The one difference from the address: the blob opens on the hear path, one per owner per call, and nothing logs it - Other dates wait on a date kind for secrets - The column drop moves to 017 ## TDR-051: A Fresh Database and a Migrated One Must Be the Same Database **Date:** 2026-10-14 · **Status:** Accepted, built 2026-10-14, released 2026-10-16 in v0.7.1 ### Context Every test and the judge ran on `schema.sql`, and production was migrated through every file since v0.1. A default a migration left behind made every whisper on production fail its save from v0.6.2 on, while every test stayed green ([[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-026|BUG-026]]). ### Decision One test builds a database from `schema.sql` and another from v0.1 through every migration, compares every column's type, nullability, and default and every check, unique, primary, and foreign key, and whispers on the migrated one. It runs in the full round, and a migration ships only with it green and the rehearsal read. Migration 015 closes the three gaps its first run found. `docs/tests.md` lists every test file and what it guards. ### Consequences - A gap between the two shapes fails a test before it reaches a person - The rehearsal reports secrets with no account as owner, which the new foreign key would refuse - The column drop moves to 016 - The mark on 015 is the two defaults and the key together, since the rehearsal of 2026-10-14 showed production had the key from its first schema ## TDR-050: The Founder Connection, One Way **Date:** 2026-10-13 · **Status:** Accepted, built 2026-10-13, released 2026-10-16 in v0.7.1 ### Context A new person had nothing to hear until someone invited them, which left the hear loop untested by anyone outside Justin and me. A connection every account starts with gives them something to hear on day one. ### Decision Every account created after `FOUNDER_ACCOUNT_ID` is set hears the founder account at Hint from its first sign-in, and the founder hears no one. Every path that could reverse it refuses: a request or an email request from the founder, an invite the founder opens, and an approval that names the founder as the hearer. The connection is made once, at creation, which keeps a removal from coming back. The card wears a Founder tag whose tap reads "I am happy to be your first connection.", and the agent's connect line names the founder. Off unless set. ### Consequences - My standing yes stands in for an approval and its preview - The reverse is locked and never offered, since a stranger's hints reaching me by default would break the promise that every direction needs its own yes - The founder account is its own account, with ideas written for strangers, and its Connections list grows with every sign-up until circles fold it into one ring ## TDR-049: The First Grouping of the Tools **Date:** 2026-10-10 · **Status:** Accepted, built 2026-10-10, release pending as v0.7 ### Context Twenty-one tools after the shares, the count the plan named as the point to group the verbs. Measured on the local server: about 3,240 tokens at every connect. A safe first phase saves about a fifth; the plan's full grouping about half, at a cost that lands on the parity bar and on the smaller clients. ### Decision The four invite verbs are one tool, `invite`, and the four connection admin verbs are one tool, `connection`, each with an `action` field. Fifteen tools in place of twenty-one. The schema an agent reads merges each group's fields; the server validates the one action named with a discriminated union, and a refusal names that action's field. The verbs most sessions meet keep their names and shapes. Monitor profile `v0.6` names the fifteen. ### Consequences - Every connected agent reconnects once for the new names, as it did for the vocabulary rename - The judge, the help text, and the prompts name the grouped tools - The full grouping waits for the circles session, which adds tools of its own ## TDR-048: A Status Is a Tag, a Button Is a Ring **Date:** 2026-10-10 · **Status:** Accepted, built 2026-10-10, release pending as v0.7 ### Context The status pills, "Hears Hints", "Shares 4 Hints", "Heard as a Hint", wore the same ring as the buttons beside them and did nothing when pressed. A tap on the row opened the card while a tap on the pill opened nothing. Four shapes went into a mock against the real buttons. ### Decision A status is a tag: corners, a tint in the level's colour, no ring. The Secret tag takes the dark teal, since the bright fill read hard at tag size. A teal ring is the one mark of a button, on every card. On the lines a person hears, the level is its icon beside the label with no tag, since nothing on a line is pressable, and the block is headed "You hear" in the same caps label as "Hears" on the controls. ### Consequences - One shape for a status and one for a control, everywhere - The reason popover on a line's pill went with the pill - The selector keeps its ring, since it is a control ## TDR-047: Shares and Asks, the First Slice of Grants **Date:** 2026-10-09 · **Status:** Accepted, built 2026-10-09, release pending as v0.7 ### Context Two asks kept coming up in use: a secret one person should hear as the Secret and no one else, and a person asking to hear one secret they have a Hint of. Both sat in the grants plan (architecture section 6) behind a design session with circles and the public list. Neither needs that session. ### Decision A share is one secret, one person, one level, set by me or made by a yes to an ask, above or below what the person's connection gives; Silent hides the one secret. An ask is three a day, answered on my side with a yes or a not now that tells the asker nothing. A secret's audience is everyone I approved or only the people with a share. The rule, first match wins: hushed or not approved is silent, a share is its level, a listed secret with no share is silent, otherwise the lower of the two levels. Migration 014 adds `shares`, `reveal_requests`, and `drops.audience`, all additive. Three tools, `share_secret`, `unshare_secret`, and `ask_to_hear`; an agent asks by an opaque ref from `hear`, never by a label. The web gets the share in a popover on a person's pill, the ask as a dashed pill with Share it and Not now, "only Mira" on the line, "Who hears it" on the form, "Ask to hear the Secret" on each Hint line, and the ask as a tile on the asker's connection card. ### Consequences - A share never bypasses consent, since that rule runs first; a share on a pending connection waits silent and shows in the approval preview - Circles, the owner-wide grants, and the public list come later on the same tables - Twenty-one tools, the point the plan names for grouping the verbs, which waits with the session ## TDR-046: Each Direction Keeps Its Own Controls, and Teal Means Secret **Date:** 2026-10-09 · **Status:** Accepted, built 2026-10-09, released 2026-10-10 inside v0.7 ### Context The two directions on an open connection card read as two unrelated bands, and a day of mocks tried arrows, then the selector in the top row, then two tinted pills on the closed row. Set beside the production card, every one of them read busier than the plain line it already had. The production screenshot showed two more things. Pause and Remove, which change what Justin hears, sat in a footer beside Stop hearing, which changes what I hear. And "Heard as a Hint" on a secret card filled teal, the selector's chosen Hint filled teal, and the Hint pill beside them wore its ember outline. ### Decision A connection card closed is the name and two pills, "Hears Hints" for what Justin hears and "Shares 1 Secret · 2 Hints" for what he shares, Secrets first. Open, everything shows at once: the controls for what Justin hears centred under the name, "Hears" as a caps label with the selector and Pause or Resume with Remove as one ring, a dotted line, the lines I hear with a dashed mark along the left between them, a dotted line, and Stop hearing alone at the foot in grey, out of the way on purpose. Every other control on a card, on a secret card too, is a small teal-ringed pill at rest, since a ring that only appears on hover read as text. On a secret card the level icon sits beside the secret at the size of the Hint icon beside the hint, in place of a large icon in a gutter. Across the app a level has one look, Secret filled teal, Hint an ember outline, Silent a plain border, and a chosen control takes its level's colour on the selector, the level cards on the whisper form, and the "Heard as" pill on a secret card. ### Consequences - A control sits with the thing it changes, and the footer is gone - Teal was both Secret and chosen; now it is Secret - The four mocks stay in the repo as the record of what read worse ## TDR-045: The Parity Scenarios in the Judge **Date:** 2026-10-09 · **Status:** Accepted, built 2026-10-09, released 2026-10-10 inside v0.7 ### Context Parity is the quality bar across agents, and the round-trip work showed how a change can touch what an agent offers without any test noticing. ### Decision P1 to P6 from the parity benchmark run in the judge, each from a fresh seed with its scene set through the MCP with no model, and the judge scores Guidance as a fifth line: the agent offered the step the web app would show and acted only on a yes. ### Consequences - A full run is thirteen agent sessions and one judge session - A change to a tool's text or a result gets a check that no step went missing ## TDR-044: Ask by Email on the Web, and the Level You Hear Someone At **Date:** 2026-10-09 · **Status:** Accepted, built 2026-10-09, released 2026-10-10 inside v0.7 ### Context Asking by email was agent-only in v0.6.2, and the level I hear a person at was in the data and only implied by the pills. I asked whether a request should carry a level. ### Decision Connections carries Ask by email beside Invite, with the same body and the same one answer the agent gets. A request carries no level; the owner sets it at approval. The card counts what I hear, "You hear 3 Hints", since the pills already say the level; the ask reads "Ask to hear", and what I hear from a person reads in serif at the size of a secret card. ### Consequences - The web control was a low lift once the agent path existed - Asking at a level would hand the asker a say in the owner's consent, which it never has ## TDR-043: Codex Is One Row per Person **Date:** 2026-10-09 · **Status:** Accepted, built 2026-10-09, released 2026-10-10 inside v0.7 · **Related:** [[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-024|Bug Tracker > BUG-024]] ### Context Codex registers a new OAuth client on a random local port at every sign-in, which left a Codex row per sign-in in Your agents. ### Decision A client that registers anew is matched to the person's agent of the same name whose callbacks go to the same host, without the port. That agent takes the new client, its old tokens go, and the newest sign-in wins. My call, 2026-10-08. ### Consequences - One row per machine had no way to tell two installs apart, since both look identical to the server - A second machine costs one sign-in when the first signs in again ## TDR-042: Your Secrets Stays Home **Date:** 2026-10-09 · **Status:** Accepted, built 2026-10-09, released 2026-10-10 inside v0.7 ### Context An account page needed a way in without unseating the dashboard or fading it into a text link. I asked for a mock first, and for the agent status to stay on the dashboard. ### Decision Two pills of one style in the header on every signed-in page, Your secrets with the gift icon and the name pill. The current page's pill wears the teal ring and a light teal fill; the other stays a full pill, one tap away. On a phone the two share the width, and See the demo and Sign out fold into the account page. The dashboard keeps its agent strip with a dot per agent, and Manage leads to the account page. Clickable text becomes a teal-outlined pill on hover, in place of an underline. ### Consequences - Where I am and how to get home read from one ring - The hover pill reads as a control on a dark surface, where an underline reads as a link in a paragraph ## TDR-041: Your Account, With a Sealed Address **Date:** 2026-10-09 · **Status:** Accepted, built 2026-10-09, released 2026-10-10 inside v0.7 ### Context I asked for the account page on 2026-10-07, with an optional shipping address, and marked the address beta. Nothing uses an address until gifting through agents (v0.8), which makes it the most sensitive field Gift Graph holds before it has a job. ### Decision A page at /account holds the name and the sign-in email as Clerk holds them, read live, the account ID, the agents with Rotate and Disconnect, delete behind a typed confirmation, and the address. The address is sealed with AES-256-GCM under a key derived from ADDRESS_KEY, in one blob per account (migration 013), opened only on this page by its owner, and carried by no tool, result, connection, or log. Delete removes everything in the account's name; the Clerk sign-in stays. ### Consequences - A blob sealed under another key opens as no address, and the person writes it again - ADDRESS_KEY joins EMAIL_HASH_KEY in both Secrets before the publish - Grants are migration 014 and the column drop 015 ## TDR-040: Fewer Round Trips per Agent Message **Date:** 2026-10-08 · **Status:** Accepted, released in v0.6.3 on 2026-10-08 · **Related:** [[Project - Gift Graph/Build & Iterate/User Feedback|User Feedback]] ### Context Gift Graph serves MCP statelessly, and every message an agent sends signs in again. Justin noticed Muse took a while per request. Each query crosses the network to Neon, and a hear cost five round trips in sequence, two of them for authentication alone. ### Decision Cut the round trips each message waits on and keep every answer as it was. Authentication is one statement that checks the token and refreshes "heard from" together. A transaction begins and takes the owner's lock in one round trip and reads the owner's state in one query, a preview's sweep rides in its insert, and `hear` is one query. The list of who is waiting runs beside each tool that carries it, and the three reads at connect run at once. Idle connections stay a minute. `scripts/local/mcp-roundtrips.ts` holds every query for 20 ms and times each message. ### Consequences - A first connect, the tool list, and a first hear went from 319 ms to 153 ms at 20 ms a round trip; a hear from 106 ms to 45, and a whisper preview from 203 to 124 - Every answer keeps its fields and their order, and the suites that compare them pass - Muse's pace in production waits on the `/mcp` durations in the Replit log after the publish ## TDR-039: Accounts Key on the Clerk User **Date:** 2026-10-08 · **Status:** Accepted, released in v0.6.3 on 2026-10-08 · **Related:** [[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-023|Bug Tracker > BUG-023]] ### Context Gift Graph moved to giftgraph.aleksandar.app on 2026-10-08. In production the server derives the Clerk key from the host a request arrives on, which gives each domain its own issuer in the session. An account was keyed on the issuer and the Clerk user together, and my first sign-in on the new domain made a second, empty account. ### Options Considered - **Key on the Clerk user alone** · one Clerk instance serves each database, which makes the user ID one person; the issuer stays on the row as a detail - **Map every known host to one canonical issuer** · a list to keep in step with every domain Replit attaches - **One domain, with the old one redirected** · leaves the same bug waiting for the next domain ### Decision Key on the Clerk user alone, and fold an empty account a second domain made into the account with the data, in a migration rehearsed on a branch of production first. Until it ships, sign in at gift-graph.replit.app. ### Consequences - A new domain changes nothing about who a person is - The fold is a data migration, which takes the next number and moves grants one further - An account with data on both sides waits for my call instead of a fold ## TDR-038: An Audit After a Large Change **Date:** 2026-10-07 · **Status:** Accepted ### Context Three days of renames ran across the server, the web app, and the tools, part of them written by parallel lanes. A sweep before the publish found a service class dead but for one method, a logger that logged nothing, an unmounted health route, a second hand-kept schema check, five web exports with no caller, and reads that took the owner's exclusive lock. ### Decision Apply the plain wins before the publish, in one scripted pass that asserts every match, and send the findings that need a design of their own to the backlog. Reads run on the pool without the owner's lock, the dashboard's four reads run at once, and migration 011 adds the two indexes every owner read was missing. Long runs get a check every two minutes, and the environment gets one before any test run starts. ### Consequences - Every removal went in with the full round green, 85 API tests among them - A hear never waits behind the owner's own change - The web refactors, the vestigial columns, and the judge's seed wait for rounds of their own ## TDR-037: Teal Ember **Date:** 2026-10-07 · **Status:** Accepted; the dark surfaces gave way to the light theme on 2026-10-19 (TDR-062), with the roles kept ### Context Oxblood and cream read as the familiar Claude palette. The new design handoff carried a dark palette, teal and ember on charcoal, with tokens named by role. ### Decision Copy the handoff's tokens into the app and read them everywhere through semantic `--gg-*` names. Teal for Secret and primary actions, ember for Hint and focus, warm grey dashes for Silent, and the level icon colors itself by level. Clerk's widgets and the page for agents take the same values. ### Consequences - A dark palette carries the sense of secrecy the product is about - A light theme is one token file away, with no component touched - The decision map keeps the vault's copper, since it belongs to the garden ## TDR-036: Ask to Hear Someone by Email, With One Answer Either Way **Date:** 2026-10-07 · **Status:** Accepted (agent-only) ### Context An invite link asks the owner to do the sending. Asking by email lets the person who wants to hear do the asking, which is the direction a first conversation runs. An address is itself a secret, and a lookup that answers differently for a known address tells the asker who has an account. ### Options Considered - **A pending connection row on a match** · built first and caught in review, since the requester could see the row and learn the account existed - **A request held on the owner's side alone** · the same answer whether or not an account matches ### Decision `request_connection` takes an account ID or an email, one of the two. The server stores a keyed hash of each verified sign-in address, taken at sign-in, and stores no address. A request waits on the owner's side until the owner answers, a decline claims it with no row made, ten requests a day per account, and a request waits fourteen days for someone who has not joined. The key is `EMAIL_HASH_KEY`, set once and never changed. ### Consequences - A declined request and an unknown address look the same from the outside - The web control waits; the agent is the only door for now - A changed key or a changed primary address leaves a stale hash, which sits in the backlog ## TDR-035: One Vocabulary at the Agent's Door **Date:** 2026-10-07 · **Status:** Accepted · **Amends:** TDR-021 ### Context A first-time agent had to learn that drop meant secret and tier meant level before it could map a request to a tool. Justin's Muse spent its first minutes guessing. ### Options Considered - **whisper and pull** · pull was the one word no page used - **whisper and hear** · the product already speaks in hearing, on the home page, the dashboard, and the connect note ### Decision The tools say what the pages say, `whisper`, `hear`, `list_secrets`, `update_secret`, `hush_secret`, `set_level`, and `remove_connection`, with `secret`, `level`, `hint`, and `labels` as the fields. Everything an agent reads follows ASD-STE100, plain technical English, one instruction per sentence. A `help` tool returns the flows and the consent rules as data, and three prompts start the same flows as commands. The database columns keep their names. ### Consequences - The monitor's profile `v0.5` names the eighteen tools - A client that cached the old names reconnects once ## TDR-034: The Seeded Identities Retire **Date:** 2026-10-07 · **Status:** Accepted · **Supersedes:** the seeded users of TDR-001 ### Context The two seeded accounts from v0.1 were the one loose end in production after the Muse scare, and a first-time agent read the prototype's leftovers, a legacy mode and an audience-approval tool, with everything else. ### Decision Migration 009 removes the seeded identities with everything in their name, the token sign-in, the env tokens, and the one-person mode. Every account is a sign-up through Clerk, and the users check allows nothing else. A leftover one-person secret on a sign-up account moves into its owner's Silent drawer with its words, level, and line. ### Consequences - Every account comes in through one door, a sign-up - The rehearsal on a branch of production confirmed every sign-up account, connection, and whisper kept ## TDR-033: One Surface Answers One Question **Date:** 2026-10-06 · **Status:** Accepted ### Context Justin's first use, on a phone. The two-column connection card stacked and ran long, and he met his own secrets before the answer he wanted. His agent opened the MCP URL as a page and found a bare 401. A day earlier, Muse had taken the person it hears for the account it holds, since one line at connect named both. ### Decision A connection card holds one direction, the level the person hears at and what I hear from them, and each secret card names who hears it as person pills. The MCP URL opened as a page answers with a page for agents, the tools listed from the server itself. The note at connect names the account alone on its first line. ### Consequences - The two-column card and its thinking stay on record in the repo - The same rule now governs the agent's notes and the dashboard's cards ## TDR-032: The Agent Gives the Web App's Steps **Date:** 2026-10-05 · **Status:** Accepted ### Context Before Gift Graph went in front of other people, the web app guided and the MCP route did not. The data for asking someone back was already in the result, and nothing told the agent what to do with it, or to wait for a yes before confirming a preview. ### Decision A result carries `next`, one plain sentence with the call that makes the step, wherever the web app offers one. Every preview tells the agent to show the owner who hears what and to confirm only on their yes. The benchmark is `agent-parity.md`, flow by flow. ### Consequences - A sentence in the result reaches the agent at the moment it decides - Through Claude, my agent showed each secret beside what others would hear and waited before saving ## TDR-031: The Release Record **Date:** 2026-10-05 · **Status:** Accepted ### Context Versions lived in the monitor's tool profiles and nowhere a person reads. I wanted to see at a glance what is live, what is built and waiting, and what is only scoped. ### Decision The README's Versions section is the record, one bullet per feature, and each heading names the date it went out. Each publish from v0.6 on carries a git tag of the same name, and every backlog item carries its built and released dates. ### Consequences - v0.6.1 went out inside v0.6.2 and has no tag of its own - The server reports its version in the MCP handshake ## TDR-030: Shared and Silent, and Withdrawal Becomes Hush **Date:** 2026-10-05 · **Status:** Accepted · **Supersedes:** TDR-013 ### Context A withdrawal that could not be undone made a person choose between Silent and gone for good, with nothing to tell the two apart from the outside. ### Decision Secrets sort into two buckets, Shared and Silent. Withdraw becomes Hush on the card. A hushed secret keeps its level and hint, leaves every future hearing, and stays out through reapproval. Its owner shares it again through the same review as any widening. ### Consequences - Two buckets are easier to hold than four states - What someone has heard still cannot be taken back, and the dashboard says so ## TDR-029: Agents Sign In With OAuth, Each Agent a Row **Date:** 2026-10-05 · **Status:** Accepted · **Supersedes:** TDR-014, TDR-017 ### Context A copied token was the hardest step for a person new to MCP. Clerk here is managed by Replit, with no place to set up OAuth applications, client registration, or a consent screen. ### Options Considered - **Clerk as the authorization server** · unavailable under Replit's managed Clerk - **Gift Graph as its own authorization server** · the MCP SDK's handlers on a Postgres provider - **Pasted tokens only** · the step people drop ### Decision Gift Graph runs its own OAuth. An agent adds the server by its URL, the person allows it on a consent page signed in with their web account, and the agent gets an hour's access token and a rotating thirty-day refresh token bound to `/mcp`. A second use of a refresh token or a code disconnects the agent. Each agent is a row in Your agents, and an agent without sign-in holds a pasted token of its own. Migration 008 moved each pasted token into an agent of its own. ### Consequences - A person registers once, on the web, and OAuth registers that person's agents to the account - Codex registers again at every sign-in and shows a second row until the first is disconnected ## TDR-028: The Web App First, Then OAuth, and No Mail **Date:** 2026-10-04 · **Status:** Accepted ### Context The web app is where most people meet Gift Graph, through a link or a screenshot I share. Polish at the first touch has paid off at every place I have worked. ### Decision The surfaces from the design handoff come next, then OAuth. Embeddings, the drafter, and grants wait behind both. Gift Graph sends no mail; an invite travels through the person's own agent or the share sheet on a phone. ### Consequences - Embeddings matter less now that the agent picks the label - Mail stays out of scope until a feature needs it ## TDR-027: The Noun Is Secret **Date:** 2026-10-04 · **Status:** Accepted ### Context I had been saying both whisper and secret for the thing a person writes, and the handoff left the title open. "A whisper heard as a Secret" made the levels hard to read. ### Decision The thing a person writes is a secret, on every page, in every tool reply, and in the docs. Whisper is the verb. The levels stay Secret, Hint, and Silent. ### Consequences - Secret says what the thing is and what sharing it costs - The tools caught up on 2026-10-07 (TDR-035) ## TDR-026: The Owner's Agent Picks the Label **Date:** 2026-10-04 · **Status:** Accepted ### Context The vocabulary audit scored version 1 as too fine and too noisy, and no word list reaches brands. The agent writing the hint already knows that a Baies is a candle. ### Options Considered - **Embeddings on the server** · measured later, adopted only if they beat the list on the blind set - **A drafter on the server** · sends the secret across a new boundary - **The owner's agent picks from the full list** · processing on each person's side ### Decision Version 2 of the vocabulary goes live, sixty-three kinds at the grain of a shop department, through migration 007 and a recorded map. The preview hands the agent the whole list, about two hundred tokens and only when whispering, and the server checks the pick. Nothing trains a model; the audit sets stay on my machine. ### Consequences - A second blind set confirmed the first before the switch - Every stored hint kept or broadened its label ## TDR-025: The Database Moves to Neon, and the Build Moves Local **Date:** 2026-10-04 · **Status:** Accepted · inflection point ### Context Every database refactor was written and tested locally and then handed to Replit to perform. Replit performed each one well, and each hand-off still cost a pull, a restart, a verification session, and a schema review. ### Decision Postgres moves to Neon, with production and dev branches. Claude Code builds locally in WSL against Docker Postgres, works on the dev branch directly, and rehearses migrations on a branch of production. Replit keeps hosting, sign-in, the judge, and Publish. ### Consequences - The token-rich side does the token-heavy work - Replit's share is now the share a team would choose to keep there, which keeps my evaluation of it honest - Replit Agent runs no SQL against Neon; the app's own start is the path ## TDR-024: The App Migrates Itself at Start **Date:** 2026-10-03 · **Status:** Accepted · **Supersedes:** TDR-015 ### Context Production fell three migrations behind the moment attention moved on, and the hand-run step needed a shell and a copied production URL. ### Decision The API server applies the guarded migration list at every start, under an advisory lock, and `/health` names the schema. A migration with data steps counts as applied only when its last constraint exists, or a condition on its data holds. A constraint over existing rows ships in two publishes, since Publish's schema review cannot be skipped. ### Consequences - The publish loop is a merge, a publish, and a check of `/health` - The first publish through the loop failed at the review, and production went out at 006 by reset ## TDR-023: Invites, a Link as Consent Given Ahead of Time **Date:** 2026-10-03 · **Status:** Accepted ### Context Getting Justin on needed an account ID sent by email, which is the step people drop. ### Decision An owner mints a single-use link at Hint or Secret, open fourteen days, previewed before it exists, shown once and stored as a hash. Opening it signed in makes the connection and offers the share-back. ### Consequences - A lost link gets a new one, and the old one stops (2026-10-05) - Removing a person closes the open links in their name (2026-10-07) ## TDR-022: Hearing Returns Everything Allowed, Ranked **Date:** 2026-10-03 · **Status:** Accepted · **Amends:** TDR-005 ### Context "Does Justin have any gifts shared with me?" returned nothing while "premium food" found his whisper. Literal filtering made a broad question look like an empty graph. ### Decision A read returns every secret the asker may hear, with the ones that match the question first. One function projects each secret to what this asker may hear, and ranking reads only that projection. ### Consequences - The asking agent does the reasoning about fit - A question that names a hidden word surfaces nothing hidden ## TDR-021: Three Levels, With Labels on the Hint **Date:** 2026-10-03 · **Status:** Accepted · **Supersedes:** TDR-004 · **Amends:** TDR-011 ### Context In production a category line leaked nearly the whole secret, and the form could not say why a category needed text. ### Decision A secret travels at Secret, Hint, or Silent. A hint is up to two labels from a versioned public vocabulary plus one line the server checks for the secret's distinctive words and for numbers. What a person hears is the stricter of the secret's level and the connection's. The surprise-safe flag retires; its need belongs to the platform as Act. ### Consequences - A label from a finite list reveals at most the choice among its entries - The line is the one unbounded channel, and it alone is checked and approved ## TDR-020: Compact Layouts and Viewport Checks as a Standing Rule **Date:** 2026-10-02 · **Status:** Accepted ### Context The example pill fix showed how a page can look right at one width and wrong at another. Agent offered automated screen-size checks. ### Decision Compact layouts are a standing preference in `replit.md`, and Agent checks pages at 1280x800, 1440x900, and 390x844 before reporting a layout change. Automated screen-size checks stay open until a page changes often enough to need them. ### Consequences - Every layout change comes back with three viewports looked at, which costs a little time per change - The rule lives beside the copy skill, which keeps words and layout under the same review ## TDR-019: Uploads Stay Out of Git History **Date:** 2026-10-02 · **Status:** Accepted ### Context Three uploads sat in the workspace, the original zip, a screenshot, and a mock. Agent asked which should go into GitHub history. ### Decision Exclude all three. Uploads are inputs to a session, and the repo carries what the session produced. ### Consequences - Screenshots and mocks live in this vault, which is where the record of the session belongs - A future contributor sees code and docs in history, with nothing to redact ## TDR-018: A Demo With Synthetic People **Date:** 2026-10-02 · **Status:** Accepted, live since v0.2 ### Context The landing page explained the tiers with one example. Nothing let a visitor try the loop without a token. ### Decision A demo page with two synthetic people, Theo as the giver and Mira as the recipient, three whispers on Mira's side with editable tiers, four prompts on Theo's side, and a reset. The demo touches no account. The copy skill wrote the words. ### Consequences - The first surface a visitor can stand on without reading documentation, which is what Probe 1 needs for tier comprehension - Two named personas, which is where the persona question in the Product Plan started ## TDR-017: Per-Account IDs and Self-Issued MCP Tokens **Date:** 2026-10-02 · **Status:** Superseded by TDR-029 · **Related:** [[Project - Gift Graph/Discovery & Planning/Product Plan|Product Plan]] ### Context v0.1 had two seeded users whose tokens I generated by hand and pasted into Replit Secrets. A third person could not join without me doing the same for them. ### Decision Each account gets an ID (`gg_…`) and the dashboard offers Get MCP token, which issues that account's own credential, shown once. The dashboard also shows the endpoint, transport, and header line a client needs. No sign-in provider yet; this is the rung below Clerk on the ladder. ### Consequences - Tokens no longer pass through my hands, which removes the rotation-after-a-screenshot problem from v0.1 - Static tokens remain the client-side credential until MCP OAuth, which leaves the ladder's next rung unchanged ## TDR-016: A Second Model Reviews Each Milestone **Date:** 2026-10-01 · **Status:** Accepted ### Context I asked whether Replit could run a model as judge while we build. Agent confirmed managed model access can run an evaluator beside the build, at usage cost, and offered two shapes, reviewing build changes or evaluating Gift Graph's responses. ### Options Considered 1. **Review changes as we build:** check each milestone against the approved requirements before committing 2. **Evaluate responses:** synthetic cases against returned disclosures, which sends preferences to a judge and adds a data-processing boundary 3. **Both** ### Decision Review changes at milestones, from a different model family than the builder, with findings tied to requirements and source locations, blocking findings fixed before commit, and the outcome recorded beside the Git commit (`pnpm review:milestone`). Automated tests stay the ground truth; a model's approval is supplementary evidence. Response evaluation waits until it can run on synthetic cases only. ### Consequences - Every milestone leaves a reviewed record, which is the audit trail an enterprise reviewer asks for first - Agent would not disclose which model it runs, which makes "different family" a request with no confirmation (open on the map) ## TDR-015: Production Stays Behind an Owner-Reviewed Process **Date:** 2026-10-01 · **Status:** Superseded by TDR-024 · **Related:** [[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-011|Bug Tracker > BUG-011]] ### Context v0.2 changes the schema and the owner's model of what a preference is. The live server had been serving the demo for a day. ### Decision The migration runs in development only (`migrate:dev`), adds without deleting or merging, and startup performs readiness checks only. Production follows the separate process in `docs/production-v02.md`, reviewed by the owner. Milestone review gates with an audit trail sit in `package.json` and `replit.md`, and read-only synthetic checks exercise the MCP tools without writing. ### Consequences - The v0.2 landing page is live while the production migration status is a question to answer, since the two can diverge - Every milestone leaves a reviewed record, which is the audit trail an enterprise reviewer asks for first - 2026-10-02: Replit's database tooling validated the migration (two new tables, `owner_login_limits` and `owner_confirmations`, among the changes) and offered Create preview deploy or Approve and publish. Preview first, per Considerations Ahead ## TDR-014: The Dashboard Reuses the Owner Credential as a Session **Date:** 2026-10-01 · **Status:** Superseded by Clerk sign-in, then TDR-029 and TDR-034 ### Context The owner needed a page to read and edit their drops, and v0.1 had one credential per user, the bearer token. ### Decision The owner signs in at `/owner` with the existing credential. The app exchanges it for a six-hour HTTP-only session and clears the input; sign out removes the server session. No second credential, no new identity system before v0.2 sign-in on the ladder. ### Consequences - One secret per person still, which keeps the rotation story simple - The session cookie is a second place that secret's authority lives, for six hours at a time ## TDR-013: Withdrawal Is Permanent **Date:** 2026-10-01 · **Status:** Superseded by TDR-030 · **Related:** [[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-006|Bug Tracker > BUG-006]] ### Context v0.1 left open what a reconnect after revocation restores. Agent's Unsure note said renewed approval restores access to existing drops. ### Decision A withdrawn preference stays out of every future pull, reapproval included. The original stays with its owner. There is no restore operation, no pull history, and no activity indicator. Revocation of a connection blocks future pulls; neither action retracts information an agent has already received. ### Consequences - Reconnect semantics are settled: a withdrawn preference stays withdrawn, everything else returns with reapproval under the widening checks - The landing page states the limit in one line, which is the right place for it ## TDR-012: Widening Waits for a Second Call **Date:** 2026-10-01 · **Status:** Accepted ### Context A tier increase is the one owner action that moves more text toward a requester. ### Decision A tier increase returns a five-minute preview, and an explicit second owner call applies it. Edits and legacy conversion also require confirmation; expanding the audience uses its own approval. Any change to owner state invalidates outstanding previews. Decreases apply immediately. Approval and reapproval cannot bypass the widening checks. ### Consequences - The pause sits exactly where the consequence is, on disclosure going up - Narrowing never waits, because nothing new leaves ## TDR-011: Owner-Wide Preferences With a Ceiling **Date:** 2026-10-01 · **Status:** Amended by TDR-021 · **Supersedes the open call in TDR-006** ### Context v0.1 scoped every drop to one requester. The concept page described drops as the owner's, visible to any approved connection by tier. ### Decision Both, explicitly. A new owner-wide preference chooses all approved connections as its audience and carries a ceiling; effective disclosure is the more restrictive of the ceiling and the connection's limit. The owner writes every lower-tier text that could become visible. Existing requester-scoped drops keep their single audience and snapshot disclosure until the owner completes any missing lower-tier text and confirms conversion; a separate approval opens a preference to all approved connections, future ones included. ### Consequences - The spec's reading and Agent's reading both survive, with the owner choosing per preference - Strict tier validation from v0.1 becomes "write every visible tier up to the ceiling," which costs the owner more typing and keeps the no-model-summaries rule intact ## TDR-010: Multi-Artifact Layout for the Review Deck **Date:** 2026-10-01 · **Status:** Accepted (applied; tests not yet re-run in the new layout) · **Related:** [[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-009|Bug Tracker > BUG-009]], [[Project - Gift Graph/Build & Iterate/Build Log|Build Log]] ### Context The publish screen offered a slide deck. After I approved a five-slide outline, Agent reported that the deck viewer needs a multi-artifact project layout and asked to move the deployed server into it first (Task #5, "Preserve Gift Graph server"). The server had been live for under an hour, the night before a call where I planned to demo it. ### Options Considered | Option | Description | Pros | Cons | |--------|-------------|------|------| | **A. Not now** | Decline the restructure, build the deck in a separate app from the three docs | Zero risk to the live server | A second app to manage | | **B. Approve** | Let Agent move the server into `artifacts/`, `lib/`, `scripts/` with a `.migration-backup/` | One repo holds server and deck | Paths the build and run commands depend on change | ### Decision **Option B landed, with the live deployment held back.** The restructure ran on a separate copy, I pushed the working v0.1 to GitHub first, and the published build keeps serving until a republish. Task #6 (the deck) is queued behind it. ### Consequences - The repo on GitHub carries the new layout (`artifacts`, `lib`, `scripts`, `.migration-backup`, `pnpm-workspace.yaml`) - The live server still runs the pre-restructure build, which is what the demo tested - Republish only after Agent confirms the 12 tests pass in the new layout - Every checkpoint in the Agent panel can roll the workspace back to before Task #5 ## TDR-009: Private Repo, Checkpoints as Commits **Date:** 2026-10-01 · **Status:** Accepted · **Related:** [[Project - Gift Graph/Build & Iterate/Validation Log|Validation Log]] ### Context Replit commits every checkpoint to a local git history and keeps its own `gitsafe-backup` remote. Nothing had reached GitHub. The repo holds my build notes and a first name in the origin story. ### Decision Private repository `gift-graph` under my personal GitHub, created from the Git pane. `.cache/` and `.local/` added to `.gitignore` (they were never tracked). Commit author set to my GitHub profile. Description changed from "Imported from zip" to what the repo is. ### Consequences - One source of truth, in this order: Replit writes code, GitHub receives it, my machine and the vault pull from GitHub - The local clone into `Project Code` and the junction into this vault folder are still to do - A public repo would need the origin story reworded first ## TDR-008: Feedback Widget Off **Date:** 2026-09-30 · **Status:** Superseded (the v0.2 landing page has pages for a person, and the widget is on as of 2026-10-02) ### Context The publish panel offers a feedback widget beside the access settings for every app. ### Decision Off for v0.1. Gift Graph serves MCP tools with no human-facing pages, and the widget would only add a script to the server. Revisit once the owner review screen ships. I am very interested in the widget itself as a feedback capture surface; that interest lives in the backlog. ## TDR-007: Autoscale Deployment on a Stateless Transport **Date:** 2026-10-01 · **Status:** Accepted · **Related:** [[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-001|Bug Tracker > BUG-001]] ### Context The first Publish failed with "Could not find run command." The preview ran through the workspace's dev workflow, and `.replit` had no deployment section. Streamable HTTP can run with or without server-side sessions; if the server held sessions in memory, Autoscale could route a client's next request to an instance that does not know the session. ### Options Considered | Option | Description | Pros | Cons | |--------|-------------|------|------| | **A. Autoscale** | Scale to zero, scale out per request | Cheapest at low traffic | Breaks if session state lives in memory | | **B. Reserved VM** | One always-on instance | Sessions survive on one box | Pays for idle time | ### Decision **Option A.** Agent checked the transport and found it creates a fresh transport per request with session IDs disabled, and all durable state lives in PostgreSQL. Build `npm run build`, run `npm start`. Region North America, 2 vCPU and 4 GiB RAM. ### Consequences - The compiled server started locally with `/health` at 200, root at 200, unauthenticated `/mcp` at 401, then the same on the live URL - A future session-bearing transport would force a move to Reserved VM - Agent requested Power mode for the fix; the step cost $0.02 ## TDR-006: Strict Tier Validation and Per-Connection Drops **Date:** 2026-10-01 · **Status:** Superseded by TDR-011 · **Related:** [[Project - Gift Graph/Build & Iterate/Feature Backlog|Feature Backlog]] ### Context Two behaviors surfaced in the live demo. The server refused `vibeText` on a category-tier drop, and `drop` takes a `requesterId`, which makes a drop belong to one connection. The concept page described drops as belonging to the owner and visible to any approved connection by tier. ### Decision, as it stood before v0.2 Keep strict tier validation; it means each drop stores only the text its tier can reveal, and no unused private text sits in the database. The tradeoff is flexibility, since a drop with no vibe text has nothing to show if the owner later lowers the default to vibe. Drop scope is the open call: one connection, or the owner across every approved connection. Agent's version is stricter than the spec, which is a reasonable reading and also a quiet deviation that a forward deployed engineer should confirm with the customer before it ships. ## TDR-005: The Tier Filter Lives in the Query **Date:** 2026-09-30 · **Status:** Amended by TDR-022 ### Context A pull must return only what the tier allows, and matching must never touch text the requester cannot see. ### Decision The server checks for an approved connection first. For each drop it returns only the field the tier allows, verbatim, category, or vibe, and excludes silent drops. The match runs against the permitted text only, as literal word matching in v0.1. ### Consequences - Withheld text never leaves storage, which is a stronger guarantee than filtering after retrieval - A requester cannot fish for private text by guessing words (verified: a pull for "Söhne" returned nothing) - Natural prompts miss when no word overlaps (a pull for "gift ideas about fonts" returned nothing). Semantic matching is the next step, and the embeddings must be built only from disclosed text or the leak reopens ## TDR-004: Owner-Written Category and Vibe Text **Date:** 2026-09-30 · **Status:** Superseded by TDR-021 (Agent's choice, kept through v0.2) ### Context The spec left open how a verbatim preference becomes its category and vibe forms. ### Decision The owner writes the category and vibe text explicitly at drop time. No model summarizes a private preference into a "safe" version. ### Consequences - Closes a leak the spec did not name: a model asked to vague-ify "wants a Söhne license" might still produce something too specific - Costs the owner a little typing per drop, which the owner review screen can ease later ## TDR-003: Identity from the Bearer Token Only **Date:** 2026-09-30 · **Status:** Accepted ### Context v0.1 has two seeded users and no registration. Every request needs an identity the server can trust. ### Decision Each request carries `Authorization: Bearer <token>`. The server matches the token to a seeded user and takes the caller's identity only from that match, never from tool arguments. Tokens are generated with `openssl rand -hex 32` and stored in Replit Secrets, never in code. ### Consequences - "One user cannot act as the other" is true by construction - Both tokens were exposed in a shell screenshot during the build and rotated afterward; rotation changes no code - Static tokens are the right prototype choice and the wrong production choice; the ladder runs tokens → app sign-in → OAuth for MCP clients → the customer's identity provider ([[Project - Gift Graph/Discovery & Planning/Product Plan|Product Plan]]) ## TDR-002: TypeScript on the MCP SDK, Streamable HTTP, Replit PostgreSQL **Date:** 2026-09-30 · **Status:** Accepted ### Context The brief asked for drop and pull as MCP tools over Streamable HTTP, the built-in database, and two seeded users. ### Decision A TypeScript server on Node using the official MCP SDK, one `/mcp` endpoint speaking MCP over Streamable HTTP, Replit's built-in PostgreSQL for users, connections, and drops. The seven tools are `request_connection`, `approve_connection`, `set_default_tier`, `revoke_connection`, `list_connections`, `drop`, and `pull`. ### Consequences - Any modern MCP client connects without a custom adapter; Claude Code did with one command per identity - `list_connections` is an addition the spec did not name and proved useful for checking state mid-demo - 12 integration tests cover identity isolation, silent drops, immediate revocation, and pulls before approval ## TDR-001: Scope v0.1 to the Handshake, Drop, and Pull **Date:** 2026-09-30 · **Status:** Accepted · **Related:** [[Concept - Gift Graph - Consent-Gated Context Between Agents]] ### Context The concept page describes a consent registry, a disclosure engine, an anti-inference batcher, PSI tombstones, notifications, and an owner review screen. I had one evening and a call the next day. ### Decision v0.1 is the consent handshake plus drop and pull with disclosure tiers for two seeded users. The anti-inference engine, PSI tombstones, the owner review screen, and enterprise SSO go into the backlog without being built. The scope lives in `replit.md`, which Agent reads at the start of every task, alongside a rule to propose a plan and wait for approval before building. ### Consequences - Agent kept the scope exactly and deferred what the backlog lists - Cutting the scope up front is itself the forward deployed move: deciding what a v0.1 leaves out - The plan gate held on the first turn and bent once later, when revise text opening with "Approved" was read as approval ([[Project - Gift Graph/Build & Iterate/Bug Tracker#BUG-002|Bug Tracker > BUG-002]]) --- ## TDR-000: Explore the Idea Before Building It **Date:** 2026-02-15 · **Status:** Accepted · **Related:** [[Concept - Gift Graph - Consent-Gated Context Between Agents]], [[Project - Gift Graph/Discovery & Planning/Product Plan|Product Plan]] ### Context The idea arrived as a question I put to Claude. Could my agent lend a friend's agent a sliver of what I want, without either agent reading the other's history? I had no build and no deadline. ### Decision Treat it as initial ideation and a feasibility exploration in a Claude chat. I tested whether the consent between two agents, the levels of what one side hears, and a server in the middle that keeps the original words at home held together as a product, and set it down without building anything. ### Consequences - The concept page on 2026-09-01 picked the idea up from that chat and drew the architecture - A Replit case study needed something real to build, and this was it; the build started 2026-09-30 and grew well past the case study - Every TDR above this one is a decision about the build