Prep planning & food-waste tracking
Stakeholder: Operations lead at a fictional restaurants & food service organization
Resource status: Structured brief. No project-specific implementation or runnable test kit is attached yet.
Industry profile and operating context
Prepare, sell and replenish perishable products across service periods.
Common systems: POS, inventory, recipes, supplier orders
Stakeholders: Frontline operator, Team supervisor, Business owner or reporting consumer
Data boundary: Use synthetic food records. This is planning software, not food-safety certification.
SkillProof learning taxonomy; not an official NAICS classification.
The business problem
Ingredient counts and recipe yields disagree across suppliers.
The domain rule
A purchase case must convert to recipe units using its effective conversion version.
People using the workflow
- Operator: create or inspect prep planning & food-waste tracking records
- Supervisor: review assigned exceptions and controlled changes
- Business owner: view permitted summaries and trace results
Data you will model
Synthetic restaurants & food service records with fields: ingredient_id,recipe_id,supplier_id,case_size,usable_units,waste_units. Include a duplicate source event, an invalid value, a missing reference, an out-of-order timestamp and one corrected record.
Required field dictionary
Required means field presence. Define types, units, nullability and state-dependent constraints before implementation; a pending record may not yet have an approval timestamp.
ingredient_id— ingredient id in this synthetic business case; requiredrecipe_id— recipe id in this synthetic business case; requiredsupplier_id— supplier id in this synthetic business case; requiredcase_size— case size in this synthetic business case; requiredusable_units— usable units in this synthetic business case; requiredwaste_units— waste units in this synthetic business case; required
Write a Python function that evaluates one record against this rule: A purchase case must convert to recipe units using its effective conversion version. Explain accepted and rejected examples.
Build a connected workflow for prep planning & food-waste tracking with persisted records, explicit states and backend permissions. Business rule: A purchase case must convert to recipe units using its effective conversion version.
A corrected case size must not rewrite historical prep quantities. Exercise the failure through the API, not just the interface.
Ordered project checkpoints
- Draw the actors, states and permission matrix; identify trusted identity fields.
- Create labeled examples that satisfy and violate: A purchase case must convert to recipe units using its effective conversion version.
- Model the required fields (ingredient_id,recipe_id,supplier_id,case_size,usable_units,waste_units) with keys, constraints and retained history.
- Build a Python service and interface; enforce the permission matrix on every protected request.
- Write a failing regression check for: A corrected case size must not rewrite historical prep quantities.
- Measure the stated business metric using a fixed fixture, then handle the change request.
Acceptance criteria
- A purchase case must convert to recipe units using its effective conversion version.
- A corrected case size must not rewrite historical prep quantities.
- Unauthorized record reads and mutations are rejected on the backend.
- Every accepted or rejected change retains a source reference and meaningful reason.
Required test matrix
| Case | Expected behavior to demonstrate |
|---|---|
| Valid record | A purchase case must convert to recipe units using its effective conversion version. |
| Duplicate or replay | A corrected case size must not rewrite historical prep quantities. |
| Unauthorized actor | Reject without leaking another user or location record. |
| Missing required field | Return a clear validation error or quarantine reason. |
| Corrected or out-of-order record | Preserve original history and apply an explicit correction policy. |
| Interrupted write | No partial state transition or falsely committed checkpoint. |
Business measurement
Measure avoidable waste units per fixed sales scenario on a fixed synthetic fixture. State input size, conditions and actual observations. Do not claim real customer savings or operational impact.
Stakeholder change request
A second supplier sells a different case size.
Portfolio evidence
- Business workflow and permission matrix
- Data contract and synthetic fixture
- Implementation with boundary and failure checks
- Results, decision record and handoff notes
Completion standard
Meet every acceptance criterion, demonstrate the required failure cases, retain actual results and explain limitations. A claimed result or downloaded brief does not establish demonstrated competence.
Scope and data boundaries
- Use synthetic food records. This is planning software, not food-safety certification.
- Local synthetic simulation. Do not use production systems or real confidential records.
- Define scope, test conditions and unresolved assumptions before claiming completion.
Fixture skeletons are illustrative, not validated test datasets. Adapt values, define expected results and retain the fixture version. Starting opens your signed-in workspace with this project selected. Next catalog review: 2027-01-22.