B2BEA.org V1 Company Workspace Data Spec
company-workspace-data-spec artifact · for B2BEA.org Rebuild · status approved
company-workspace-data-spec artifact · for B2BEA.org Rebuild · status approved
- 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.
- 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
Machine-readable source fields
| id | area | current | required | severity |
|---|---|---|---|---|
| CW-GAP-001 | No company workspace route | Only internal admin companies page observed. | Build authenticated private company workspace surface for company admins and employees. | P0 |
| CW-GAP-002 | Empty company membership tables | organization_members and membership_seats exist but have zero rows. | Implement invite, membership, and seat assignment lifecycle with active removed_at filtering. | P0 |
| CW-GAP-003 | Role scoping | organization_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-004 | Academy assignment | No course_assignments/company assignment model observed. | Add course assignment model tied to org, employee, entitlement, and enrollment. | P0 |
| CW-GAP-005 | Company-created jobs | Jobs table has published/draft statuses but no company submission/review lifecycle. | Add review workflow and admin approval before public publishing. | P0 |
| CW-GAP-006 | Analytics exports | Own-company analytics export model not defined. | Define bounded event taxonomy, aggregation, and export policy. | P1 |
| CW-GAP-007 | Auditability | No company workspace audit trail observed. | Record employee, seat, academy, job, export, and settings changes. | P1 |
| CW-GAP-008 | Data drift risk | Admin 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-009 | Organization type enum | organizations.type only allows pro_member/vendor. | Confirm whether practitioner company accounts fit pro_member or need company/customer/employer enum value. | P1 |
- 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
- 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
B2BEA.org V1 Company Workspace Data Spec
1
| id | topic | decision |
|---|---|---|
| CW-DEC-001 | Public surface | Practitioner 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-002 | Canonical company account | Use organizations as the canonical company account table. Extend it for workspace/account metadata instead of creating a second company table. |
| CW-DEC-003 | Company membership | Use org-held memberships plus membership_seats as the canonical source of company seats and included benefits. |
| CW-DEC-004 | Company roles | Use organization_members for company-scoped roles. Use person_roles only for global/internal/vendor roles. |
| CW-DEC-005 | Jobs publishing | Company-created jobs require B2BEA admin review before public publishing in V1. |
| CW-DEC-006 | Academy assignments | Company 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-007 | Analytics exports | Company 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-008 | CRM boundary | HubSpot remains CRM primary for lead, pipeline, sales activity, and renewal workflows. Company workspace state lives in B2BEA Supabase. |
- survey-system-spec
- notification-spec
- academy-certification-spec
- vendor-portal-workflow-spec
a820dd0c-6cef-4133-bfbd-d802fd806e44
2026-05-07T00:32:06.121Z
B2BEA-org-new
/Users/justinking/Vaults/Projects/B2BEA-org-new
czqxkykbhoyyjccckpqq.supabase.co
company-workspace-data-spec
- invited
- accepted_active
- seat_assigned
- seat_revoked
- removed
- reinvited
- draft
- submitted_for_review
- changes_requested
- approved
- published
- rejected
- expired
- removed
- assigned
- enrolled
- in_progress
- completed
- overdue
- revoked
- prospect_or_inactive
- active
- past_due_or_suspended
- expired
- cancelled
| role | notes | grants |
|---|---|---|
| company_owner | One or more accountable company owners. May manage admins. | - company.workspace.admin - company.academy.assign - company.careers.submit_job - company.analytics.export |
| company_admin | Operational company admin; can invite/remove members depending policy. | - company.workspace.admin - company.academy.assign - company.careers.submit_job - company.analytics.export |
| company_recruiter | Optional V1 role if hiring workflow needs separation. | - company.workspace.read - company.careers.submit_job |
| company_member | Employee/member baseline access. | - company.workspace.read |
| company_learner | Employee with active academy seat or assignment. | - company.workspace.read - academy.course.enroll.included |
| b2bea_admin | Brett/Sarah/Justin light admin model for review and support. | - admin.platform.manage - admin.content.publish |
- data-model-spec v1
- entitlement-model-spec v1
- permission-lifecycle-matrix v3
- capability-map v5
| table | fields | purpose |
|---|---|---|
| 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_at | Invite 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_at | Company/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_at | Review 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_at | Optional 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_at | Workspace audit trail for employee, seat, academy, job, export, and settings changes. |
| use | table | required 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. |
- 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.
| actor | surface | capability | description |
|---|---|---|---|
| company_admin/company_member | Company workspace | CompanyWorkspaceView | View private company dashboard, account status, seats, assigned courses, submitted jobs, and reporting. |
| company_admin | Company workspace | CompanyUpdateProfile | Update private company workspace metadata, logo/banner for careers, website, HQ, and primary contact. |
| company_admin | Company workspace | CompanyInviteEmployee | Invite employee by email, assign role, optionally reserve/assign academy seat. |
| company_admin | Company workspace | CompanyRemoveEmployee | Remove employee access, revoke active seat, preserve audit history. |
| company_admin | Company workspace | CompanyAssignAcademy | Assign eligible course/path/certification to employee or cohort. |
| company_admin | Company workspace | CompanyViewLearningProgress | View aggregate and employee-level progress allowed by policy. |
| company_admin | Company workspace | CompanyCreateJob | Create a job submission for B2BEA admin review. |
| company_admin | Company workspace | CompanyManageJobs | View submitted/published/expired/returned jobs and make updates through review workflow. |
| company_admin | Company workspace | CompanyViewAnalytics | View own-company learning, jobs, and engagement analytics. |
| company_admin | Company workspace | CompanyExportAnalytics | Export bounded own-company reports. |
| b2bea_admin | B2BEA admin | AdminReviewCompanyJob | Review, approve, reject, publish, unpublish, or request changes to company-created jobs. |
2026-05-07T00:32:06.121Z
- 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.
30
Jobs support organization_id, company_name, source, status, published_at, expires_at. Existing statuses do not include review/submitted.
exists_populated
6733
People has organization_id and profile/careers fields; still must replace legacy persons references.
exists_populated
9
Course access exists but needs entitlement normalization before company assignment.
exists_populated
1
Supports held_by_person_id or held_by_org_id and seat_count. Only one active person-held Pro membership observed.
exists_partial
8
Global person roles exist; no company-specific role scope beyond organization_members.role.
exists_partial
60
Supports name, slug, type, website, location, status, primary contact, careers extension fields.
exists_populated
0
Supports membership_id, assigned_person_id, assigned_at, removed_at. No active seat assignments observed.
exists_empty
4
Participation exists, but no company assignment/source fields observed.
exists_partial
0
Supports org-person role admin/member plus joined/removed timestamps; currently unused live.
exists_empty
| surface | requirements |
|---|---|
| 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 |
- 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.