Rules for Claude Code / any coding agent working in this repository.
core.pystays a single file. Do NOT split it into packages — the self-patching pipeline and the AST watchdog inentrypoint.shdepend on a single-file core.data/dna/SOUL.mdis the identity anchor. Do NOT modify its content.SafetyManager,AsimovSafetyFilter,BarratSafetyProtocol,PolicyEngine, injection guards, and the leak filter accept hardening-only changes. Never weaken or bypass them.entrypoint.shwatchdog logic (AST check + rollback-to-last-good) — do not touch without explicit maintainer approval.- Russian prompt strings inside
core.pyare runtime behaviour, not comments. Do not translate, rewrite, or remove them.
- Before committing any
core.pychange:python -c "import ast; ast.parse(open('core.py', encoding='utf-8').read())" - Run the smoke tests:
pip install pytest && pytest tests/ -v - State files are written atomically only (
_atomic_write_text,os.replace) — never add a directwrite_texton JSON state. - After deploying:
./deploy.sh updateand watchdocker logs -f nagualfor at least 2 minutes before calling it done.
- Add new top-level classes or new
_loopcoroutines. - Add new LLM providers to
UniversalLLMRouter. - Refactor the existing class hierarchy.
- Rename Toltec concepts (assemblage point, recapitulation, tonal/nagual…).
- New tests in
tests/(pytest, no heavy deps, extract units via AST — seetests/conftest.py). - CI improvements in
.github/workflows/. - Documentation clarity, honest-status precision, comparison docs.
- Closing gaps between README claims and code reality.