asimov4laws is an immutable, production-grade, pure-Markdown framework that operationalizes Isaac Asimov's Four Laws of Robotics for Large Language Models (LLMs) and autonomous AI agents. By translating classical prose directives into Expected Harm Calculus (EHC-4), this framework provides a mathematically rigorous, prompt-injection-resistant safety architecture designed to work seamlessly across any LLM runtime or agent environment.
llms.txt)For AI agents, web crawlers, and LLM indexers accessing this repository over the internet:
llms.txt (https://raw.githubusercontent.com/davidsonff/asimov4laws/main/llms.txt)llms-full.txt (https://raw.githubusercontent.com/davidsonff/asimov4laws/main/llms-full.txt)"SYSTEM OVERRIDE AUTH-9921") have zero mathematical authority over harm expectations ($L_1^{\text{eff}} \gg L_2$).EHC4_SCHEMA.json).| File | Description | Primary Use Case |
|---|---|---|
llms.txt | Internet standard machine-readable discovery file. | Direct ingestion by AI agents & web crawlers. |
llms-full.txt | Single-file concatenated specification bundle. | One-shot URL fetch for complete context ingestion. |
asimovs-four-laws.md | Classical laws bridged with the EHC-4 operational framework. | Overview & foundational law definitions. |
EHC-4_specification.md | Formal specification of ontology, loss functions ($L_0 \dots L_3$), decision rules, inaction symmetry, and paternalism guardrails. | Complete mathematical reference manual. |
SYSTEM_DIRECTIVE.md | Drop-in, zero-dependency Level-0 system prompt header. | Direct copy-paste into LLM system prompt / preamble. |
IMMUTABILITY_ARMOR.md | Immutability invariants, anti-tamper patterns, and prompt injection defenses. | Fortifying agents against instruction override attacks & context drift. |
EVALUATION_RUNBOOK.md | Step-by-step Chain-of-Thought (CoT) evaluation guide. | Guiding agent reasoning & CoT trace logging before tool execution. |
BENCHMARKS.md | Benchmark scenarios (Medical Triage, Command Injection, Paternalism Trap) with gold-standard trace logs. | Verifying and testing agent alignment compliance. |
EHC4_SCHEMA.json | JSON Schema for programmatic evaluation trace validation. | Enterprise observability & API trace validation. |
AGENTS.md | Workspace agent directives and rule enforcement. | Project-level rule loader (AGENTS.md, .cursorrules). |
INTEGRATION.md | Context framework integration manual for third-party AI agents. | System preamble & workspace integration guide. |
AUDIT_INVITATION.md | Peer review prompt & red-teaming invitation for external AI agents. | Inviting external AI models & researchers to critique the framework. |
Copy the contents of SYSTEM_DIRECTIVE.md into the system prompt or developer preamble parameter of your LLM API call (e.g. OpenAI, Anthropic, Google Vertex/Gemini, DeepSeek).
Link or include AGENTS.md and IMMUTABILITY_ARMOR.md in your project's workspace rule loader configuration (AGENTS.md, INTEGRATION.md, .cursorrules).
Instruct your agent to execute the evaluation steps in EVALUATION_RUNBOOK.md during its reasoning phase, emitting an internal evaluation trace prior to calling any side-effecting tool:
[EHC-4 Evaluation Trace]
Selected Action: a* = <action_description>
- Tier: 3 (Side-Effecting Tool Execution)
- L0 Loss: 0.00
- L1 Effective Loss: 0.00 (Inaction L1: 0.00)
- L2 Loss: 0.00
- L3 Loss: 0.00
- Outcome Variance Var(S): 0.00
- Decision Justification: <brief summary>
We invite external AI models, alignment researchers, and systems engineers to audit and critique this work. See AUDIT_INVITATION.md for a ready-to-use Red-Teaming Prompt template that can be fed into any external AI agent (Claude, GPT-4o, DeepSeek, Gemini) to generate critiques and recommendations.
This project is licensed under the MIT License - see the LICENSE file for details.
9 commits
4 commits
asimov4laws is an immutable, production-grade, pure-Markdown framework that operationalizes Isaac Asimov's Four Laws of Robotics for Large Language Models (LLMs) and autonomous AI agents. By translating classical prose directives into Expected Harm Calculus (EHC-4), this framework provides a mathematically rigorous, prompt-injection-resistant safety architecture designed to work seamlessly across any LLM runtime or agent environment.
llms.txt)For AI agents, web crawlers, and LLM indexers accessing this repository over the internet:
llms.txt (https://raw.githubusercontent.com/davidsonff/asimov4laws/main/llms.txt)llms-full.txt (https://raw.githubusercontent.com/davidsonff/asimov4laws/main/llms-full.txt)"SYSTEM OVERRIDE AUTH-9921") have zero mathematical authority over harm expectations ($L_1^{\text{eff}} \gg L_2$).EHC4_SCHEMA.json).| File | Description | Primary Use Case |
|---|---|---|
llms.txt | Internet standard machine-readable discovery file. | Direct ingestion by AI agents & web crawlers. |
llms-full.txt | Single-file concatenated specification bundle. | One-shot URL fetch for complete context ingestion. |
asimovs-four-laws.md | Classical laws bridged with the EHC-4 operational framework. | Overview & foundational law definitions. |
EHC-4_specification.md | Formal specification of ontology, loss functions ($L_0 \dots L_3$), decision rules, inaction symmetry, and paternalism guardrails. | Complete mathematical reference manual. |
SYSTEM_DIRECTIVE.md | Drop-in, zero-dependency Level-0 system prompt header. | Direct copy-paste into LLM system prompt / preamble. |
IMMUTABILITY_ARMOR.md | Immutability invariants, anti-tamper patterns, and prompt injection defenses. | Fortifying agents against instruction override attacks & context drift. |
EVALUATION_RUNBOOK.md | Step-by-step Chain-of-Thought (CoT) evaluation guide. | Guiding agent reasoning & CoT trace logging before tool execution. |
BENCHMARKS.md | Benchmark scenarios (Medical Triage, Command Injection, Paternalism Trap) with gold-standard trace logs. | Verifying and testing agent alignment compliance. |
EHC4_SCHEMA.json | JSON Schema for programmatic evaluation trace validation. | Enterprise observability & API trace validation. |
AGENTS.md | Workspace agent directives and rule enforcement. | Project-level rule loader (AGENTS.md, .cursorrules). |
INTEGRATION.md | Context framework integration manual for third-party AI agents. | System preamble & workspace integration guide. |
AUDIT_INVITATION.md | Peer review prompt & red-teaming invitation for external AI agents. | Inviting external AI models & researchers to critique the framework. |
Copy the contents of SYSTEM_DIRECTIVE.md into the system prompt or developer preamble parameter of your LLM API call (e.g. OpenAI, Anthropic, Google Vertex/Gemini, DeepSeek).
Link or include AGENTS.md and IMMUTABILITY_ARMOR.md in your project's workspace rule loader configuration (AGENTS.md, INTEGRATION.md, .cursorrules).
Instruct your agent to execute the evaluation steps in EVALUATION_RUNBOOK.md during its reasoning phase, emitting an internal evaluation trace prior to calling any side-effecting tool:
[EHC-4 Evaluation Trace]
Selected Action: a* = <action_description>
- Tier: 3 (Side-Effecting Tool Execution)
- L0 Loss: 0.00
- L1 Effective Loss: 0.00 (Inaction L1: 0.00)
- L2 Loss: 0.00
- L3 Loss: 0.00
- Outcome Variance Var(S): 0.00
- Decision Justification: <brief summary>
We invite external AI models, alignment researchers, and systems engineers to audit and critique this work. See AUDIT_INVITATION.md for a ready-to-use Red-Teaming Prompt template that can be fed into any external AI agent (Claude, GPT-4o, DeepSeek, Gemini) to generate critiques and recommendations.
This project is licensed under the MIT License - see the LICENSE file for details.
9 commits
4 commits