B2BEA.org V1 Company Workspace Data Spec
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
company-workspace-data-spec · supabase_json

B2BEA.org V1 Company Workspace Data Spec

company-workspace-data-spec artifact · for B2BEA.org Rebuild · status approved

Planning Surface

Use this to decide what happens next.

Status

approved

Agent Handoff
Start Here

company-workspace-data-spec artifact · for B2BEA.org Rebuild · status approved

Completion Evidence
  • A company admin can invite an employee, assign a seat, assign a course, and see resulting access through the entitlement evaluator.
  • Removing an employee or revoking a seat removes workspace/academy access within the documented cache window.
  • Company-created jobs cannot become public without B2BEA admin approval.
  • Practitioner company data has no public profile route or public directory exposure in V1.
  • Company exports include only own-company data and are policy-gated.
  • All employee, seat, academy, job, export, and settings changes create audit events.
Artifact Shape
  • gaps: 9 items
  • scope: excluded: object, included: object
  • title: B2BEA.org V1 Company Workspace Data Spec
  • version: 1
  • decisions: 8 items
  • next specs: 4 items
  • project id: a820dd0c-6cef-4133-bfbd-d802fd806e44
  • updated at: 2026-05-07T00:32:06.121Z
  • source repo: name: string, local_path: string, live_supabase_host: string
  • artifact type: company-workspace-data-spec
  • lifecycle models: employee: object, job_submission: object, academy_assignment: object, company_membership: object
  • permission model: 6 items
Structured Payload

Machine-readable source fields

gaps
idareacurrentrequiredseverity
CW-GAP-001No company workspace routeOnly internal admin companies page observed.Build authenticated private company workspace surface for company admins and employees.P0
CW-GAP-002Empty company membership tablesorganization_members and membership_seats exist but have zero rows.Implement invite, membership, and seat assignment lifecycle with active removed_at filtering.P0
CW-GAP-003Role scopingorganization_members.role only supports admin/member; person_roles is global.Define company-scoped roles and avoid using global roles for company permissions.P0
CW-GAP-004Academy assignmentNo course_assignments/company assignment model observed.Add course assignment model tied to org, employee, entitlement, and enrollment.P0
CW-GAP-005Company-created jobsJobs table has published/draft statuses but no company submission/review lifecycle.Add review workflow and admin approval before public publishing.P0
CW-GAP-006Analytics exportsOwn-company analytics export model not defined.Define bounded event taxonomy, aggregation, and export policy.P1
CW-GAP-007AuditabilityNo company workspace audit trail observed.Record employee, seat, academy, job, export, and settings changes.P1
CW-GAP-008Data drift riskAdmin companies page reads people.organization_id for roster visibility while also writing organization_members.Choose roster truth and update all reads to use active organization_members or a tested view.P1
CW-GAP-009Organization type enumorganizations.type only allows pro_member/vendor.Confirm whether practitioner company accounts fit pro_member or need company/customer/employer enum value.P1
scope
excluded
  • Public practitioner company profile pages in V1
  • Public company directory for practitioner companies in V1
  • Complex internal admin permissioning beyond Brett/Sarah/Justin light admin model
  • Company-owned CRM pipeline; HubSpot remains CRM primary
included
  • Private practitioner company workspace only
  • Company admins and employee/member access
  • Academy seat assignment and company learning visibility
  • Company-created jobs submitted for B2BEA admin review
  • Company profile/account settings for private workspace use
  • Bounded own-company analytics/export rules
title

B2BEA.org V1 Company Workspace Data Spec

version

1

decisions
idtopicdecision
CW-DEC-001Public surfacePractitioner company accounts are private workspace only in V1. Do not build public company profile pages or a public company directory for practitioner companies.
CW-DEC-002Canonical company accountUse organizations as the canonical company account table. Extend it for workspace/account metadata instead of creating a second company table.
CW-DEC-003Company membershipUse org-held memberships plus membership_seats as the canonical source of company seats and included benefits.
CW-DEC-004Company rolesUse organization_members for company-scoped roles. Use person_roles only for global/internal/vendor roles.
CW-DEC-005Jobs publishingCompany-created jobs require B2BEA admin review before public publishing in V1.
CW-DEC-006Academy assignmentsCompany admins can assign available academy content to employees only when the org entitlement grants the content and the employee has an active seat or assignment.
CW-DEC-007Analytics exportsCompany analytics and exports are own-company only and must exclude raw platform-wide data and sensitive user-level data unless explicitly consented and permitted.
CW-DEC-008CRM boundaryHubSpot remains CRM primary for lead, pipeline, sales activity, and renewal workflows. Company workspace state lives in B2BEA Supabase.
next specs
  • survey-system-spec
  • notification-spec
  • academy-certification-spec
  • vendor-portal-workflow-spec
