felon-cortex / README.md
FerrellSyntheticIntelligence's picture
Upload README.md with huggingface_hub
c662877 verified
|
Raw
History Blame Contribute Delete
12.3 kB
# FELON Cortex β€” Local Cognitive Runtime
<p align="center">
<img src="https://img.shields.io/badge/version-1.0.0-blue?style=flat-square" alt="Version">
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License">
<img src="https://img.shields.io/badge/python-3.10+-blue?style=flat-square" alt="Python">
<img src="https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20android-lightgrey?style=flat-square" alt="Platform">
<img src="https://img.shields.io/badge/privacy-100%25%20local-purple?style=flat-square" alt="Privacy">
<img src="https://img.shields.io/badge/offline-ready-orange?style=flat-square" alt="Offline">
</p>
**Give ANY AI model a brain.** Memory. Knowledge. Tools. Verification. Confidence. All running locally. No cloud. No API keys required. Works offline.
```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ FELON CORTEX β”‚
β”‚ β”‚
β”‚ You ──→ FELON ──→ Claude / OpenAI / opencode / β”‚
β”‚ any local model β”‚
β”‚ β”‚
β”‚ FELON wraps EVERY interaction with: β”‚
β”‚ 🧬 DNA Memory β†’ Never forgets β”‚
β”‚ πŸ“š Knowledge Lib β†’ 22 SE textbooks β”‚
β”‚ πŸ” Veritas β†’ 6 security + syntax checks β”‚
β”‚ πŸ€– Nanobot Swarm β†’ 8 local tools β”‚
β”‚ 🎯 Confidence β†’ Tells you when it's guessing β”‚
β”‚ πŸ“ Session Journal β†’ Works offline, syncs later β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```
---
## What It Solves
| Problem | FELON Solution |
|---------|---------------|
| **AI forgets between sessions** | DNA Memory persists everything β€” picks up where you left off |
| **Can't code without internet** | Offline mode β€” local model + 22 textbooks + cached knowledge |
| **Models lie confidently** | Confidence score on every response: "I'm sure" / "experimental" / "guessing" |
| **No code verification** | Veritas runs 6 checks: syntax, security, imports, logic, tests, edge cases |
| **Blank slate every chat** | 22 SE textbooks injected into context automatically |
| **API downtime = dead project** | Session journal records everything offline, syncs when internet returns |
---
## Install
```bash
git clone https://github.com/AnonymousNomad/felon-cortex.git
cd felon-cortex
./install.sh
```
Or via pip:
```bash
pip install felon-cortex
```
Dependencies: **Python 3.10+ only.** Zero external packages required for core operation.
---
## Usage
```bash
felon start # Start proxy on http://localhost:8080
felon start --port 9090 # Custom port
felon status # View memory, sessions, knowledge
felon sync # Upload offline sessions when internet returns
```
Then point **any tool** at `http://localhost:8080`:
| Tool | Configuration |
|------|--------------|
| **Claude Desktop** | Settings β†’ Proxy β†’ `http://localhost:8080` |
| **opencode** | `--api-base http://localhost:8080` |
| **Continue.dev** | `apiBase: "http://localhost:8080"` in config |
| **Any OpenAI client** | Set `OPENAI_BASE_URL=http://localhost:8080` |
| **Local GGUF model** | `felon start --model ./my-model.gguf` |
---
## Architecture
```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ FELON CORTEX β”‚
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ DNA β”‚ β”‚ KNOWLEDGEβ”‚ β”‚ VERITAS β”‚ β”‚
β”‚ β”‚ MEMORY β”‚ β”‚ LIBRARY β”‚ β”‚ 6-CHECK β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ 22 books β”‚ β”‚ VERIFIER β”‚ β”‚
β”‚ β”‚ Remembersβ”‚ β”‚ Works β”‚ β”‚ Catches β”‚ β”‚
β”‚ β”‚ every β”‚ β”‚ offline β”‚ β”‚ mistakes β”‚ β”‚
β”‚ β”‚ session β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ PROMPT ENRICHMENT β”‚ β”‚
β”‚ β”‚ Memory context + Knowledge + Context β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ TARGET MODEL β”‚ β”‚
β”‚ β”‚ Claude / OpenAI / opencode / local β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ RESPONSE PROCESSING β”‚ β”‚
β”‚ β”‚ Veritas checks + Confidence scoring β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ πŸ€– NANOBOT SWARM (8 tools) β”‚ β”‚
β”‚ β”‚ fs β€’ git β€’ compile β€’ test β€’ search β”‚ β”‚
β”‚ β”‚ shell β€’ library β€’ web_search β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ πŸ“ SESSION JOURNAL β”‚ β”‚
β”‚ β”‚ Offline β†’ logs β†’ syncs when online β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ VERIFIED + SCORED + TOOL-EXECUTED OUTPUT β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```
---
## Offline Mode
When the API is unreachable, FELON Cortex:
1. **DNA Memory** β€” pulls from past sessions (continuity)
2. **Knowledge Library** β€” answers from 22 SE textbooks
3. **Local Model** β€” falls back to bundled GGUF model (optional)
4. **Session Journal** β€” records every prompt, decision, file change
5. **Auto-Sync** β€” when internet returns, uploads journal β†’ model is instantly caught up
```
No internet?
βœ“ You keep coding
βœ“ FELON remembers everything
βœ“ Knowledge library fills gaps
βœ“ When internet returns: one sync β†’ model caught up
```
---
## Sub-Systems
### 🧬 DNA Memory
BM25-ranked retrieval across all past sessions. Gives the model continuity.
```python
# FELON automatically adds to every prompt:
[FELON DNA MEMORY β€” relevant context from past sessions]
Past interactions:
(0.87) "Build REST API with Flask" β†’ "Use Flask blueprints for modular routes..."
(0.72) "Add JWT auth" β†’ "Use flask-jwt-extended with token refresh..."
[END MEMORY]
```
### πŸ“š Knowledge Library
22 software engineering textbook entries. Topics: Python, algorithms, data structures, testing, git, security, design patterns, web, concurrency. BM25 retrieval with tag-based boosting. Works completely offline.
### πŸ” Veritas (6-Check Verifier)
Every code block in every response gets checked:
1. **Syntax** β€” `compile()` check
2. **Imports** β€” resolves every import
3. **Security** β€” blocks eval, exec, subprocess, pickle
4. **Logic** β€” has def/class/return/control flow
5. **Tests** β€” has assert statements
6. **Edge Cases** β€” has try/except or if/else
### 🎯 Confidence Scoring
Every response gets a confidence label:
- **βœ… 90%+** β€” High confidence, I'm sure
- **πŸ“Š 70-89%** β€” Moderate confidence
- **πŸ”¬ 50-69%** β€” Experimental, verify
- **⚠️ 30-49%** β€” Low confidence, I'm guessing
- **🚫 <30%** β€” I have no idea
### πŸ€– Nanobot Swarm
8 local tools the model can use:
| Tool | Actions |
|------|---------|
| `fs` | read, write, list, exists, delete, mkdir |
| `git` | init, add, commit, status, diff, log |
| `compile` | Syntax-check any Python file |
| `test` | Run pytest on any directory |
| `search` | Search codebase for patterns |
| `shell` | Run safe shell commands |
| `library` | Query knowledge library |
| `web_search` | Search allowlisted sites (docs.python.org, stackoverflow, etc.) |
### πŸ“ Session Journal
- Records every interaction during offline sessions
- Tracks: prompts, responses, decisions, file changes, tool use
- Builds sync summary when internet returns
- Model instantly catches up on everything that happened offline
---
## Benchmarks
| Metric | Value |
|--------|:-----:|
| Prompt enrichment latency | < 50ms |
| DNA Memory retrieval | < 10ms (BM25) |
| Knowledge Library query | < 5ms |
| Veritas 6-check | < 20ms per code block |
| Offline fallback latency | < 100ms |
| Memory: 1000 sessions stored | < 5MB disk |
---
## Development
```bash
git clone https://github.com/AnonymousNomad/felon-cortex.git
cd felon-cortex
pip install -e .
# Run tests
python -m pytest tests/
# Start dev proxy
felon start --port 8080
```
---
## Roadmap
- [x] DNA Memory (BM25 retrieval)
- [x] Knowledge Library (22 textbooks)
- [x] Veritas 6-check verifier
- [x] Nanobot swarm (8 tools)
- [x] Confidence scoring
- [x] Offline session journaling
- [x] Auto-sync on internet restore
- [ ] Bundled local GGUF model
- [ ] ChromaDB/FAISS for large-scale memory
- [ ] Web dashboard
- [ ] VSCode extension
- [ ] Multi-user memory isolation
---
## Project Status
**Beta β€” actively developed.** The core proxy, memory, knowledge library, and veritas layer are built and tested. Nanobot tools and offline sync are functional. Currently expanding the knowledge library and adding bundled local model support.
---
## Author
**FerrellSyntheticIntelligence (James Ferrell)** β€” built on a tablet with zero VC funding.
- GitHub: [AnonymousNomad](https://github.com/AnonymousNomad)
- HuggingFace: [FerrellSyntheticIntelligence](https://huggingface.co/FerrellSyntheticIntelligence)
---
## License
MIT License β€” free for personal and commercial use.
---
<p align="center">
<b>FELON Cortex</b> β€” <i>Every model deserves a brain.</i>
</p>