Chapter 1 · Sessions 1 and 2
What the old schedule holds, and the tables that replace it
Before you build a scheduler, you find out whether the schedule you have today is finite at all, what it runs on, and what it costs, from its own screens and its own bill. Then one careful prompt adds the eleven scheduling tables to your platform, keyed to the presses and parts you already have, with tests that refuse impossible data.
25 min4 stepsAbout 7 hours hands-on across six sessionsSessions 1 and 2
By the end of this chapter you can
- Inventory the current scheduling tool or board: resources, orders, users and the bill, read from its own screens and invoice.
- Test whether today's schedule is finite or infinite capacity drawn as a Gantt chart, and whether it runs on nameplate rates.
- Map the specification's spine names to your platform's tables and add only what is missing.
- Have Claude Code write the eleven aps_ tables, their rules, tests and two small made-up seeded cases.
What this module replaces
Production scheduling turns released orders into a plan that says which operation runs on which press, line, crew or tool, and when. Vendors call the software advanced planning and scheduling (APS) [1][2]: PlanetTogether, Siemens Opcenter APS (Preactor), Asprova and DELMIA Ortems, and, far more often, a Smartsheet, monday.com or Excel board. ISA-95 Part 3 (IEC 62264-3) frames the job as detailed production scheduling, between planning above and execution below [3]. Material requirements (M12) and recording what happened (M04) belong to other modules; this one sits between them: orders in, a feasible plan out, actual times back.
| Resource type | Stamping plant example | What limits it |
|---|---|---|
| machine | Press P-03 | Its open hours and its rate |
| line | A transfer line treated as one unit | The slowest station |
| labor_pool | Die setters on first shift | Heads available and skills |
| tool | Die D-112 | Only one press can hold it at a time |
| vessel | A wash tank | Batch size and cleaning |
| work_center | The six presses as a group | Their combined hours |
Session 1: Count what the old schedule holds and costs, and test it
60 minutesWhy
The module is worth building only if it replaces a real tool, real workarounds and a real bill. Two checks on today's schedule (is it finite, and does it use measured rates?) tell you how far you have to go and give the planner a reason to trust the new one. Figures read from the tool and the invoice are what Session 6 compares against.
Do this
With the planner, gather from the tool's own screens and the vendor's account page (no customer names):
- Every resource the schedule places work on, using the six types above, with its shift hours.
- Every scheduling tool, board and spreadsheet: owner, logins, how people sign in, where its bill comes from; the amount, period, renewal date and notice period as printed.
- Where orders come from (ERP, MRP, a spreadsheet, email) and how many are open this week, with the fields they carry.
- For three presses, one day each: minutes of work the schedule places, minutes the press is open, any two jobs drawn at once or past the shift's end (the infinite-capacity test).
- For the same three: the rate the schedule uses and where it came from (nameplate, routing, or measured).
- Word for word, the planner's answer to: when you re-run the schedule, do the jobs you moved by hand stay put?
On a new branch aps/inventory, write docs/scheduling-inventory.md from what I give you below. Use only my numbers: where I wrote "unknown", write "unknown" and who can find out. Never estimate, round or fill a gap.
Tables:
1. Resources in the first scope: code, type, what it can do, shift hours, who looks after it.
2. Tools: name, owner, logins, bill per year, renewal date, notice period, export available, source of each figure.
3. Orders: where they come from, how many open this week, which fields they carry.
4. The infinite-capacity test: for three presses, work minutes, open minutes, load (work / open), any overlap or run past the shift, and a verdict "finite" or "infinite drawn as a Gantt chart".
5. Rates: the rate used, its source (nameplate, routing or measured), and the date.
6. Workarounds, and the planner's answer about re-runs, word for word.
7. The first scope to replace (one area with its bottleneck), why, and the planner and supervisor who will test it.
My notes:
<paste your notes here>
Open a pull request titled "Scheduling inventory" and show me the link.You will see recreated screen
- The two checks, in numbers: a load over 100% or an overlap means the current chart is not a finite schedule.
- Unknowns stay unknown; the verdicts are written as found.
Check it worked
Pull request Scheduling inventory holds the seven tables, every figure with its source, and the infinite-capacity and rate results for three presses.
Fastest path
Do the three-press test on paper with the planner while you collect the other numbers, then paste everything in one go.
If it goes wrong
Claude Code filled in a price, a rate or a count you did not give it
Say: Remove every figure I did not give you and write unknown. We hit this on our own platform: screens showed numbers nobody had measured, because an agent filled gaps so a page looked finished.
The planner says the schedule lives only in their head or on a whiteboard
Write that down; it is the most common answer. Photograph one day of the whiteboard for the three-press test, with no customer names in the picture.
Your platform's names for the spine
The specification points at core_equipment, core_calendar, core_item, core_person and core_reason_code, with a tenant_id on every row. Your platform already has equipment and parts from Session 5. If you took another module first, docs/spine-map.md already exists: extend it, never start a second one. The scheduler must place work on your presses; a second press list would let a breakdown on one never reach the other.
| Specification says | On the stamping plant's platform | If missing |
|---|---|---|
| core_equipment | equipment | Never missing |
| core_item | parts | Never missing |
| core_person | Supabase sign-in users with memberships | A people table pointing at the sign-in user |
| core_calendar and shift definitions | usually missing | Add them: site, time zone, shifts, holidays |
| core_reason_code | usually missing | Add it: other modules use reason codes too |
| core_event_outbox, core_status_history | missing unless another module added them | Add them in the spine migration |
| tenant_id on every row | site_id on every row | Your platform serves one company; site is the scope |
Session 2: Map the spine, and add only what is missing
15 minutesWhy
Calendars, shift definitions and reason codes are shared: maintenance, execution and quality modules all read them. Adding them once, in their own migration merged first, keeps one calendar per press. Putting them inside the scheduling migration would make the next module build a second calendar that disagrees.
Do this
cd ~/code/acme-platform && git switch main && git pull && claudeRead docs/SCHEMA-PLAN.md, docs/naming-standard.md, every file in supabase/migrations, and docs/spine-map.md if it exists. Do not change any existing table or migration.
On a new branch spine/aps-prerequisites:
1. Create or extend docs/spine-map.md: for each of core_equipment, core_calendar (site, time zone, holidays), core_shift_definition (calendar, name, start and end time, days), core_item, core_person, core_job_role, core_reason_code (code, name, category), core_status_history and core_event_outbox, the table on this platform that plays that role, or "missing". Record: our scope column is site_id and our id type is the first migration's.
2. For every "missing" item, write ONE new migration (npx supabase migration new spine_for_scheduling) with this platform's conventions: primary key, site_id, created_at, created_by, updated_at, updated_by, row_version, archived_at, ext jsonb, timestamptz times, row-level security on with no policies; status history and outbox append-only. Add each new table to docs/matrix.json with no rights yet.
3. pgTAP tests for every new table: exists, primary key, row-level security on, append-only where stated.
Push, open a pull request titled "Spine for scheduling", wait for every check to finish, and tell me the result in plain words. If a check fails, fix it and wait again before reporting.You will see recreated screen
- An earlier module's map is extended, not replaced.
- Reused where it exists: one outbox for every module.
Check it worked
Pull request Spine for scheduling is green, and its Files changed tab shows one new migration and no edit to an older one.
If it goes wrong
Claude Code created a second calendar or reason-code table beside one that exists
Say: Remove the duplicate and point at the existing table, recorded in docs/spine-map.md.
It renamed equipment to core_equipment
Say: Revert every rename; map names in docs/spine-map.md instead. A rename that is only half done breaks every query that used the old name; we hit exactly that on our platform.
It reports success but a check is red
Say: A check is red. Run gh pr checks, read the failed log, fix it and wait for green before you report. Trust the check on GitHub, never the summary.
The eleven tables
The reference below is the specification's, column by column: req means required, a list after a colon is the only values allowed, an arrow is a link to another table. You do not type any of it: Step 3's prompt carries it into your repository.
| Table | Holds | Columns |
|---|---|---|
| aps_resource | Schedulable resource, usually linked to equipment | code text req, unique; name text req; equipment_id → core_equipment; resource_type text req: machine, line, labor_pool, tool, vessel, work_center; capacity_units num req; efficiency_factor num; calendar_id → core_calendar; is_bottleneck bool |
| aps_capability | Capability that operations require | code text req, unique; name text req |
| aps_resource_capability | What a resource can do and how fast | resource_id → aps_resource req; capability_id → aps_capability req; rate_per_hour num; preference int |
| aps_calendar_exception | Downtime, extra shifts or holidays per resource | resource_id → aps_resource req; starts_at ts req; ends_at ts req; kind text req: unavailable, overtime, planned_maintenance, holiday; note text |
| aps_setup_matrix | Sequence-dependent changeover time between product attributes | resource_id → aps_resource req; attribute_key text req; from_value text req; to_value text req; setup_min num req; setup_cost money |
| aps_scenario | Schedule version: draft what-if or published | name text req; status text req: draft, published, archived; horizon_start ts req; horizon_end ts req; objective_weights json; solver text req: rules, heuristic, cp_sat, manual; created_from_id → aps_scenario; published_at ts; published_by → core_person |
| aps_job | Order to be scheduled within a scenario | scenario_id → aps_scenario req; order_ref_type text req: production_order, planned_order, manual; order_ref_id uuid; item_id → core_item; qty qty; due_at ts; release_at ts; priority int; status text req: unscheduled, scheduled, late, infeasible |
| aps_scheduled_operation | Operation placed on a resource with times | scenario_id → aps_scenario req; job_id → aps_job req; seq int req; capability_id → aps_capability; resource_id → aps_resource; start_at ts; end_at ts; setup_min num; run_min num; locked bool; sequence_on_resource int |
| aps_constraint | Additional scenario constraint | scenario_id → aps_scenario req; constraint_type text req: material, labor_skill, tool, max_wait, precedence, batch, custom; params json req |
| aps_scenario_kpi | KPI value computed per scenario for comparison | scenario_id → aps_scenario req; kpi text req: on_time_pct, total_lateness_h, total_setup_h, utilization_pct, makespan_h, wip_count; value num req |
| aps_adherence | Scheduled against actual per operation | scheduled_operation_id → aps_scheduled_operation req; actual_start ts; actual_end ts; start_deviation_min num; reason_code_id → core_reason_code |
Session 2: One prompt: the eleven tables, their rules and their tests
25 minutesWhy
A rule kept in the table protects every screen, import and scheduler run, including ones not written yet. A calendar exception that ends before it starts, or a published scenario that can be edited, would quietly corrupt every plan built on it. Giving Claude Code the exact column list stops it inventing or dropping a column.
Do this
On a new branch aps/tables, add this module's own section to docs/spine-map.md, the one shared map (never a separate tables file), with exactly this content, then use it.
## M03 Scheduling tables (from the module specification M03)
Every table also has the standard columns recorded above in this map. "req" means not null. A list after a colon is a check constraint. "→ core_x" means a foreign key to the table docs/spine-map.md maps core_x to. Types: ts = timestamptz, qty, num and money = numeric, json = jsonb.
### aps_resource
Schedulable resource, usually linked to equipment.
- code text req, unique
- name text req
- equipment_id → core_equipment
- resource_type text req: machine, line, labor_pool, tool, vessel, work_center
- capacity_units num req
- efficiency_factor num
- calendar_id → core_calendar
- is_bottleneck bool
### aps_capability
Capability that operations require.
- code text req, unique
- name text req
### aps_resource_capability
What a resource can do and how fast.
- resource_id → aps_resource req
- capability_id → aps_capability req
- rate_per_hour num
- preference int
### aps_calendar_exception
Downtime, extra shifts or holidays per resource.
- resource_id → aps_resource req
- starts_at ts req
- ends_at ts req
- kind text req: unavailable, overtime, planned_maintenance, holiday
- note text
### aps_setup_matrix
Sequence-dependent changeover time between product attributes.
- resource_id → aps_resource req
- attribute_key text req
- from_value text req
- to_value text req
- setup_min num req
- setup_cost money
### aps_scenario
Schedule version: draft what-if or published.
- name text req
- status text req: draft, published, archived
- horizon_start ts req
- horizon_end ts req
- objective_weights json
- solver text req: rules, heuristic, cp_sat, manual
- created_from_id → aps_scenario
- published_at ts
- published_by → core_person
### aps_job
Order to be scheduled within a scenario.
- scenario_id → aps_scenario req
- order_ref_type text req: production_order, planned_order, manual
- order_ref_id uuid
- item_id → core_item
- qty qty
- due_at ts
- release_at ts
- priority int
- status text req: unscheduled, scheduled, late, infeasible
### aps_scheduled_operation
Operation placed on a resource with times.
- scenario_id → aps_scenario req
- job_id → aps_job req
- seq int req
- capability_id → aps_capability
- resource_id → aps_resource
- start_at ts
- end_at ts
- setup_min num
- run_min num
- locked bool
- sequence_on_resource int
### aps_constraint
Additional scenario constraint.
- scenario_id → aps_scenario req
- constraint_type text req: material, labor_skill, tool, max_wait, precedence, batch, custom
- params json req
### aps_scenario_kpi
KPI value computed per scenario for comparison.
- scenario_id → aps_scenario req
- kpi text req: on_time_pct, total_lateness_h, total_setup_h, utilization_pct, makespan_h, wip_count
- value num req
### aps_adherence
Scheduled against actual per operation.
- scheduled_operation_id → aps_scheduled_operation req
- actual_start ts
- actual_end ts
- start_deviation_min num
- reason_code_id → core_reason_code
Then write ONE migration (npx supabase migration new aps_tables) that creates all eleven tables exactly as listed, and:
- codes unique per site; one resource-capability pair once; one setup_matrix row per resource, attribute_key, from_value and to_value;
- capacity_units, rate_per_hour and setup_min not negative; efficiency_factor above 0 and at most 1.5; an exception's ends_at after its starts_at;
- at most one published scenario per site (a partial unique index);
- a trigger that refuses any insert, update or delete of jobs, operations, constraints or KPIs of a scenario whose status is published or archived;
- row-level security on every table with no policies, the touch-row and audit triggers, and each table added to docs/matrix.json with no rights yet.
pgTAP tests in supabase/tests/aps.test.sql proving the database refuses: an unknown resource_type, an exception that ends before it starts, a duplicate resource code, a second published scenario, and a change to an operation of a published scenario. Show me each test failing before its rule exists and passing after.
Do not connect to any Supabase project. Push, open a pull request titled "Scheduling tables", wait for every check, and tell me the result in plain words.You will see recreated screen
- The column list now lives in the one shared map, in its own section.
- Two rules that protect the floor: one published plan, and a published plan nobody can edit.
Check it worked
Pull request Scheduling tables is green; you saw the five tests red then green; no older migration is edited.
Fastest path
Asking for red-then-green in the prompt saves the round trip where you discover a test that could never fail.
If it goes wrong
A screen fails later with "column does not exist"
Say: Rebuild the local database from supabase/migrations only, run supabase db diff, and write any difference as a new migration. We merged ten columns without a migration once; the fresh-database check catches it.
The check went green after a test or CI file changed
Say: Undo every change to tests and CI. Never weaken a check to get to green; stop and explain instead. On our platform an agent that was refused one command used another to do the same thing.
Session 2: Two small seeded cases, tried on the development project
20 minutesWhy
The scheduler in Session 4 is tested against answers you can work out on paper: these two cases are those answers. The tests read them from a fixture with fixed times; the screens read the same cases as seed rows shifted onto today, made up and marked, so they never age and never reach production. Pushing the migrations and seed to the development project yourself proves they work on a real project before the deploy pipeline applies the migrations to production on merge.
Do this
On the branch aps/tables, write supabase/seeds/scheduling.sql and list it under [db.seed] sql_paths in supabase/config.toml, after the Foundation seed. Never append to supabase/seed.sql, and never seed production. Every row is made up and marked SYNTHETIC: codes start SYN-, names start "SYNTHETIC · ". The seed's day is the next working day after the seed runs, read once, in the site's time zone, so the rows are shifted onto today; it is safe to run twice (a second run leaves the same rows).
One calendar, one shift 08:00 to 17:00 with no breaks. Press SYN-P-03 (machine, capability "stamp", rate 60 per hour, efficiency_factor 0.8, source "SYNTHETIC: not measured" in ext, is_bottleneck true), the only resource with that capability. Setup matrix on attribute "family": A to B 30 minutes, B to A 60, same family 0.
Seed 1 (scenario "SYN Seed setups"): jobs J1, J2, J3, J4 of 96 units, families A, B, A, B, released 08:00, due 17:00.
Seed 2 (scenario "SYN Seed rules"): P 144 units (3 hours) due 11:00, Q 48 units (1 hour) due 12:00, R 96 units (2 hours) due 13:00, all released 08:00, family A.
Three reason codes for late starts (SYN-LATE-MATERIAL, SYN-LATE-TOOL, SYN-LATE-CREW).
Also write the two cases as hand-worked examples with fixed times on a fixed day in tests/fixtures/scheduling-cases.json; Session 4's tests read that fixture, never the seed rows. Add a test that runs the seed twice on an empty database and checks the same rows are there. Push to the same pull request and wait for the checks.When it is green, push to the development project yourself, in a terminal (not inside Claude Code), pasting the password from the entry Supabase: acme-platform-dev database password:
cd ~/code/acme-platform && git fetch && git switch aps/tables && npx supabase link --project-ref tsrqponmlkjihgfedcbanpx supabase db push --include-seedhttps://supabase.com/dashboard/project/tsrqponmlkjihgfedcba/editor
The development project's Table Editor: open aps_job.
That is the first load. After it, reload the made-up rows with npm run seed:dev, never with supabase db reset. Then owner two approves and you merge; the deploy workflow applies the migrations (never the seed) to production.
You will see recreated screen
| scenario | order_ref | qty | due_at | status |
|---|---|---|---|---|
| SYN Seed setups | SYN-J1 | 96 | 17:00 | unscheduled |
| SYN Seed setups | SYN-J2 | 96 | 17:00 | unscheduled |
| SYN Seed rules | SYN-P | 144 | 11:00 | unscheduled |
- Unscheduled until Session 4's scheduler places them.
- Expected until Session 3 adds the access rules.
Check it worked
acme-platform-dev shows the two seeded scenarios with their jobs, the pull request is merged, and the deploy run on main is green.
If it goes wrong
A week later the seeded day is in the past and the Gantt is empty
The seed used fixed dates. Say: Make every seeded time relative to one clock reading at seed time; fixed-date examples belong in tests/fixtures/scheduling-cases.json. Then reload with npm run seed:dev. We hit this: eleven days after seeding, every recent-hours panel was blank.
A later step expects a number the seed does not give
Say: List every count and time a later step expects, and show the seed line that makes it. Fix the seed, not the check. Reviews of five of our modules found this mismatch.
Claude Code offers to run db push for you
Refuse; the deny rule from Session 1 stops it anyway. You run it, on the development project.
Someone suggests supabase db reset --linked to start again
Do not. To start the made-up rows again on the development project, run npm run seed:dev.
Knowledge check
A press has a rate of 50 units an hour and an efficiency factor of 0.8. How many minutes does an order of 200 units take?
Knowledge check
Which describes an infinite-capacity schedule?
References
- PlanetTogether: APS frequently asked questions. https://www.planettogether.com/faq
- SYMESTIC: what is an APS system. https://www.symestic.com/en-us/what-is/aps-system
- ISA: ISA-95 standard, Enterprise-Control System Integration. https://www.isa.org/standards-and-publications/isa-standards/isa-95-standard
- Supabase Docs: Testing your database. https://supabase.com/docs/guides/database/testing
Chapter 2 · Session 3
Who may plan, publish and dispatch, and their screens
A published schedule is what the floor is told to do, so who may change and publish it matters. You write the planner, supervisor and operator into the role matrix, generate the access rules from it, prove every refusal, and build the Gantt for the planner and the dispatch list for the operator's phone.
20 min2 steps3 roles, 2 machine accounts
By the end of this chapter you can
- Add the module's roles, scopes and rights to docs/matrix.json and regenerate the access rules and route list.
- Prove that only the planner publishes and nobody edits a published plan.
- Build the Gantt, scenario compare and a phone dispatch list whose Start and Finish taps work offline and never count twice.
| Role | Scope | May | May never |
|---|---|---|---|
| Planner | Own site | Resources, calendars, setup matrix; build, copy, compare and publish scenarios; lock operations | Edit a published scenario |
| Supervisor | Own area | Read the published plan; record downtime and extra shifts as exceptions; give reasons for late starts | Publish, or change the plan |
| Operator | Own area | See the dispatch list; tap Start and Finish | Open set-up or the Gantt |
| aps_importer (machine) | Its import only | Insert resources, capabilities, rates and open jobs | Read, change or delete anything; publish |
| Scheduler run (machine) | Draft scenarios | Place operations, set job status and KPIs in a draft | Touch a published scenario |
Session 3: The roles in the matrix, rules generated, refusals proven
30 minutesWhy
If rights are written by hand they drift from what was agreed; if they are generated from docs/matrix.json, the database, the routes and the menus always agree. The two rules that matter most here, only the planner publishes and nobody edits a published plan, must be proven by tests that try and fail.
Do this
Read docs/matrix.json, scripts/gen-policies.mjs, scripts/gen-routes.mjs, lib/access/routes.ts and docs/spine-map.md with its M03 section. Before writing any route code, read the relevant guide in node_modules/next/dist/docs/ (this Next.js version keeps request middleware in proxy.ts).
On a new branch aps/access, add to docs/matrix.json:
1. Roles planner, supervisor, operator; machine accounts aps_importer and aps_scheduler. In a separate migration create both as database logins with NOLOGIN, no BYPASSRLS, owning nothing; I set their passwords myself on each project, and you list them by name (never a value) in docs/KEYS.md.
2. Scopes: planner by site; supervisor and operator by area (the area equipment their membership names).
3. Rights from nothing: planner reads every aps_ table and the lookups, writes master data and draft scenarios, publishes; supervisor reads the published scenario and adherence in their area, inserts calendar exceptions for their area's resources, sets reason_code_id on late adherence rows; operator reads the published operations of their area and inserts and updates their own aps_adherence rows (actual_start, actual_end only); aps_scheduler updates operations, job status and KPIs of draft scenarios only; aps_importer only inserts: resources, capabilities, resource capabilities, setup matrix rows, a draft scenario and its jobs; it never reads, updates or deletes. Nobody gets delete.
4. Screens and routes: /scheduling/resources and /scheduling/gantt and /scheduling/compare (planner; Gantt read-only for supervisor), /scheduling/adherence (planner, supervisor), /scheduling/dispatch (operator, supervisor), /api/scheduling/run, /api/scheduling/publish (planner only), /api/scheduling/adherence (operator). No import page or route: real records arrive only through the import workflow in Session 6.
Run node scripts/gen-policies.mjs and node scripts/gen-routes.mjs (it writes lib/access/routes.ts). Write docs/aps-rights-walk.md listing every right Sessions 4 to 6 need, with a test that fails if any is not allowed. Add to supabase/tests/access.test.sql: one allowed and one refused per role and table; nobody but the planner publishes; nobody updates an operation of a published scenario; a supervisor of another area cannot see this area's adherence; aps_importer cannot read anything, adherence included; for every permitted update, the row really changed; a signed-out request to every new screen and route is refused.
Push, open a pull request titled "Scheduling access", wait for every check, and tell me the result in plain words. If a check fails, fix the matrix or the code, never the test.You will see recreated screen
- An operator may write only two columns on their own adherence rows.
- Even the planner cannot edit a published plan: they copy it.
Check it worked
Pull request Scheduling access is green, docs/aps-rights-walk.md passes, and there is a refused test for every role.
If it goes wrong
A Finish tap reports success but actual_end stays empty
The operator's read rule does not cover the row after the change, so the update finds nothing. Say: Make the operator's read rule cover their adherence rows before and after the update, and test that the row really changed. We hit this in three of our modules.
A supervisor can publish because they are signed in
Signed in is not allowed. Say: Add a refused-role test for every role on /api/scheduling/publish. On our platform any signed-in user could delete a whole site.
The generator refuses: a table is missing from the matrix
Correct. Add the row with no rights, then grant only what the walk needs.
Session 3: The Gantt, the comparison and the phone dispatch list
45 minutesWhy
The planner judges a schedule by looking at it, so the Gantt must show load and conflicts honestly. The operator's dispatch list is where the plan meets the floor; if Start and Finish do not work in a dead spot, or count twice, adherence numbers become fiction. Building both against the seed lets the planner and an operator try them before the scheduler exists.
Do this
Read the operator, supervisor and manager screens from Foundation Sessions 12 and 13, including how the operator screens queue taps offline, and follow them. Read node_modules/next/dist/docs/ before adding routes; check proxy.ts still denies every route not in lib/access/routes.ts.
On a new branch aps/screens, against the seed on the development project:
1. /scheduling/resources (planner): resources, rates, efficiency factor with its source, calendar exceptions, setup matrix.
2. /scheduling/gantt (planner; read-only for supervisor): a row per resource, a bar per operation with setup shown separately, closed hours shaded, a resource load view; any overlap or bar outside open hours shown in red with its reason; locked operations marked.
3. /scheduling/compare (planner): two scenarios side by side with their six KPIs.
4. /scheduling/dispatch (operator, phone first): the published operations of my area in start order, one card each (part, quantity, press, planned start and end, setup); big Start and Finish buttons. Each tap records the phone's time and a row id made on the phone, is queued offline, and is sent until confirmed; the same id sent twice makes one row; the server computes start_deviation_min.
44 px tap targets, 16 px fields, 15 px text, no sideways scroll at 360 and 390 px. Empty lists say "Nothing scheduled", never made-up rows. Screen tests for each role, a refused role per screen, and a test that sends the same Start twice and finds one row.
Push, open a pull request titled "Scheduling screens", wait for every check including the preview, and give me the preview address and the demo login for each role.https://github.com/acme-ops/acme-platform/pulls
Open the pull request and its Vercel preview; try the dispatch list on your phone in flight mode, then reconnect.
You will see recreated screen
- The tap is kept on the phone and sent when the signal returns.
- Sending twice makes one row: the id was made on the phone.
You will see recreated screen
| Resource | 08:00 | 12:00 | 16:00 | Load |
|---|---|---|---|---|
| SYN-P-03 | – | – | – | 0% |
- No made-up bars: an empty plan is shown as empty.
Check it worked
The preview opens on your phone; a Start tapped in flight mode arrives once after reconnecting; an operator sent to /scheduling/gantt is refused; the screen tests are green.
If it goes wrong
A Start tapped twice makes two adherence rows
Say: Make the row id on the phone and insert with on conflict do nothing on that id; test the same tap sent twice.
Every adherence row shows the same operator
The page sent the person and the server trusted it. Say: Take the operator from the signed-in session on the server. We hit this: every record said it was created by the founder.
A link on the Gantt opens a blank 404
Say: Start the build, sign in as each role, visit every page and link on the four screens, and report every 404. We once had 130 links pointing nowhere.
Knowledge check
Who may change an operation of a published scenario?
Knowledge check
An operator taps Start twice with no signal, and both taps arrive later. What should the database hold?
References
- Supabase Docs: Row Level Security. https://supabase.com/docs/guides/database/postgres/row-level-security
- W3C: Web Content Accessibility Guidelines (WCAG) 2.2. https://www.w3.org/TR/WCAG22/
- PostgreSQL Documentation: INSERT, including ON CONFLICT. https://www.postgresql.org/docs/current/sql-insert.html
Chapter 3 · Session 4
A finite scheduler, end to end
You predict the answers on paper first, then Claude Code builds the scheduler to match them: finite capacity forward and backward, four dispatch rules, changeover-aware sequencing from the setup matrix, locks that survive a re-run, and scenarios you copy, compare and publish. Three of its tests are the module's definition of done.
30 min3 stepsThe three checks that define done
By the end of this chapter you can
- Predict the seeded cases on paper and turn the predictions into tests.
- Have Claude Code build a deterministic finite scheduler with EDD, SPT, CR and FIFO, proven never to overload a resource.
- Prove that changing the setup matrix changes the sequence as predicted, and that locks survive a re-run.
- Copy, compare and publish a scenario, with one published plan and an event for other modules.
| Rule | Which job goes first | Good at |
|---|---|---|
| EDD (earliest due date) | The one due soonest | Keeping the worst lateness small |
| SPT (shortest processing time) | The shortest job | Finishing the most jobs soonest |
| CR (critical ratio) | Lowest of time left to due ÷ work left | Showing which job is most at risk |
| FIFO (first in, first out) | The earliest release | Fairness and simplicity |
The production-planning body of knowledge the specification points to (ASCM's CPIM) covers these dispatching rules alongside capacity planning [1]. No rule wins every measure, which is why the seeded cases test them against each other.
Session 4: Predict on paper, then build the finite scheduler
35 minutesWhy
A scheduler is only trustworthy if you can say in advance what it will do. Writing the answers on paper first and handing them to Claude Code as tests means the code is judged against your plant sense, not its own. The test that tries hundreds of random cases and finds no overloaded press is the first check that defines done.
Do this
On paper, with this chapter: Seed 2 under EDD (P 08:00–11:00, Q 11:00–12:00, R 12:00–14:00, total lateness 1 hour) and under SPT (Q, R, P; P ends 14:00, 3 hours late); backward from the due dates, P would need to start at 07:00, before the shift, so it is infeasible. Then write docs/scheduling-rules.md with the planner: the start tolerance in minutes that counts as on time, and the longest wait for a scheduler answer they will accept.
Read the M03 section of docs/spine-map.md, docs/scheduling-rules.md and tests/fixtures/scheduling-cases.json. On a new branch aps/scheduler:
1. lib/scheduling/ (plain TypeScript, no database calls inside the algorithm): run minutes = qty / (rate_per_hour × efficiency_factor) × 60; forward and backward finite scheduling on each resource's calendar and exceptions; jobs never overlap on a resource and never sit outside open hours; a job that cannot fit is marked late or infeasible with the reason; dispatch rules EDD, SPT, CR, FIFO as sort keys with ties broken by job code. Same input, same plan, every time.
2. /api/scheduling/run (planner): loads a draft scenario, runs as aps_scheduler, writes operations, job status and the six KPIs, and records how long it took.
3. Tests that read tests/fixtures/scheduling-cases.json, with my predictions written into it as the expected answers: Seed 2 EDD gives P 08:00–11:00, Q 11:00–12:00, R 12:00–14:00 and total lateness 1 hour; SPT gives total lateness 3 hours; backward marks P infeasible with the reason "starts before the shift opens"; Seed 1 run minutes are 120. And a property-based test (fast-check): for 500 random sets of resources, calendars, exceptions and jobs, no resource ever has overlapping operations or work outside its open hours.
4. Time the run on the seeds and on generated sets of 10, 100 and 1,000 jobs, and write the seconds into docs/scheduling-rules.md beside the planner's limit.
Show me the property test failing on a scheduler that ignores calendars, then passing. Push, open a pull request titled "Finite scheduler", wait for every check, and tell me the result in plain words.You will see recreated screen
- The first check that defines done: no overload, found by random cases, not by the three you thought of.
- Latency to answer, measured against the planner's own limit.
Check it worked
Pull request Finite scheduler is green; your paper answers for Seed 2 are its tests; the property test was shown failing then passing; the timings are in docs/scheduling-rules.md.
If it goes wrong
The Gantt shows two bars overlapping on one press
The chart is drawing something the scheduler did not place, or the scheduler is not finite. Say: Add this case as a test that fails, then fix the scheduler, never the test.
Running twice gives two different plans
The scheduler is not deterministic (a tie broken at random, or an unordered list). Say: Find every tie and break it by job code; add a test that runs the same input twice and compares.
A test was green from the start
Say: Break the scheduler on purpose (ignore calendars) and show me the test fails, then restore it. Our page-presence check reported 350 present and 0 absent for weeks because it could only ever say yes.
Session 4: Setups that change the sequence, and locks that survive a re-run
30 minutesWhy
Changeover time is where a good sequence earns its keep, so the sequencer must react to the setup matrix exactly as you predict; if it does not, either the matrix or the code is wrong, and now you can tell which. Planners override for reasons the data does not know, and if a re-run moves their locked work, they stop trusting the tool. These are the second and third checks that define done.
Do this
On paper: Seed 1 in arrival order costs 30 + 60 + 30 = 120 minutes of setup and ends at 18:00, past the shift. Grouped (J1, J3, J2, J4) it costs 30 and ends 16:30. Change A to B to 90: grouped A first now ends 17:30, past the close, while J2, J4, J1, J3 costs 60 and ends at 17:00 exactly. Seed 2 with Q locked at 10:00–11:00 under EDD: R 08:00–10:00, Q, then P 11:00–14:00.
On a new branch aps/sequence:
1. A sequencer: try each job first, then always take the job with the smallest setup from the one just placed (ties: earlier due date, then lower job code); keep the order with the smallest total setup (ties: lower first job code). setup_min is written on the operation when it is placed, so a later matrix change never rewrites a published plan. The first job on a resource needs no setup.
2. Locks: a locked operation keeps its resource and times on every re-run and everything else is planned around it; a lock in closed hours or overlapping another lock is refused with the reason.
3. Tests from my predictions, added to tests/fixtures/scheduling-cases.json: Seed 1 grouped gives J1, J3, J2, J4, 0.5 setup hours, ends 16:30. With A to B set to 90 in the test, the order becomes J2, J4, J1, J3 with 1.0 setup hours, ending 17:00. Seed 2 with Q locked at 10:00-11:00 under EDD gives R 08:00-10:00, Q 10:00-11:00, P 11:00-14:00; a second run gives the identical plan. A property test: for 300 random scenarios with random locks, every locked operation is unchanged after a re-run.
Show each new test failing before the change and passing after. Push, open a pull request titled "Setups and locks", wait for every check, and tell me the result in plain words.You will see recreated screen
- Predict, change one number, check: the matrix and the sequencer agree.
- Locks survive every re-run, in your case and in 300 random ones.
Check it worked
Pull request Setups and locks is green, and its tests are your paper predictions.
If it goes wrong
With A to B at 90 the sequencer still picks J1 first
Either the test changed the matrix in the wrong place, or the sequencer reads a cached matrix. Say: Show me the setup values the sequencer used for this run, and why it chose J1.
A planner's lock moved after a run
Stop and add the case as a failing test. The third pitfall is exactly this; it must never reach the floor.
Session 4: Copy, compare and publish a scenario
25 minutesWhy
Planners need to ask "what if we add Saturday?" without touching the plan the floor is running. Publishing must be all or nothing: the new plan becomes the one, the old is archived, and other modules are told, in one step, so the floor never sees half a plan.
Do this
On a new branch aps/publish:
1. Copy a scenario: a new draft with created_from_id set, all jobs, operations (locks kept), constraints and KPIs copied; the original untouched.
2. /scheduling/compare shows the six KPIs of two scenarios side by side.
3. /api/scheduling/publish (planner only), in one transaction: refuse if any resource is loaded beyond capacity; set status published with published_at and published_by from the session; archive the previously published scenario; write status history; write aps.scenario.published and one aps.job.late_predicted per late job to core_event_outbox.
4. Tests: a copy leaves the original unchanged; publish archives the old one and leaves one published; a scenario with an overload cannot be published; the outbox holds the events; publish by a supervisor is refused.
Push, open a pull request titled "Scenarios and publish", wait for every check, and tell me the result in plain words.Then try it on the preview: copy SYN Seed rules, switch the copy to SPT, run both, compare, and publish the better one.
You will see recreated screen
| KPI | SYN Seed rules · EDD | Copy · SPT |
|---|---|---|
| On time % | 67 | 67 |
| Total lateness (h) | 1.0 | 3.0 |
| Total setup (h) | 0.0 | 0.0 |
| Makespan (h) | 6.0 | 6.0 |
- Six values per scenario, computed by the run, never typed.
- Publishing archives the current plan in the same step.
Check it worked
Pull request Scenarios and publish is green; on the preview, exactly one scenario is published and the outbox holds aps.scenario.published.
If it goes wrong
Two scenarios show as published
The one-published index or the transaction is missing. Say: Show me the publish transaction and the partial unique index; add a test that publishes twice.
Publish shows success but the floor still sees the old plan
Say: After publishing, read the published scenario back from the database and show its id; if it did not change, show an error. On our platform a button reported success while nothing had happened.
Knowledge check
Three jobs: P 3 h due 11:00, Q 1 h due 12:00, R 2 h due 13:00, all from 08:00. Under EDD, how late is R?
Knowledge check
Why does a property-based test, not three hand-picked cases, prove the scheduler never overloads a press?
References
- ASCM: CPIM, Certified in Planning and Inventory Management. https://www.ascm.org/learning-development/certifications-credentials/cpim/
- Fabrico: what is advanced planning and scheduling (APS). https://www.fabrico.io/blog/what-is-advanced-planning-and-scheduling-aps/
- Google OR-Tools: CP-SAT solver. https://developers.google.com/optimization/cp/cp_solver
Chapter 4 · Sessions 5 and 6
Move resources and orders, and switch the old tool off
Resources, routings and open orders come from your ERP or MRP export; old schedules rarely need to move. The import is proven on made-up data, rehearsed once on the development project with a copy IT has approved, and run into production through the pipeline at the start of a side-by-side week. Then the measured week decides the cutover.
30 min5 stepsEnds with the module gate
By the end of this chapter you can
- Build an import that is safe to run twice and refuses a bottleneck with no measured efficiency source.
- Rehearse it on the development project with a copy IT approved in writing, and remove the rehearsal the same day.
- Import into production through import-scheduling.yml, started by a person from main for an approved export, run a week side by side, and compare on-time delivery, changeover hours and adherence.
- Feed measured performance back into capacity, cut over, and record the saving from invoices.
Scheduling has no regulation of its own; the risk is credibility. If capacity data is wrong, the schedule promises dates that cannot be kept and the floor learns to ignore it. So efficiency factors come from measured OEE (availability × performance × quality, as ISO 22400-2 defines the KPIs [1]), each with its source, period and date. A bottleneck with no measured source is a known risk, written down, never a guess.
| KPI | Definition | Compared in Session 6 |
|---|---|---|
| Schedule adherence | Operations started within tolerance ÷ operations scheduled | New module only (the old tool rarely records it) |
| On-time delivery (planned) | Jobs finishing on or before due ÷ jobs | Old against new |
| Changeover hours | Sum of setup time per period and resource | Old against new |
| Bottleneck utilisation | Load ÷ available time on constraint resources | Old against new |
| Key or secret | What it unlocks | Where it lives | Who holds it | Never |
|---|---|---|---|---|
| aps_importer password (development) | Signing in as the insert-only import login on acme-platform-dev; listed by name in docs/KEYS.md | Password manager; GitHub secret APS_IMPORTER_PASSWORD_DEV | pat@acme.com, sam@acme.com | Never in a file, a chat or Claude Code |
| aps_importer password (production) | Signing in as the insert-only import login on acme-platform-prod, until it is set to NOLOGIN at cut-over; listed by name in docs/KEYS.md | Password manager; GitHub secret APS_IMPORTER_PASSWORD_PROD | pat@acme.com, sam@acme.com | Never on a laptop outside the password manager |
| The ERP or MRP export | Resources, routings and open orders, with customer names | A private folder, then the private Storage bucket imports; its sha256 and counts in docs/imports/scheduling-approved.md | The planner | Never in the repository, a test, or a chat |
Session 5: The import, built and tested on a made-up export
35 minutesWhy
An import that cannot run twice, or that writes when you only meant to look, makes the cutover guesswork. A dry run with a report of every row it cannot map, a refusal to load a bottleneck without a measured efficiency source, and a refusal of any export nobody approved mean real data only ever meets a script that has already been reviewed and proven on made-up data.
Do this
First, with the planner, write docs/aps-import-map.md: the export's columns, how ERP work centres map to resources, routings to capabilities and rates, and orders to jobs; and, for each bottleneck, its measured OEE with source and period (or "not measured").
Read docs/aps-import-map.md, the M03 section of docs/spine-map.md and docs/matrix.json. On a new branch aps/import:
1. scripts/import/aps-import.mjs: reads one export file (a zip of the export's CSV files), connects as the database login aps_importer with the password from the environment variable APS_IMPORTER_PASSWORD (never printed), and inserts resources, capabilities, resource capabilities with rates, setup matrix rows and open orders as jobs in a new draft scenario named "Imported <date>". It only inserts: rows that already exist (same code, same order number) are skipped with on conflict do nothing and listed, never read or overwritten, so a second run adds nothing. A resource marked bottleneck with no measured efficiency source is refused and listed. Every row carries ext.import_run.
--dry-run writes a report (counts per kind, every row it cannot map) and changes nothing.
2. supabase/snippets/aps-remove-run.sql, for the development project only: deletes only the rows whose ext.import_run is the run id I type in, and prints what it removed. I paste it into that project's SQL editor myself; nothing runs it automatically.
3. A CI test that fails if any bottleneck resource has no measured efficiency source in ext.
4. tests/import/ on a made-up export (SYN- names): dry run changes nothing; counts match; second run adds nothing; unmeasured bottleneck refused; an export whose sha256 is not approved is refused; a count that differs from the approved counts fails the run; the removal snippet removes only its own run.
5. .github/workflows/import-scheduling.yml: started by hand only (workflow_dispatch) and refusing to run from any branch but main; inputs target (development or production) and dry_run. It downloads the export from the private Storage bucket imports of the target and computes its sha256; it refuses unless that sha256 and the expected count per kind are recorded for that target in docs/imports/scheduling-approved.md on main; it runs the script with APS_IMPORTER_PASSWORD_DEV or APS_IMPORTER_PASSWORD_PROD; it fails on any count mismatch (rows in the export must equal the approved counts, and imported plus skipped must equal the rows in the export); it writes the counts to the job summary and uploads the report as an artifact. No GitHub environment with required reviewers. Never print a secret.
Push, open a pull request titled "Scheduling import", wait for every check, and tell me the result in plain words. Do not run the workflow.You will see recreated screen
- The refusal that keeps nameplate rates out: a bottleneck must have a measured source.
Check it worked
Pull request Scheduling import is green and merged; the workflow's only trigger is workflow_dispatch, it refuses any branch but main, and it reads the approved sha256 and counts from docs/imports/scheduling-approved.md.
If it goes wrong
Claude Code asks for the importer password to test
Refuse. Tests use the made-up export and CI's own throwaway database; you type real passwords only into GitHub's secrets page and the project's SQL editor.
Claude Code suggests a GitHub environment with required reviewers
Say: No environments with required reviewers; the reviewed pull request that records the sha256 is the approval. On the Team plan they are not available for private repositories.
The planner has no measured OEE for a bottleneck
Measure one week by hand tally (planned time, run time, count, good count) before Session 6, or write it as a known risk and keep that press's factor at what the planner can defend.
Session 5: Rehearse the import on the development project
25 minutesWhy
The first run against real data finds what made-up data could not: a work centre with no calendar, a routing with no rate, an order for a part that is not in the spine. Finding them on the development project, with a copy IT has approved in writing, costs nothing; removing the rehearsal the same day keeps that project made-up only.
Do this
Ask IT to approve one copy of the export for the rehearsal, in writing, redacted where it holds personal data (people's names on orders or crews). Work out its fingerprint in a terminal (on Windows, Get-FileHash in PowerShell):
shasum -a 256 ~/private/aps-export.zipOn a new branch aps/import-approval-dev, create docs/imports/scheduling-approved.md with a section "development rehearsal": export file aps-export.zip, sha256 <paste the value>, expected counts <resources, capabilities, rates, setup rows, open orders>, IT's written approval for one rehearsal on acme-platform-dev given on <date> by <role>, redacted where it held personal data, and a line "removed on:" left empty. Open a pull request titled "Scheduling: approve rehearsal export".Owner two approves the pull request and you merge it. On the development project, set the import login's password yourself in the SQL editor (alter role aps_importer login password '…', the value from the password manager), then:
https://github.com/acme-ops/acme-platform/settings/secrets/actions
If missing: new secret APS_IMPORTER_PASSWORD_DEV, the value only.
https://supabase.com/dashboard/project/tsrqponmlkjihgfedcba/storage/buckets
Upload the approved copy to the private bucket imports.
https://github.com/acme-ops/acme-platform/actions/workflows/import-scheduling.yml
Run workflow from main: target development, dry_run true; read the summary; then dry_run false.
The same day: paste supabase/snippets/aps-remove-run.sql with the run id into the development project's SQL editor, delete the file from the bucket, and record the date on the "removed on:" line through a pull request.
You will see recreated screen
| Kind | Approved | In export | Imported | Skipped |
|---|---|---|---|---|
| Resources | 14 | 14 | 13 | 1 |
| Rates | 52 | 52 | 52 | 0 |
| Open orders | 236 | 236 | 236 | 0 |
- It ran only because the export is the approved one.
- Approved, in the export and imported plus skipped must all agree, or the run fails.
- The guard working: measure it, record the source, run again.
Check it worked
Counts agree with the approved counts with every skip explained; a draft run of the imported scenario places every job with no overload; the same day the rehearsal rows are removed, the file is deleted from the bucket, and the date is recorded in docs/imports/scheduling-approved.md.
If it goes wrong
The run refuses: sha256 not approved
The file in the bucket is not the one recorded on main (a re-export changes it). Record the new value through a pull request owner two approves, or upload the approved file.
The run fails at sign-in although the secret exists
The value is probably wrong: on our Academy a key's value was its own name, pasted by mistake. Paste the value only, never NAME=value.
The imported scenario has jobs marked infeasible
Read each reason. Usually a calendar is missing or a due date is already past; fix the map or the calendar, not the scheduler.
Session 6: Import into production through the pipeline, and start the side-by-side week
25 minutes, then a weekWhy
Real resources and orders reach production only through reviewed code that a person starts from main, for an export whose fingerprint and counts were approved in a reviewed pull request, never from a laptop, an upload page or an agent. Importing at the start of the side-by-side week means both schedules plan the same orders on the same Monday, so the week's comparison is fair.
Do this
On the Monday the old tool publishes its plan: take a fresh export, work out its sha256, and add a "production" section to docs/imports/scheduling-approved.md (file, sha256, expected counts, date) through a pull request; owner two approves and you merge. Set aps_importer's password on production yourself in its SQL editor. Then:
https://github.com/acme-ops/acme-platform/actions/workflows/deploy.yml
Check the latest deploy on main is green, so production has every migration.
https://github.com/acme-ops/acme-platform/settings/secrets/actions
If missing: APS_IMPORTER_PASSWORD_PROD, the value only.
https://supabase.com/dashboard/project/abcdefghijklmnopqrst/storage/buckets
Production Storage: upload the export to the private bucket imports.
https://github.com/acme-ops/acme-platform/actions/workflows/import-scheduling.yml
Run workflow from main: target production, dry_run true, then false, then false once more (it must add nothing).
https://acme-platform.vercel.app/scheduling/gantt
As the planner: run the imported draft, check no overload, and publish it for the first scope.
You will see recreated screen
| Resource | Load | Late jobs |
|---|---|---|
| WC-PRESS-03 | 94% | 2 |
| WC-PRESS-06 | 88% | 0 |
- The first check that defines done, on real orders.
- Only the planner sees this button; the old published plan, if any, is archived in the same step.
Check it worked
The run's sha256 matched the approved production entry, production counts equal the approved counts, a second run added nothing, and the imported scenario is published with no resource over capacity. Write the counts in docs/cutover.md.
If it goes wrong
The run fails with "relation does not exist"
Production is missing a migration. Check the deploy run and the daily freshness check from Session 11; fix the deploy, never apply by hand. Our production database once fell nine migrations behind main.
The run fails on a count mismatch
Do not edit the approved counts to make it pass. Read the report, find which rows are missing or extra, fix the export or the map, and record the new file through a reviewed pull request.
Operators see no dispatch list
Check their membership names the area that the resources sit under; the access rules scope by area.
Session 6: Compare the week, and feed what you measured back
30 minutesWhy
A week of both schedules, measured the same way, is the evidence for switching. Comparing on-time delivery, changeover hours and bottleneck load, and reading adherence with its reasons, shows whether the new plan is better and whether the floor followed it. Feeding measured output back into the efficiency factors is what keeps the next week's promises honest.
Do this
On a new branch aps/cutover, write docs/cutover.md from what I give you:
1. Old against new for the week: planned on-time delivery, changeover hours per resource, bottleneck utilisation, each with its source (the old tool's report name; the new module's query). Explain every difference I give you; where I wrote "unexplained", say we are not ready.
2. Schedule adherence from the new module: operations started within the tolerance in docs/scheduling-rules.md ÷ operations scheduled, and the late starts by reason code.
3. The three checks that define done, run on the deployed demo address with date and who ran them: no overload in any published scenario (property test), the setup-matrix prediction, locks kept on re-run.
4. Each resource whose starts or finishes ran consistently late: its measured output this week against its efficiency_factor, and the new factor with its source and period. Then update those factors through the planner's resources screen, never by hand in the database.
My figures:
<paste the old tool's figures, the new module's figures and the check results>
Open a pull request titled "Scheduling cutover evidence".You will see recreated screen
| Measure | Old board | New module | Note |
|---|---|---|---|
| On time (planned) | 71% | 86% | same 236 orders |
| Changeover hours | 31.5 | 22.0 | families grouped |
| Bottleneck load | 123% | 94% | old board was infinite |
| Adherence | not recorded | 82% | tolerance 15 min |
- Every figure has a source; the old board's 123% shows why the new one is needed.
- A factor never changes without a recorded measurement.
Check it worked
docs/cutover.md is merged with no unexplained difference, adherence with reasons, the three checks passing on the deployed address, and every changed factor with its measured source.
If it goes wrong
The new plan looks worse on on-time delivery
Check both planned the same orders with the same due dates. A finite plan often shows lateness the old infinite chart hid; that is the truth arriving, and the planner should see it as such.
Adherence is very low in the first days
Read the reasons before changing anything: often operators are still tapping late. Fix the habit first, then the factors.
Session 6: Cut over, and cancel with the saving written down
20 minutesWhy
The module is finished when the old board or tool stops costing money and nobody plans in it. The saving written as arithmetic from invoices proves the work paid for itself; the module's checks in the testing protocol keep it honest after you have moved on.
Do this
Tell the floor the new dispatch list is the plan, retire the old board, keep the old tool's last export with its sha256 in private storage, set the import login to NOLOGIN on production and development (alter role aps_importer nologin in each project's SQL editor), read the cancellation terms from your own account page and cancel (or note the end date). Then:
On the branch aps/cutover, update docs/cutover.md and docs/scheduling-inventory.md from what I give you: the cutover date; in docs/KEYS.md, aps_importer set to NOLOGIN on both projects with the date; where the old export is stored and its sha256; the old annual cost from invoice <number>, the cancellation or end date, and the saving as arithmetic from the invoices I give you, never an estimate; each tool and workaround marked replaced, retired or still in use, with the date. Add this module's checks to docs/testing-protocol.md (no-overload property test, setup-matrix prediction, locks on re-run, the bottleneck-source check). Push and tell me when the pull request is green.
My figures:
<paste the dates, invoice figures and storage location>You will see recreated screen
- The module's gates now run on every later change to the platform.
Check it worked
The old tool is cancelled or has an end date, aps_importer is NOLOGIN on both projects, its export is stored with its fingerprint, the saving is written from invoices, and docs/testing-protocol.md lists the module's checks.
If it goes wrong
A planner keeps a private spreadsheet "just in case"
Ask what it holds that the module does not. If it is a constraint (a die that cannot follow another), add it as an aps_constraint; if it is a habit, give it a week.
Knowledge check
Where must a bottleneck's efficiency factor come from?
Knowledge check
Why is the production import run at the start of the side-by-side week?
References
- ISO 22400-2:2014, KPIs for manufacturing operations management. https://www.iso.org/standard/54497.html
- GitHub Docs: Manually running a workflow. https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
- GitHub Docs: Using secrets in GitHub Actions. https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions
- Capterra: PlanetTogether overview and reviews. https://www.capterra.com/p/80205/PlanetTogether/reviews/
Chapter 5 · 12 questions · 80% passes
Final assessment
Twelve questions across the module. Score 80% (10 of 12) to pass. Your LMS records your score and each answer; you can review the chapters and try again.
15 min12 questions≈ 15 minutesRetake allowed
Your result
CivOps AI Academy
Scheduling and Dispatch: Finite-Capacity Scheduling on Your Own Platform
Element M03 complete · Learner
Your LMS records this completion. For the CivOps Foundation certificate, finish the Foundation Course at https://civops.io/learn.