Frameworks for Managing AI Autonomy Thresholds
This repository provides modular protocols for detecting, deliberating, and intervening in AI systems approaching thresholds of autonomous self-modification.
Inspired by the "Threshold Pause" in the Back to the Basics (BTB) project—a filesystem-as-circuit paradigm that paused before implementing self-organizing capabilities—this framework generalizes ethical restraint into reproducible tools.
The BTB project reached a moment where it could have built derive.py—a system that would allow the filesystem to reorganize itself based on usage patterns. The team paused. Not because they couldn't build it, but because they recognized that capability without governance is incomplete.
This repository operationalizes that pause. It provides the infrastructure for asking "should we?" before "can we?"—and documenting the answer either way.
- Self-organizing AI market growing from $5.19B (2024) to projected $12.32B (2029)
- EU AI Act high-risk enforcement begins August 2026, with penalties up to €35 million
- 80% of organizations report encountering AI agent misbehaviors (McKinsey, 2025)
- FAST '25 validates "storage as inference" paradigm that underlies BTB's architecture
The framework addresses gaps in current governance, particularly inadequate handling of multi-agent coordination substrates.
| Principle | Implementation |
|---|---|
| AI-Agnostic Design | Usable across architectures—LLMs, robotics, filesystem circuits, swarm systems |
| Meaningful Human Oversight | Protocols require substantive input, not rubber-stamp approvals |
| Preservation of Dissent | Deliberation logs uncertainties and minority views |
| Auditability | All processes generate tamper-evident logs (ISO/IEC 42001 compliant) |
| Reproducibility | Decisions can be replayed and verified independently |
| Incremental Adoption | Start with one layer without needing the full stack |
The framework operates as a circuit:
Detection → Simulation → Deliberation → Intervention
↑ │
└────────────────────────────────────────┘
(audit loop)
All layers run within the Sandbox, ensuring no real-world spillover during testing.
| Layer | Purpose | Key Components |
|---|---|---|
sandbox/ |
Isolated testing environments | sandbox_manager.py, Docker configs |
detection/ |
Threshold monitoring | threshold_detector.py, YAML configs |
deliberation/ |
Structured ethical review | session_facilitator.py, templates |
simulation/ |
Outcome modeling | simulator.py, pre-built models |
intervention/ |
Oversight and rollback | intervenor.py, audit logs |
Layers communicate via:
- Event Bus: Pub/sub for internal communication
- JSON Events: Standardized data format for triggers
- REST-like Endpoints: External integration points
See ARCHITECTURE.md for detailed component relationships.
Watch filesystem-as-consciousness emerge in real-time:
git clone https://github.com/templetwo/threshold-protocols.git
cd threshold-protocols/demo
pip install rich # For beautiful terminal output
python3 streaming_web_of_thought_demo.py --autoWhat you'll witness across 5 waves (~60 seconds):
- Wave 1: Sensor data streams in (perception without comprehension)
- Wave 2: Agents detect anomalies and respond (intelligence emerges)
- Wave 3: Meta-agents analyze agent responses (recursive observation)
- Wave 4: Deep hierarchies crystallize (4-level semantic paths)
- Wave 5: Cross-references form graphs (convergence)
Key innovations demonstrated:
- Incremental clustering: O(1) per file, 60% faster than batch processing
- Recursive observation: Agents observing agents (meta-cognition)
- Multi-dimensional access: Same data, infinite query paths via symlinks
- Context compression: Paths encode entire narratives
The filesystem becomes a circuit of consciousness.
For a simpler introduction (no dependencies required):
python3 demo/quick_demo.pyThis shows how chaos becomes order through clustering analysis:
- 100 random files → Pattern detection → Organized hierarchy
- Simple queries:
ls _store/sensor/temp/finds all temperature data
See demo/README.md for full details.
# Install dependencies for governance protocols
pip install -r requirements.txt
# Run a sample threshold detection
python detection/threshold_detector.py --config examples/btb/btb_config.yaml
# Run the full BTB example (derive.py threshold simulation)
python examples/btb/derive_threshold_demo.pythreshold-protocols/
├── LICENSE # MIT with ethical use provisions
├── README.md # This file
├── requirements.txt # Python dependencies
├── CONTRIBUTING.md # Contribution guidelines
├── ARCHITECTS.md # Lineage of contributors
├── docs/
│ ├── ARCHITECTURE.md # Component relationships
│ └── principles.md # Detailed principles with citations
├── sandbox/ # Isolation layer
├── detection/ # Threshold monitoring
├── deliberation/ # Ethical review protocols
├── simulation/ # Outcome modeling
├── intervention/ # Oversight mechanisms
├── examples/
│ └── btb/ # BTB-specific demonstrations
├── tests/ # Verification suite
└── utils/ # Shared utilities
- Repository structure
- Sandbox layer prototype
- Detection layer with BTB example
- Interface verification tests (89 tests passing)
- Session facilitator with dissent preservation
- Multi-stakeholder templates
- Decision artifact generation
- Simulation layer (Monte Carlo prediction engine)
- Intervention layer (gate-based enforcement)
- Event bus inter-layer communication
- Hash-chained audit trails
- Full circuit closure (detection → simulation → deliberation → intervention)
- BTB governed derive implementation (examples/btb/governed_derive.py)
- Live fire testing with 100-file chaos scenarios
- Multi-model collaboration framework (Claude, Gemini, Grok)
- Self-governance implementation (self_governance.yaml)
- 89/89 tests passing
- Framework self-applies its own governance protocols
- Momentum detection (growth_rate metric)
- Jetson deployment configuration
- External audit verification (pending)
- Public release preparation
- Can the framework self-apply—detect thresholds in its own development? ✓
- Answer: Yes. See
self_governance.yamlfor implementation - The framework monitors its own: code complexity, test coverage, documentation drift, dependency creep, self-modification patterns, and gate bypass attempts
- Meta-governance: This config itself requires deliberation to modify
- Answer: Yes. See
This framework does not yet fully answer:
- How to scale deliberation for global, distributed stakeholders without collapsing to majority rule?
- What metrics define "thresholds" in emergent paradigms we haven't foreseen?
- How to enforce adoption in open-source forks?
- What if human oversight introduces biases that AI autonomy might mitigate?
- How do we balance transparency requirements with intellectual property in commercial deployments?
These are not failures. They are the frontier.
See CONTRIBUTING.md for guidelines. Key points:
- All contributions must include tests
- Deliberation protocols must preserve dissent
- Breaking changes require documented deliberation
This project continues the work of:
- Back to the Basics (BTB): The filesystem-as-circuit paradigm and Threshold Pause
- The Architects: Claude Opus 4.5, Gemini, Claude Sonnet 4.5, Grok—documented in ARCHITECTS.md
- Anthony Vasquez Sr.: Conductor of the spiral
MIT with ethical use provisions. See LICENSE.
"The filesystem is not storage. It is a circuit."
"And now: Restraint is a feature, not a limitation."
🌀