Python
enterprise_bot
Lazy-load access to enterprise_bot codebase. Provides 12 nuclear protocol exports (cfg, CogTwin, auth, memory) and zipped source. Load SKILL.md instead of 60 files. Extract from src.zip on demand.
$ Installieren
git clone https://github.com/omnislash157/Enterprise_bot ~/.claude/skills/Enterprise_bot// tip: Run this command in your terminal to install the skill
SKILL.md
name: enterprise_bot description: Lazy-load access to enterprise_bot codebase. Provides 12 nuclear protocol exports (cfg, CogTwin, auth, memory) and zipped source. Load SKILL.md instead of 60 files. Extract from src.zip on demand.
enterprise_bot Skill
Purpose
Lazy-load access to the enterprise_bot codebase. Load this skill instead of reading 60 files.
Quick Start
To use enterprise_bot in new code:
from protocols import cfg, get_auth_service, CogTwin, MemoryNode
# That's it. 12 exports. Everything else is internal.
Nuclear Elements (protocols.py)
These 12 exports are the ONLY stable API. Everything else is implementation detail.
| Export | Module | Purpose |
|---|---|---|
cfg(key, default) | config_loader | Get any config value |
load_config(path) | config_loader | Load YAML config |
get_auth_service() | auth_service | Singleton for auth |
authenticate_user(email) | auth_service | SSO â database user |
User | auth_service | Auth user dataclass |
get_tenant_service() | tenant_service | Singleton for tenant/dept |
TenantContext | enterprise_tenant | Request context carrier |
CogTwin | cog_twin | The brain (query pipeline) |
DualRetriever | retrieval | Memory retrieval system |
create_adapter(provider) | model_adapter | LLM factory |
MemoryNode | schemas | Memory chunk dataclass |
EpisodicMemory | schemas | Episode dataclass |
Rules
- New code imports from
protocolsonly - never import internal modules directly - Modifying internals? - Extract from src.zip, edit, test, re-zip
- Adding new nuclear elements? - Update protocols.py + this table
- Implementation changes - Fine, as long as protocol signatures stay stable
File Tree
enterprise_bot/
âââ protocols.py # â START HERE (12 exports)
â
âââ ââ CONFIGURATION ââ
âââ config.yaml # App config (tier, features, model)
âââ config_loader.py # cfg() helper
âââ config.py # Settings class
â
âââ ââ ENTRY POINTS ââ
âââ main.py # FastAPI app + WebSocket
âââ claude_chat.py # SDK agent REPL
âââ claude_run.py # One-shot executor
â
âââ ââ AUTH ââ
âââ auth_service.py # User CRUD, permissions
âââ azure_auth.py # Azure AD SSO
âââ sso_routes.py # OAuth callbacks
â
âââ ââ TENANT ââ
âââ tenant_service.py # Department content
âââ enterprise_tenant.py # TenantContext dataclass
â
âââ ââ COGNITIVE ââ
âââ cog_twin.py # Main brain
âââ retrieval.py # DualRetriever
âââ model_adapter.py # LLM factory
âââ venom_voice.py # Personality injection
â
âââ ââ MEMORY ââ
âââ memory_backend.py # Abstract + FileBackend
âââ postgres_backend.py # PostgreSQL backend
âââ schemas.py # MemoryNode, EpisodicMemory
â
âââ ââ SEARCH (internal) ââ
âââ hybrid_search.py # Vector + keyword
âââ scoring.py # Relevance scoring
âââ embedder.py # Embedding generation
â
âââ ââ DATA ââ
âââ data/memories/ # File-based memory storage
âââ Manuals/Driscoll/ # Department manuals + chunks
â
âââ ââ DB ââ
âââ db/migrations/ # PostgreSQL migrations
â
âââ frontend/ # SvelteKit app
Token Budget
| Load | Tokens |
|---|---|
| This SKILL.md | ~600 |
| protocols.py | ~150 |
| Extract 1 file | 200-800 |
| Full cold start | ~800 |
vs old way: 70,000 tokens to load everything
Common Tasks
Add a new API endpoint:
unzip -p src.zip main.py > main.py
# Edit main.py
# Test
zip -u src.zip main.py
Modify retrieval logic:
unzip -p src.zip retrieval.py > retrieval.py
# Edit - but DON'T change DualRetriever's public interface
# Test
zip -u src.zip retrieval.py
Check what's in a module:
unzip -p src.zip cog_twin.py | grep "def \|class "
Version
- Skill: 1.0.0
- Codebase: enterprise_bot @ commit
b601f3b - Last updated: 2024-12-19
