geode-context · git:20260907.97cb78b · 2026-09-07 · sha256 fc4fff052e191439

geode-context git:20260907.97cb78bA

Immutable. This exact content is served forever at /api/v1/blob/fc4fff052e191439.

---
name: geode-context
visibility: public
triggers: geode, harness, agent, runtime, release, packaging, docs, plugin, architecture
description: GEODE runtime architecture and repo-shape context. Use for architecture, packaging, release, docs, CI, AgenticLoop, async runtime, and plugin boundary questions.
---

# GEODE Context

Version-agnostic runtime context. Use `geode version` / `geode about` for the
installed version and runtime facts; never trust numbers remembered from this
skill.

## Current Shape

- GEODE is a general-purpose autonomous-agent harness whose runtime is `AgenticLoop(while tool_use)`.
- The agent loop, sub-agents, plans, and batches are all instances of the same tool-use loop.
- The runtime is domain-agnostic. Shipped packages:
  - `core/` — agent loop, tools, MCP, memory, hooks, wiring, CLI, server, gateway.
  - `evals/` — Petri audits, benchmarks, seed generation, and GEO measurement.
  - `evolve/` — scaffold search and Crucible experiment supervision.
- `site/` is the public Next.js docs/site, not a Python package.
- Dependency direction is `evolve -> evals -> core`; reverse imports are forbidden.

## Runtime Boundaries

- Canonical execution path is async-first: `AgenticLoop.arun()`, tool `aexecute()`, async provider clients.
- `core/agent/loop/agent_loop.py` is the implementation. `DEFAULT_MAX_ROUNDS = 0` means no round cap. Model completion and runtime guard exits are distinct `TerminationReason` values in `core/agent/loop/models.py`; a diagnostic or budget exit is not task success.
- Sub-agents: `core/agent/sub_agent.py` (`SubAgentManager`) — max depth 1 (no recursion), session-wide cap 15, global Lane concurrency 50 (`core/wiring/container.py`).
- Headless mode policy lives in `core/server/supervised/services.py`: `run_bash` and delegation remain denied; DAEMON desktop control requires explicit `gateway.allow_computer_use`, while SCHEDULER keeps the desktop denial. The active tool plan and profile can further restrict access.

## Prompt And Context Injection

- `core/agent/system_prompt.py` builds the base prompt; `core/agent/loop/_context.py` composes skill and session context. `core/llm/prompt_assembler.py` contains shared formatting helpers, not another assembler.
- `PROMPT_CACHE_BOUNDARY` is the opening `<dynamic_context>` tag. Stable instructions precede it; per-turn context stays inside the closed envelope. `core/agent/loop/agent_loop.py` emits `PROMPT_ASSEMBLED` after each per-round rebuild.
- Skill metadata is injected as `<available_skills>` (metadata only); full skill bodies load on demand via the `use_skill` tool.
- Do not inject old Game IP pipeline facts, fixed DAG claims, analyst/evaluator topology, or confidence-threshold loop claims into the system prompt.

## Release Pipeline

- Functional commits update `CHANGELOG.md`.
- Quality gates: `ruff check` / `ruff format --check` (`core`, `evals`, `evolve`, `tests`, `scripts`), `mypy core/ evals/ evolve/`, `lint-imports`, `pytest -m "not live"`, `geode version` smoke.
- Publishing is manual/approval-gated, not automatic on every main push.

## Guardrails

- Do not restore the retired top-level `plugins`, `geode_product`, or
  `core.self_improving` packages. Evaluation and evolution stay explicit outer
  consumers of `core`.
- Do not describe GEODE as a fixed Plan-and-Execute DAG, fixed StateGraph, or confidence-threshold pipeline.
- Do not cite LangSmith as current observability; GEODE uses its own hooks, audit diagnostics, run logs, and site/docs gates.
- Do not hard-code deprecated model names. Use the provider registries and token/cost tables.