How nithish34/central-os-brain works
Company Brain OS detects drift between official documents and live company activity, routes conflicts through human review, then records approved remediation actions. The main loop spans connector ingestion, canonical events and pipeline processing, data-backed conflict detection, review, and execution; grounded chat and operational views are supporting capabilities. The graph combines README-documented flow with relationships visible in sampled source. Several worker, endpoint, and service implementations were not sampled, so their detailed call wiring is omitted.
Main entry points: action_executor.py Action execution · App.tsx Dashboard SPA · ingestion.py Canonical ingestion · database.py Product data
Components 23
Ingestion
- Connectors
fast_api_server/app/integrations - Webhook ingestion
fast_api_server/app/ingestion/router.py - Canonical ingestion
fast_api_server/app/events/ingestion.py - Event pipeline
fast_api_server/app/services/layer3_pipeline/event_bus.py - Background workers
fast_api_server/app/workers
Intelligence & Review
- Conflict detection
fast_api_server/app/services/layer2_intelligence/conflict_detector.py - Grounded chat
fast_api_server/app/services/layer2_intelligence/nlp_chat_engine.py - RAG retrieval
fast_api_server/app/services/layer2_intelligence/rag_engine.py - Conflict review
fast_api_server/app/api/v1/endpoints/conflicts.py
Execution
- Policy checks
fast_api_server/app/services/layer0_execution/policy_engine.py - Action execution
fast_api_server/app/services/layer0_execution/action_executor.py - GitHub remediation
fast_api_server/app/services/github_service.py - Workflow records
fast_api_server/app/models/workflow.py - Audit records
fast_api_server/app/models/audit.py
Platform
- FastAPI application
fast_api_server/app/main.py - Auth & tenancy
fast_api_server/app/auth/service.py - Product data
fast_api_server/app/core/database.py
Dashboard
- Dashboard SPA
frontend/src/App.tsx - Typed API client
frontend/src/services/api.ts - Pipeline view
frontend/src/components/views/PipelineView.tsx - Knowledge explorer
frontend/src/components/views/ExploreView.tsx
Other components
- Company sources
- Dashboard user
Connections 26
- Company sources → Connectors: provide activity
README.md - Company sources → Webhook ingestion: send webhooks
README.md - Connectors → Canonical ingestion: normalize events
fast_api_server/app/integrations/router.py - Webhook ingestion → Canonical ingestion: normalize events
- Canonical ingestion → Product data: persist events
fast_api_server/app/events/ingestion.py - Canonical ingestion → Event pipeline: publish outbox
README.md - Event pipeline → Background workers: dispatch events
README.md - Background workers → Conflict detection: process knowledge
- Conflict detection → Product data: read and write
README.md - Product data → RAG retrieval: supply documents
fast_api_server/app/services/layer2_intelligence/rag_engine.py - Product data → Grounded chat: supply context
fast_api_server/app/services/layer2_intelligence/nlp_chat_engine.py - RAG retrieval → Grounded chat: ground answers
fast_api_server/app/services/layer2_intelligence/nlp_chat_engine.py - Dashboard user → Dashboard SPA: use dashboard
README.md - Dashboard SPA → Typed API client: request data
frontend/src/App.tsx - Typed API client → FastAPI application: call API
README.md - FastAPI application → Auth & tenancy: authorize requests
- FastAPI application → Conflict review: route review
fast_api_server/app/main.py - Conflict review → Conflict detection: review conflicts
README.md - Conflict review → Policy checks: check approval
README.md - Policy checks → Action execution: authorize actions
README.md - Action execution → GitHub remediation: create pull requests
README.md - Action execution → Workflow records: record workflows
README.md - Action execution → Audit records: write audit trail
README.md - Dashboard SPA → Pipeline view: render pipeline
frontend/src/App.tsx - Dashboard SPA → Knowledge explorer: render knowledge
frontend/src/App.tsx - Pipeline view → Typed API client: fetch pipeline
frontend/src/components/views/PipelineView.tsx