MeridianDocsSign in
Configuration

Employee experience

How employees join, train, accept policies and set up their laptop in meridian, guided by the agent, and how everything they do becomes evidence for the CISO.

syoshida has two sides that share one programme:

  • CISO side (roles owner, admin, member): runs the compliance programme.
  • Employee side (new role employee): everyone else in the company. Employees do the small set of things certification needs from each person, guided by the agent, and everything they do becomes evidence on the CISO side automatically.

Existing pieces we extend, not replace: invites (invites table already carries courses and policies), /invite/[token] page, training courses in content/training/*.json with training_progress, policy acknowledgement, my-work, the agent (backend/agent), Shadow invites (/api/shadow/invites), Shadow MDM device posture (/api/shadow/mdm/devices/{id}).

Principles

  1. Only what this person must do. An employee never sees registers, frameworks, settings, other people, or evidence. The backend enforces this, not just the menu.
  2. Driven by the frameworks the CISO enabled. Assignments (trainings, policies, device rules, screening) are computed from enabled frameworks plus the person's attributes (department, role tags such as engineering, handles_card_data, uses_ai).
  3. Agent-guided, like the CISO. The employee home is a conversation plus a checklist. The agent knows the person's open items and walks them through each one, including installing Shadow with the right command for their OS.
  4. Learn, then prove. Each training is short lessons (embedded video or slides, then a short text) followed by an assessment with a pass mark. Completion records score, time, course version and answers, and issues a certificate.
  5. Everything is evidence. Every completion, acknowledgement, upload, device enrolment and attestation is stored once, shows up live on the CISO People page and Training register, writes a ledger entry, links to the controls it satisfies, and ticks roadmap tasks.
  6. Privacy. Employees' CVs and screening documents are personal data: visible only to the person and owners/admins, never to auditors (auditors see that screening was done, with date and method, not the document), never sent to an LLM, and deletable on offboarding.

Roles

employee is new. Existing member keeps today's behaviour (programme team). require_operator() must refuse employees; add is_employee() and an EmployeeOrSelf style check for the /me/* routes. Every existing route that is not listed below as employee-allowed returns 403 for employee.

Employee-allowed routes: /me, /me/* (below), /auth/*, /policies/{id} (only policies assigned to them, read), /policies/{id}/acknowledge, /training, /training/{key}, /training/{key}/*, /agent/* (employee mode), /uploads (only for their profile docs), /files/brand/*, /workspace/brand (read brand only).

Assignment engine (backend, deterministic)

Inputs: enabled frameworks, workspace profile (mdm, ai_role, industry), person attributes (department, tags[], start_date), content catalogue.

Each course and requirement declares frameworks it serves and optional audience tags. Assign when any enabled framework matches and the audience matches (empty audience = all).

Item kindSourceDueRenewal
trainingcontent/training/*.json with matching frameworksstart + 14 days (existing staff: assignment + 30 days)course renew_days (default 365)
policypolicies flagged employee_ack: true (acceptable use, information security, AI acceptable use, remote working/mobile device, data protection, code of conduct) and publishedstart + 7 dayson new policy version
devicealways when Shadow is in use: install Shadow and enrol; when Shadow MDM is on: fix failing posture checks on own devicesstart + 7 dayscontinuous
profilejob title, department, manager, start date, CV/resume upload (optional unless CISO requires)start + 7 days–
screeningwhen ISO 27001 (A.6.1), SOC 2 (CC1.4), PCI DSS (12.7) or HIPAA is enabled: consent + upload of background-check result, or CISO marks verifiedstart + 30 days–
ndawhen ISO 27001 (A.6.6): accept the confidentiality agreement (a policy with kind: agreement)start + 7 days–

The CISO can add/remove assignments per person or per department and change due dates.

Status per item: todo, in_progress, done, overdue, waived (CISO, with reason). Compliance score per person = done ÷ (assigned − waived), and per company.

Training content format (content/training/<key>.json)

Backwards compatible with today's files. New optional fields:

json
{
  "key": "ai-security-essentials",
  "version": 1,
  "title": "AI security essentials",
  "summary": "…",
  "minutes": 20,
  "frameworks": ["iso42001-2023", "eu_ai_act", "iso27001-2022"],
  "audience": [],
  "renew_days": 365,
  "pass_mark": 80,
  "satisfies": ["iso42001-2023:7.3", "iso42001-2023:A.4.6", "iso27001-2022:A.6.3"],
  "sources": [{"title": "…", "publisher": "…", "url": "…", "license": "OGL v3.0 | CC BY 4.0 | Public domain (US Gov) | YouTube standard embed"}],
  "lessons": [
    {
      "title": "…",
      "media": [
        {"kind": "youtube", "id": "<11-char id>", "title": "…", "publisher": "…", "start": 0, "end": null, "minutes": 4},
        {"kind": "slides", "slides": [{"title": "…", "body_md": "…"}]}
      ],
      "body_md": "…",
      "quiz": [{"q": "…", "options": ["…"], "answer": 1, "explain": "…"}]
    }
  ],
  "assessment": [{"q": "…", "options": ["…"], "answer": 2, "explain": "…"}]
}
  • media.kind: youtube (embedded via youtube-nocookie.com), video (direct MP4/WebM URL from an openly licensed source), slides (our own slide deck rendered in-app).
  • Lesson quizzes are formative (instant feedback, not scored). assessment is the scored final test: shuffled questions and options, pass mark pass_mark, unlimited retries, best score kept, every attempt stored.
  • A lesson counts as watched when the video was played to ≥ 80 % (YouTube IFrame API) or the slides were all viewed; employees can still skip ahead, but completion records it.

Data model (new tables; additive migrations)

  • people_profiles(user_id PK, job_title, department, manager_id, start_date, location, tags JSON, phone, updated_at)
  • people_documents(id, user_id, kind ['cv','screening','certificate','id_check','other'], file_id, name, uploaded_at, verified_by, verified_at, note) — files stored with the existing upload store; access: owner of the doc + owner/admin.
  • screening(user_id PK, status ['not_started','consented','in_progress','passed','failed','waived'], method, provider, completed_at, verified_by, consent_at, note)
  • assignments(id, user_id, kind, ref, due_at, status, assigned_by ['engine'|user id], waived_reason, completed_at, created_at, UNIQUE(user_id, kind, ref))
  • training_attempts(id, user_id, course_key, course_version, score, passed, answers JSON, started_at, finished_at)
  • training_progress gains watched JSON (lesson indices watched), best_score, course_version, certificate_id.
  • certificates(id, user_id, course_key, course_version, score, issued_at, expires_at, hash) — the hash is a ledger entry.
  • invites gains kind ['team','employee'], department, tags, message, start_date, bulk_id.
  • nudges(id, user_id, kind, ref, sent_at, by) for CISO reminders.

API (all JSON; /api prefix)

Employee (self):

MethodPathNotes
GET/me/home{person, score: {done, total, pct}, due_soon: [...], items: [assignment...], device: {...}, next: assignment}
GET/me/assignmentslist with kind, ref, title, due_at, status, href, minutes
GET/PATCH/me/profileprofile fields (employee can edit job_title, department, location, phone; manager/start_date editable by admin only unless empty)
GET/POST/me/documentsupload CV etc. (multipart via /uploads then POST {file_id, kind}); DELETE /me/documents/{id}
GET/POST/me/screeningread status; POST {action:"consent"} or {action:"upload", file_id, provider, completed_at}
GET/me/device{os_hint, shadow: {enrolled, devices:[{hostname, os, last_seen, posture_summary}]}, install: {macos, windows, linux: command strings with the person's personal join link}, hardening: [{rule_id, title, status, steps_md per OS}]} — install link created on demand via existing Shadow invite flow, bound to this person
POST/training/{key}/watched{lesson}
POST/training/{key}/attempt{answers: [index...]} → {score, passed, results:[{correct, explain}], certificate?}
GET/me/certificates, /me/certificates/{id}certificate JSON (frontend renders printable page)

CISO (owner/admin/member; auditors read-only where marked R):

MethodPathNotes
POST/people/invite{people:[{email, name, department?, tags?, start_date?}], message?} (bulk, up to 500) → invite links; also accepts CSV text {csv}
GET (R)/peopleeach person: role, profile, score, items by kind with status, device enrolled/posture, screening status (no documents for auditors), last activity
GET (R)/people/{id}full detail incl. attempts, certificates, acknowledgements; documents only for owner/admin
PATCH/people/{id}profile fields, tags, department
POST/people/{id}/assignmentsadd {kind, ref, due_at}; PATCH /assignments/{id} {due_at?, status:"waived", reason}
POST/people/{id}/nudge{kind?} records a reminder (email when mail is configured; otherwise an inbox notification)
POST/people/{id}/screening{status, method, provider, completed_at, note} (admin)
GET (R)/training/registerper course × person: status, best score, completed_at, version, certificate id; ?format=csv
GET (R)/people/summarycompany score, overdue counts by kind, completion % per course, per department
GET/PUT/people/settings{require_cv, screening_required, default_due_days, renew_days_override, reminders: {enabled, every_days}}

Evidence: on any change the server rebuilds per-control evidence rows (same mechanism as other evidence: evidence.requirement_refs) and a daily signed snapshot file in the evidence room: "Training register", "Policy acknowledgements", "Screening register", "Endpoint enrolment". Controls: ISO 27001 7.3, A.6.1, A.6.2, A.6.3, A.6.6, A.5.10, A.8.1; ISO 42001 7.2, 7.3, A.4.6; SOC 2 CC1.4, CC2.2; PCI DSS 12.6, 12.7; HIPAA 164.308(a)(5). Roadmap tasks linked to these refs complete when coverage is 100 % of active employees (excluding waived).

Agent: employee mode

Same chat UI and blocks as the CISO agent, different prompt and tools, and it must also work with the offline guide (no LLM configured) used in tests.

  • Prompt: friendly, short, second person; knows the person's name, role, due items, OS hint; never discusses other people or company-internal compliance data; never asks for passwords.
  • Tools (employee scope only): my_tasks, start_training {key} (returns a card linking to the player), explain_policy {id} (summary of a policy assigned to them), install_shadow {os} (returns command card with copy button and a "check" action), check_my_device, my_device_fixes {rule_id, os} (step-by-step hardening instructions), update_profile {fields}, record_screening_consent, report_concern {text} (creates an incident/concern).
  • Offline guide: a scripted flow — welcome → profile → policies → install Shadow (detect OS from the browser user agent passed by the frontend) → trainings → device fixes → done.

Employee UI

Routes (Next.js frontend/app/app/..., shell shows only these for employee):

  • /app → Home: greeting, a progress ring (score), "Next up" card, checklist grouped as Learn (trainings), Read & accept (policies, NDA), Your laptop (install, fixes), About you (profile, CV, screening), with due dates and overdue badges; the agent panel docked on the right (bottom sheet on phones) starts with the next step.
  • /app/learn and /app/learn/[key] → training list and player: lesson rail on the left, video/slide stage, short text, formative quiz; final assessment screen with progress, then a result screen (score, explanations for wrong answers, retry) and certificate.
  • /app/learn/[key]/certificate/[id] → printable certificate (company brand, name, course, version, score, date, verification hash).
  • /app/read → policies to accept: reader with scroll progress and "I have read and accept".
  • /app/device → install Shadow with OS tabs (auto-selected), copy command, live "waiting for your laptop…" check, then posture checklist with fix steps.
  • /app/me → profile form, documents (CV/resume, screening certificate) with drag-and-drop upload, screening consent, certificates list.
  • /invite/[token] → redesigned branded invite page: company logo and accent, who invited, optional message, "What you'll do" (≈ N minutes, items preview), name + password, accept terms; then lands on Home with the agent's welcome.

CISO UI changes

  • People (/app/people): invite employees (single, bulk paste, CSV), filters (department, status, overdue), per-person row with score bar and chips per kind, person drawer with everything above, nudge, waive, mark screening verified, view CV (admin).
  • Training (/app/training): becomes the Training register for the CISO: courses with completion %, pass rates, overdue, per-person table, CSV export, preview course as employee.
  • Settings → People: require CV, screening required, default due days, reminders.
  • Dashboard card "Workforce compliance" with the company score and top overdue items.
  • Auditor view: People (no documents), Training register, certificates verify.

Changes from v1 contract

Implemented in backend/server/src/people/ (+ routes/people.rs), backend/core/src/workforce.rs (the pure planner) and backend/agent/src/employee.rs. Everything below is additive.

Routes and roles

  • The agent's routes are the existing /threads* (not /agent/*). POST /threads/{id}/messages takes an optional "os": "macos"|"windows"|"linux" (else the User-Agent is used). Employees can only answer choice cards in their own threads; attachments are refused.
  • Also allowed for employees: GET /inbox, POST /inbox/read (reminders arrive there), GET /workspace/brand → {name, brand}. GET /me returns workspace: {id, name, slug, brand, onboarded} for employees (no company profile).
  • Writes on the CISO side (PATCH /people/{id}, assignments, nudge) need owner/admin/member; POST /people/invite, POST /people/{id}/screening, PUT /people/settings need owner/admin. PATCH /members/{id} accepts role: "employee".

Assignments — shape everywhere (/me/assignments, /me/home.items, /people/{id}.items): {id, user_id, kind, ref, title, minutes, href, group: "learn"|"read"|"laptop"|"about", due_at: "YYYY-MM-DD", status: "todo"|"in_progress"|"done"|"overdue"|"waived", stored_status, overdue: bool, assigned_by: "engine"|<user id>, waived_reason, completed_at, created_at}. ref: training → course key; policy/nda → policy id; device → shadow_install | posture; profile → details | cv; screening → background_check. A done training's due_at is its renewal date. Policies are employee-acknowledged when doc_meta.employee_ack / front-matter employee_ack says so, else by key (acceptable use, information security, AI acceptable use, mobile device/remote working, data protection, code of conduct, agreements); kind: agreement (or a confidentiality/NDA key) becomes an nda item when ISO 27001 is on. /people/settings gains device_required (default true): Shadow install is assigned while true.

  • /me/home: {person: {id, name, email, role, color, first_name, profile}, workspace: {name, brand}, score: {done, total, pct}, due_soon, items, device: {enrolled, posture_ok, devices, failing_checks, checked_at}, next}.
  • POST /people/{id}/assignments {kind, ref, due_at?} (default today + 14). PATCH /assignments/{id} {due_at?, status?: "waived" (reason required) | "todo" (un-waive), remove?: true} (remove only for manual items).

Documents and screening

  • Upload: POST /uploads {name, size, purpose: "profile"} (≤ 25 MB), chunks with PUT /uploads/{id}?offset=; it ends status: "stored" (never imported or read). Then POST /me/documents {file_id, kind, name?}, or multipart (kind, file) straight to /me/documents. GET /me/documents/{id} downloads; admins: GET /people/{id}/documents/{doc}. Document: {id, user_id, kind, name, size, uploaded_at, verified_by, verified_at, note}.
  • GET /me/screening → {status, method, provider, completed_at, verified_by, consent_at, note, updated_at, documents, required}. upload sets in_progress; an admin's passed/failed/ waived completes it (and marks screening documents verified).

Training

  • GET /training/{key} adds version, frameworks, audience, renew_days, pass_mark, sources, has_final_assessment, assessment: [{index, q, options}] (no answers); progress adds watched, best_score, certificate_id, attempts, course_version. v1 courses (no assessment) score their lesson quizzes, whose answers are hidden from employees. GET /training items add version, frameworks, audience, pass_mark, status, due_at.
  • POST /training/{key}/attempt {answers: [index…] in course order, started_at?} → {attempt_id, score, passed, pass_mark, correct, total, results: [{correct, explain}], best_score, course_version, certificate}. Employees can no longer complete a scored course or set a score through /progress.
  • Certificate: {id, user_id, person: {id, name}, course_key, course_title, course_version, score, pass_mark, issued_at, expires_at, valid, hash, ledger_seq, verified, satisfies, workspace: {name, brand}}. GET /certificates/{id} verifies any certificate (programme team and auditors).

Device — GET /me/device[?os=] → {os_hint, available, mdm, shadow: {enrolled, devices: [{id, hostname, os, last_seen, online, posture_summary: {id, pass, fail, unknown}|null}], checked_at, posture_ok}, install: {macos, linux, windows, join_url, expires_at}|null, hardening: [{rule_id, title, status, mode, devices: [{id, hostname, status, detail}], steps_md: {macos, windows, linux}, steps_for_os?}], message?, error?}. Without a Hub: available: false, install: null.

CISO

  • POST /people/invite → {bulk_id, created, skipped, invites: [{id, email, name, department, tags, start_date, link} | {email, existing: true} | {email, error}]}; CSV columns email,name, department,tags,start_date (header optional, tags split by ;/|). GET /invites/token/{t} adds {kind, name, department, tags, message, start_date, inviter: {name, color}, preview: {items, minutes, by_kind, list: [{kind, title, minutes}]}}.
  • GET /people[?role=&department=] → array of {id, name, email, role, color, status: "active", profile, score, items_by_kind: {<kind>: {total, done, overdue, waived, status}}, overdue, items, device, screening: {status, method, completed_at}, last_activity, joined_at} plus pending invites as {id, email, name, role: "employee", status: "invited", profile, invited_at, link?}. GET /people/{id} adds attempts, certificates, acknowledgements, nudges, device.hardening, full screening, and documents (owner/admin only, with download).
  • GET /training/register → {courses: [{key, title, version, minutes, pass_mark, frameworks, audience, assigned, done, overdue, pct, pass_rate}], rows: [{course_key, course_title, course_version, person: {id, name, email, department}, status, best_score, attempts, completed_at, version, certificate_id, expires_at, due_at}]}; ?format=csv downloads.
  • GET /people/summary → {company: {score, employees, invited}, overdue_by_kind, overdue_total, courses: [{key, title, assigned, done, overdue, pct}], departments: [{department, people, score}], coverage: {<register>: {done, open, pct}}, top_overdue: [{person, kind, ref, title, due_at}]}.
  • POST /people/{id}/nudge → {id, channel: "inbox", open}. This server has no mail sender, so reminders are inbox notifications (ledger people.nudge addressed to the person); overdue employees are reminded automatically every reminders.every_days.
  • POST /people/snapshot (admin) files today's signed register snapshots now.

Evidence — live rows evd_people_{training,policy_acknowledgements,screening,endpoint_enrolment} titled "<Register> (live)", daily "<Register> · YYYY-MM-DD" JSON snapshots whose SHA-256 is written to the ledger; requirement_refs are "<framework short> <ref>" (e.g. ISO 27001 A.6.3) for enabled frameworks. Roadmap tasks complete at 100 % coverage: training tasks for their course; evidence/review tasks whose every ref is covered.

Data model additions — people_documents(path, size, sha256), screening.updated_at, assignments.cycle, certificates.ledger_seq, nudges.channel, invites.name, uploads.purpose; tables people_settings, people_devices, shadow_join_links (sealed).

Employee agent cards (all carry id, kind, and usually title, href): employee_tasks {score, items}, training {key, title, summary, minutes, lessons, pass_mark, progress}, policy {policy: {id, key, title, status, version, excerpt, acknowledged}, action: "acknowledge"}, install {os, available, commands: {macos, linux, windows, join_url, expires_at}, enrolled, message, check: "check_my_device"}, device_status {enrolled, devices, failing, available}, device_fixes {os, rules: [{rule_id, title, status, steps_md}]}, profile {facts, editable}, screening {status}, concern {ref}, and choice (screening consent, options consent/later, meta.employee_action: "screening_consent").