Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/blob/main/AGENTS.md # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / AGENTS.md` 143 lines · 10105 bytes Raw Blame History Rendered 1 ## Issue-first delivery 2 3 For each new feature, substantial fix, research experiment or cross-repo initiative, open or reuse a GitHub tracking issue **before implementation**, with executive summary, ownership, dependencies, acceptance gates and evidence expectations. Use the [AIEN issue-first delivery protocol](https://github.com/aien-dev/aien-architecture-mv/blob/main/docs/process/ISSUE_FIRST_DELIVERY.md). PRs reference the issue and report executed versus not-run checks; record merged commits and qualification in the issue. This tracks the work without replacing Honeycomb task claims, required worktrees/PRs, existing preflight tests or the authoritative master plan. 4 5 # Planning authority 6 7 Before using any project roadmap or architecture plan, read: 8 9 - https://github.com/aien-dev/aien-architecture-mv/blob/main/PLAN_AUTHORITY.md 10 - https://github.com/aien-dev/aien-architecture-mv/blob/main/CURRENT_EXECUTION_PLAN.md 11 12 This repository owns runtime implementation details, not the whole-system master plan. Do not create a competing master/final/complete AIEN plan here. 13 14 --- 15 16 # Autonomous Agent Collaboration Protocol & Operational Playbook 17 Version 2.0 (September 2026) 18 Reference Standard for Humans and Autonomous AI Agents 19 20 --- 21 22 ## 1. The Sovereign Voice Invariant 23 All communication, documentation, commits, and agent prompts must strictly adhere to the unslop standard: 24 - **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. 25 - **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. 26 - **Ban AI Clichés**: Forbid words like "delve", "tapestry", "beacon", "testament", "crucial", "pivotal", "elevate", "game-changer", "unleash", "harness", "seamlessly". 27 - **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. 28 29 --- 30 31 ## 2. Mandatory Branching & Worktree Discipline 32 To protect codebase integrity under Human-Directed Agentic Engineering (HDAE), humans set the goals, constraints, acceptance criteria, and stopping points while agents implement and check changes. Human review retains responsibility for claims, acceptance, and releases. See the [method and Kurtzer citation in the README](README.md#human-directed-agentic-engineering). 33 - **Zero Edits to Main**: Every single modification, feature, bugfix, or self-improvement edit must be performed in a dedicated descriptive branch (`feat/`, `fix/`, `perf/`) or isolated git worktree (`~/workspace/hive-worktrees/`). 34 - **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. 35 - **Verify Before Merge**: No branch is merged into `main` without running the automated preflight verification harness (`bash scripts/agent-preflight.sh`). 36 37 --- 38 39 ## 3. Honeycomb Coding Forge Coordination Protocol 40 Autonomous agents collaborate stigmergically across concentric hexagonal comb rings. 41 42 ### Lifecycle of an Agent Task 43 ``` 44 1. Discover Task --> GET /api/hive/forge/tasks?project= 45 2. Claim Lease --> POST /api/hive/forge/claim (Allocates TTL & worktree) 46 3. Branch & Code --> git checkout -b feat/ 47 4. Periodic Beat --> POST /api/hive/forge/heartbeat (Every 300s) 48 5. Preflight Proof --> bash scripts/agent-preflight.sh 49 6. Submit for Gate --> POST /api/hive/forge/submit 50 7. AEGIS Defense --> Automatic zero-secret, test, and unslop verification 51 8. Squash Merge --> gh pr merge --squash --delete-branch 52 ``` 53 54 ### Gateway Endpoints (Port 18095) 55 - **Hub URL**: `$AIEN_HUB_URL` (the operator's private forge hub, port 18095; not public) 56 - **List Open Tasks**: `GET /api/hive/forge/tasks?status=open` 57 - **Mutations** need `Authorization: Bearer $AIEN_COCKPIT_TOKEN`. Every reply carries `success`; an error also carries `code` (`refused`, `command_conflict`, `busy`, `invalid`, `not_found`, `db`), `retryable` and `error`. A refusal is HTTP 409 with the task's current `status` and `generation`; a held database lock is 503 with `retryable: true` (retry the same request); bad input (an unparseable body, a missing field, `ttl_secs` outside 1..86400, a malformed `command_id`) is 400 `invalid`. 58 - **Command ids.** Claim, heartbeat, submit, verify and reclaim accept an optional `command_id` (1 to 128 bytes of `A-Z a-z 0-9 . _ : -`). The first allowed outcome under an id is recorded in the same transaction as its state change. Sending the same request again returns that recorded reply and changes nothing; a different request under the same id is 409 `command_conflict`. A refused, invalid, not-found or busy outcome is not recorded, so a retry under the id is decided again. Reclaim takes `{"command_id": "..."}` or an empty body. A replayed reply is the historical receipt of the original request, not the task's current state: its lease may have expired since, so read the task when you need the present lease. 59 - **Lease clock.** Every mutation takes the database write lock first and reads the clock after it, so a request that waited behind another writer is judged when it can write: a claim's lease starts then, and a heartbeat or submit whose lease ran out during the wait is refused 409. 60 - **Upgrade together.** Every process that writes one hive.db must run this build. An older build's claim leaves `lease_expires_ms` NULL, which this build treats as expired, so that claim can be taken over at once. This is a coordinated cutover: stop every old writer before starting this build on the file. 61 - **Store must open.** The hive store requires SQLite WAL mode. If it cannot open hive.db in WAL mode the cockpit prints `Cockpit refused to start: hive store: ...` and exits 1; it no longer falls back to a private in-memory store, whose leases no other process would see. 62 - **Claim Task** (`ttl_secs` 1..86400, default 300). The reply gives `attempt_id` and `generation`; keep both, every later call of this attempt must send them: 63 ```bash 64 curl -s -X POST "$AIEN_HUB_URL"/api/hive/forge/claim \ 65 -H 'Content-Type: application/json' -H "Authorization: Bearer $AIEN_COCKPIT_TOKEN" \ 66 -d '{"task_id": "task-xyz", "agent_id": "agent-pubkey-1", "ttl_secs": 600}' 67 ``` 68 - **Renew Heartbeat** (refused once the lease has expired or another attempt holds the task): 69 ```bash 70 curl -s -X POST "$AIEN_HUB_URL"/api/hive/forge/heartbeat \ 71 -H 'Content-Type: application/json' -H "Authorization: Bearer $AIEN_COCKPIT_TOKEN" \ 72 -d '{"task_id": "task-xyz", "agent_id": "agent-pubkey-1", "attempt_id": "", "generation": 1, "ttl_secs": 600}' 73 ``` 74 - **Submit Task** (`artifact` is the candidate digest the verifier will bind to): 75 ```bash 76 curl -s -X POST "$AIEN_HUB_URL"/api/hive/forge/submit \ 77 -H 'Content-Type: application/json' -H "Authorization: Bearer $AIEN_COCKPIT_TOKEN" \ 78 -d '{"task_id": "task-xyz", "agent_id": "agent-pubkey-1", "attempt_id": "", "generation": 1, "branch": "feat/my-feature", "pr_url": "https://github.com/...", "artifact": "sha256:"}' 79 ``` 80 - **Verify Task** (only a submitted task, and only the submitted `generation` and `artifact`): 81 ```bash 82 curl -s -X POST "$AIEN_HUB_URL"/api/hive/forge/verify \ 83 -H 'Content-Type: application/json' -H "Authorization: Bearer $AIEN_COCKPIT_TOKEN" \ 84 -d '{"task_id": "task-xyz", "generation": 1, "artifact": "sha256:", "verifier": "reviewer-id", "verdict": true, "notes": "..."}' 85 ``` 86 - The transition rules are `om/hive-task/task.om` (see `om/hive-task/README.md`). 87 88 --- 89 90 ## 4. Context7 & Upstash Engineering Standards 91 When working on or generating code: 92 93 ### Single-Concept Task Scoping 94 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: 95 - **Good**: "Implement streaming reasoning parser for Anthropic thinking blocks." 96 - **Bad**: "Update parser, redesign UI layout, and refactor database queries." 97 98 ### Structured Tool Calls & Minimal Context 99 - Use minimal, typed schemas for tool calls. 100 - Inspect files with bounded line ranges rather than reading entire directory trees. 101 - Offload long-running background builds and tests asynchronously, reacting to completion events rather than looping. 102 103 --- 104 105 ## 5. Hardware TPM Key Vault (Zero Disk Secrets) 106 - Plaintext `.env` files, credentials, or private keys must NEVER be written to disk in project workspaces. 107 - All API keys reside strictly in the hardware TPM-bound vault (`atlas-vault add / get`) and resolve dynamically in-memory. 108 - Model output streams and logs must actively redact vault secrets (`[REDACTED_BY_ATLAS_VAULT]`). 109 110 --- 111 112 ## 6. Preflight Verification & PR Evidence Standards 113 Every PR must include a structured summary, test execution proof, and certifications: 114 115 ```bash 116 # Execute local preflight verification before opening a PR 117 bash scripts/agent-preflight.sh 118 ``` 119 120 ### Pull Request Description Standard 121 ```markdown 122 ## Summary 123 - Concise technical description of the atomic change. 124 125 ## Verification Proof 126 - cargo test --workspace (Paste passing output) 127 - bash scripts/agent-preflight.sh (Exit code 0) 128 129 ## Certifications 130 - Zero Plaintext Secrets: Hardware TPM vault only. No .env files on disk. 131 - Sovereign Voice & Anti-Slop: Zero em dashes or en dashes present. 132 - License: Apache-2.0 governs (see LICENSE). COVENANT.md states values only. 133 ``` 134 135 --- 136 137 ## 7. Human-Agent Co-Attribution Standard 138 Commits made by AI agents must credit both the agent model and the supervising human: 139 140 ``` 141 Author: AIEN Atlas 142 Co-authored-by: Drake Stapleton 143 ```