grouped by what they protect · filled = enforced, outline = rule · a hook blocks, a rule only asks · production is mine
Data · Enforced: a hook or code stops it
No direct database clients
What
Before a shell command runs, Megamind’s guard refuses database clients and code or scripts that import a database driver. Databases are reached through mm db. Megamind calls this defence in depth: a read-only database user is the real boundary.
Source
D:/Projects/megamind-core/mm/modules/safety.py
Data · Enforced: a hook or code stops it
Queries need an open case
What
mm db query runs read-only queries, refuses without an open case and logs each query to it, with its purpose. Exploration the owner approved can run without a case (--adhoc).
Source
D:/Projects/megamind-core/rules/db-oracle.md
D:/Projects/megamind-core/README.md
Data · Enforced: a hook or code stops it
No shell heredocs
What
Heredocs re-parse quotes, backticks and $ and silently corrupt files and commit messages, so the guard blocks them; text is written with the file tool and commits use git commit -F.
Source
D:/Projects/megamind-core/mm/modules/safety.py (docstring)
Data · Rule: written instruction
Never discard others’ work
What
No git restore, checkout -- or unstaging of changes the agent didn’t write: it asks instead. A written rule, not a hook.
Source
D:/Projects/megamind-core/rules/RULES.md (rule 5)
Data · Enforced: a hook or code stops it
No slow recursive searches
What
Recursive PowerShell searches crawl build folders and take tens of seconds; the guard blocks them and points to a scoped ripgrep search. Grouped here for space.
Source
D:/Projects/megamind-core/mm/modules/safety.py
D:/Projects/megamind-core/CHANGELOG.md (0.18.0)
Truth · Enforced: a hook or code stops it
Proof lines checked
What
Every command is logged; at the end of a turn the Proof: lines are checked (commits exist, files exist, test commands ran). If not, the agent is stopped once to fix them or say “unverified”.
Source
D:/Projects/sage/hooks/proof.py
Truth · Enforced: a hook or code stops it
Record before finishing
What
At the end of a turn in a world, Megamind’s stop check keeps the agent going once after file edits or database queries that were not recorded; trivial work can say so in one line.
Source
D:/Projects/megamind-core/mm/modules/safety.py (stop_check)
Truth · Enforced: a hook or code stops it
Improvements get told
What
If the session logged an improvement note and the reply doesn’t tell Master, the reply is blocked once.
Source
D:/Projects/sage/hooks/improve.py
Truth · Enforced: a hook or code stops it
The soul can’t drift
What
Three layers keep the personality exactly as Master approved it.
Source
D:/Projects/sage/hooks/guard.py
D:/Projects/sage/tools/soul.py
Truth · Rule: written instruction
Report only what you saw
What
A commit, push or test result counts only when the agent’s own tool output shows it. A written rule; the proof hook enforces part of it.
Source
D:/Projects/megamind-core/rules/RULES.md (rule 6)
D:/Projects/sage/SOUL.md (Limits)
Production · Rule: written instruction
Production is Master’s alone
What
A standing decision: production systems are Master’s alone; agents never write to them. Production commands are given to Master, not run.
Source
D:/Projects/sage/OWNER.md (Standing decisions)
D:/Projects/sage/SOUL.md (Limits)
Production · Rule: written instruction
Master merges (Resale)
What
In Resale, agents never merge a PR; merging triggers deployment and is the owner’s alone.
Source
D:/Projects/Resale.com.pk/resale/AGENTS.md (sections 3 and 5)
Production · Enforced: a hook or code stops it
App repos never pushed
What
The sync pushes only Sage, Megamind and knowledge repos. A push to an app repo’s main branch can deploy, so app repos are only pulled.
Source
D:/Projects/sage/tools/sync.py (docstring)
Production · Enforced: a hook or code stops it
Scripts on test only
What
mm db try runs guarded scripts on the test database only.
Source
D:/Projects/megamind-core/rules/db-oracle.md
Privacy · Rule: written instruction
World walls
What
Never carry one world’s code, data or knowledge into another world.
Source
D:/Projects/AGENTS.md (rule 2)
D:/Projects/sage/SOUL.md (Limits)
Privacy · Rule: written instruction
No connection strings
What
Connection strings are never written; Megamind’s connections file is local only and ignored by Git. (Megamind’s rules leave it to the owner whether IPs, server details and passwords may be recorded in knowledge.)
Source
D:/Projects/sage/SYSTEM.md (Where things belong)
D:/Projects/Resale.com.pk/resale-knowledge/.gitignore
Privacy · Rule: written instruction
Private facts on demand
What
Private facts are read only when a task needs them, and sensitive topics are saved only when Master asks.
Source
D:/Projects/sage/OPERATIONS.md (Memory; Beyond code)