Modules / People
People, starters & leavers
Who works here, on what terms and since when, and the admin of bringing a new employee or freelancer in and taking them out again. That covers their details, the contract, accounts and access, first-week plans, everyone's tasks, and access removed at the right time. The history is kept, so nothing is ever overwritten.
People ask for it as: “onboarding and offboarding”, “bring a new employee or freelancer into the business”, “collect their details and trigger an onboarding checklist”, “remove access at the right time”, “who works here”, “starters and leavers”, “a new starter on Monday”, “handover when someone leaves”
Who uses it
| Role | Does | Sees |
|---|---|---|
| Operations / HR | runs every starter and leaver, keeps the org, playbooks and catalogues, handles personal data and privacy requests | everything, including sensitive data |
| Hiring manager / team lead | asks for a starter, approves the welcome email, records a leaver, takes over their work, moves a start or last day | the people in their line (derived from the org tree) and their runs and pay, never sensitive data |
| IT / ops | does the account and access steps by hand until a connector is wired, approves account deletion, retries failed actions | people with an open IT step, and the runs and action log for them, never sensitive data or pay |
| Finance | payroll hand-off for employees, supplier set-up for freelancers, bank and tax details | every person, their pay and their sensitive data |
| Anyone a step is assigned to (a buddy, a takeover, a director) | sees and completes the steps of the responsible groups they belong to | only their own steps, and the person's name and start date on them |
| The person themselves, once they can sign in | sees their own record, their own engagement and documents, and their first-week plan | only themselves, and not their own sensitive data (that goes through HR, customer_varies) |
| The starter, before they have a sign-in | fills in their own details and uploads right-to-work evidence through a link | one intake form, bound to their engagement, through the public-link door. It never echoes back stored sensitive values |
| The clock (a service client, or the always-on worker) | calls run_due_steps(now). ONE clock worker (the clock service client) calls every brick's tick route, listed in the composition | nothing through people's doors; the tick runs as the brick's service identity |
| Expenses (a service client) | asks who a person is on a date, their employment and their derived manager, to fix an approval chain | the employment slice and the derived manager on a date; no pay, no sensitive data |
| Point of sale (a service client) | asks whether a person is employed on a date (staff discount, till login) | the employment slice on a date; no pay, no sensitive data |
| Time off (a service client, v3) | asks whether a person is employed, their work pattern and holidays, and their derived manager, to cost and route a request | the employment slice, the work pattern and the derived manager; no pay, no sensitive data |
| Timesheets (a service client, v3) | asks a person's employment, expected hours and manager, to build and route a week | the employment slice, the work pattern and the derived manager; no pay, no sensitive data |
| Payroll (a service client, v3) | produces and reads the payroll extract, marks it sent when a run is approved, reads the identity HMRC needs and the work pattern for proration | the extract, the employment slice, the work pattern and the payroll identity (audited); never bank details |
| Payments (a service client) | reads one person's bank account on the payment date to pay an approved expense report | one bank slice of person_sensitive per call, every read audited; nothing else of the sensitive aggregate |
| The system | expands runs, times steps, calls capabilities, syncs the business partner, drafts, chases, applies retention | everything, through its own service account |
What it has to do
Reference user stories. Each has a test written into it — the given / when / then — which becomes an automated check once it is built. Expect to keep some, change some and drop some.
Things people do
HR-01As a manager, I want to ask for a starter with one form, so that the onboarding starts without me chasing HR.
Given the form: legal name, preferred name, personal email, worker type (employee / freelancer sole trader / freelancer via a company / intern…), job, org unit, start date, and for a freelancer a day rate or a fixed fee (and the company, when via a company) · when I submit it (record_hire, a Hired event) · then there is one person (person_id derived from the staff number, or from the normalised personal email) with its business partner created AT HIRE (kind person, name and work contact only, HR-50), one engagement, one assignment slice from the start date, a pay slice if a rate was given, and one onboarding run from the playbook for that worker type × event type × org unit, which Operations sees. Submitting twice gives the same person, engagement and run. A start date in the past beyond the setting is refused ("start dates more than 30 days back are corrections, ask HR"). A second open engagement for the same person is refused, naming the one that is open. A company freelancer with no company is refused.
Hiring manager / team lead · screen: New starter · reference: not built
HR-02As a starter, I want to fill in my own details from a link, so that nobody re-types my bank details from an email.
Given an intake link sent to my personal email, valid for the configured days, asking for the fields for my worker type and country · when I fill in address, emergency contact, bank details (employee) or company and VAT details (freelancer), NI number, and upload my right-to-work document · then the values go to the Sensitive aggregate and the upload to a DataK3 object filed as a sensitive document; the form shows which fields are still missing and never shows a stored sensitive value back; the link works for this engagement only, expires, can be reissued (the old one stops working), and every use is audited by the door. The manager sees "details: 5 of 6 done", never the values.
The starter, before they have a sign-in · screen: Your details · reference: not built
HR-03As anyone with steps to do (IT, finance, a buddy, a manager), I want my steps as overdue, today and this week, so that I start the day knowing what is late.
Given steps assigned to the responsible groups I belong to · when I open My tasks and complete one · then I see counts and lists by overdue / today / this week (derived on read through the tracked-work library); completing a step records who and when and makes the steps that depend on it due; a step of another group is not found. A manual task (an action with no provider) shows the capability, the exact input and the plan in words, and asks for the provider_ref (optional) when I mark it done.
Anyone a step is assigned to (a buddy, a takeover, a director) · screen: My tasks · reference: not built
HR-04As Operations, I want one view of every run, so that I see what is done, what is stuck and who it is waiting on.
Given runs at different stages · when I open the run board · then each run shows the person, direction, start or last day, steps done of total, the next due step, "waiting on <group>" and what is stuck (overdue, failed, waiting for approval or signature), all derived on read; filters by direction, org unit, worker type
Operations / HR · screen: Runs · reference: not built
HR-05As a manager, I want an AI-drafted welcome email I can edit and approve, so that the starter gets a warm, specific welcome without me writing it from scratch.
Given a draft step whose draft was made from the job, org unit, buddy (a run party), start date and first project brief (no sensitive field) · when I edit and approve it (approve_draft) · then the approved text becomes the input of the dependent mail.send step (from my work mailbox, to the starter's personal email). With no mail provider, that step is a manual task carrying the exact message, and I copy and send it and mark it sent. A failed draft is a manual task "write the welcome email" and never blocks the run.
Hiring manager / team lead · screen: Run · reference: not built
HR-06As a manager, I want to record a leaver with their last day and reason, so that offboarding is planned backwards from that day.
Given a person with an active engagement in my line · when I record the leave (record_leave, a Left event) with last day and a reason from the list · then actual_end is set, the assignment and pay are delimited at last day + 1, and one offboarding run starts from the playbook for that worker type × reason (a freelancer's has no payroll steps). A draft step produces the handover list from what hr knows they look after (their open steps, people in their line via a chief position, org units they lead, the groups and spaces of their unit), and I edit it. Each item becomes a task for the takeover group (a run party I name). With the UK pack, a last day giving less than the statutory minimum notice is warned, not refused (the contract may say more, and the employee may waive).
Hiring manager / team lead · screen: Record a leaver · reference: not built
HR-07As the approver for a destructive step, I want to approve or refuse it explicitly, so that an account is never deleted by a timer.
Given an identity.delete_user step due at last_day + 30 days behind an approval step · when I approve it (approve_step), or refuse it with a reason · then approved: the delete step runs when due, and only after drive.transfer_status says completed; refused: the delete step is cancelled with my reason; nobody without hr:step:approve can approve; the approval is in the run log with who and when
IT / ops · screen: Run · reference: not built
HR-08As a manager, I want to move a start date or a last day, so that the plan follows reality without rebuilding it.
Given an onboarding run with 3 steps done and 9 not done, start date Monday 3rd · when I move the start date to Monday 10th (move_event_date) · then the 9 not-done steps get a new due_at from their timing rules (working days and the org's timezone respected); the 3 done steps keep their due_at and result; the run log says who moved it, from what to what, and when; the engagement and the assignment slice move with it. A contract extension (ContractExtended) re-times an open offboarding run the same way.
Hiring manager / team lead · screen: Run · reference: not built
HR-09As IT, I want to read every action's request, result and actor, so that I can answer "what did the system do to this account".
Given action steps that ran automatically, failed, or were done by hand as manual tasks · when I open the action log for a person or a run · then each attempt shows the capability, the input (secrets redacted), the result status, the provider_ref, the message, who or what acted and when. The automatic attempts come from the provider's log (capabilities rule 5) through the seam. Manual ones come from hr's own step record. Another person's log, for someone with no IT step, is not found.
IT / ops · screen: Action log · reference: not built
HR-10As Operations, I want to preview a run before it fires, so that I see every step, its date and every payload before going live.
Given a hire about to be recorded, or an existing run · when I preview it (preview_run, dry_run=true) · then I get every step with its computed due_at, responsible group, and for each action the exact capability input and the provider's plan (or "manual: no provider" and the plan in words). Nothing is written, claimed or sent. A go-live shadow is a dry run beside one real starter.
Operations / HR · screen: Run · reference: not built
HR-11As Operations, I want to keep our checklists as playbooks, so that a new step never needs a developer.
Given the employee onboarding playbook, version 3, used by two open runs · when I add a step "buddy coffee, start_date +1 working day 10:00, group buddy" and save · then version 4 is created and new runs use it; the two open runs keep version 3. Saving a destructive action with no approval before it is refused in words. So is a delete with no transfer before it, or a dependency cycle.
Operations / HR · screen: Playbooks · reference: not built
HR-12As Operations, I want to keep the org (units, chief positions, jobs, locations, schedules, and which groups and spaces each unit has), so that managers, access and reports follow it.
Given Studio under Operations, with a chief position held by the Studio lead · when I move Studio under Campaigns from the 1st of next month · then a new Studio slice from that date delimits the old one; until then the old tree is current; the derived manager changes on that date for everyone in Studio without touching their records; a move that would make a cycle is refused; a second chief for one unit on one date is refused
Operations / HR · screen: Org · reference: not built
HR-13As finance or HR, I want to read and correct a person's sensitive data, so that pay goes to the right account and nobody else sees it.
Given a person whose bank details were entered at intake · when I open their sensitive data, and correct the sort code · then I see the current values per kind; the correction is a new slice (valid_from today, or a correction of the same date) and the old one is kept; a manager or IT user asking for the same route gets 404 (the route exists, the record does not, for them), through the API and through MCP alike
Finance · screen: Sensitive data · reference: not built
HR-14As HR, I want to record pay and pay components with effective dates, so that a raise next month is entered today and history is never overwritten.
Given a salaried employee on 42,000.0000 GBP per year since 1 March · when I record a PayChanged event with reason "annual review", 45,000.0000 from 1 April · then a pay slice from 1 April delimits the March slice at 31 March; the reason is required; a component (car allowance) is its own sliced row; a rate basis of hour/day/month/year/fixed comes from the rows and is never converted at write time; no derived hourly rate is stored for a salaried person
Operations / HR · screen: Person · reference: not built
HR-15As HR, I want to rehire someone who has worked here before, so that their history is kept and offboarding never fires by mistake.
Given a freelancer whose engagement 1 ended last year · when I record a Rehired event · then the same person gets engagement 2; one onboarding run from the rehire playbook starts; no offboarding run is created by anything in the rehire; their old engagement, documents and events stay readable
Operations / HR · screen: Person · reference: not built
HR-16As HR, I want to convert a freelancer to an employee in one step, so that they don't lose access between two contracts.
Given a freelancer on engagement 1 with an account and team access · when I record a Converted event effective 1 December · then engagement 1 ends 30 November (reason converted), engagement 2 (employee) starts 1 December, as one event in one transaction; ONE conversion run starts (employment contract, payroll set-up, business-partner roles worker → employee, and supplier removed when they were a sole trader); no offboarding or access-removal step runs
Operations / HR · screen: Person · reference: not built
HR-17As a manager, I want to record a transfer to another team or job, so that their access changes on the day and the history shows both.
Given a Designer in Studio · when I record a Transferred event to Campaigns, Campaign Producer, from the 15th · then a new assignment slice from the 15th delimits the Studio one; a change run is created with the access delta from the unit access rows (add the new unit's groups and spaces, remove the old ones) timed on the event date; a transfer into a unit outside my line is refused unless I hold the destination's chief position too
Hiring manager / team lead · screen: Person · reference: not built
HR-18As Operations, I want starters, leavers, headcount and FTE by team and worker type over time, so that I can answer "how many people do we have" for any date.
Given slices covering this year · when I open the report for this month, by org unit and worker type · then starters (engagements starting in the period), leavers (actual_end in the period), headcount and FTE at the period end, all derived from slices on read (no snapshot table); a past month gives the answer as the org was then, not as it is now; a manager sees their own line only
Operations / HR · screen: Reports · reference: not built
HR-19As finance, I want a payroll extract per legal entity and period, so that the payroll provider gets every change once and I re-key nothing.
Given November, with two starters, one leaver, a pay change and a bank change at the legal entity GH-UK · when I produce the extract and mark it sent · then the batch lists every pay and component slice touching the period with its proration dates, starters and leavers, and bank changes; freelancer engagements (paid as suppliers) are never in it; once sent the batch is frozen, and a later change to November lands in the next open batch as a retro line, so no row goes out twice
Finance · screen: Payroll extract · reference: not built
HR-20As HR, I want documents filed on the person with a type, an expiry and an access class, so that the right-to-work copy and the signed contract are where they belong.
Given a right-to-work document uploaded at intake, and a signed employment contract from contracts · when I open the person's documents · then the contract is a pay-bearing document (readable with hr:pay:read); the right-to-work copy is sensitive (filed in the Sensitive aggregate, readable with hr:sensitive:read only); downloads are streamed by the use case, never an object link; each has its DataK3 object key, sha256, uploaded by and when, and an expiry where the type has one. A time-limited right to work expiring within the configured days shows on the board and creates a follow-up check step (the UK pack).
Operations / HR · screen: Person · reference: not built
HR-21As HR, I want to produce everything we hold on a person, so that a subject-access request is answered on time.
Given a subject-access request from a former freelancer, recorded with its received date · when I export it (export_subject_access) · then one archive (a DataK3 object) with the person, every slice including superseded ones, events, documents, sensitive data, run steps naming them, and their business-partner fields. The request shows its due date (one month from receipt, UK GDPR Art. 12(3)), and the export is logged with who and when.
Operations / HR · screen: Privacy · reference: not built
HR-22As HR, I want to handle an erasure request, so that we delete what we may and can say why we keep the rest.
Given an erasure request from a leaver of three years ago · when I apply it · then each data category is erased or anonymised unless a retention rule with a legal-obligation basis still holds it, in which case it is kept and the reason is recorded; the business partner's person fields are anonymised through the bp seam; everything done is in the retention log
Operations / HR · screen: Privacy · reference: not built
HR-23As HR, I want to cancel a run when a starter withdraws, so that nothing more fires and what already happened is undone deliberately.
Given an onboarding run where the account was created and a group added · when I cancel it with a reason · then every not-done step is cancelled; for each done action a reversal task is created (suspend the account, remove from the group), named after the capability. Nothing is reversed silently. The cancellation is in the run log.
Operations / HR · screen: Run · reference: not built
HR-24As an employee, I want to see my own record and my first week, so that I know what is planned and what HR holds.
Given I have signed in (pool_user_sub on my person) · when I open My record · then I see my person detail, engagement, assignment, documents of the personnel class and my first-week steps; anybody else's record is not found
The person themselves, once they can sign in · screen: My record · reference: not built
HR-25As HR, I want to invite a person to sign in, so that they can see their record and their tasks.
Given a person with a work email and no pool_user_sub · when I invite them (invite_to_sign_in) · then an action step calls the capability identity.invite_app_user (proposed; a future appid provider brick provides it) with the work email and the pool; its output sub is stored on hr_person.pool_user_sub; inviting twice reuses the same user (idempotency_key invite:<person_id>). With no provider it is a manual task (rule 8): an admin creates the pool user with the exact input shown and records the sub on completion. Until then they are a person with no login, which is normal.
Operations / HR · screen: Person · reference: not built — identity.invite_app_user is proposed, not yet in capabilities.yaml
HR-26As HR, I want to record the right-to-work check with its evidence, so that we can show the check was done before day one.
Given an employee starting Monday with right-to-work evidence uploaded at intake (UK pack) · when I record the check, giving its type (manual document check, check via an identity service provider, or Home Office online check), the date, who did it and any follow-up date · then a compliance record on the engagement points at the sensitive evidence; the playbook's "right to work checked" gate before day-one steps is met. A start date before the check date is flagged. The record says what was done, and the module makes no legal judgement.
Operations / HR · screen: Person · reference: not built
HR-27As HR, I want to record the IR35 status determination for a freelancer, so that the contract cannot go out before it is decided.
Given a freelancer via a limited company, at a client the customer has set as medium or large (UK pack) · when I record the determination (inside or outside, the reasons, the date, given to the worker and to whoever we contract with) · then a compliance record exists, and the contract step's condition is met. Without it the contract step stays blocked with "record the status determination first". The module records the determination and does not make it.
Operations / HR · screen: Person · reference: not built
HR-28As Operations, I want to keep the catalogues (worker types, event types and reasons, infogroups, jobs, rate bases, pay components, document types, retention rules, settings), so that our vocabulary is ours and not the software's.
Given the default catalogues from the UK pack · when I add a leave reason "end of project" to Left, and a worker type "intern" · then new events and hires can use them at once; a reason in use cannot be deleted, only retired; a worker type must say whether payroll applies and which business-partner roles it gives
Operations / HR · screen: Settings · reference: not built
HR-29As Operations, I want to see how our onboarding is actually going — how long runs take, where steps go late and how soon a starter can work — so that I fix the programme, not just the run in front of me.
Given onboarding runs over time, some done and some open, from one or more versions of the playbooks · when I open the onboarding monitor (onboarding_monitor, GET /reports/onboarding), optionally from a date · then I see the run lead time (median and longest, in days, from the run's creation to its last step done) and the age of the runs still open; the steps overdue now, counted by owner group and by team (the person's org unit); the days from the start date to the first access granted (an account made, a group or chat space joined; negative is before day one, which is the aim); and, per playbook version the runs used, how many runs used it and its deviations from the pack's standard by class. Every number is derived from the runs on read, nothing stored; every date is the business date in business_timezone. A manager sees the same numbers over the runs of their own line (the run board's rows). APQC 7.3.1.3 Monitor and update employee onboarding program (11243): monitor here, update through versioned playbooks (HR-11) and playbook_deviations.
Operations / HR · screen: Reports · reference: brick-hr 0.6 (unreleased): domain/monitoring.py, application/reports.onboarding_monitor; tests test_hr_29_*
HR-55As the owner of offboarding, I want to choose when a leaver loses their sign-in to this ERP — at the end of their last day, or as soon as they are recorded — with a different choice per leave reason, so that a dismissed person loses access at the meeting while someone who resigned keeps it to their last day.
Given the dated setting offboarding.revoke_access_at, default last_day_end (the last day at the business close, 17:30 in business_timezone, after the access-removal approval); the other value is immediate (as soon as the leaver is recorded and the access removal approved); I hold hr:offboarding:policy · when I set dismissal to immediate, then a dismissal and a resignation are recorded today · then the dismissal's revoke_erp_login step is due when the leaver is recorded and runs once the access-removal approval is given, months before the last day; the resignation's is due on the last day at 17:30. The setting is a new dated row each time, never an edit: from tomorrow by default, only the first row of a key and reason may start today, never earlier, and a different value for a day that has a row is refused (409). Every row — who, when, from which day, the note — is readable, and the one in force is the reason's own, else the default's, else last_day_end, on the business date the leaver is recorded. A run already made keeps its timing. Without hr:offboarding:policy the change is refused (403).
Operations / HR · screen: Settings · reference: brick-hr 0.6 (unreleased): POST/GET /dated-settings/{setting_key}, hr_setting_row; tests test_hr_55_*
Things that happen on their own
HR-30run_due_steps(now), called by the clock every minute or soThe system moves every run on. Steps that are due and whose dependencies are done get done, so nothing depends on someone remembering.
Given steps with due_at ≤ now, their depends_on done, state pending · when the tick runs · then each step is executed by kind (task: shown as due; action/document: a CapabilitySeam call with idempotency_key <run_id>|<step_no>; draft: the Models adapter; intake: the door issues the link; approval: waits for a person); a step claimed by a concurrent tick is skipped; running the tick twice acts once per step. It also applies due future-dated changes (HR-38) and chases (HR-36).
· reference: not built
HR-31at the account step's timing (typically start_date −3 working days 09:00, org timezone)The system sets the starter up in our tools (work account, team groups, chat spaces, shared folders), and does it automatically once a provider is wired.
Given an onboarding run past its contract-signed gate, the org unit's access rows (groups, spaces, folders) · when the steps fall due · then identity.provision_user, then one groups.add_member / chat.add_to_space / drive.create_folder step per access row; with a provider: done, and the work email is written back as a new person-detail slice and synced to the business partner. With no provider: each is a manual task with the exact input ("create anna.berg@… in OU /Staff/London") and the plan in words, and marking it done with the created address writes it back the same way. Wiring a provider later changes no playbook.
· reference: not built
HR-32at each calendar step's timingThe system puts the first week in the calendar (day-one welcome, IT set-up, buddy coffee, week-one review).
Given playbook calendar steps with titles, times (working-day offsets from start_date) and attendee groups · when they fall due · then calendar.create_event with the times resolved in the org's timezone; with no provider, a manual task with the times and attendees filled in
· reference: not built
HR-33when a draft step falls due, or when a manager asks for it earlyThe system drafts the welcome email, the handover list and the leaver letter with AI, so that the manager edits rather than writes.
Given a draft step with its draft instructions row and the allowed fields (job, unit, buddy, dates, first project; never a sensitive field) · when it runs · then a chat completion at https://api.dodil.io/v1 with the brick's service-account token (ignite.model-user) produces the draft, stored on the step, waiting for approval by its group; the model name is a settings row; on any failure or timeout the step becomes a manual task "write it by hand" and the run goes on; running it twice keeps the first draft unless the approver asks for a new one
· reference: not built
HR-34at last_day 17:30 (org timezone), or at the event date for a reason the playbook treats as immediateThe system removes access at the right time.
Given an offboarding run · when the removal steps fall due · then identity.suspend_user, drive.transfer_ownership to the derived manager on the last day, mail.set_autoreply, groups.remove_member and chat.remove_from_space per access row; with no provider each is a manual task due at exactly that time, which the board shows as a countdown
· reference: not built
HR-35at last_day +30 days 09:00, after its approvalThe system deletes the account and frees the licence only when it is safe.
Given an approved identity.delete_user step and a drive.transfer_ownership step done earlier · when it falls due · then it first asks drive.transfer_status; if not completed the step stays waiting (in_progress) and is asked again on the next tick; then identity.delete_user; without an approval it never runs; with no provider it is a manual task
· reference: not built
HR-36on every tickThe system handles every outcome of an action, so that a failure becomes work for a person instead of a silent gap.
Given action steps with results · when the result is in_progress / failed retryable / failed not retryable / connection_required, or the capability has no provider · then in_progress: asked again next tick, not counted as a failure; failed retryable: retried with backoff and after N attempts (a row) a manual task for IT with the provider's message in words; failed not retryable or connection_required: a manual task at once, naming what is missing; no provider: a manual task from the start (rule 8), with the same input and plan
· reference: not built
HR-37on every tick, per the chasing cadence rowsThe system chases what is late (an incomplete intake, an overdue task), so that Operations is not the reminder service.
Given an intake missing two fields for 2 working days, and a task overdue since yesterday · when the cadence says it is time · then a reminder through mail.send (or a manual task to send it) to the starter or to the task's group, at most once per cadence slot and up to the configured maximum; the chase is in the run log. Running twice in one slot sends once (idempotency_key <run_id>|<step_no>|chase|<slot>).
· reference: not built
HR-38on every tick, for slices and events whose effective date has arrivedThe system makes future-dated changes take effect outside hr too, so that the business partner is right on the day.
Given a Hired event recorded today for a start date in two weeks, and a Left event for Friday · when the effective date arrives · then the business partner gets role employee (or worker) from the start date and loses employee after the last day, through the bp seam; each sync is keyed by the event, so a second tick changes nothing. This is pitfall 5 in the research, avoided.
· reference: not built
HR-39on read (derived)The system derives every state that a date decides, so that no job sets a flag and nothing is stale.
Given slices, events and steps · when anything is read · then the current slice is valid_from ≤ today < valid_to; the manager is ManagerOf(person, date); FTE, engagement status (future / active / ending / ended), overdue, "waiting on", run done, and headcount are computed; reading twice gives the same answer
· reference: not built
HR-40once a day, in the first tick after 02:00 (org timezone)The system applies the retention schedule, so that leavers' data does not pile up.
Given retention rules per data category (e.g. sensitive bank details, N months after the engagement ends, purged) · when the sweep runs · then each category past its period is purged or anonymised per its rule; each action is a row in the retention log (date, person, category, action); the business partner is anonymised through the seam when the person category goes; running twice on the same day changes nothing
· reference: not built
HR-41on every tickThe system warns when a fixed-term engagement or a time-limited right to work is about to run out, so that someone decides in time.
Given an engagement with planned_end in 14 days and no Left or ContractExtended event, or a right-to-work follow-up date in 28 days · when the configured warning days are reached · then one task to the manager ("extend or record a leaver") or to HR ("follow-up right-to-work check"), keyed by the engagement and the date, so it is created once
· reference: not built
HR-42when a Left event whose reason is redundancy expands its offboarding runThe system adds an outplacement offer to a redundancy's offboarding, so that the person made redundant is offered help to find their next job and the answer is on record.
Given the employee offboarding playbook with the step offer_outplacement (hr, 2 working days after the run is created, condition reason_is [redundancy], outcomes [accepted, declined]) · when a leaver is recorded with the reason redundancy (any other reason skips the step, recorded with its condition) · then HR has a task "Offer outplacement support"; completing it MUST give the outcome, accepted or declined (output.outcome; any other answer is refused 422 naming both), which is kept on the step and shown with it to whoever sees the step. A done step never changes its answer. With an outplacement provider connected the step can be an action with the same two outcomes; with none it is this task. The step is a playbook row, so a customer removes it, re-times it or gives it another group like any other step (a variation in playbook_deviations). APQC 7.6.2.4 Develop and implement employee outplacement (10516). This changes the offboarding PROCESS: the signed artifact is signoff/hr/employee-offboarding.bpmn.
· reference: brick-hr 0.6 (unreleased): gb pack offboarding step 14, playbook condition reason_is, step outcomes; tests test_hr_42_*
HR-43when a Left event whose reason is retirement expands its offboarding runThe system runs a retirement as its own checklist, so that the pension scheme is told, the knowledge is handed over and the long service is recognised, not only the access removed.
Given the playbook employee-retirement (event type leave, reason retirement, employee worker types) — rows, chosen because it names the reason (the most specific playbook wins) · when a leaver is recorded with the reason retirement · then the run comes from employee-retirement: every access step and approval of the employee offboarding (no outplacement offer), plus "Tell the pension scheme they are retiring" (finance, last day −20 working days), "Knowledge handover sessions held" (manager, last day −5 working days, after the handover list) and "Long-service recognition" (manager, last day −2 working days). No new code path: the playbook mechanism (HR-11). APQC 7.6.2.1 Manage retirement (10514).
· reference: brick-hr 0.6 (unreleased): gb pack retirement(); test test_hr_43_*
Things that cross into other modules
HR-50when a person is created, a name or work contact changes, or a role-bearing event takes effecthr keeps the person's business partner right, as its single writer, so that every module addresses this person with one key and reads nothing private.
Given business-partner installed, with person partners, the bp:person:sync write path, and person partners readable only with bp:person:read · when hr syncs · then a partner of kind person with bp_key 'person:<person_id>' (so hr derives the bp_id without a round trip) carries ONLY the legal name, preferred name and work email / work phone; roles employee (while an employee engagement is active), worker (freelancer), supplier (a sole-trader freelancer, paid outside payroll). A freelancer's company is its own partner (organisation, supplier role, created or reused through promote), and bp holds the edge person works_for company. Personal email, phone, address, NI, bank and right to work never go to bp. The partner is created at the hire (HR-01), not at the start date; person partners are readable only with bp:person:read (hr, contracts and finance roles), never by every signed-in user. Syncing twice changes nothing.
· owned by business-partner · reference: not built — needs the business-partner changes listed in reference.known_gaps
HR-51when a document step falls duehr asks contracts to draft, send and track the right contract, so that the run waits for "signed" and the signed copy lands on the person.
Given an approved template for the worker type, the person's business partner, the engagement and pay · when the step runs · then contracts.draft (counterparty bp_id; context person_id|n; template kind; the variables, including the UK client_size_regime from hr's settings for the engagement's legal entity; signers), then contracts.send. Then contracts.status on each tick until signed, declined or expired. The contract_id produced is stored on the step. When signed, contracts.status gives hr, as the ORIGINATOR, the executed copy's object key and sha256; hr streams it with contracts.fetch_executed (no broad contract:employment:read) and files it on the person as a pay-bearing document, and the steps that depend on it become due. With contracts not installed, it is a manual task with the same input ("send the employment contract and attach the signed copy").
· owned by contracts · reference: not built — the contracts.* capabilities are proposed, not yet in capabilities.yaml
HR-52when an action step runshr asks a provider brick to act in the customer's tools through capabilities, never vendor terms.
Given compose.yaml mapping each capability to a provider brick, or to none · when an action step runs · then a POST /capabilities/<name> through the CapabilitySeam with idempotency_key, dry_run and the validated input; the RESULT shape is handled as in HR-36; the provider owns its claim table and action log
· owned by the capability provider (google-workspace first; none in the first demo) · reference: not built
HR-53when an intake step runs, or HR reissues the linkThe starter reaches their intake through the platform's public-link door, never through the staff app.
Given the public-link door (a separate app, no pool) · when hr asks for an intake link · then the door issues a token bound to (hr, intake_id) and the actions read_intake / submit_intake, stored as a hash, expiring, single purpose, rate-limited, revocable, with an audit row per use; the door calls hr's intake use cases through a seam with a service identity scoped to that one intake
· owned by erp-platform (the public-link door) · reference: not built — platform piece
HR-54when a Left event commits, and at the last day 17:30 for the sign-inhr tells the other modules that a person has left, so that nothing they own outlives the person — no ERP sign-in, no open task, no open expense report.
Given a committed Left event (actual_end set) and its offboarding run; the outbound seams below · when the event commits (never inside its transaction), and the tick consumes what is pending · then (1) the ERP sign-in: the offboarding step revoke_erp_login (it, last day 17:30, after the access-removal approval) asks identity.revoke_app_user {pool, email, sub, reason} — the composition's dodil-appid pool user disabled and every session revoked — claimed once on <run_id>|<step_no>; with no connector (or no pool configured) it is a manual task with that exact input (rule 8). (2) open tasks: each module holding tasks assigned to the person hands them to the DERIVED manager on the last day (hr answers the manager; it stores none). (3) expenses settles the person's open expense reports before final pay. (4) v3: time-off cancels leave after the last day and fixes the leaver's balance for payroll (POST /employees/{person_id}/leaver on time-off). (2), (3) and (4) are consumed after commit from pending rows (the Left event, until each consumer has acknowledged it); a consumer that is down delays its part and nothing else. Only (1) is built.
· owned by dodil-appid (through a provider brick) for (1); the task-owning modules for (2); expenses for (3); time-off for (4) · reference: brick-hr 0.6 (unreleased): (1) only — identity.revoke_app_user (erp-platform capabilities.yaml 0.6, from 0.9.7; hr's own capabilities.local.yaml before), gb offboarding step 13, its timing from HR-55; tests test_hr_54_*. (2) and (3) are named seams, not built
HR-56when another module needs to know whether a person is employed on a date (expenses, pos, time-off, timesheets, payroll)Other modules ask hr whether a person is employed on a date and where, so that nobody keeps a second staff list.
Given person 4410 employed by UK01 from 2024-03-01 in org unit SALES, location LON, cost centre SALES-N · when time-off calls GET /persons/4410/employment?on=2026-12-21, and GET /persons/4410/employment?on=2024-02-01 · then {employed: true, engagement_id, worker_type, company_code UK01, org_unit_id, location_code LON, cost_centre SALES-N, bp_id}; for 2024-02-01 employed false with nulls, never a 404; no pay and no sensitive data
· owned by hr · reference: named seam (v2 draft)
HR-57when another module fixes an approver (expenses, time-off, timesheets)Other modules ask hr who a person's manager is on a date, so that approvals follow the org tree and nobody stores a manager.
Given person 4410 in org unit SALES whose chief position is held by 2280 on 2026-12-21; 2280's own manager is 1904 · when GET /persons/4410/manager?on=2026-12-21, and GET /persons/2280/manager?on=2026-12-21&level=1 · then {manager: {person_id 2280, bp_id, pool_user_sub, email}, source org_tree} and, for 2280, 1904; derived by ManagerOf on read, never stored
· owned by hr · reference: named seam (v2 draft)
HR-58when a person signs in to another module's screen (expenses, time-off, timesheets, payroll self-service)Other modules turn the signed-in user's sub into a person_id here, so that "my" means the same person everywhere.
Given person 4410 with hr_person.pool_user_sub s-4410 · when GET /persons?pool_user_sub=s-4410, and with a sub nobody carries · then {person_id 4410, bp_id, company_code UK01}; 404 for the unknown sub
· owned by hr · reference: named seam (v2 draft)
HR-59when payments exports a payout run to a person (an expense reimbursement, a salary)Payments reads one person's bank account on the payment date, so that the account is known only to the payment file.
Given person 4410 with a bank slice valid from 2025-06-01 · when payments' client calls GET /persons/4410/bank-account?on=2026-11-30 · then {account_holder, sort_code, account_number, valid_from 2025-06-01}; every read audited (who, when, which person, which payout); any other client is refused; 404 when none is held on the date
· owned by hr · reference: named seam (v2 draft)
HR-60when the payroll module prepares a pay run (instead of a payroll provider reading the extract)The payroll module reads hr's payroll extract for a legal entity and period, so that pay, starters, leavers and changes reach the payslip with nobody re-keying them.
Given company UK01, monthly period 2026-11: starter 4450 (2026-11-02, salary 30,000.00 a year), leaver 4495 (last day 2026-11-13), a pay change for 4410 from 2026-11-16 (36,000.00 to 38,400.00), a retro line for October; weekly period 2026-W47 for the weekly-paid · when payroll calls POST /payroll-extracts {legal_entity_ref UK01, period 2026-11}, GET /payroll-extracts/UK01|2026-11, and after its run is approved POST /payroll-extracts/UK01|2026-11/sent {sent_ref: the pay run id} · then the produce call answers the draft batch (re-produced while it is a draft, so a later change before the run is approved is picked up); the GET lists every line (person_id, n, component, for_period, rate_basis, rate_amount NUMERIC 19,4, prorate_from, prorate_to, change_kind) with starters and leavers named, 4410's pay as two slices split on 2026-11-16, and October's retro line; freelancers never appear; sent freezes the batch exactly as mark_extract_sent does (HR-19), a repeat with the same sent_ref answers the same, a different sent_ref 409; a weekly period is an ISO week (YYYY-Www) for a weekly pay schedule (v3)
· owned by hr · reference: not built
HR-61when payroll builds a full payment submission or a P45/P60 for a personPayroll reads the identity HMRC needs (legal name, date of birth, NI number, home address) from hr, so that it is kept once, as sensitive data, and read only by payroll.
Given person 4410 with ni_number, date_of_birth and home_address slices in person_sensitive · when payroll's client calls GET /persons/4410/payroll-identity?on=2026-11-30 · then {person_id, legal_first_names, legal_last_name, date_of_birth, ni_number (or null), home_address (the address shape), valid_from}; every read audited like a bank read; refused to every client but payroll's and to every person role; no bank data on this route
· owned by hr · reference: not built
HR-62when time-off costs a request, timesheets builds a week's expected hours, or payroll prorates a part periodOther modules read a person's working pattern and public holidays day by day, so that a bank holiday, a part-time day and a mid-month start mean the same in every module.
Given person 5120 at location EDI (holiday_calendar GB-SCT), schedule Monday to Wednesday 450 minutes, FTE 0.6000 · when GET /persons/5120/work-pattern?from=2026-11-30&to=2026-12-06 · then 7 days: 2026-11-30 contracted 450 with public_holiday "St Andrew's Day", 2026-12-01 and 12-02 450, Thursday to Sunday 0; employed per day; at most 400 days per call (422 bounds); derived from the assignment, work schedule and hr_holiday rows on read. v4: contracted_minutes is the day's contracted time (0 on a non-working day and on a public holiday the schedule does not work); a caller counting working days counts a day with contracted_minutes > 0 while employed, whatever its length, and a caller costing hours uses the minutes
· owned by hr · reference: not built
HR-63when another module needs a person's company, org unit, team, manager or work email on a date (time-off, expenses, timesheets, payroll)Other modules ask hr for a person's organisational assignment and work email by person id, so that no module types an email or keeps its own copy of who belongs where.
Given person 4410 employed by UK01 in org unit SALES, team SALES-N, derived manager 2280, work email [email protected] on 2026-12-21 · when expenses calls GET /persons/4410/assignment?on=2026-12-21 · then {person_id 4410, on 2026-12-21, employed true, company_code UK01, org_unit_id, org_unit_code SALES, team_code SALES-N, manager_person_id 2280, work_email [email protected], pool_user_sub (null until the person signs in)}; a date with no engagement answers employed false with nulls, never a 404; derived on read from the assignment slice, the ManagerOf walk and the communication record in force on the date (SAP's organisational assignment plus communication), nothing stored by the caller; no pay and no sensitive data; a caller sees only the companies its grant is scoped to
· owned by hr · reference: v4 (2026-10-26, seemo's decided answer 2): not built
HR-64when another module works over everyone of a company, an org unit or a manager's team (a year-end pass, a team calendar, a reminder run, a migration matching people)Other modules ask hr for the roster of a company, org unit or team on a date, so that a year-end pass or a team calendar covers everyone and nobody keeps a staff list.
Given UK01 on 2026-12-31: 212 people employed, 5 of them in the team whose derived manager is 2280 · when time-off calls GET /roster?company_code=UK01&on=2026-12-31&limit=200, then the next page; and GET /roster?company_code=UK01&manager_person_id=2280&on=2026-12-21 · then a page of [{person_id, company_code, org_unit_code, team_code, manager_person_id, work_email, fte, employed_from, employed_to}] ordered by person_id, at most 200 a page with next_offset; 212 people in two pages; the team query answers the 5 whose derived manager is 2280 on that date (direct reports, level 1); people who left before `on` are not listed; a company outside the caller's scope answers an empty page, never another company's people
· owned by hr · reference: v4 (2026-10-26, seemo's decided answer 2): not built
How things move
run
open → done → cancelled
- none → open by system · when a committed personnel event whose kind starts a run, and a playbook matching it · steps expanded from the frozen playbook version; due_at computed
- open → cancelled by hr_admin · needs reason · not-done steps cancelled; a reversal task per done action
step
pending → waiting → done → skipped → cancelled
- pending → waiting by system · when due and its dependencies done; for an approval, draft, document or in_progress action, waiting on someone or something · shown on My tasks for its group
- pending / waiting → done by assignee or system · when task completed / capability done / approval granted / contract signed / draft approved · result and provider_ref stored; dependants become due
- pending / waiting → skipped by system · when its condition is false for this person · recorded with the condition
- pending / waiting → cancelled by hr_admin or it · when run cancelled, or an approval refused
offboarding_playbook
standard → redundancy → retirement
- none → standard by system · when a Left event: the employee offboarding playbook · the gb steps 1–13: handover, approvals, access removal at last day 17:30, the ERP sign-in revoked (HR-54), deletion after approval
- none → redundancy by system · when the reason is redundancy (condition reason_is) · the same run plus offer_outplacement (HR-42, outcome accepted or declined)
- none → retirement by system · when the reason is retirement: the playbook employee-retirement, which names the reason · the standard steps plus pension_notice, knowledge_handover, long_service_recognition (HR-43)
engagement
future → active → ending → ended
- none → future by manager or hr_admin · when a Hired, Rehired or Converted event
- future / active → ending by manager or hr_admin · when a Left event (actual_end set)
intake
issued → submitted → expired → revoked
- none → issued by system · when the intake step falls due
- issued → submitted by starter · when every required field for the worker type and pack
- issued / expired → revoked by hr_admin · a reissue makes a new link
What it keeps
| Thing | Meaning | Identified by | Shared? |
|---|---|---|---|
| person | a natural person we employ or engage, once, however many times they come back | person_id = blake2b(person_key, 7); person_key = 'staff:<no>' else 'email:<normalised personal email>' | SHARED — hr is the sole writer (person_id in shared.yaml) |
| person detail | the person's names and contact on a date | person_id|valid_from (TC1) | module-owned (Person aggregate) |
| engagement | one period of working for us under one worker type | person_id|n | module-owned (Person aggregate) |
| assignment | where an engagement sits on a date | person_id|n|valid_from (TC1 per engagement) | module-owned (Person aggregate) |
| pay | the rate an engagement is paid at on a date | person_id|n|valid_from (TC1 per engagement from its first slice) | module-owned (Person aggregate) |
| pay component | an allowance or recurring extra | person_id|n|component|valid_from (TC3) | module-owned (Person aggregate) |
| event | a personnel event on an engagement (Hired, Transferred, PayChanged, ContractExtended, Left, Rehired, Converted) | person_id|n|seq (append-only) | module-owned (Person aggregate) |
| document | a non-sensitive document on a person (signed contract, letters) | person_id|doc_id (doc_id derived: 'contract:<contract_id>', 'letter:<run_id>|<step_no>') | module-owned (Person aggregate) |
| compliance record | a record a localisation pack requires (right-to-work check, status determination, written statement given) | person_id|n|kind|valid_from | module-owned (Person aggregate) |
| sensitive | the root of one person's sensitive data | person_id | module-owned (Sensitive aggregate root) |
| person sensitive | the personal data only HR and finance may see | person_id|kind|valid_from (TC3, under the hr_sensitive root) | module-owned (its OWN aggregate) |
| org | one org tree | org_id | module-owned (Org aggregate root) |
| org unit | a team or department on a date | org_id|org_unit_id|valid_from (TC1 over its lifetime) | SHARED — hr is the sole writer (other modules may group by it) |
| position | one seat in an org unit that describes a job | org_id|position_id|valid_from (TC1 over its lifetime) | module-owned (Org aggregate) |
| job | a job in the catalogue | job_code | SHARED — hr is the sole writer |
| location | an office or place of work | location_code | module-owned (configuration) |
| work schedule | a weekly pattern of working time | schedule_code | module-owned (configuration) |
| holiday | a public holiday in a calendar | holiday_calendar|holiday_date | module-owned (configuration; a localisation pack loads its rows) |
| catalogue | the small catalogues (worker types, employee subgroups, org unit types, event types → kind, reasons, infogroups, rate bases, pay component types, pay grades, responsible groups, document types, intake fields, draft instructions, retention rules, settings) | each by its own code (worker_type, event_type, event_type|reason, event_type|record, component, group_code, document_type, pack|field, category, key) | module-owned (configuration) |
| unit access | the groups, chat spaces and folders that come with an org unit | org_unit_id|kind|target | module-owned (configuration) |
| playbook | the customer's checklist for one kind of run, versioned | playbook_id|version | module-owned (configuration with invariants) |
| playbook step | one step of a playbook | playbook_id|version|step_no | module-owned (Playbook aggregate) |
| run | a playbook expanded for one person and one personnel event | run_id = <direction>:<person_id>:<n>:<event seq> | module-owned (Run aggregate root) |
| run step | one step of one run | run_id|step_no (step_no = the playbook step_no, plus '/<target>' when fanned out per access row) | module-owned (Run aggregate) |
| run party | who a run-scoped group is for this run (the buddy, the takeover) | run_id|group_code | module-owned (Run aggregate) |
| run log | the run's history (reschedules, approvals, completions, chases, cancellations) | run_id|seq (append-only; seq is the next integer for the run, a concurrent duplicate is rejected 23505 and retried) | module-owned (Run aggregate) |
| intake | the starter's self-service form for one engagement | intake_id = person_id|n | module-owned (Intake aggregate) |
| payroll batch | one period's hand-off to payroll for one legal entity | batch_id = <legal_entity_ref>|<period> | module-owned (PayrollExtract aggregate) |
| payroll line | one line of a payroll extract | batch_id|person_id|n|component|for_period | module-owned (PayrollExtract aggregate) |
| privacy request | a subject-access or erasure request | request_id (derived from the person and the received date) | module-owned (PrivacyRequest aggregate) |
| retention log | what the retention sweep or an erasure did | run_date|person_id|category | module-owned (append-only) |
Before this module, the sign-in pool WAS the staff list: other modules hold the pool user's sub or email in their owner columns. From now on, person_id is the key for people. hr_person.pool_user_sub maps the two, and a module that needs more than "who is signed in" references person_id, never a copy of the staff list. And never put a person's private data on their business partner: it is the record other modules share. Even with person partners restricted to bp:person:read, a partner carries a name and a work contact, nothing more.
What runs on its own
| Story | When | What |
|---|---|---|
| HR-30 | every minute or so | POST /run-due-steps (run_due_steps(now)), as the brick's service identity |
| HR-31 | at each step's due_at | the account and access action steps |
| HR-32 | at each step's due_at | calendar action steps |
| HR-33 | at the draft step's due_at, or on request | the Models adapter |
| HR-34 | last_day 17:30 org timezone | access removal steps |
| HR-35 | last_day +30 days, after approval | transfer status check, then delete |
| HR-36 | every tick | result handling and retries |
| HR-37 | per the cadence rows | chasing |
| HR-38 | when an effective date arrives | business-partner sync of future-dated events |
| HR-39 | on read | nothing stored |
| HR-40 | daily, first tick after 02:00 org timezone | the retention sweep |
| HR-41 | every tick | expiry warnings |
Questions that shape your version
Read these out and let the customer correct one — people rarely recall a policy on demand and can always react to one. Standard is a named authority you can look up and hold us to. Commonly seen is exactly that: arrangements we have met, with no survey behind them. A customer doing none of them is not doing it wrong.
- Do your people have staff numbers?
- small agency
- no staff numbers; the personal email identifies the starter until payroll assigns one
- with a payroll provider
- the payroll id becomes the staff number from the first payroll run
- warning
- the key is fixed when the person is created; a staff number given later is stored, not re-keyed
- Where do the people you take on work, which countries?
- For people working in the UK, how do you check right to work, and when?
Standard Immigration, Asylum and Nationality Act 2006 s.15 (civil penalty for employing someone without the right to work) and the statutory excuse established by the checks the Home Office prescribes, described in the Home Office guidance "An employer's guide to right to work checks": a manual document check, a check through a certified identity service provider (British and Irish citizens with a valid passport), or the Home Office online check (share code), done BEFORE employment starts, with a follow-up check before time-limited permission ends. The guide asks for copies to be kept for the employment and two years after. Confirm against the edition in force: it changes.
- employees
- checked in the first week before the start, from the evidence uploaded at intake
- freelancers
- often not checked, on the basis that they are self-employed; ask your adviser, this is not a rule we can give
- Must the contract be signed before the first day?
Standard Employment Rights Act 1996 s.1 (as amended from 6 April 2020): employees and workers are entitled to a written statement of particulars, most of it on or before the first day of work. Which particulars may follow later is in s.1–s.2; read them with your adviser.
- Do you engage freelancers through their own limited companies, and how big is your business?
Standard Income Tax (Earnings and Pensions) Act 2003, Part 2 Chapter 10 (off-payroll working): from 6 April 2021 a medium or large private-sector client decides the worker's status and gives a status determination statement with its reasons; a small client (Companies Act 2006 size thresholds) does not, and the worker's own company decides under Chapter 8. The module records the determination; it does not make it.
- How much notice do you give and expect?
Standard Employment Rights Act 1996 s.86: at least one week after one month's employment, one week per complete year from two years up to twelve weeks; at least one week from the employee. A contract may give more.
- When should access go when someone leaves?
- resignation or end of contract
- at the end of the last day (e.g. 17:30), deletion after about 30 days with an approval
- dismissal
- immediately, at the time of the meeting
- warning
- deletion is irreversible after the vendor's grace period; keep it behind an approval whatever else changes
- Should managers see the pay of their people?
- small business
- yes, they set it
- larger business
- no; pay goes through HR and a manager sees the band
- How long do you keep each kind of data after someone leaves?
Standard UK GDPR Art. 5(1)(e) (storage limitation: no longer than necessary; no fixed period is given), Art. 15 (right of access, answered within one month under Art. 12(3)), Art. 17 (erasure, with the exceptions in Art. 17(3), such as a legal obligation to keep).
- payroll and tax
- several years after the tax year it relates to, set with the payroll provider
- unsuccessful or withdrawn starters
- months, not years
- warning
- a leaver's bank details kept for years "just in case" is the common finding in an audit
- Do your checklists count calendar days or working days?
- Who signs contracts on your side, and who approves anything off-template?
- May we draft the welcome email, the handover and the leaver letter with AI?
- When you make someone redundant, do you offer outplacement support, and who may see whether they took it?
- small business
- an offer of a few career-transition sessions, often through a provider
- larger business
- a provider contract; the outcome seen by HR only
- warning
- the outcome says something about a person being made redundant; if managers should not see it, the step needs its own visibility, which is a change, not a row
- What happens when someone retires?
- When should a leaver lose their sign-in to this ERP?
What you can change yourself
These are settings, not code: someone in your team changes them on a screen, without a developer and without a release.
- your checklists per worker type, event type, reason and team, versioned (v2: employee-retirement, for the reason retirement)
- each step: what, which group, when (anchor, offset in days or working days, time), what it depends on, approvals, conditions, and (v2) the outcomes completing it must record
- your teams and departments, who leads each (the chief position), dated
- which groups, chat spaces and shared folders each team gets
- your job catalogue and families
- offices, their country, timezone and holiday calendar
- working patterns (37.5 hours Mon–Fri, part-time patterns) and the full-time base
- public holidays per calendar (the pack loads them; you can add company days)
- employee, freelancer (sole trader / via a company), intern…: payroll or supplier, which partner roles
- your names for the personnel events, each mapped to one of the seven kinds
- leave reasons, pay-change reasons, transfer reasons
- what each event's form asks for
- hour, day, month, year, fixed fee, and their labels
- allowances and extras (≈ wage types), and which worker types they apply to
- optional pay bands per job, used by the 'rate outside band' condition
- who does what: manager, IT, finance, buddy, HR, director, and how each is resolved
- document types, their access class (personnel / pay / sensitive), expiry and retention category
- what the starter is asked for, per worker type and country, and which fields are required
- the instructions for each AI draft (welcome email, handover, leaver letter), and the fields it may use
- how long each kind of data is kept after someone leaves, and whether it is purged or anonymised
- v2 (HR-55): dated policy settings the owner sets (hr:offboarding:policy), rows only ever added — from tomorrow, the first row of a key and scope may start today, never earlier — so the table is the audit trail (set_by, set_at, note); scope '' is the default, a leave reason overrides it
- timezone, intake link validity, chasing cadence, max action attempts before IT, warning days, AI model name, rounding mode, and per legal entity the UK client size for IR35 (passed to contracts, which keeps no copy)
Where the platform limits what we can promise
There is no server-side scheduler. one tick (run_due_steps) driven by an always-on worker or an external clock; every job above runs inside it
erp_platform.money is 2-decimal; rates need 4. the platform adds a Rate type (NUMERIC(19,4)) before hr is built; until then nothing in hr may route a rate through Money
No read-your-writes inside an open transaction. a personnel event commits first; run expansion and the bp sync read it back in a later transaction
For builders
- Module spec — this page, for agents
- The lifecycle and the design template
Code
Public repositories, anonymous clone, one release tag each. Read README.md and AGENTS.md first.
- brick-hr (brick, v0.5.3)
git clone --depth 1 --branch v0.5.3 https://git.dodil.io/dodil/erp-brick-hr.git
ssh:[email protected]:dodil/erp-brick-hr.git - brick-business-partner (brick, v0.3.2)
git clone --depth 1 --branch v0.3.2 https://git.dodil.io/dodil/erp-brick-business-partner.git
ssh:[email protected]:dodil/erp-brick-business-partner.git - erp-platform (platform, v0.8.2)
git clone --depth 1 --branch v0.8.2 https://git.dodil.io/dodil/erp-platform.git
ssh:[email protected]:dodil/erp-platform.git
Known gaps in the reference
- not deployed: it has not run behind the gateway for a real person, so the self-check through ignite invoke and a sign-in per role are still to do
- no screen: API and MCP only
- absence and time are extension points, not built: hourly and daily payable amounts need the time brick's quantities, so v1 lines for those bases carry the rate and no amount (v3: the time-off and timesheets modules are specified, wave 4; payroll reads their quantities itself)
- concurrent employment: the model allows it, v1 refuses a second active engagement
- one localisation pack only (gb)
- documents are bytes in hr_object_chunk in the bucket until the platform has an object-store helper
- payroll calculation is out of scope here: the extract hands rates, slices and proration dates to a payroll provider, or (v3) to the payroll module, which reads it through HR-60
- freelancer invoices and self-bills are not here (purchasing/payables)
- v2: identity.revoke_app_user is hr's own capability contract (brick-hr capabilities.local.yaml) until erp-platform's capabilities.yaml has it; no provider brick for it exists yet, so it is a manual task today
- v2: the open-task hand-over and the expenses settlement on a Left event (HR-54) are named seams, not built