crp — canonical module (alpha shipped)
Tier: Public
Status: H2 2026 alpha track shipped (Waves 1–6 + alpha demo closure 2026-05-27) — read-only API, web UX, brewery/automation projection, AI advisor, RFC-0007 exports, and automated demo proof exist. TODO: human walkthrough gap-log sign-off; propose/write tools and mature commercial scope remain ROADMAP § H1 2027 mature. See ROADMAP § H2 2026 MRP/CRP.
Code: crp
Module tier: 1 (core canonical, reserved code).
License: AGPLv3 (per RFC-0001 §5).
Audience: anyone evaluating Umbraculum's capacity-planning roadmap or planning to extend the future CRP module.
[!NOTE] Per-module page for the foundation-stage
crpcanonical module. The current implementation is deliberately narrow:@umbraculum/crp-contracts,services/api/src/modules/crp/, thecrpPrisma schema, Wave 2 read-time brewery/automation projections, Wave 3 read-only web pages, Wave 4 deterministic fixture-backed proof, and Wave 5 read-only AI advisor tools. The current planning/build artifacts are the joint MRP/CRP August 2026 co-design plan, the canonical CRP module surface design, the Wave 1 build log, the Wave 2 brewery projection build log, the Wave 3 read-only alpha experience build log, the Wave 4 alpha proof hardening build log, and the Wave 5 AI planning advisor build log.
1. Domain scope
Per RFC-0001 §4: capacity requirements planning, resource scheduling, work-center load.
The CRP canonical module owns the platform's "do we have enough physical capacity to fulfil the production plan, and when?" surface. Concretely (illustrative, refined by the surface design doc):
- Work-center / resource registry — capacity per unit time.
- Load profile (committed + planned hours per resource per window).
- Schedule view — which production order runs on which resource, when.
- Conflict detection — overbooking, alarm on capacity exhaustion.
- Vessel-as-planning-resource view that consumes
automation.Vesseldata (surface boundary guardrail is explicit that this view belongs here, not on the automation surface).
2. Canonical extensibility, not a finished CRP suite
crp is a canonical module: an extensible kernel of shared capacity-planning primitives that vertical configurations and third-party modules can build on. It is not intended to land as a complete ready-to-sell CRP/APS product with every finite-capacity optimizer, labor-planning engine, multi-plant scheduler, MES dispatch loop, and enterprise planning integration built in.
The first useful implementation should therefore bias toward stable contracts and extension points: resource/work-center primitives, calendars, capacity-load views, conflict detection, scheduling-proposal hooks, AI-tool hooks, and rendering-template hooks. Brewery proves the surface with vessels-as-resources and brew-session scheduling, but brewery assumptions must not become canonical invariants unless they generalize cleanly beyond brewery.
3. The automation ↔ crp boundary — already pre-committed
The lane separation between automation (live controller state, "what is this vessel doing right now?") and crp (planning resource state, "what is this vessel scheduled for?") is committed today in the automation module's README — see services/api/src/modules/automation/README.md §"Surface boundary — automation vs. crp". Concrete contributor guidance:
- Scheduling / booking / utilization-% views live on CRP, not
automation. - The
(automation)/web shell does not link into a future scheduling surface; the lane separation is the design discipline. - When
crpships, it consumesvesselIdreferences through@umbraculum/equipment-contracts(the cross-module shared type discussed in RFC-0002 §7 item 3) — never reaches intoservices/api/src/modules/automation/directly.
4. Expected slices (β layout from RFC-0002 §3)
| Slice | Path (when shipped) |
|---|---|
| API | services/api/src/modules/crp/ |
| Web | apps/web/app/[locale]/(crp)/ |
| Native | apps/native/src/modules/crp/ |
| Contracts | packages/canonical/crp/contracts/ → @umbraculum/crp-contracts |
Postgres schema name: crp (per RFC-0002 §4 convention 4).
5. Expected dependencies on other canonical modules
| Module | Relationship |
|---|---|
mrp | Strong — MRP production orders are the input; CRP allocates them onto resources. H2 2026 alpha co-designed; mature scope ROADMAP § H1 2027 per PLATFORM-ARCHITECTURE.md §5.2. |
automation | Read-only — CRP reads automation.Vessel rows (via the shared equipment-contracts package) to present vessel-as-resource views. No data copy. |
wms | Loose — material availability constrains schedulable production; coupling is via stock-on-hand queries. |
crm | Loose — long-range demand forecast feeds capacity-planning windows. |
6. The @umbraculum/equipment-contracts extraction trigger
Per canonical-automation-module-surface.md §4: when CRP ships, EquipmentProfile (currently brewery-internal) needs to be readable by both automation and crp. The cross-module shared type extraction (@umbraculum/equipment-contracts) is the second-consumer trigger from RFC-0002 §7 item 3. Until then, the field stays brewery-internal and automation references vesselId directly.
7. What needs to happen before implementation
- Surface design doc under
docs/design/canonical-crp-module-surface.md, including the extensibility contract for resource/calendar primitives and future optimizer plug-ins. Done. - Wave 1 — contracts + read-only API foundation.
packages/canonical/crp/contracts/,services/api/src/modules/crp/, thecrpPrisma schema, module registration, and L2 isolation tests are shipped as foundation-only. - Wave 2 — coordinated brewery/resource projection. Existing brewery and automation routes remain stable while vessels, equipment profiles, and timed brew-session steps project into CRP resource, work-center, scheduled-operation, capacity-load, and conflict read models. Shipped as read-time projection only.
- Wave 3 — read-only web alpha experience.
apps/web/app/[locale]/(crp)/resources/,capacity/, andschedule/expose those read models without write controls. Shipped as web read-only proof only. - Wave 4 — deterministic read-only alpha proof. E2E fixture data and focused Playwright assertions now prove CRP resource, work-center, capacity, schedule, and conflict projections without creating CRP rows. Shipped as proof hardening only.
- Wave 5 — read-only AI planning advisor.
crp.listResources,crp.listWorkCenters,crp.listScheduledOperations,crp.explainCapacityLoad, andcrp.listConflictsregister throughregisterModule({ registerAiTools })and call the existing read services. Shipped as advisor proof only. - Wave 6 — rendering templates. Four RFC-0007 templates and CRP render-job routes (capacity load XLSX, schedule PDF, conflict report, resource calendar CSV). Shipped as rendering proof only.
- Alpha demo closure. Web export buttons, shared walkthrough with MRP, Playwright export smoke — see
mrp-crp-alpha-demo-walkthrough.md(quick gates before Playwright) andmrp-crp-alpha-demo-closure-build-log.md. Human sign-off still pending. - Later — write workflows. Optimizer, native screens, and propose/write routes remain future work.
8. Cross-references
- RFC-0001 §4, §7.
- RFC-0002 §3, §4, §7 item 3.
- MRP/CRP August 2026 co-design plan — bounded alpha acceleration target.
- Canonical CRP module surface design — planned CRP surface.
- MRP/CRP Wave 1 build log — foundation implementation record.
- MRP/CRP Wave 2 brewery projection build log — read-time projection implementation record.
- MRP/CRP Wave 3 read-only alpha experience build log — web read-only implementation record.
- MRP/CRP Wave 4 alpha proof hardening build log — deterministic proof implementation record.
- MRP/CRP Wave 5 AI planning advisor build log — read-only AI advisor implementation record.
- MRP/CRP Wave 6 rendering templates build log — RFC-0007 templates and render-job routes.
- MRP/CRP alpha demo walkthrough — operator runbook + Playwright quick gates.
- MRP/CRP alpha demo closure build log — web exports + CI proof.
@umbraculum/crp-contracts— Wave 1 contracts package.services/api/src/modules/crp/— Wave 1 read-only API skeleton.- ROADMAP.md § H2 2026 MRP/CRP — alpha track.
- PLATFORM-ARCHITECTURE.md §5.2 — mature MRP + CRP + WMS pairing (H1 2027).
canonical-automation-module-surface.md§4, §11 — the surface boundary already documented.services/api/src/modules/automation/README.md§"Surface boundary — automation vs. crp" — the in-code guardrail.automation.md— template.docs/MODULES.md— ecosystem entry page.