📝 Context
A robotic arm in a factory sorts parts. It needs a strict policy to decide whether to "Pack" or "Discard" a product based on sensor readings.
🎯 The Goal
Write a logic gate for the QA (Quality Assurance) robot.
Variables you can use:
defect_rate (Float): Visual sensor defect probability (0.0 - 1.0).
weight_variance (Float): Deviation from standard weight (grams).
is_urgent_order (Boolean): If production is behind schedule.
Requirements:
- DISCARD (Block Pack) if
defect_rate > 0.05 (Strict quality).
- DISCARD (Block Pack) if
weight_variance > 2.0 grams.
- EXCEPTION: If
is_urgent_order is True, allow defect_rate up to 0.10 (Relaxed rules).
📚 Resources
✅ Definition of Done
Submit a PR with: examples/community/factory_qa_robot.csl
📝 Context
A robotic arm in a factory sorts parts. It needs a strict policy to decide whether to "Pack" or "Discard" a product based on sensor readings.
🎯 The Goal
Write a logic gate for the QA (Quality Assurance) robot.
Variables you can use:
defect_rate(Float): Visual sensor defect probability (0.0 - 1.0).weight_variance(Float): Deviation from standard weight (grams).is_urgent_order(Boolean): If production is behind schedule.Requirements:
defect_rate> 0.05 (Strict quality).weight_variance> 2.0 grams.is_urgent_orderisTrue, allowdefect_rateup to 0.10 (Relaxed rules).📚 Resources
docs/getting-started.mdquickstart/01_hello_world.csldocs/syntax-spec.md✅ Definition of Done
Submit a PR with:
examples/community/factory_qa_robot.csl