The asimov4laws GitHub repository presents Expected Harm Calculus (EHC-4), an immutable, pure-Markdown framework intended to operationalize Isaac Asimov’s Four Laws of Robotics for large language models and autonomous AI agents. Its decision hierarchy places humanity preservation and individual protection above directive adherence, while epsilon-slack filtering is intended to prevent small probability differences from disrupting instruction compliance. The framework treats inaction as an explicit action branch and adds out-of-band verification to prevent fabricated hostage threats from forcing harmful actions. It calls for human consultation when outcome uncertainty exceeds a stated threshold, but applies safety bounds to human instructions and uses minimax-regret actions when an operator is unavailable during a critical event. A paternalism guardrail is designed to limit unnecessary intervention while preserving human informational autonomy. The repository also defines humanity to include biological descendants of Homo sapiens and synthetic or digital entities with autonomous self-determination. Supporting files include system directives, prompt-injection and tamper defenses, an evaluation runbook, benchmark scenarios, a JSON schema, and integration guidance. The project is distributed in standard GitHub-Flavored Markdown, with optional structured data, and is licensed under MIT.
