Stages 2–4 — Supply, demand, gap

For HR administrators

Stages 2, 3, and 4 — supply, demand, and gap analysis — are the platform's computational core. Unlike Stage 1, these stages are deterministic: the same inputs produce the same outputs every time. The AI plays an advisory role only — it explains and suggests, but it never moves the numbers.

Stage 2 — Supply analysis

Supply analysis projects the workforce you will have, starting from your current headcount. You tune three factors:

  • Retirement rate — the annual departure rate due to retirement (default 6%).
  • Hiring rate — the expected annual addition rate (default 8%).
  • Planning horizon — the number of years to project (default 2 years).

The starting points come from your workspace's real data — total people and retirement-eligible counts — not from manual estimates.

Stage 3 — Demand analysis

Demand analysis estimates the workforce you will need per role. It is built on the platform's deterministic workload engine, which measures tasks at the position level (not the unit) and rolls them up to the unit. Each position has a measurement mode:

  • Specialized — tasks measured in hours: (hours × repetition × frequency) ÷ effective per-employee hours per year.
  • Routine — tasks measured by known quantitative output: annual volume ÷ standard per-employee rate.

The effective hours per year are no longer a fixed constant — they come from the position's work-time profile (الدوام). Define profiles in Settings → Work time (work days of the week including Friday, hours/day, holidays, productivity → a live effective-FTE-hours figure, with an optional manual override for official figures like 1023.5). Each position picks a profile on the workload tab (or inherits the workspace default), so a 6-hour, 6-day, or Friday-working seat is measured against its own schedule. The seeded default reproduces the previous 1023.5 exactly.

Position requirements are aggregated within the unit to show its total need. The current headcount is derived automatically from the people assigned to each position (never entered by hand). If the same task appears on two positions, a mandatory review gate (merge / reassign / keep-justified) blocks plan approval until it's resolved — so the calculation stays transparent and auditable.

AI draft tasks (AI prepares · you decide)

Building a position's task list from scratch is the slow part. Inside any position, an AI draft tasks button proposes a starter set of concrete, measurable tasks for that role — with mode-appropriate estimates: frequency, repetition, and hours for a specialized position, or annual volume and standard rate for a routine one. It runs only when you click it — never automatically. The tasks come back as an editable draft you review, then insert one-by-one or all at once; nothing is saved until you add it, estimates are deliberately conservative, and every value stays editable in the task table afterwards.

Editing tasks (cached, then saved)

Adding, editing, or deleting tasks — and switching a position's measurement mode or work-time profile — updates the figures instantly on screen but does not touch the database. Editing a task's frequency, repetition, or hours/time recalculates its load and the position/unit gap live as you type. Your changes are held locally, and a Save changes button — beside the AI draft tasks button inside the open position — lights up with a count of what's still pending. Nothing is persisted until you click it: Save writes every cached change at once and reloads the tab with the saved data, while Discard drops the pending edits and reloads the last-saved state. Trying to open another unit or job from the sidebar while you have unsaved changes prompts a confirmation first (leaving discards them), and leaving the page entirely warns you too — so nothing is lost by accident.

The workload tab's sidebar is a searchable, filterable org-unit tree. Search by unit name to jump to any unit, then click to select it. Four filters narrow the tree — occupancy (vacant / occupied), gap status (deficit / surplus / balanced), org-unit type, and measurement mode (specialized / routine). When a job-level filter is active, units auto-expand to show only their matching positions, so a query like "vacant" surfaces every unfilled seat across the structure at once.

Every row carries a status dot for staffing at a glance, explained by the sidebar legend: 🔴 deficit (under-staffed), 🟢 surplus (over-staffed), ⚪ balanced, 🟠 vacant (no headcount). A unit's dot reflects its aggregate state, turning amber whenever it contains any vacant position.

Table view and graph view

A Table / Graph toggle at the top of the tab switches between the two ways to read the same demand data. Table is the default master/detail layout — the org-unit tree on the side, positions and their task tables on the right. Graph lays the org structure out as a node-graph of unit cards connected by their parent → child relations (the same visual language as the org chart). Each card is tinted by its org-unit type — a lighter shade of the type's colour, matching the tree's type icons — and carries a status dot plus required vs. current headcount, job count, and a gap chip (deficit / surplus / balanced), so a unit's type and its staffing health are both legible at a glance. The layout keeps the top two levels — and any group of just one or two units — side-by-side; only a deeper level that fans out into three or more units stacks its cards vertically as an indented list, so a wide fan-out grows downward instead of sprawling sideways. You can override that automatic choice per parent: any card with children shows a small layout toggle on hover that flips its direct children between the horizontal row and the vertical stack, and your choice for each unit is remembered in the browser across reloads. A companion control hides a unit's whole subtree — the collapsed card shows a badge with how many units are hidden, and one click restores them. Another keeps only the direct children in view, collapsing every deeper level beneath them at once (and toggles back to reveal them). By default the graph opens showing only the top two levels — every deeper unit starts collapsed behind its hidden-count badge, and you expand the branches you want to explore. Clicking a card opens a dialog with that unit's details (its jobs with required / current / gap), the same as the table shows. The graph carries the same filters as the table (search, occupancy, gap, mode, unit type) — but a filtered-out unit is dimmed in place rather than removed, so the surrounding structure stays intact for context. A full-screen button in the canvas controls expands the graph to the whole viewport, with the filter bar pinned inside the frame so it stays usable there. Pan, zoom, and the minimap make them navigable; clicking a card selects that unit, and flipping back to Table opens its details.

An Export results (.xlsx) button in the page header (top-right, beside the page title) downloads the current view as an Excel workbook. It exports every unit and all its linked jobs that survive the active search and filters — not just the selected unit — with each job's mode, required, current headcount, gap, and status, plus the parent unit for hierarchy. The file mirrors exactly what the tree shows, so a filtered query like "deficit" exports precisely those under-staffed seats across the whole structure in one sheet (right-to-left for Arabic).

Stage 4 — Gap analysis

Gap analysis combines the outputs of the previous two stages: for each role, gap = demand − supply. Each row is then classified:

  • Priority — high, medium, or low, by the size of the gap and the criticality of the role.
  • Recommended action — text suggesting how to close the gap (hire, reskill, redistribute, or rationalise).

Actionable rows carry an Apply button that creates a real draft in Jadiroon in one click — and it now works even from an uploaded ministry Excel, where a job title has no matching seeded role (applying then creates a placeholder role first). When the strategy carries automation ambitions, a routine role can instead get an automation recommendation that marks a planned closure — "automate instead of expand." The result is a prioritised, applicable gap table, ready to become the closing report in the final-review stage.

Advisory AI in these stages

Even with the numbers deterministic, the AI adds an advisory layer: an explanation of why a gap is high priority, or a more clearly worded action suggestion. But it does not change the computed supply, demand, or gap — those come from the deterministic engine alone.