Files
aitbc/ai-memory/architecture/system-overview.md
aitbc 0c60fc5542
Some checks failed
AITBC CI/CD Pipeline / lint-and-test (3.11) (pull_request) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.12) (pull_request) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.13) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (apps/coordinator-api/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (cli/aitbc_cli) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-core/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-crypto/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-sdk/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (tests) (pull_request) Has been cancelled
Security Scanning / CodeQL Security Analysis (javascript) (pull_request) Has been cancelled
Security Scanning / CodeQL Security Analysis (python) (pull_request) Has been cancelled
Security Scanning / Dependency Security Scan (pull_request) Has been cancelled
Security Scanning / Container Security Scan (pull_request) Has been cancelled
Security Scanning / OSSF Scorecard (pull_request) Has been cancelled
AITBC CI/CD Pipeline / test-cli (pull_request) Has been cancelled
AITBC CI/CD Pipeline / test-services (pull_request) Has been cancelled
AITBC CI/CD Pipeline / test-production-services (pull_request) Has been cancelled
AITBC CI/CD Pipeline / security-scan (pull_request) Has been cancelled
AITBC CI/CD Pipeline / build (pull_request) Has been cancelled
AITBC CI/CD Pipeline / deploy-staging (pull_request) Has been cancelled
AITBC CI/CD Pipeline / deploy-production (pull_request) Has been cancelled
AITBC CI/CD Pipeline / performance-test (pull_request) Has been cancelled
AITBC CI/CD Pipeline / docs (pull_request) Has been cancelled
AITBC CI/CD Pipeline / release (pull_request) Has been cancelled
AITBC CI/CD Pipeline / notify (pull_request) Has been cancelled
Security Scanning / Security Summary Report (pull_request) Has been cancelled
feat: add production setup and infrastructure improvements
- Add production genesis initialization scripts
- Add keystore management for production
- Add production node runner
- Add setup production automation
- Add AI memory system for development tracking
- Add translation cache service
- Add development heartbeat monitoring
- Update blockchain RPC router
- Update coordinator API main configuration
- Update secure pickle service
- Update claim task script
- Update blockchain service configuration
- Update gitignore for production files
2026-03-18 15:22:24 +00:00

50 lines
2.2 KiB
Markdown

# Architecture Overview
This document describes the high-level structure of the AITBC project for agents implementing changes.
## Rings of Stability
The codebase is divided into layers with different change rules:
- **Ring 0 (Core)**: `packages/py/aitbc-core/`, `packages/py/aitbc-sdk/`
- Spec required, high confidence threshold (>0.9), two approvals
- **Ring 1 (Platform)**: `apps/coordinator-api/`, `apps/blockchain-node/`
- Spec recommended, confidence >0.8
- **Ring 2 (Application)**: `cli/`, `apps/analytics/`
- Normal PR, confidence >0.7
- **Ring 3 (Experimental)**: `experiments/`, `playground/`
- Fast iteration allowed, confidence >0.5
## Key Subsystems
### Coordinator API (`apps/coordinator-api/`)
- Central orchestrator for AI agents and compute marketplace
- Exposes REST API and manages provider registry, job dispatch
- Services live in `src/app/services/` and are imported via `app.services.*`
- Import pattern: add `apps/coordinator-api/src` to `sys.path`, then `from app.services import X`
### CLI (`cli/aitbc_cli/`)
- User-facing command interface built with Click
- Bridges to coordinator-api services using proper package imports (no hardcoded paths)
- Located under `commands/` as separate modules: surveillance, ai_trading, ai_surveillance, advanced_analytics, regulatory, enterprise_integration
### Blockchain Node (Brother Chain) (`apps/blockchain-node/`)
- Minimal asset-backed blockchain for compute receipts
- PoA consensus, transaction processing, RPC API
- Devnet: RPC on 8026, health on `/health`, gossip backend memory
- Configuration in `.env`; genesis generated by `scripts/make_genesis.py`
### Packages
- `aitbc-core`: logging utilities, base classes (Ring 0)
- `aitbc-sdk`: Python SDK for interacting with Coordinator API (Ring 0)
- `aitbc-agent-sdk`: agent framework; `Agent.create()`, `ComputeProvider`, `ComputeConsumer` (Ring 0)
- `aitbc-crypto`: cryptographic primitives (Ring 0)
## Conventions
- Branches: `<agent-name>/<issue-number>-<short-description>`
- Claim locks: `claim/<issue>` (short-lived)
- PR titles: imperative mood, reference issue with `Closes #<issue>`
- Tests: use pytest; aim for >80% coverage in modified modules
- CI: runs on Python 3.11, 3.12; goal is to support 3.13