← Context/ plans

Augment from DB Β· Phase 4 β€” people reveal, person cards, add-person with automatic affiliation

The org card grows its people: every affiliated person revealed with role + relevance, nested identity links with their own βž• and πŸ”, and an inline add-person where the affiliation edge materializes without the operator ever managing it.

Spec reference

Implements Phase 4 of Augment From DB Flow. All UI lands in apps/org-workbench; zero service changes β€” every verb (organization.affiliations, person.candidates / person.apply / person.affiliate, person.links.add / person.corpus.add) shipped in Phase 1 or earlier flows. Branch: rebuild/turbo-rsbuild.

Wire shapes verified against person-resolver.ts: PersonNormRecord (name required; linkedin_url, role, observation optional), PersonCandidate (person_uuid + score + match_reason), PersonApplyInput (action: 'match'|'create', person_uuid required for match), PersonAffiliateInput (person_uuid + org_action:'match' + org_slug + role? + client).

Scope note: AffiliatedPerson carries personal_corpus_count, not the corpus entries (Phase 1 contract). The person card therefore lists links in full (AdditiveList reuse) but shows corpus as count + βž• + πŸ” only β€” entry listing rides affiliation.detail in a later pass if the operator wants it.

Steps

  1. Client lib (org-client.ts + types.ts) β€” PersonCandidate, PersonNormRecord mirrors; wrappers for person.candidates, person.apply, person.affiliate, person.links.add, person.corpus.add.

  2. PersonCard.svelte β€” one affiliated person expanded: headline Β· role Β· relevance; AdditiveList reuse for personal_links (βž• β†’ person.links.add, πŸ” β†’ person-shaped envelope, target links); corpus row (count + βž• β†’ person.corpus.add, πŸ” target corpus). Every write dispatches augment-it:entity-updated { person_uuid }.

  3. AddPersonInline.svelte β€” the spec's "magic": name (+ optional LinkedIn URL, role) β†’ person.candidates β†’ operator gate ALWAYS (pick a candidate or "create new" β€” scores + match_reason shown) β†’ person.apply β†’ person.affiliate with the org pre-bound (org_action:'match', this card's org_slug) β€” the edge + paired observation materialize without an explicit affiliation step. Callable again later for other orgs (N-affiliation assumption).

  4. PeopleReveal.svelte β€” collapsible "People Β· N" section on the org card over organization.affiliations (already relevance-sorted server-side); rows expand to PersonCard; footer hosts AddPersonInline; refetches on its own writes and on person-shaped augment-it:entity-updated.

  5. OrgCard.svelte β€” mounts PeopleReveal under the three lists.

  6. Verify β€” svelte-check + build org-workbench; shell build regression; organization.affiliations live data already proven (Aspen, 10 people). The add-person write path is NOT exercised headlessly β€” it creates real canonical persons, and polluting the shared layer for a smoke test violates the additive-writes discipline; the verbs themselves shipped and were live-proven in the person-db-resolver flow. Operator walk-through: reveal Aspen's 10 β†’ expand one β†’ βž• a link β†’ add a real person β†’ see the affiliation appear with no explicit step.

  7. Changelog, commit + push as attempt(augment-from-db, people-reveal, step4):.