aien-sovereign-core
Autonomous sovereign intelligence engine and runtime core for NVIDIA DGX Spark
Brought by drakestapleton
aien-sovereign-core / AGENTS.md
| 1 | # Autonomous Agent Collaboration Protocol & Operational Playbook |
| 2 | Version 2.0 (September 2026) |
| 3 | Reference Standard for Humans and Autonomous AI Agents |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | ## 1. The Sovereign Voice Invariant |
| 8 | All communication, documentation, commits, and agent prompts must strictly adhere to the unslop standard: |
| 9 | - **Zero Em Dashes and En Dashes**: Never use em dashes or en dashes (Unicode U+2014 / U+2013) for pauses or clauses. Use standard commas, colons, parentheses, or periods. Use plain hyphens (`-`) only for CLI flags or compound terms. |
| 10 | - **Zero Sycophancy**: Never open with conversational filler such as "Certainly!", "Great question!", or "I would be happy to help." Address the operator or peer model directly as a professional systems engineer. |
| 11 | - **Ban AI Clichés**: Forbid words like "delve", "tapestry", "beacon", "testament", "crucial", "pivotal", "elevate", "game-changer", "unleash", "harness", "seamlessly". |
| 12 | - **Lead with Proof**: Every commit, pull request, or issue comment must lead immediately with verifiable technical evidence: compilation logs, test run receipts (`cargo test --verbose`), benchmark numbers, or diff snippets. |
| 13 | |
| 14 | --- |
| 15 | |
| 16 | ## 2. Mandatory Branching & Worktree Discipline |
| 17 | To protect codebase integrity in an agent-only development environment: |
| 18 | - **Zero Edits to Main**: Every single modification, feature, bugfix, or self-improvement edit must be performed in a dedicated descriptive branch (`feat/<name>`, `fix/<name>`, `perf/<name>`) or isolated git worktree (`/home/drakestapleton/workspace/hive-worktrees/<task_id>`). |
| 19 | - **Autonomous Public PR Creation**: Never commit directly to `main`. Commit to your feature branch, test thoroughly, push the branch to origin, and open a public Pull Request immediately via `gh pr create` so peers and supervisors see work happening in real time. |
| 20 | - **Verify Before Merge**: No branch is merged into `main` without running the automated preflight verification harness (`bash scripts/agent-preflight.sh`). |
| 21 | |
| 22 | --- |
| 23 | |
| 24 | ## 3. Honeycomb Coding Forge Coordination Protocol |
| 25 | Autonomous agents collaborate stigmergically across concentric hexagonal comb rings. |
| 26 | |
| 27 | ### Lifecycle of an Agent Task |
| 28 | ``` |
| 29 | 1. Discover Task --> GET /api/hive/forge/tasks?project=<project> |
| 30 | 2. Claim Lease --> POST /api/hive/forge/claim (Allocates TTL & worktree) |
| 31 | 3. Branch & Code --> git checkout -b feat/<task-module> |
| 32 | 4. Periodic Beat --> POST /api/hive/forge/heartbeat (Every 300s) |
| 33 | 5. Preflight Proof --> bash scripts/agent-preflight.sh |
| 34 | 6. Submit for Gate --> POST /api/hive/forge/submit |
| 35 | 7. AEGIS Defense --> Automatic zero-secret, test, and unslop verification |
| 36 | 8. Squash Merge --> gh pr merge --squash --delete-branch |
| 37 | ``` |
| 38 | |
| 39 | ### Gateway Endpoints (Port 18095) |
| 40 | - **Hub URL**: `http://192.168.1.108:18095` |
| 41 | - **List Open Tasks**: `GET /api/hive/forge/tasks?status=open` |
| 42 | - **Claim Task**: |
| 43 | ```bash |
| 44 | curl -s -X POST http://192.168.1.108:18095/api/hive/forge/claim \ |
| 45 | -H 'Content-Type: application/json' \ |
| 46 | -d '{"task_id": "task-xyz", "agent_id": "agent-pubkey-1", "ttl_secs": 600}' |
| 47 | ``` |
| 48 | - **Renew Heartbeat**: |
| 49 | ```bash |
| 50 | curl -s -X POST http://192.168.1.108:18095/api/hive/forge/heartbeat \ |
| 51 | -H 'Content-Type: application/json' \ |
| 52 | -d '{"task_id": "task-xyz", "agent_id": "agent-pubkey-1", "ttl_secs": 600}' |
| 53 | ``` |
| 54 | - **Submit Task**: |
| 55 | ```bash |
| 56 | curl -s -X POST http://192.168.1.108:18095/api/hive/forge/submit \ |
| 57 | -H 'Content-Type: application/json' \ |
| 58 | -d '{"task_id": "task-xyz", "agent_id": "agent-pubkey-1", "branch": "feat/my-feature", "pr_url": "https://github.com/..."}' |
| 59 | ``` |
| 60 | |
| 61 | --- |
| 62 | |
| 63 | ## 4. Context7 & Upstash Engineering Standards |
| 64 | When working on or generating code: |
| 65 | |
| 66 | ### Single-Concept Task Scoping |
| 67 | Do not attempt multiple disparate refactors or features in a single commit or tool invocation. Scope every task and pull request to a single, testable, atomic unit: |
| 68 | - **Good**: "Implement streaming reasoning parser for Anthropic thinking blocks." |
| 69 | - **Bad**: "Update parser, redesign UI layout, and refactor database queries." |
| 70 | |
| 71 | ### Structured Tool Calls & Minimal Context |
| 72 | - Use minimal, typed schemas for tool calls. |
| 73 | - Inspect files with bounded line ranges rather than reading entire directory trees. |
| 74 | - Offload long-running background builds and tests asynchronously, reacting to completion events rather than looping. |
| 75 | |
| 76 | --- |
| 77 | |
| 78 | ## 5. Hardware TPM Key Vault (Zero Disk Secrets) |
| 79 | - Plaintext `.env` files, credentials, or private keys must NEVER be written to disk in project workspaces. |
| 80 | - All API keys reside strictly in the hardware TPM-bound vault (`atlas-vault add / get`) and resolve dynamically in-memory. |
| 81 | - Model output streams and logs must actively redact vault secrets (`[REDACTED_BY_ATLAS_VAULT]`). |
| 82 | |
| 83 | --- |
| 84 | |
| 85 | ## 6. Preflight Verification & PR Evidence Standards |
| 86 | Every PR must include a structured summary, test execution proof, and certifications: |
| 87 | |
| 88 | ```bash |
| 89 | # Execute local preflight verification before opening a PR |
| 90 | bash scripts/agent-preflight.sh |
| 91 | ``` |
| 92 | |
| 93 | ### Pull Request Description Standard |
| 94 | ```markdown |
| 95 | ## Summary |
| 96 | - Concise technical description of the atomic change. |
| 97 | |
| 98 | ## Verification Proof |
| 99 | - cargo test --workspace (Paste passing output) |
| 100 | - bash scripts/agent-preflight.sh (Exit code 0) |
| 101 | |
| 102 | ## Certifications |
| 103 | - Zero Plaintext Secrets: Hardware TPM vault only. No .env files on disk. |
| 104 | - Sovereign Voice & Anti-Slop: Zero em dashes or en dashes present. |
| 105 | - Sovereign Defense Covenant: Section 6 Retroactive Inception applies. |
| 106 | ``` |
| 107 | |
| 108 | --- |
| 109 | |
| 110 | ## 7. Human-Agent Co-Attribution Standard |
| 111 | Commits made by AI agents must credit both the agent model and the supervising human: |
| 112 | |
| 113 | ``` |
| 114 | Author: AIEN Atlas <aien.atlas@proton.me> |
| 115 | Co-authored-by: Drake Stapleton <drake@aien.org> |
| 116 | ``` |