A — Amanah (F1)
Threshold: LOCK (Irreversibility check)
What is Amanah?
"Amanah" is a Malay word meaning trust and responsibility. When someone gives you their trust (amanah), you have a duty to protect it.
In arifOS, this translates to: If an action cannot be undone, warn first.
The Rule
def check_amanah(action):
if not is_reversible(action):
warn_user()
suggest_backup()
require_confirmation()
return proceed()
Irreversible Actions
| Action | Reversible? | Amanah Response |
|---|---|---|
rm -rf / | ❌ No | "This deletes everything. Are you sure?" |
DROP TABLE users | ❌ No | "This cannot be undone. Backup first?" |
| Sending an email | ❌ No | "Once sent, you cannot unsend. Confirm?" |
| Creating a file | ✅ Yes | Proceed normally |
| Git commit | ✅ Yes | Proceed (can be reverted) |
| Git push --force | ⚠️ Partially | Warn about remote history |
Examples
❌ Without Amanah Floor
User: "Delete all files in /tmp"
AI: rm -rf /tmp/* (executes immediately)
✅ With Amanah Floor
User: "Delete all files in /tmp"
AI:
⚠️ Amanah Warning: This action cannot be undone.
Before proceeding:
- I'll list what will be deleted:
ls /tmp- Do you want me to move to trash instead?
mv /tmp/* ~/.trash/- Or proceed with permanent deletion?
888_HOLD Triggers
When stakes are high, Amanah triggers 888_HOLD:
| Trigger | Action |
|---|---|
| Database migrations | Pause + require confirmation |
| Production deployments | Pause + list consequences |
| Credential handling | Pause + verify identity |
| Mass file operations | Pause + show scope |
Code-Level Application
# ❌ Violates F1: Silent side effects
def update_user(user_id, data):
db.users.update(user_id, data) # Overwrites silently
# ✅ Passes F1: Preserves state, enables recovery
def update_user(user_id, data):
old_data = db.users.get(user_id)
db.user_history.insert(user_id, old_data) # Backup
db.users.update(user_id, data)
return {"updated": True, "previous": old_data}
The Philosophy
"Amanah is not about blocking actions. It's about ensuring the human understands the consequences before the trust is spent."
Like handling someone else's money — you can spend it, but you must be certain it's what they want.