docxology/codomyrmex

GitHub: docxology/codomyrmex

Stars: 3 | Forks: 1

CI Security Auto-Merge
Version Modules Workflows Zero Mock License
Stars Forks Last Commit Issues Repo Size Python Ruff ty

# 🐜 Codomyrmex Codomyrmex 是一个生产级库,包含 **127 个深度集成的模块**,涵盖 AI 智能体、云基础设施、安全、金融、多媒体等领域——所有模块均基于严格的 **Zero-Mock**(零模拟)测试策略,确保每个方法都是真实的、经过测试的、有文档记录的且功能正常的。该生态系统包括 **3,000+ 个 Python 文件**、**905+ 个测试文件**、**1,029+ 个文档页面** 和 **36 个 GitHub Actions 工作流**。 ## 📚 文档中心 ### 顶层文档 | 文档 | 描述 | |:---|:---| | [**docs/README.md**](docs/README.md) | 文档主页 — 完整目录指南 | | [**docs/ARCHITECTURE.md**](docs/ARCHITECTURE.md) | 系统架构,依赖层,设计模式 | | [**docs/AGENTS.md**](docs/AGENTS.md) | 智能体协调规则和自主工作流 | | [**docs/SPEC.md**](docs/SPEC.md) | 技术规范,API 契约,Schemas | | [**docs/PAI.md**](docs/PAI.md) | Personal AI Infrastructure 集成参考 | | [**docs/PAI_DASHBOARD.md**](docs/PAI_DASHBOARD.md) | PAI 仪表板 GUI 参考和选项卡指南 | | [**docs/index.md**](docs/index.md) | MkDocs 站点索引和导航入口点 | ### 文档目录 | 目录 | 文件 | 描述 | |:---|:---:|:---| | [**docs/getting-started/**](docs/getting-started/) | 9 | 快速入门、安装、设置、教程 | | [**docs/development/**](docs/development/) | 10 | 开发环境、测试策略、贡献指南 | | [**docs/reference/**](docs/reference/) | 16 | API 参考,CLI 参考,故障排除 | | [**docs/modules/**](docs/modules/) | 126 个目录 | 每个模块的文档(每个模块的 README, SPEC, AGENTS, PAI) | | [**docs/agents/**](docs/agents/) | 4 | 智能体规则、协调、自主操作 | | [**docs/integration/**](docs/integration/) | 11 | 外部服务集成(Google, GitHub 等) | | [**docs/deployment/**](docs/deployment/) | 5 | 生产部署指南和检查清单 | | [**docs/security/**](docs/security/) | 11 | 安全理论、威胁模型、审计流程 | | [**docs/pai/**](docs/pai/) | 10 | PAI 仪表板、邮件、日历、技能管理 | | [**docs/bio/**](docs/bio/) | 15 | 生物学与蚁学视角 | | [**docs/cognitive/**](docs/cognitive/) | 11 | 认知科学与工程视角 | | [**docs/agi/**](docs/agi/) | 14 | AGI 理论、涌现、递归自我改进 | | [**docs/compliance/**](docs/compliance/) | 5 | 审计报告、策略合规、SOC2 | | [**docs/examples/**](docs/examples/) | 8 | 代码示例、集成演示、演练 | | [**docs/project/**](docs/project/) | 9 | 架构、路线图、贡献、治理 | | [**docs/project_orchestration/**](docs/project_orchestration/) | 11 | 多项目工作流指南和流水线 | | [**docs/skills/**](docs/skills/) | 9 | 技能系统生命周期、治理、编写 | | [**docs/plans/**](docs/plans/) | 1 | 实施计划和集成路线图 | ## 📐 系统架构 ``` graph TB subgraph Core["🧠 Core Intelligence"] LLM["LLM Subsystem"] Agents["Agent Framework"] Cerebrum["Cerebrum Reasoning"] Orchestrator["Orchestrator"] MCP["Model Context Protocol"] end subgraph AI["🤖 AI & ML"] EvolutionaryAI["Evolutionary AI"] GraphRAG["Graph RAG"] PromptEng["Prompt Engineering"] VectorStore["Vector Store"] Coding["Coding Agents"] Skills["Skills Engine"] end subgraph Infra["☁️ Infrastructure"] Cloud["Cloud (AWS/GCP/Azure)"] Containerization["Containerization"] CICD["CI/CD Automation"] Deployment["Deployment"] EdgeComputing["Edge Computing"] Networking["Networking"] end subgraph Data["�� Data & Storage"] DB["Database Management"] Cache["Cache Layer"] DataLineage["Data Lineage"] Serialization["Serialization"] Documents["Documents"] FeatureStore["Feature Store"] end subgraph Security["🔒 Security"] Auth["Authentication"] Crypto["Cryptography"] Encryption["Encryption"] Privacy["Privacy"] Defense["Defense"] Identity["Identity"] end subgraph Media["🎨 Multimedia"] Audio["Audio"] Video["Video"] Multimodal["Multimodal"] DataViz["Data Visualization"] Meme["Meme Generator"] end subgraph PAI["🏠 Personal AI"] Email["Email"] Calendar["Calendar"] Finance["Finance"] Wallet["Wallet"] Website["Website"] PAIDash["PAI Dashboard"] end subgraph DevTools["🛠️ Developer Tools"] CLI["CLI"] IDE["IDE Integration"] GitOps["Git Operations"] GitAnalysis["Git Analysis"] TreeSitter["Tree-sitter"] StaticAnalysis["Static Analysis"] Terminal["Terminal Interface"] end Core --> AI Core --> Infra Core --> Data Core --> Security Core --> Media Core --> PAI Core --> DevTools LLM --> Agents Agents --> Orchestrator Orchestrator --> MCP MCP --> Skills ``` ## 🗂️ 完整模块清单 ### 🧠 核心智能模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`agents`](src/codomyrmex/agents/) | 168 | 83 | [📖](docs/modules/agents/) | [⚙️](config/agents/config.yaml) | [📜](scripts/agents/) | 多提供商智能体框架 (Gemini, Claude, OpenAI, Jules) | | [`cerebrum`](src/codomyrmex/cerebrum/) | 32 | 13 | [📖](docs/modules/cerebrum/) | [⚙️](config/cerebrum/config.yaml) | [📜](scripts/cerebrum/) | 认知推理引擎,具有思维链和决策树功能 | | [`llm`](src/codomyrmex/llm/) | 41 | 20 | [📖](docs/modules/llm/) | [⚙️](config/llm/config.yaml) | [📜](scripts/llm/) | LLM 子系统,支持 OpenRouter, Gemini 2.5 Pro, 流式传输 | | [`orchestrator`](src/codomyrmex/orchestrator/) | 46 | 20 | [📖](docs/modules/orchestrator/) | [⚙️](config/orchestrator/config.yaml) | [📜](scripts/orchestrator/) | 工作流引擎,流水线执行,并行编排 | | [`model_context_protocol`](src/codomyrmex/model_context_protocol/) | 27 | 9 | [📖](docs/modules/model_context_protocol/) | [⚙️](config/model_context_protocol/config.yaml) | [📜](scripts/model_context_protocol/) | MCP 工具服务器,Bridge 和协议实现 | | [`prompt_engineering`](src/codomyrmex/prompt_engineering/) | 10 | 7 | [📖](docs/modules/prompt_engineering/) | [⚙️](config/prompt_engineering/config.yaml) | [📜](scripts/prompt_engineering/) | 模板管理,Prompt 优化,Few-shot 模式 | | [`skills`](src/codomyrmex/skills/) | 22 | 11 | [📖](docs/modules/skills/) | [⚙️](config/skills/config.yaml) | [📜](scripts/skills/) | 可扩展技能注册表和执行引擎 | ### 🤖 AI 与机器学习模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`coding`](src/codomyrmex/coding/) | 71 | 18 | [📖](docs/modules/coding/) | [⚙️](config/coding/config.yaml) | [📜](scripts/coding/) | 代码生成、重构、分析和审查智能体 | | [`evolutionary_ai`](src/codomyrmex/evolutionary_ai/) | 11 | 6 | [📖](docs/modules/evolutionary_ai/) | [⚙️](config/evolutionary_ai/config.yaml) | [📜](scripts/evolutionary_ai/) | 遗传算法,适应度,选择,基因组算子 | | [`graph_rag`](src/codomyrmex/graph_rag/) | 5 | 3 | [📖](docs/modules/graph_rag/) | [⚙️](config/graph_rag/config.yaml) | [📜](scripts/graph_rag/) | 基于图的检索增强生成 (Graph RAG) | | [`vector_store`](src/codomyrmex/vector_store/) | 5 | 4 | [📖](docs/modules/vector_store/) | [⚙️](config/vector_store/config.yaml) | [📜](scripts/vector_store/) | Embedding 存储,相似性搜索,FAISS/ChromaDB | | [`bio_simulation`](src/codomyrmex/bio_simulation/) | 9 | 3 | [📖](docs/modules/bio_simulation/) | [⚙️](config/bio_simulation/config.yaml) | [📜](scripts/bio_simulation/) | 生物群落模拟和基因组种群模型 | | [`simulation`](src/codomyrmex/simulation/) | 3 | 3 | [📖](docs/modules/simulation/) | [⚙️](config/simulation/config.yaml) | [📜](scripts/simulation/) | 通用仿真框架 | | [`quantum`](src/codomyrmex/quantum/) | 6 | 1 | [📖](docs/modules/quantum/) | [⚙️](config/quantum/config.yaml) | [📜](scripts/quantum/) | 量子计算抽象和电路模拟 | | [`fpf`](src/codomyrmex/fpf/) | 26 | 11 | [📖](docs/modules/fpf/) | [⚙️](config/fpf/config.yaml) | [📜](scripts/fpf/) | 自由能原理框架(Active Inference) | ### ☁️ 基础设施与 DevOps 模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`cloud`](src/codomyrmex/cloud/) | 52 | 22 | [📖](docs/modules/cloud/) | [⚙️](config/cloud/config.yaml) | [📜](scripts/cloud/) | 多云 SDK (AWS, GCP, Azure, Infomaniak, Coda.io) | | [`containerization`](src/codomyrmex/containerization/) | 16 | 7 | [📖](docs/modules/containerization/) | [⚙️](config/containerization/config.yaml) | [📜](scripts/containerization/) | Docker/Podman 管理,镜像构建,Registry | | [`container_optimization`](src/codomyrmex/container_optimization/) | 3 | 2 | [📖](docs/modules/container_optimization/) | [⚙️](config/container_optimization/config.yaml) | [📜](scripts/container_optimization/) | 资源调优和容器性能优化 | | [`ci_cd_automation`](src/codomyrmex/ci_cd_automation/) | 22 | 12 | [📖](docs/modules/ci_cd_automation/) | [⚙️](config/ci_cd_automation/config.yaml) | [📜](scripts/ci_cd_automation/) | 流水线构建,Artifact 管理,部署编排 | | [`deployment`](src/codomyrmex/deployment/) | 13 | 7 | [📖](docs/modules/deployment/) | [⚙️](config/deployment/config.yaml) | [📜](scripts/deployment/) | 部署策略(蓝绿部署,金丝雀发布,滚动更新) | | [`edge_computing`](src/codomyrmex/edge_computing/) | 14 | 2 | [📖](docs/modules/edge_computing/) | [⚙️](config/edge_computing/config.yaml) | [📜](scripts/edge_computing/) | 边缘集群管理,调度,健康监控 | | [`networking`](src/codomyrmex/networking/) | 9 | 6 | [📖](docs/modules/networking/) | [⚙️](config/networking/config.yaml) | [📜](scripts/networking/) | HTTP 客户端,WebSocket,gRPC,服务网格 | | [`networks`](src/codomyrmex/networks/) | 3 | 3 | [📖](docs/modules/networks/) | [⚙️](config/networks/config.yaml) | [📜](scripts/networks/) | 网络拓扑和图分析 | | [`cost_management`](src/codomyrmex/cost_management/) | 4 | 2 | [📖](docs/modules/cost_management/) | [⚙️](config/cost_management/config.yaml) | [📜](scripts/cost_management/) | 云成本跟踪,预算警报,优化 | ### 💾 数据与存储模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`database_management`](src/codomyrmex/database_management/) | 17 | 12 | [📖](docs/modules/database_management/) | [⚙️](config/database_management/config.yaml) | [📜](scripts/database_management/) | 多数据库引擎 (SQLite, PostgreSQL),迁移,ORM | | [`cache`](src/codomyrmex/cache/) | 19 | 11 | [📖](docs/modules/cache/) | [⚙️](config/cache/config.yaml) | [📜](scripts/cache/) | 多后端缓存 (Redis, memory, disk),TTL, LRU | | [`data_lineage`](src/codomyrmex/data_lineage/) | 5 | 2 | [📖](docs/modules/data_lineage/) | [⚙️](config/data_lineage/config.yaml) | [📜](scripts/data_lineage/) | 数据流跟踪,血缘图,来源 | | [`serialization`](src/codomyrmex/serialization/) | 7 | 6 | [📖](docs/modules/serialization/) | [⚙️](config/serialization/config.yaml) | [📜](scripts/serialization/) | JSON, YAML, MessagePack, Protobuf 序列化 | | [`documents`](src/codomyrmex/documents/) | 38 | 16 | [📖](docs/modules/documents/) | [⚙️](config/documents/config.yaml) | [📜](scripts/documents/) | 文处理 (PDF, HTML, CSV, XML, Markdown) | | [`feature_store`](src/codomyrmex/feature_store/) | 5 | 2 | [📖](docs/modules/feature_store/) | [⚙️](config/feature_store/config.yaml) | [📜](scripts/feature_store/) | ML 特征注册表,版本控制和服务 | | [`agentic_memory`](src/codomyrmex/agentic_memory/) | 35 | 30 | [📖](docs/modules/agentic_memory/) | [⚙️](config/agentic_memory/config.yaml) | [📜](scripts/agentic_memory/) | 长期智能体记忆,检索和知识图谱 | | [`model_ops`](src/codomyrmex/model_ops/) | 22 | 10 | [📖](docs/modules/model_ops/) | [⚙️](config/model_ops/config.yaml) | [📜](scripts/model_ops/) | ML 模型生命周期,注册表,版本控制 | ### 🔒 安全与身份模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`security`](src/codomyrmex/security/) | 47 | 16 | [📖](docs/modules/security/) | [⚙️](config/security/config.yaml) | [📜](scripts/security/) | 威胁检测,漏洞扫描,审计追踪 | | [`auth`](src/codomyrmex/auth/) | 13 | 4 | [📖](docs/modules/auth/) | [⚙️](config/auth/config.yaml) | [📜](scripts/auth/) | OAuth, API Key, JWT, RBAC 认证 | | [`crypto`](src/codomyrmex/crypto/) | 37 | 26 | [📖](docs/modules/crypto/) | [⚙️](config/crypto/config.yaml) | [📜](scripts/crypto/) | 加密原语,哈希,密钥管理 | | [`encryption`](src/codomyrmex/encryption/) | 12 | 3 | [📖](docs/modules/encryption/) | [⚙️](config/encryption/config.yaml) | [📜](scripts/encryption/) | AES-GCM,签名,KDF, HMAC,密钥轮换 | | [`privacy`](src/codomyrmex/privacy/) | 4 | 2 | [📖](docs/modules/privacy/) | [⚙️](config/privacy/config.yaml) | [📜](scripts/privacy/) | PII 检测,数据匿名化,合规性 | | [`defense`](src/codomyrmex/defense/) | 4 | 5 | [📖](docs/modules/defense/) | [⚙️](config/defense/config.yaml) | [📜](scripts/defense/) | 对抗性防御,输入清洗(已弃用) | | [`identity`](src/codomyrmex/identity/) | 5 | 4 | [📖](docs/modules/identity/) | [⚙️](config/identity/config.yaml) | [📜](scripts/identity/) | 数字身份,角色管理,生物认知认证 | | [`wallet`](src/codomyrmex/wallet/) | 16 | 3 | [📖](docs/modules/wallet/) | [⚙️](config/wallet/config.yaml) | [📜](scripts/wallet/) | 加密货币钱包,密钥存储,交易签名 | ### 🎨 多媒体与可视化模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`audio`](src/codomyrmex/audio/) | 15 | 5 | [📖](docs/modules/audio/) | [⚙️](config/audio/config.yaml) | [📜](scripts/audio/) | TTS (edge-tts, pyttsx3),音频处理,转录 | | [`video`](src/codomyrmex/video/) | 12 | 4 | [📖](docs/modules/video/) | [⚙️](config/video/config.yaml) | [📜](scripts/video/) | 视频处理,帧提取,Veo 2.0 生成 | | [`multimodal`](src/codomyrmex/multimodal/) | 2 | 3 | [📖](docs/modules/multimodal/) | [⚙️](config/multimodal/config.yaml) | [📜](scripts/multimodal/) | Imagen 3 图像生成,多模态 AI 管道 | | [`data_visualization`](src/codomyrmex/data_visualization/) | 68 | 20 | [📖](docs/modules/data_visualization/) | [⚙️](config/data_visualization/config.yaml) | [📜](scripts/data_visualization/) | Matplotlib, Plotly,图表生成,仪表板 | | [`meme`](src/codomyrmex/meme/) | 57 | 6 | [📖](docs/modules/meme/) | [⚙️](config/meme/config.yaml) | [📜](scripts/meme/) | Meme 生成,模板引擎,社交媒体格式化 | | [`spatial`](src/codomyrmex/spatial/) | 12 | 3 | [📖](docs/modules/spatial/) | [⚙️](config/spatial/config.yaml) | [📜](scripts/spatial/) | 地理空间数据,坐标系,地图 | ### 🏠 个人 AI (PAI) 模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`email`](src/codomyrmex/email/) | 14 | 4 | [📖](docs/modules/email/) | [⚙️](config/email/config.yaml) | [📜](scripts/email/) | Gmail, AgentMail 提供商,SMTP, IMAP | | [`calendar_integration`](src/codomyrmex/calendar_integration/) | 6 | 2 | [📖](docs/modules/calendar_integration/) | [⚙️](config/calendar_integration/config.yaml) | [📜](scripts/calendar_integration/) | Google Calendar CRUD,事件管理,日程安排 | | [`finance`](src/codomyrmex/finance/) | 10 | 2 | [📖](docs/modules/finance/) | [⚙️](config/finance/config.yaml) | [📜](scripts/finance/) | 账本,工资单,预测,税务计算 | | [`website`](src/codomyrmex/website/) | 15 | 19 | [📖](docs/modules/website/) | [⚙️](config/website/config.yaml) | [📜](scripts/website/) | PAI 仪表板服务器,健康监控,代理 | | [`market`](src/codomyrmex/market/) | 4 | 3 | [📖](docs/modules/market/) | [⚙️](config/market/config.yaml) | [📜](scripts/market/) | 市场数据,交易信号,投资组合分析 | | [`logistics`](src/codomyrmex/logistics/) | 27 | 9 | [📖](docs/modules/logistics/) | [⚙️](config/logistics/config.yaml) | [📜](scripts/logistics/) | 任务路由,供应链,资源分配 | | [`relations`](src/codomyrmex/relations/) | 15 | 4 | [📖](docs/modules/relations/) | [⚙️](config/relations/config.yaml) | [📜](scripts/relations/) | 联系人管理,关系图谱,CRM | | [`physical_management`](src/codomyrmex/physical_management/) | 8 | 4 | [📖](docs/modules/physical_management/) | [⚙️](config/physical_management/config.yaml) | [📜](scripts/physical_management/) | IoT 设备跟踪,实物资产管理 | ### 🛠️ 开发者工具模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`cli`](src/codomyrmex/cli/) | 21 | 6 | [📖](docs/modules/cli/) | [⚙️](config/cli/config.yaml) | [📜](scripts/cli/) | 富文本 CLI,包含所有模块的子命令 | | [`ide`](src/codomyrmex/ide/) | 16 | 9 | [📖](docs/modules/ide/) | [⚙️](config/ide/config.yaml) | [📜](scripts/ide/) | VS Code, Cursor, Antigravity IDE 集成 | | [`git_operations`](src/codomyrmex/git_operations/) | 34 | 20 | [📖](docs/modules/git_operations/) | [⚙️](config/git_operations/config.yaml) | [📜](scripts/git_operations/) | 完整的 Git CLI 包装器(分支、合并、贮藏、子模块) | | [`git_analysis`](src/codomyrmex/git_analysis/) | 16 | 4 | [📖](docs/modules/git_analysis/) | [⚙️](config/git_analysis/config.yaml) | [📜](scripts/git_analysis/) | 提交分析,贡献者统计,代码变动 | | [`tree_sitter`](src/codomyrmex/tree_sitter/) | 7 | 2 | [📖](docs/modules/tree_sitter/) | [⚙️](config/tree_sitter/config.yaml) | [📜](scripts/tree_sitter/) | AST 解析,代码导航,结构化查询 | | [`static_analysis`](src/codomyrmex/static_analysis/) | 4 | 9 | [📖](docs/modules/static_analysis/) | [⚙️](config/static_analysis/config.yaml) | [📜](scripts/static_analysis/) | Linting,复杂度指标,死代码检测 | | [`terminal_interface`](src/codomyrmex/terminal_interface/) | 8 | 4 | [📖](docs/modules/terminal_interface/) | [⚙️](config/terminal_interface/config.yaml) | [📜](scripts/terminal_interface/) | 富文本终端 UI,ANSI 渲染,交互式提示 | | [`scrape`](src/codomyrmex/scrape/) | 12 | 9 | [📖](docs/modules/scrape/) | [⚙️](config/scrape/config.yaml) | [📜](scripts/scrape/) | Web 抓取,HTML 解析,站点地图爬取 | | [`search`](src/codomyrmex/search/) | 6 | 3 | [📖](docs/modules/search/) | [⚙️](config/search/config.yaml) | [📜](scripts/search/) | 全文搜索,模糊匹配,正则表达式搜索 | ### ⚙️ 配置与运维模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`config_management`](src/codomyrmex/config_management/) | 13 | 7 | [📖](docs/modules/config_management/) | [⚙️](config/config_management/config.yaml) | [📜](scripts/config_management/) | 分层配置加载,验证,热重载 | | [`config_monitoring`](src/codomyrmex/config_monitoring/) | 3 | 1 | [📖](docs/modules/config_monitoring/) | [⚙️](config/config_monitoring/config.yaml) | [📜](scripts/config_monitoring/) | 配置漂移检测和警报 | | [`config_audits`](src/codomyrmex/config_audits/) | 4 | 1 | [📖](docs/modules/config_audits/) | [⚙️](config/config_audits/config.yaml) | [📜](scripts/config_audits/) | 配置合规性审计和规则引擎 | | [`environment_setup`](src/codomyrmex/environment_setup/) | 4 | 4 | [📖](docs/modules/environment_setup/) | [⚙️](config/environment_setup/config.yaml) | [📜](scripts/environment_setup/) | 依赖解析,环境验证 | | [`logging_monitoring`](src/codomyrmex/logging_monitoring/) | 16 | 4 | [📖](docs/modules/logging_monitoring/) | [⚙️](config/logging_monitoring/config.yaml) | [📜](scripts/logging_monitoring/) | 结构化日志,指标收集,警报 | | [`telemetry`](src/codomyrmex/telemetry/) | 25 | 13 | [📖](docs/modules/telemetry/) | [⚙️](config/telemetry/config.yaml) | [📜](scripts/telemetry/) | OpenTelemetry traces, spans, exporters | | [`performance`](src/codomyrmex/performance/) | 19 | 4 | [📖](docs/modules/performance/) | [⚙️](config/performance/config.yaml) | [📜](scripts/performance/) | 基准测试,性能分析,性能可视化 | | [`maintenance`](src/codomyrmex/maintenance/) | 12 | 3 | [📖](docs/modules/maintenance/) | [⚙️](config/maintenance/config.yaml) | [📜](scripts/maintenance/) | 健康检查,清理,系统诊断 | | [`release`](docs/modules/cerebrum/) | 4 | 2 | [📖](docs/modules/release/) | [⚙️](config/release/config.yaml) | [📜](scripts/release/) | 发布管理,变更日志生成,版本控制 | ### 🧩 框架与实用工具模块 | 模块 | Py | 测试 | 文档 | 配置 | 脚本 | 描述 | |:---|:---:|:---:|:---:|:---:|:---:|:---| | [`utils`](src/codomyrmex/utils/) | 17 | 15 | [📖](docs/modules/utils/) | [⚙️](config/utils/config.yaml) | [📜](scripts/utils/) | CLI 辅助工具,字符串操作,文件工具,装饰器 | | [`validation`](src/codomyrmex/validation/) | 16 | 7 | [📖](docs/modules/validation/) | [⚙️](config/validation/config.yaml) | [📜](scripts/validation/) | Schema 验证,数据契约,类型检查 | | [`exceptions`](src/codomyrmex/exceptions/) | 13 | 2 | [📖](docs/modules/exceptions/) | [⚙️](config/exceptions/config.yaml) | [📜](scripts/exceptions/) | 全面的异常层次结构 (AI, IO, Git, Config) | | [`events`](src/codomyrmex/events/) | 29 | 7 | [📖](docs/modules/events/) | [⚙️](config/events/config.yaml) | [📜](scripts/events/) | 事件总线,发布/订阅,事件存储,日志监听器 | | [`plugin_system`](src/codomyrmex/plugin_system/) | 12 | 7 | [📖](docs/modules/plugin_system/) | [⚙️](config/plugin_system/config.yaml) | [📜](scripts/plugin_system/) | 插件发现,生命周期,依赖注入 | | [`dependency_injection`](src/codomyrmex/dependency_injection/) | 4 | 2 | [📖](docs/modules/dependency_injection/) | [⚙️](config/dependency_injection/config.yaml) | [📜](scripts/dependency_injection/) | IoC 容器,服务定位器,作用域生命周期 | | [`concurrency`](src/codomyrmex/concurrency/) | 17 | 5 | [📖](docs/modules/concurrency/) | [⚙️](config/concurrency/config.yaml) | [📜](scripts/concurrency/) | 分布式锁,信号量,Redis 锁定 | | [`compression`](src/codomyrmex/compression/) | 8 | 1 | [📖](docs/modules/compression/) | [⚙️](config/compression/config.yaml) | [📜](scripts/compression/) | gzip, zstd, brotli 压缩算法 | | [`templating`](src/codomyrmex/templating/) | 8 | 4 | [📖](docs/modules/templating/) | [⚙️](config/templating/config.yaml) | [📜](scripts/templating/) | Jinja2 模板,代码生成模板 | | [`feature_flags`](src/codomyrmex/feature_flags/) | 9 | 6 | [📖](docs/modules/feature_flags/) | [⚙️](config/feature_flags/config.yaml) | [📜](scripts/feature_flags/) | 功能标志管理,发布策略 | | [`tool_use`](src/codomyrmex/tool_use/) | 5 | 4 | [📖](docs/modules/tool_use/) | [⚙️](config/tool_use/config.yaml) | [📜](scripts/tool_use/) | 工具注册,执行和发现 | | [`testing`](src/codomyrmex/testing/) | 15 | 7 | [📖](docs/modules/testing/) | [⚙️](config/testing/config.yaml) | [📜](scripts/testing/) | 测试 Fixtures,运行器,覆盖率工具 | | [`documentation`](src/codomyrmex/documentation/) | 45 | 10 | [📖](docs/modules/documentation/) | [⚙️](config/documentation/config.yaml) | [📜](scripts/documentation/) | Docusaurus 站点,文档生成,质量检查 | | [`docs_gen`](src/codomyrmex/docs_gen/) | 4 | 2 | [📖](docs/modules/docs_gen/) | [⚙️](config/docs_gen/config.yaml) | [📜](scripts/docs_gen/) | 从源代码自动生成文档 | | [`module_template`](src/codomyrmex/module_template/) | 2 | 5 | [📖](docs/modules/module_template/) | [⚙️](config/module_template/config.yaml) | [📜](scripts/module_template/) | 创建新模块的规范模板 | | [`operating_system`](src/codomyrmex/operating_system/) | 10 | 1 | [📖](docs/modules/operating_system/) | [⚙️](config/operating_system/config.yaml) | [📜](scripts/operating_system/) | OS 交互,文件系统 | | [`file_system`](src/codomyrmex/file_system/) | 2 | 2 | [📖](docs/modules/file_system/) | [⚙️](config/file_system/config.yaml) | [📜](scripts/file_system/) | 文件操作,目录遍历器,权限 | | [`dark`](src/codomyrmex/dark/) | 4 | 2 | [📖](docs/modules/dark/) | [⚙️](config/dark/config.yaml) | [📜](scripts/dark/) | Dark PDF 提取和处理 | | [`embodiment`](src/codomyrmex/embodiment/) | 9 | 1 | [📖](docs/modules/embodiment/) | [⚙️](config/embodiment/config.yaml) | [📜](scripts/embodiment/) | ROS Bridge,传感器,执行器(已弃用) | | [`demos`](src/codomyrmex/demos/) | 2 | 1 | [📖](docs/modules/demos/) | [⚙️](config/demos/config.yaml) | [📜](scripts/demos/) | 演示注册表和展示运行器 | | [`formal_verification`](src/codomyrmex/formal_verification/) | 8 | 2 | [📖](docs/modules/formal_verification/) | [⚙️](config/formal_verification/config.yaml) | [📜](scripts/formal_verification/) | Z3 后端,SMT 求解器,不变量检查 | | [`system_discovery`](src/codomyrmex/system_discovery/) | 14 | 4 | [📖](docs/modules/system_discovery/) | [⚙️](config/system_discovery/config.yaml) | [📜](scripts/system_discovery/) | 系统自省,能力检测 | ### 🧬 ML 训练与优化模块 | 模块 | Py | 文档 | 描述 | |:---|:---:|:---:|:---| | [`lora`](src/codomyrmex/lora/) | 3 | [📖](docs/modules/lora/) | LoRA 微调适配器 | | [`peft`](src/codomyrmex/peft/) | 3 | [📖](docs/modules/peft/) | 参数高效微调 | | [`rlhf`](src/codomyrmex/rlhf/) | 3 | [📖](docs/modules/rlhf/) | 基于人类反馈的强化学习 | | [`dpo`](src/codomyrmex/dpo/) | 3 | [📖](docs/modules/dpo/) | 直接偏好优化 | | [`distillation`](src/codomyrmex/distillation/) | 3 | [📖](docs/modules/distillation/) | 模型蒸馏和压缩 | | [`quantization`](src/codomyrmex/quantization/) | 5 | [📖](docs/modules/quantization/) | 模型量化 (INT8, FP16) | | [`distributed_training`](src/codomyrmex/distributed_training/) | 3 | [📖](docs/modules/distributed_training/) | 多 GPU 和分布式训练 | | [`autograd`](src/codomyrmex/autograd/) | 4 | [📖](docs/modules/autograd/) | 自动微分引擎 | | [`matmul_kernel`](src/codomyrmex/matmul_kernel/) | 3 | [📖](docs/modules/matmul_kernel/) | 自定义矩阵乘法内核 | | [`softmax_opt`](src/codomyrmex/softmax_opt/) | 3 | [📖](docs/modules/softmax_opt/) | Softmax 优化(FlashAttention 风格) | | [`nas`](src/codomyrmex/nas/) | 3 | [📖](docs/modules/nas/) | 神经架构搜索 | | [`model_merger`](src/codomyrmex/model_merger/) | 3 | [📖](docs/modules/model_merger/) | 模型合并 (TIES, SLERP, DARE) | | [`slm`](src/codomyrmex/slm/) | 3 | [📖](docs/modules/slm/) | 小语言模型优化 | | [`ssm`](src/codomyrmex/ssm/) | 3 | [📖](docs/modules/ssm/) | 状态空间模型 | | [`eval_harness`](src/codomyrmex/eval_harness/) | 3 | [📖](docs/modules/eval_harness/) | LLM 评估工具套件 | | [`logit_processor`](src/codomyrmex/logit_processor/) | 3 | [📖](docs/modules/logit_processor/) | Logit 操作和处理 | | [`tokenizer`](src/codomyrmex/tokenizer/) | 4 | [📖](docs/modules/tokenizer/) | 自定义分词器训练和管理 | ### 🔗 数据管道与基础设施模块 | 模块 | Py | 文档 | 描述 | |:---|:---:|:---:|:---| | [`api`](src/codomyrmex/api/) | 31 | [📖](docs/modules/api/) | REST/GraphQL API 框架 | | [`collaboration`](src/codomyrmex/collaboration/) | 30 | [📖](docs/modules/collaboration/) | 多智能体协作协议 | | [`ml_pipeline`](src/codomyrmex/ml_pipeline/) | 2 | [📖](docs/modules/ml_pipeline/) | ML 流水线编排 | | [`data_curation`](src/codomyrmex/data_curation/) | 3 | [📖](docs/modules/data_curation/) | 数据集管理和清洗 | | [`synthetic_data`](src/codomyrmex/synthetic_data/) | 3 | [📖](docs/modules/synthetic_data/) | 合成数据生成 | | [`text_to_sql`](src/codomyrmex/text_to_sql/) | 3 | [📖](docs/modules/text_to_sql/) | 自然语言转 SQL 翻译 | | [`semantic_router`](src/codomyrmex/semantic_router/) | 3 | [📖](docs/modules/semantic_router/) | 语义意图路由 | ### 🧩 专业模块 | 模块 | Py | 文档 | 描述 | |:---|:---:|:---:|:---| | [`ai_gateway`](src/codomyrmex/ai_gateway/) | 3 | [📖](docs/modules/ai_gateway/) | AI 网关和 API 代理 | | [`aider`](src/codomyrmex/aider/) | 5 | [📖](docs/modules/aider/) | Aider AI 编程助手集成 | | [`neural`](src/codomyrmex/neural/) | 7 | [📖](docs/modules/neural/) | 神经网络原语 | | [`interpretability`](src/codomyrmex/interpretability/) | 3 | [📖](docs/modules/interpretability/) | 模型可解释性和说明性 | | [`image`](src/codomyrmex/image/) | 2 | [📖](docs/modules/image/) | 图像处理工具 | | [`examples`](src/codomyrmex/examples/) | 9 | [📖](docs/modules/examples/) | 参考实现示例 | | [`pai_pm`](src/codomyrmex/pai_pm/) | 6 | [📖](docs/modules/pai_pm/) | PAI 项目管理服务器 | | [`soul`](src/codomyrmex/soul/) | 4 | [📖](docs/modules/soul/) | 生物认知身份和角色引擎 | ## 🔬 模块依赖架构 ``` graph LR subgraph Foundation["Foundation Layer"] Utils["utils"] Exceptions["exceptions"] Events["events"] Validation["validation"] Config["config_management"] end subgraph DataLayer["Data Layer"] DB["database_management"] Cache["cache"] Serial["serialization"] Docs["documents"] Memory["agentic_memory"] end subgraph AILayer["AI Layer"] LLM["llm"] Agents["agents"] Cerebrum["cerebrum"] RAG["graph_rag"] VS["vector_store"] PE["prompt_engineering"] end subgraph InfraLayer["Infrastructure Layer"] Cloud["cloud"] Container["containerization"] Deploy["deployment"] CICD["ci_cd_automation"] Net["networking"] end subgraph SecurityLayer["Security Layer"] Auth["auth"] Crypto["crypto"] Encrypt["encryption"] Identity["identity"] Privacy["privacy"] end subgraph AppLayer["Application Layer"] Orch["orchestrator"] MCP["model_context_protocol"] CLI["cli"] Website["website"] PAI["email + calendar"] end Foundation --> DataLayer Foundation --> SecurityLayer DataLayer --> AILayer SecurityLayer --> AILayer AILayer --> AppLayer InfraLayer --> AppLayer DataLayer --> InfraLayer ``` ## 🚀 智能体编排流水线 ``` sequenceDiagram participant User participant CLI participant Orchestrator participant MCP as MCP Server participant Agents participant LLM as LLM Provider participant Tools User->>CLI: codomyrmex run --task "analyze codebase" CLI->>Orchestrator: Create workflow Orchestrator->>MCP: Register available tools MCP->>Tools: Discover ~424 tools across 127 modules Orchestrator->>Agents: Dispatch agent Agents->>LLM: Generate completion (Gemini 2.5 Pro) LLM-->>Agents: Response + tool calls Agents->>MCP: Execute tool calls MCP->>Tools: Run git_analysis, static_analysis, etc. Tools-->>MCP: Results MCP-->>Agents: Tool outputs Agents-->>Orchestrator: Completed task Orchestrator-->>CLI: Display results CLI-->>User: Formatted output ``` ## 🏗️ 项目结构 ``` codomyrmex/ ├── .github/ # 36 GitHub Actions workflows, templates, docs ├── config/ # 127 module-specific config.yaml files ├── docs/ # 1,029+ documentation files across 18 directories │ ├── ARCHITECTURE.md # System architecture │ ├── AGENTS.md # Agent coordination │ ├── SPEC.md # Technical specification │ ├── PAI.md # Personal AI reference │ ├── PAI_DASHBOARD.md # PAI dashboard reference │ ├── index.md # MkDocs site index │ ├── getting-started/ # 9 quick-start docs │ ├── development/ # 10 dev guides │ ├── modules/ # 126 per-module doc directories │ ├── security/ # 11 security guides │ ├── agi/ # 14 AGI theory docs │ └── ... (18 directories) ├── scripts/ # 445+ orchestrator scripts │ ├── agents/ # Jules batch dispatch, harvester │ ├── maintenance/ # Config generation, health checks │ └── ... (90+ module scripts) ├── src/codomyrmex/ # Main source (127 modules) │ ├── agents/ # 168 files │ ├── llm/ # 41 files │ ├── security/ # 47 files │ ├── tests/ # 905+ test files (zero-mock) │ └── ... (122 more modules) ├── CHANGELOG.md # Release history ├── CITATION.cff # Citation metadata └── pyproject.toml # uv-managed project config (uv_build backend) ``` ## 📊 汇总统计 | 指标 | 值 | |:---|:---:| | **总模块数** | 127 | | **总 Python 文件数** | 3,000+ | | **总测试文件数** | 905+ | | **文档文件数** | 1,029+ | | **GitHub 工作流** | 36 | | **MCP 工具** | 424 | | **测试策略** | Zero-Mock (100% 真实方法) | | **默认 LLM** | Gemini 2.5 Pro | | **包管理器** | uv | | **Python 版本** | ≥3.11 | ## 🔌 LLM 提供商矩阵 | 提供商 | 模型 | 状态 | 免费层级 |式传输 | 工具调用 | |:---|:---|:---:|:---:|:---:|:---:| | **Google Gemini** | gemini-2.5-pro | ✅ | ✅ | ✅ | ✅ | | **Google Imagen** | imagen-3.0-generate-002 | ✅ | ❌ | — | — | | **Google Veo** | veo-2.0-generate-001 | ✅ | ❌ | — | — | | **OpenRouter** | Llama 3.3 70B | ✅ | ✅ | ✅ | ✅ | | **OpenRouter** | DeepSeek R1 | ✅ | ✅ | ✅ | ✅ | | **OpenRouter** | Google Gemma 3 | ✅ | ✅ | ✅ | ✅ | | **Anthropic** | Claude 3.5 Sonnet | ✅ | ❌ | ✅ | ✅ | | **OpenAI** | GPT-4o | ✅ | ❌ | ✅ | ✅ | ## 🤖 智能体调度架构 ``` graph TD subgraph Dispatch["Agent Dispatch Layer"] Jules["Jules CLI v0.1.42"] GeminiCLI["Gemini CLI v0.22.5"] Claude["Claude Code"] Codex["Codex CLI"] end subgraph Orchestration["Orchestration"] BatchDispatch["jules_batch_dispatch.sh"] MegaSwarm["mega_swarm_dispatcher.py"] Harvester["mega_swarm_harvester.py"] end subgraph Targets["Target Modules - 126"] M1["agentic_memory"] M2["agents"] Mdots["..."] M95["website"] end MegaSwarm --> Jules BatchDispatch --> Jules Jules --> Targets GeminiCLI --> Targets Claude --> Targets Harvester --> Jules Harvester -->|"Pull and Apply"| Targets ``` ## 🧪 测试理念 ``` graph LR subgraph Policy["Zero-Mock Policy"] direction TB R1["Real methods only"] R2["Real file I/O"] R3["Real network calls"] R5["No unittest.mock"] R6["No MagicMock"] end subgraph Layers["Test Layers"] Unit["Unit Tests - 800+ files"] Integration["Integration Tests"] E2E["End-to-End Validation"] end Policy --> Layers ``` ``` # 运行所有测试 uv run pytest src/codomyrmex/tests/ -v --tb=short # 运行特定模块 uv run pytest src/codomyrmex/tests/unit/llm/ -v # Lint 和格式化 uv run ruff check . # lint uv run ruff format . # format uv run ty check src/ # type check ``` ## 🗺️ 配置架构 ``` graph TB subgraph ConfigRoot["config/"] C1["agents/config.yaml"] C2["llm/config.yaml"] C3["security/config.yaml"] Cdots["... 127 total"] end subgraph Scripts["scripts/"] S1["agents/orchestrator.py"] S2["llm/demo.py"] S3["security/audit.py"] Sdots["... 445+ scripts"] end subgraph Source["src/codomyrmex/"] Src1["agents/"] Src2["llm/"] Src3["security/"] SrcDots["... 127 modules"] end C1 -.->|"YAML load"| S1 C2 -.->|"YAML load"| S2 C3 -.->|"YAML load"| S3 S1 -->|"import"| Src1 S2 -->|"import"| Src2 S3 -->|"import"| Src3 ``` ## 个人 AI 仪表板 ``` graph LR subgraph Dashboard["PAI Dashboard localhost:3000"] Overview["Overview Tab"] EmailTab["Email Tab"] CalendarTab["Calendar Tab"] SkillsTab["Skills Tab"] AgentsTab["Agents Tab"] end subgraph Backend["Backend Services"] Gmail["Gmail API"] GCal["Google Calendar API"] MCP2["MCP Tool Server"] AgentAPI["Agent Dispatch API"] end subgraph External["External Services"] Google["Google Workspace"] Jules2["Jules Agents"] Gemini["Gemini 2.5 Pro"] end Dashboard --> Backend Backend --> External ``` ## ⚡ 快速开始 ``` # 克隆 git clone https://github.com/docxology/codomyrmex.git && cd codomyrmex # 安装(所有开发依赖) uv sync --all-groups # 设置环境 cp .env.example .env # Edit with your API keys # 运行 CLI uv run codomyrmex --help # 运行测试 uv run pytest src/codomyrmex/tests/ -v # Lint 和格式化 uv run ruff check . && uv run ruff format . # Dispatch Jules agents uv run python scripts/agents/mega_swarm_dispatcher.py ``` ## 文档标准 每个模块都遵循 **RASP** 文档模式: | 文档 | 目的 | 链接 | |:---|:---|:---| | `README.md` | 人类可读的概述 | [根目录 README](README.md),[Docs README](docs/README.md) | | `AGENTS.md` | 智能体可读的指令 | [根目录 AGENTS](AGENTS.md),[Docs AGENTS](docs/AGENTS.md) | | `SPEC.md` | 技术规范 | [根目录 SPEC](SPEC.md),[Docs SPEC](docs/SPEC.md) | | `PAI.md` | Personal AI 集成 | [根目录 PAI](PAI.md),[Docs PAI](docs/PAI.md) | ## 🏗️ `.github/` 目录概览 ### 工作流(共 36 个) | 类别 | 工作流 | 描述 | |:---|:---|:---| | **核心 CI/CD** | [ci.yml](workflows/ci.yml),[security.yml](workflows/security.yml),[release.yml](workflows/release.yml),[pre-commit.yml](workflows/pre-commit.yml) | Lint,测试,安全扫描,发布 | | **代码质量** | [code-health.yml](workflows/code-health.yml),[benchmarks.yml](workflows/benchmarks.yml),[documentation.yml](workflows/documentation.yml),[documentation-validation.yml](workflows/documentation-validation.yml) | 质量门禁,基准测试,文档 | | **PR 自动化** | [auto-merge.yml](workflows/auto-merge.yml),[pr-labeler.yml](workflows/pr-labeler.yml),[pr-title-check.yml](workflows/pr-title-check.yml),[pr-conflict-check.yml](workflows/pr-conflict-check.yml),[pr-coverage-comment.yml](workflows/pr-coverage-comment.yml),[pr-linter-comments.yml](workflows/pr-linter-comments.yml) | 自动合并,标签,覆盖率 | | **AI 调度** | [gemini-dispatch.yml](workflows/gemini-dispatch.yml),[gemini-invoke.yml](workflows/gemini-invoke.yml),[gemini-review.yml](workflows/gemini-review.yml),[gemini-triage.yml](workflows/gemini-triage.yml),[gemini-scheduled-triage.yml](workflows/gemini-scheduled-triage.yml),[jules-dispatch.yml](workflows/jules-dispatch.yml) | Gemini 和 Jules 智能体编排 | | **维护** | [maintenance.yml](workflows/maintenance.yml),[cleanup-branches.yml](workflows/cleanup-branches.yml),[lock-threads.yml](workflows/lock-threads.yml),[workflow-coordinator.yml](workflows/workflow-coordinator.yml),[workflow-status.yml](workflows/workflow-status.yml) | 仓库健康,分支清理,状态 | | **社区** | [first-interaction.yml](workflows/first-interaction.yml),[first-pr-merged.yml](workflows/first-pr-merged.yml),[agent-welcome.yml](workflows/agent-welcome.yml),[agent-metrics.yml](workflows/agent-metrics.yml) | 新用户引导,智能体欢迎 | | **依赖** | [dependency-review.yml](workflows/dependency-review.yml),[dependabot-auto-approve.yml](workflows/dependabot-auto-approve.yml),[sbom.yml](workflows/sbom.yml) | 依赖审查,SBOM 生成 | ### 社区与配置文件 | 文件 | 目的 | |:---|:---| | [CONTRIBUTING.md](CONTRIBUTING.md) | 贡献者指南,包含 PR 流程和代码标准 | | [CODEOWNERS](CODEOWNERS) | 按文件路径自动分配审查者 | | [PULL_REQUEST_TEMPLATE.md](PULL_REQUEST_TEMPLATE.md) | 标准 PR 检查清单 | | [ISSUE_TEMPLATE/](ISSUE_TEMPLATE/) | Bug 报告,功能请求,Jules 任务,文档问题 | | [dependabot.yml](dependabot.yml) | 自动依赖更新配置 | | [release-drafter.yml](release-drafter.yml) | 自动生成的发行说明 | | [FUNDING.yml](FUNDING.yml) | GitHub Sponsors 配置 | | [WORKFLOW_IMPROVEMENTS.md](WORKFLOW_IMPROVEMENTS.md) | 计划中的工作流增强 | | [WORKFLOW_TESTING_GUIDE.md](WORKFLOW_TESTING_GUIDE.md) | 本地测试 GitHub Actions 指南 | ## 📜 许可证 MIT 许可证 — 详情见 [LICENSE](LICENSE)。

由 🐜 Codomyrmex 构建 — 自主软件群落
127 个模块 · 3,000+ 个 Python 文件 · 905+ 个测试 · 1,029+ 份文档 · 36 个工作流 · Zero-Mock · 生产级

标签:AI编程助手, Claude, Codomyrmex, CVE检测, DNS解析, Gemini, GPT, GUI应用, MCP工具, PAI集成, Web界面, Zero-Mock测试, 二进制文件分析, 人工智能原生, 代码工作区, 函数图谱, 可视化调试, 多智能体编排, 威胁情报, 安全防护, 工作流自动化, 带宽管理, 开发者工具, 开源项目, 技术中台, 搜索引擎查询, 智能编排, 模块化工作空间, 测试用例, 漏洞管理, 用户界面自定义, 自动化CI/CD, 请求拦截, 跨平台UI框架, 软件开发套件, 逆向工具