project id

a820dd0c-6cef-4133-bfbd-d802fd806e44

updated at

2026-05-07T00:32:06.121Z

source repo
name

B2BEA-org-new

local path

/Users/justinking/Vaults/Projects/B2BEA-org-new

live supabase host

czqxkykbhoyyjccckpqq.supabase.co

artifact type

company-workspace-data-spec

lifecycle models
employee
  • invited
  • accepted_active
  • seat_assigned
  • seat_revoked
  • removed
  • reinvited
job submission
  • draft
  • submitted_for_review
  • changes_requested
  • approved
  • published
  • rejected
  • expired
  • removed
academy assignment
  • assigned
  • enrolled
  • in_progress
  • completed
  • overdue
  • revoked
company membership
  • prospect_or_inactive
  • active
  • past_due_or_suspended
  • expired
  • cancelled
permission model
rolenotesgrants
company_ownerOne or more accountable company owners. May manage admins.- company.workspace.admin - company.academy.assign - company.careers.submit_job - company.analytics.export
company_adminOperational company admin; can invite/remove members depending policy.- company.workspace.admin - company.academy.assign - company.careers.submit_job - company.analytics.export
company_recruiterOptional V1 role if hiring workflow needs separation.- company.workspace.read - company.careers.submit_job
company_memberEmployee/member baseline access.- company.workspace.read
company_learnerEmployee with active academy seat or assignment.- company.workspace.read - academy.course.enroll.included
b2bea_adminBrett/Sarah/Justin light admin model for review and support.- admin.platform.manage - admin.content.publish
source artifacts
  • data-model-spec v1
  • entitlement-model-spec v1
  • permission-lifecycle-matrix v3
  • capability-map v5
target data model
add new
tablefieldspurpose
organization_invitations- id - organization_id - email - role - invited_by_person_id - status - token_hash - expires_at - accepted_by_person_id - accepted_at - created_at - updated_atInvite and acceptance lifecycle for company employees.
course_assignments- id - organization_id - course_id - assigned_to_person_id - assigned_by_person_id - source_type - status - due_at - created_at - updated_atCompany/admin assignment of courses, paths, or certifications before/alongside enrollment.
company_job_submissions- id - organization_id - submitted_by_person_id - job_id - payload - status - reviewed_by_person_id - reviewed_at - review_note - created_at - updated_atReview workflow wrapper for company-created jobs before publishing to jobs.
company_analytics_events- id - organization_id - person_id - event_type - resource_type - resource_id - metadata - created_atOptional normalized own-company analytics event stream if existing tables are insufficient.
company_audit_events- id - organization_id - actor_person_id - event_type - target_type - target_id - reason - metadata - created_atWorkspace audit trail for employee, seat, academy, job, export, and settings changes.
reuse existing
usetablerequired hardening
Canonical company account and workspace profile.organizations- Add/confirm workspace_status, workspace_enabled, account_type beyond pro_member/vendor if needed. - Keep public_profile_enabled false/not used for practitioner companies in V1.
Company-scoped membership and roles.organization_members- Expand role enum to owner/admin/member/learner/recruiter if V1 needs distinct workflows. - Use active membership filter removed_at is null everywhere. - Add invited_by/accepted_at/status if not using separate invites table.
Org-held membership and seat count.memberships- Use held_by_org_id for company accounts. - Ensure status/current_period_end drives entitlement evaluator.
Seat assignment to people.membership_seats- Add assigned_by, assignment_source, status if audit cannot be fully covered elsewhere. - Enforce active seat count <= membership.seat_count.
Published public jobs and company-submitted job records.jobs- Add review lifecycle statuses or separate submission table. - Add submitted_by/approved_by/reviewed_at/rejection_reason/change_request fields.
Learner course participation.course_enrollments- Add/source link to course assignment if company-assigned courses are V1.
acceptance criteria
  • A company admin can invite an employee, assign a seat, assign a course, and see resulting access through the entitlement evaluator.
  • Removing an employee or revoking a seat removes workspace/academy access within the documented cache window.
  • Company-created jobs cannot become public without B2BEA admin approval.
  • Practitioner company data has no public profile route or public directory exposure in V1.
  • Company exports include only own-company data and are policy-gated.
  • All employee, seat, academy, job, export, and settings changes create audit events.
