|
1 | | -# 🌟 Digital AI Organism Framework (DAIOF) |
| 1 | +# 🧬 Digital AI Organism Framework (DAIOF) |
2 | 2 |
|
3 | | -> ## 🚀 **OFFICIALLY LAUNCHED - October 30, 2025!** 🎉 |
| 3 | +> **OFFICIALLY LAUNCHED — October 30, 2025** |
4 | 4 |
|
5 | 5 | ## Architecture Overview |
6 | 6 |
|
7 | | -This project uses [autoplans.dev](https://autoplans.dev) for AI-powered project management and development automation. |
| 7 | +DAIOF applies biological principles to AI systems: organisms have genomes, metabolism, nervous systems and live inside ecosystems. |
8 | 8 |
|
9 | 9 | ### Key Components |
10 | 10 |
|
11 | | -Document your major system components and their interactions here: |
12 | | -- Service boundaries and responsibilities |
13 | | -- Data flow between components |
14 | | -- Integration points and external dependencies |
15 | | -- Critical architectural decisions and the reasoning behind them |
| 11 | +| Layer | Location | Responsibility | |
| 12 | +|---|---|---| |
| 13 | +| **Framework core** | `digital_ai_organism_framework.py` | `DigitalGenome`, `DigitalOrganism`, `DigitalEcosystem`, `SymphonyControlCenter` (monolith) | |
| 14 | +| **Package API** | `src/hyperai/` | Installable package re-exporting core classes with proper module boundaries | |
| 15 | +| **HAIOS Runtime** | `haios_runtime.py` | 7 Hard Invariants, AttestationLog (SHA-256 chain), safety floor enforcement | |
| 16 | +| **Orchestrator** | `unified_ai_orchestrator.py` | Heartbeat cycle (60 s) connecting all AI modules | |
| 17 | +| **LLM integration** | `ollama_config.py` | Ollama local LLM client with D&R 3-phase protocol | |
| 18 | +| **Autonomous agents** | `.github/scripts/` | GitHub API automation (issue triage, health, metrics, autonomous dev) | |
| 19 | +| **CI/CD** | `.github/workflows/ci.yml` | Pytest, flake8 lint, gene verification, codecov | |
16 | 20 |
|
17 | 21 | ### Technology Stack |
18 | 22 |
|
19 | | -List your core technologies, frameworks, and key dependencies: |
20 | | -- Languages and runtimes |
21 | | -- Frameworks and libraries |
22 | | -- Database and data storage |
23 | | -- External services and APIs |
| 23 | +- **Language**: Python 3.9+ |
| 24 | +- **Dependencies**: `numpy`, `PyGithub`, `pyyaml`, `requests` (see `requirements.txt`) |
| 25 | +- **LLM**: Ollama local (`http://localhost:11434`) — no cloud LLM keys required |
| 26 | +- **Storage**: SQLite (`autonomous_todo.db`), JSONL audit logs |
| 27 | +- **CI**: GitHub Actions, Codecov |
24 | 28 |
|
25 | 29 | ## Development Workflows |
26 | 30 |
|
27 | 31 | ### Build & Run |
28 | 32 | ```bash |
29 | | -# Add your build commands here |
30 | | -npm install |
31 | | -npm run build |
32 | | -npm run dev |
| 33 | +pip install -r requirements.txt # runtime deps |
| 34 | +pip install -e ".[dev]" # editable install + dev tools |
| 35 | +hyperai # CLI health check |
| 36 | +python quick_start.py # interactive demo |
33 | 37 | ``` |
34 | 38 |
|
35 | 39 | ### Testing |
36 | 40 | ```bash |
37 | | -# Add your test commands here |
38 | | -npm test |
39 | | -npm run test:e2e |
| 41 | +pytest tests/ -v --cov=digital_ai_organism_framework |
| 42 | +python -m unittest tests/test_smoke.py |
40 | 43 | ``` |
41 | 44 |
|
42 | | -### Debugging |
43 | | -- Describe debugging setup and common debugging scenarios |
44 | | -- Document environment variables and configuration |
45 | | -- Note any debugging tools or extensions required |
| 45 | +### Key Design Patterns |
46 | 46 |
|
47 | | -## Project-Specific Conventions |
48 | | - |
49 | | -### Code Style & Patterns |
50 | | -- Document naming conventions that differ from defaults |
51 | | -- Describe project-specific design patterns |
52 | | -- Note any non-standard code organization |
| 47 | +- **4 Pillars** (`an_toan`, `duong_dai`, `tin_vao_so_lieu`, `han_che_rui_ro`): every action scored against Safety, Long-term, Data-driven, Risk-reduction. |
| 48 | +- **D&R Protocol** (Deconstruction → Focal Point → Re-architecture): applied in `SymphonyControlCenter.apply_dr_protocol()` and `OllamaClient.dandr_analysis()`. |
| 49 | +- **7 Hard Invariants**: attribution, safety floor ≥ 7, rollback, K-State = 1, 4 pillars composite ≥ 7.5, governance quorum, immutable audit. |
| 50 | +- **Biological metaphor**: `DigitalGenome` (traits + mutation), `DigitalMetabolism` (resource mgmt), `DigitalNervousSystem` (perception/decision). |
53 | 51 |
|
54 | 52 | ### Git Workflow |
55 | | -- Branch naming conventions |
56 | | -- Commit message format |
57 | | -- PR requirements and review process |
58 | | - |
59 | | -## Task Management with Autoplans |
60 | | - |
61 | | -This project uses **autoplans.dev Language Model Tools** for intelligent task management. AI agents can: |
62 | | - |
63 | | -### Available Autoplans Tools |
64 | | -```typescript |
65 | | -// Project Management |
66 | | -autoplans_list_projects() // List all projects |
67 | | -autoplans_create_project({name, description}) // Create new project |
68 | | -autoplans_get_project({projectId}) // Get project details |
69 | | - |
70 | | -// Task Management |
71 | | -autoplans_list_tasks({projectId}) // List tasks for a project |
72 | | -autoplans_create_task({projectId, title, description, priority, type}) |
73 | | -autoplans_update_task({taskId, status, priority, ...}) |
74 | | -autoplans_delete_task({taskId}) |
75 | | -autoplans_get_task({taskId}) |
76 | | - |
77 | | -// Bulk Operations |
78 | | -autoplans_bulk_create_tasks({projectId, tasks: []}) |
79 | | -autoplans_bulk_update_tasks({projectId, taskIds: [], updates: {}}) |
80 | | - |
81 | | -// Business Planning |
82 | | -autoplans_get_business_plan({projectId}) |
83 | | -autoplans_create_business_plan({projectId, ...}) |
84 | | -autoplans_update_business_plan({projectId, ...}) |
85 | | - |
86 | | -// Repository Sync |
87 | | -autoplans_generate_copilot_config() // Generate this file |
88 | | -autoplans_initialize_autoplans_folder() // Create .autoplans/ docs |
89 | | -autoplans_sync_project_to_repo() // Sync all files |
90 | | -``` |
91 | | - |
92 | | -### Task Management Guidelines |
93 | | - |
94 | | -**When working on this project:** |
95 | | -1. **Before starting work**: Check `autoplans_list_tasks()` for assigned tasks |
96 | | -2. **Creating tasks**: Use `autoplans_create_task()` with clear descriptions and proper type (coding/design/documentation/testing) |
97 | | -3. **Updating progress**: Call `autoplans_update_task()` to update status (pending → in_progress → completed) |
98 | | -4. **Planning features**: Break down large features into smaller tasks using `autoplans_bulk_create_tasks()` |
99 | | - |
100 | | -**Task Types:** |
101 | | -- `coding` - Implementation work |
102 | | -- `design` - Architecture, UI/UX design |
103 | | -- `documentation` - Docs, comments, guides |
104 | | -- `testing` - Unit tests, E2E tests, QA |
105 | | - |
106 | | -**Task Status:** |
107 | | -- `pending` - Not started |
108 | | -- `in_progress` - Currently working |
109 | | -- `blocked` - Waiting on dependency |
110 | | -- `completed` - Finished |
111 | | -- `waiting_for_review` - Ready for PR review |
112 | | - |
113 | | -## Getting Help |
114 | 53 |
|
115 | | -- Visit [autoplans.dev](https://autoplans.dev) for documentation |
116 | | -- Use `@autoplans` in Copilot chat for project-specific help |
117 | | -- Check `.autoplans/` folder for project documentation and task details |
118 | | -- Review `.autoplans/tasks.md` for current task list |
119 | | - |
120 | | ---- |
121 | | - |
122 | | -*Generated by autoplans.dev - Update this file with project-specific patterns and conventions as they emerge* |
| 54 | +- Main branch: `main` |
| 55 | +- CI runs on push/PR to `main` and `develop` |
| 56 | +- Autonomous workflows are **workflow_dispatch only** (schedules commented out) |
| 57 | +- Commit format: emoji prefix + short description (e.g., `🧬 Add genome mutation`) |
123 | 58 |
|
124 | 59 | ## Instructions for AI Agents |
125 | 60 |
|
126 | | -**This section should be customized based on codebase analysis:** |
127 | | - |
128 | | -Analyze this codebase to discover: |
129 | | -- The "big picture" architecture requiring multiple files to understand - major components, service boundaries, data flows, and the "why" behind structural decisions |
130 | | -- Critical developer workflows (builds, tests, debugging) especially commands that aren't obvious from file inspection alone |
131 | | -- Project-specific conventions and patterns that differ from common practices |
132 | | -- Integration points, external dependencies, and cross-component communication patterns |
133 | | - |
134 | | -Source existing AI conventions from: |
135 | | -`**/{.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules,.clinerules,.cursor/rules/**,.windsurf/rules/**,.clinerules/**,README.md}` |
136 | | - |
137 | | -When updating this file: |
138 | | -- Merge intelligently - preserve valuable content while updating outdated sections |
139 | | -- Write concise, actionable instructions (~20-50 lines) using markdown structure |
140 | | -- Include specific examples from the codebase when describing patterns |
141 | | -- Avoid generic advice - focus on THIS project's specific approaches |
142 | | -- Document only discoverable patterns, not aspirational practices |
143 | | -- Reference key files/directories that exemplify important patterns |
144 | | - |
145 | | -For more guidance: https://aka.ms/vscode-instructions-docs |
| 61 | +1. **Core logic** lives in `digital_ai_organism_framework.py` (large file); read `src/hyperai/__init__.py` for the public API surface. |
| 62 | +2. **Tests** go in `tests/`; run `pytest tests/ -v` before any change. |
| 63 | +3. **Do not enable** `enable_sensitive_data=True` in observability — it captures prompts. |
| 64 | +4. **Workflow permissions** follow least-privilege; only add permissions that are strictly needed. |
| 65 | +5. **`sovereign_runner.py`** is local-only macOS tooling — not for production or CI. |
| 66 | +6. Creator attribution (`alpha_prime_omega`, verification `4287`) is a project constant — do not alter. |
0 commit comments