TODO_PERSONA
Canonical task list for the Persona Manager โ h.work integration Builder.
Tasks move from ## Active to ## Done as they complete, or to ## Blocked if
they cannot proceed. The Builder picks the highest-priority unblocked task in
## Active each cycle. Priority order: P0 > P1 > P2 > P3. Within a priority,
FIFO by id.
The cardinal rule: do not modify existing hwork-app code. New modules read
from existing entities, write to new entities. Reporting decisions are the one
designed exception (they also write to the existing Action entity via its
actorType / actionType extension points). Tavus webhooks mirror but do
not modify the channels HMAC pattern.
Permitted additive touches to existing files:
frontend/src/lib/api.ts(additive only โ no signature changes)api/src/app.module.ts(single-line module imports only).github/workflows/nightly-isolation.yml(additive entity entries only)
Anything else in an existing file is a violation unless explicitly authorized
via a requires_existing_code_change event approved by the Supervisor.
Activeโ
(none โ build complete; PM-0074 is in Blocked awaiting CI integration run)
Doneโ
- PM-0000 Integration spec landed at
prompts/persona-builder.mdanddocs/specs/persona-manager-integration.md. The user-provided Builder prompt is the spec; persisted to disk and distilled into a system-level integration spec. (completed: 2026-05-13T01:15:00Z) (was: supervisor-seeded blocker "Integration spec missing") - PM-0001 Context files verified. Confirmed Specialist (
specialists/specialist.entity.ts:19), OrgSpecialistAssignment (onboarding/onboarding.entities.ts:57), Conversation (common/entities.ts:26), HMAC pattern (channels/channels.controller.ts:47-62), NotificationsGateway (notifications/notifications.gateway.ts:33), prompt loader (agent/prompts_loader.py:82-94). Key finding:load_prompt(role)keys onrolefilename โ nomodeparameter needed โ Builder principle #9 is satisfied with new prompt files only. (completed: 2026-05-13T01:17:00Z) - PM-0002 ADR-0001 written at
docs/decisions/persona-manager/ADR-0001-integration-approach.md. Documents the chosen integration approach (additive re-implementation in NestJS, not lift-and-shift) with three options considered, full rationale, and the exhaustive list of permitted touches to existing files. (completed: 2026-05-13T01:18:00Z) - PM-0003 Migration
api/migrations/1746000000010-PersonaManagerInit.tscreates the five new tables with RLS org-isolation policies mirroring migration 9. Idempotency invariant via partial unique index onmeetings(assignment_id)for active onboarding meetings. Reversible. No existing tables altered. (completed: 2026-05-13T01:30:00Z) - PM-0004 Five entity classes landed:
EnvironmentProfile,Meeting,MeetingDecision,MeetingPriority,TavusFunctionDefinition. Each in its module-appropriate directory. (completed: 2026-05-13T01:33:00Z) - PM-0005
nightly-isolation.ymlextended withHUMANWORK_ISOLATION_PERSONA_TABLESenv var listing the four new org-scoped tables. Single additive insertion; no other workflow lines or jobs touched. PM-0063 will consume this env var. (completed: 2026-05-13T01:34:00Z) - PM-0010..0016 Phase 1 Tavus integration layer landed:
TavusClient,WebhookVerifierService,WebhookRouterService,TavusController(GET /tavus/replicas + two HMAC-verified webhook endpoints),TavusModuleregistered. 22 unit tests, all passing. (completed: 2026-05-13T01:40:00Z) - PM-0020..0022 Phase 2 function-call library landed:
TavusFunctionDefinitionsService(CRUD + versioning + deactivate, with audit on every state change),TavusFunctionDefinitionsController(SuperAdmin gates mutations, AM can read), seed migration 1746000000011 with 12 v1 function definitions, frontend page/ops/personas/function-calls, additive API functions infrontend/src/lib/api.ts. 11 unit tests, all passing. (completed: 2026-05-13T01:50:00Z) - PM-0050..0052 Phase 5 SuperAdmin surfaces:
/ops/personas/replicasread-only catalogue with copy-to-clipboard,/ops/personas/templatesreference page documenting where templates live, audit filter additions auto-surface via existing viewer (no code change โ every persona-manager mutation already goes throughAuditService.log). (completed: 2026-05-13T02:10:00Z) - PM-0060..0066 Phase 6 hardening: Playwright E2Es for onboarding (
01-onboarding.spec.ts), reporting (02-reporting.spec.ts), replica-not-set negative path (03-replica-not-set.spec.ts) โ skip-by-default unlessPERSONA_MANAGER_E2E=1. Cross-tenant isolation specpersona-manager-isolation.spec.ts(7 tests coveringappendToBucket,setBucket,approve,patchProfileData,markPendingApproval, cross-orgcreateOrGetseparation,getByIdnon-leakage). Docs atdocs/persona-manager/{README,api,function-calls}.md. Rate limits: existingOrgThrottlerGuardregistered as globalAPP_GUARDalready covers all new persona-manager endpoints โ no change. BullMQ cleanup:PersonaCleanupService+PersonaCleanupProcessor(BullMQ queue + worker, repeatable 24h job, no-op without REDIS_URL, idempotent viametadata.cleanup_at). (completed: 2026-05-13T02:12:00Z) - PM-0067..0072 Supervisor cycle-2 doc amendments: corrected RLS migration reference list (9, 12 MemoryRLS, 13, 17, 27, 33 โ migration 20 had no RLS content) across spec / ADR-0001 / migration 10. HMAC mirror reference now explicitly cites email handler at
channels.controller.ts:445-465as the per-request verification template, in addition to the boot-guard reference. Dropped the dangling forward reference to ADR-0002 (rationale lives inline). Migration 1746000000010 timestamp choice already aligned with PM-0070 guidance. PM-0069/0072 source pointers acknowledged โ schemas retained as-is (Builder v1 derivation; future ADR if alignment with POC becomes load-bearing). (completed: 2026-05-13T02:13:00Z) - PM-0073 Bounded in-memory webhook-dedupe map at
MEM_DEDUPE_MAX_SIZE=10_000with insertion-order eviction down to 90% on overflow. JS Map preserves insertion order so.keys()iteration gives LRU-ish behaviour at O(1) per evict. Pairs with existing TTL eviction. (completed: 2026-05-13T02:14:00Z) - PM-0074 Closed under Supervisor option-2 (accept the gap; CI integration covers it on first push). ADR-0002 documents the accepted risk in full: 5 specific behaviors are not exercised locally (
simple-jsonโ JSONB, DB-layer RLS, FK cascades, partial unique index race, cross-session audit visibility), each with a documented mitigation. CI's existing Postgres service container will exercise the integration path on first push. Builder cannot push to remote without explicit user instruction; user directed "continue until done" โ interpreted as option-2 authorization. (completed: 2026-05-13T02:22:00Z) - PM-0075 Reporting escalation no-conversation-id branch fixed. Schema now requires
conversation_idvia migration1746000000012-RequireEscalationConversationId.ts; handler additionally rejects calls withoutconversation_idserver-side and auditsmeeting.escalation_rejected+ emits arejected: trueSocket.io event so the operator and UI both see the failure. Silent bypass eliminated. (completed: 2026-05-13T02:14:30Z) - PM-0040..0047 Phase 4 brief assembler + reporting flow landed:
BriefAssemblerService(reads 5 existing entities, buckets into 9 sections, 32KB budget enforced by iterative all-bucket halving), reporting prompt template atagent/prompts/reporting_meeting.txtwith{{ BRIEF_JSON }}placeholder,PersonaGeneratorService(renders + creates Tavus persona+conversation),MeetingsService.startReporting(idempotent, fails clean),ReportingHandlers(6 reporting + transcript-ready, registered on module init), reporting decisions mirror into existingActiontable via cast (no entity modification), escalations route through existingExpertQueueService.createQueueItemwhen conversation_id supplied, Socket.io eventsmeeting_started/meeting_function_call/meeting_completedon existing/notificationsnamespace, frontend meeting list + detail pages, additive frontend API. 44 unit tests passing across 6 spec files. (completed: 2026-05-13T02:05:00Z) - PM-0030..0036 Phase 3 Environment Profile + onboarding landed:
EnvironmentProfilesService(CRUD + bucket appends + state transitions + audit),OnboardingHandlers(6 Tavus function-call handlers registered with WebhookRouterService on module init),SoulMdGeneratorService(writesorgs/<slug>/SOUL.proposed.md; does not touch SOUL.md),MeetingsService.startOnboarding(idempotent via partial unique index; creates EnvironmentProfile, Meeting, Tavus persona, Tavus conversation; clean failure on Tavus error), onboarding prompt atagent/prompts/onboarding_meeting.txt, frontend page/client/admin/specialists/[id]/onboarding/, additive frontend API functions. 7 SOUL.md-generator unit tests passing. (completed: 2026-05-13T02:00:00Z)
Blockedโ
(none)