target capabilities
actorsurfacecapabilitydescription
company_admin/company_memberCompany workspaceCompanyWorkspaceViewView private company dashboard, account status, seats, assigned courses, submitted jobs, and reporting.
company_adminCompany workspaceCompanyUpdateProfileUpdate private company workspace metadata, logo/banner for careers, website, HQ, and primary contact.
company_adminCompany workspaceCompanyInviteEmployeeInvite employee by email, assign role, optionally reserve/assign academy seat.
company_adminCompany workspaceCompanyRemoveEmployeeRemove employee access, revoke active seat, preserve audit history.
company_adminCompany workspaceCompanyAssignAcademyAssign eligible course/path/certification to employee or cohort.
company_adminCompany workspaceCompanyViewLearningProgressView aggregate and employee-level progress allowed by policy.
company_adminCompany workspaceCompanyCreateJobCreate a job submission for B2BEA admin review.
company_adminCompany workspaceCompanyManageJobsView submitted/published/expired/returned jobs and make updates through review workflow.
company_adminCompany workspaceCompanyViewAnalyticsView own-company learning, jobs, and engagement analytics.
company_adminCompany workspaceCompanyExportAnalyticsExport bounded own-company reports.
b2bea_adminB2BEA adminAdminReviewCompanyJobReview, approve, reject, publish, unpublish, or request changes to company-created jobs.
live schema evidence
checked at

2026-05-07T00:32:06.121Z

code signals
  • src/admin/companies/index.njk manages organizations and members from the internal admin surface.
  • Admin companies page loads people by people.organization_id rather than organization_members, so removed_at state can drift from visible membership.
  • Admin companies page can upsert organization_members but the role choices are only admin/member in schema and vendor roles are assigned separately through person_roles.
  • Admin jobs page can choose organizations for jobs; public company-created job submission workflow is not present.
  • No practitioner company workspace route or portal surface was observed.
  • No company course assignment, invitation, seat availability, or company analytics export implementation was observed.
tables checked
jobs
rows

30

notes

Jobs support organization_id, company_name, source, status, published_at, expires_at. Existing statuses do not include review/submitted.

status

exists_populated

people
rows

6733

notes

People has organization_id and profile/careers fields; still must replace legacy persons references.

status

exists_populated

courses
rows

9

notes

Course access exists but needs entitlement normalization before company assignment.

status

exists_populated

memberships
rows

1

notes

Supports held_by_person_id or held_by_org_id and seat_count. Only one active person-held Pro membership observed.

status

exists_partial

person roles
rows

8

notes

Global person roles exist; no company-specific role scope beyond organization_members.role.

status

exists_partial

organizations
rows

60

notes

Supports name, slug, type, website, location, status, primary contact, careers extension fields.

status

exists_populated

membership seats
rows

0

notes

Supports membership_id, assigned_person_id, assigned_at, removed_at. No active seat assignments observed.

status

exists_empty

course enrollments
rows

4

notes

Participation exists, but no company assignment/source fields observed.

status

exists_partial

organization members
rows

0

notes

Supports org-person role admin/member plus joined/removed timestamps; currently unused live.

status

exists_empty

surface requirements
surfacerequirements
Company workspace dashboard- Current membership/status - Seat usage - Employee roster - Assigned academy content - Job submissions - Recent audit/activity - Exports/downloads available to the account
Employee roster- Invite employee - Role selection - Seat assignment/revocation - Remove employee - Status filters - Last active/accepted state
Academy management- Available courses/paths from entitlement - Assign to employee/cohort - Progress view - Completion/certification status - Export allowed reporting
Careers/jobs- Create job draft - Submit for review - See admin review status - Respond to change request - Expire/remove job
Admin review- Queue of company job submissions - Diff/payload review - Approve to jobs table - Reject/request changes - Publish/unpublish - Audit event
implementation sequence
  • Fix people/persons references and decide roster truth before building company workspace.
  • Extend or formalize organization_members roles and active roster read model.
  • Implement organization_invitations and acceptance flow.
  • Wire org-held memberships and membership_seats into entitlement evaluator.
  • Add course_assignments and company academy assignment/progress reporting.
  • Add company_job_submissions or extend jobs with review fields, then wire admin review.
  • Add company audit events and notification events for invites, seat changes, assignments, and job review outcomes.
  • Add own-company analytics aggregation and export checks.
  • Build workspace UI surfaces against the hardened data contracts.