h.work Documentation
Internal product documentation for the h.work platform β AI-augmented operations for delivering managed AI+Expert services.
π Quick Startβ
| π Section | What you'll find |
|---|---|
| π― Features | Feature specs, requirements, and implementation status |
| π¨ Design | Information architecture, user flows, views by role |
| π‘ API Reference | Complete API documentation with endpoints |
| π§ͺ User Stories | P0/P1/P2 user stories by role (Client, Expert, AM, Superadmin) |
π Key Documentsβ
Recently Updated (2026-06-04)β
- Documentation Fixes (archived) β Summary of doc updates landed on 2026-05-22.
- Implementation Status β What's built vs. gap analysis
- API Reference β Updated with 50+ endpoints
- 2026-07-13 β RailwayβECS supersession: ADR-038 formally supersedes ADR-003 for staging/prod (prod cutover #701 closed 2026-06-15). Railway remains canonical for dev only (#1233). Swept stale "migrating Railway β ECS" claims in
PRODUCT_OVERVIEW.mdandUSER_OPERATIONS_MANUAL.md. - 2026-06-02 β 2026-06-04 architecture & infra sweep:
- New ADRs accepted: ADR-024 Haystack migration (supersedes ADR-004 + ADR-009 RAGflow), ADR-025 pgvector, ADR-026 OpenRouter routing, ADR-027 TypeORM-only, ADR-028 retire RailwayPerOrgProvisioner (implementation in PR #1584 / #1450).
- Promotion flow: PR #1559 made
dev β staging β maina CI-enforced required status check β seedocs/promotion-flow.md. - Domain canonicalization (PR #1537):
h852.work= dev,h853.work= staging,h.work= prod. Sweep any older docs using stale subdomain names. - Schema renames: PR #1602 β
environment_profilesβclient_briefs(DB-table-only as of 2026-06-04; API module rename tracked in #1199). PR #1604 β newcorrection_embeddingstable (Phase 1 of learning-loop #1360; uses OpenAI directly for embeddings β flagged as a possible ADR-026 exception).
- 2026-05-29 β 2026-06-02 audit-followup sweeps (#1265, #1280): ADR-020 isolation classification fully shipped end-to-end (#1132β#1153,
expert_agent_messagestable dropped, unifiedmessagestable live,osa_idFK onagent_runs/tool_calls); Lago billing live (#1069 wiring, #1105 lifecycle, #1155 webhook + FE, #1016 Phase-7 Stripe teardown β Stripe survives only as Lago's PSP); Stripe Checkout for client payment-method add-card (#1275, closes #1268); ADR-023 invite lifecycle accepted (#1286); Tavus integration rename completion (#1031 + #1280 β/ops/tavus/*is live,/ops/personas/*is 308-redirect-only).
Architecture & Designβ
- Information Architecture β Full IA by role (Client, Expert, AM, Superadmin)
- User Flows β Onboarding wizard, client portal, expert queue
- Agent Architecture β Per-client sandboxed deployments
- Views by Role β Screen-by-screen breakdown
Operationsβ
- Deployment Guide β Environment setup and deployment
- Email Channel Setup β Gmail API + DWD configuration (primary, shipped 2026-06-05 PR #1722); Cloudflare worker fallback during 2-week soak (#1440/#1441)
- Incident Response β On-call runbooks
- Engagement Date Changes β AM runbook: what realigns billing automatically vs. when a Start Date / trial change on a billed subscription needs a manual Lago credit/back-bill (#894)
ποΈ Platform Overviewβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββ
β CLIENT PORTAL (/client/*) β EXPERT WORKSPACE (/workspace/*) β
β β β
β β’ Chat with Specialists β β’ Queue (pending tickets) β
β β’ Thread management β β’ Tasks (agentic plan review) β
β β’ Settings (Team/Channels/Billing) β β’ Analytics β
β β β’ Personal settings β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OPS PORTAL (/ops/*) β AM + Superadmin β
β β
β β’ Clients (AM: assigned; SA: all) β
β β’ Inbox β’ Queue (SA only) β’ Analytics β’ Health β’ Billing β
β β’ Team (SA only) β’ Settings β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
𧬠Terminologyβ
| Term | Definition |
|---|---|
| Specialist | Client-facing AI persona (e.g., "Bob") that clients chat with |
| Agent runtime | Internal sandboxed AI runtime infrastructure behind a Specialist (NestJS+FastAPI service). This is infra terminology only β never use "Agent" as a synonym for Specialist in user-facing copy. |
| Expert | Human reviewer who supervises AI output and handles escalations |
| AM | Account Manager β onboards and manages client orgs |
| SA | Superadmin β cross-org access and platform operations |
β οΈ Important Notesβ
API Route Migration
/am/*routes are legacy β prefer/ops/*where available- Documentation updated: 2026-05-22
- See API Reference for current endpoints
Expert β Org Access Model (current)
- Expert pools were removed 2026-05-03.
- The previous direct table
org_expertswas deprecated 2026-05-22 per ADR-007.- The canonical model is now
expert_accessβ a dual-scope grant table:
scope='org'β Expert can see all of one Org's data.scope='specialist'β Expert can see one (Org Γ Specialist) slice.- All new code must use
ExpertAccessService.org_expertsis readable for back-compat during the #537 transition and is removed in #540 after soak.- See Implementation Status Β§ 13 and ADR-007.
π Contributingβ
This documentation is auto-rendered from the /docs folder of the humanwork repo. Edit markdown files directly β changes deploy on push to dev.
Quick edit links:
Last major update: June 4, 2026