alxshelepenok/grove

grove

A formal workflow protocol that keeps AI coding agents on track through machine-enforced invariants, verified evidence, and structured context. Designed to keep deep, long-running projects coherent across sessions, agents, and months.

미분류agent-toolingagentic-workflowai

Code grows. Context windows don't. Plant a Grove 🌳

Long-running agent work fails in a predictable way: decisions and assumptions drift out of view as sessions grow, agents report work done that is not done, and after a few months the codebase no longer matches what anyone believes about it, so nobody can say why a given line exists.

Grove fits reasoning-heavy work that outlives a single session: long refactors, multi-session features, security and compliance work where every conclusion needs an audit trail. The protocol picks the next step, so you stop re-explaining the project to every new session.

What this gives you:

  • Atomic progress: every task is mechanically proven, not just claimed.
  • Hierarchy over compression: context is strictly structured, never lossily

summarized.

  • Absolute reproducibility: every action is recorded, so any step, decision,

or assumption can be replayed and retraced.

  • Continuity across agents: if an agent stops mid-goal, another agent on

another client or model resumes from verified state.

  • Total ownership: every goal, decision, task, question, and assumption is

stored in a persistent historical graph that belongs entirely to you.

Grove enforces its rules as deterministic invariants stored in a single checksummed lockfile: the agent cannot declare work done without falsifiable evidence, start unready tasks, or hallucinate progress. Instead of lossy prompt compression or summarization, project state lives in a typed reasoning graph with machine-checkable edges, and each step receives exactly the execution packet it needs, and nothing more.

Works with Claude Code, Codex, Gemini CLI, Cursor, Windsurf, Cline, GitHub Copilot, and any other agent. Grove includes a CLI, a built-in MCP server, and a drop-in agent skill bundle so you can integrate it into your workspace immediately.

[!IMPORTANT] A note on the desktop app shown below. It exists to make the
graph, the evidence, and the health of a project visible at a glance, but it
is still experimental and has not been tested on macOS yet. The CLI and the
MCP server are the stable, tested interfaces. The UI is implemented without
any JavaScript framework, mostly plain HTML, CSS, and Tauri, which keeps it
fast, and the graph is rendered with WebGL.

The reasoning graph, explored live. The same view at 143 nodes, history included. All an agent needs for one work item, nothing more. Work items tracked from proposal to done. Goals, work, and content health per area. Work grouped by theme, with the critical path.

Agents lose context as projects grow

Long-running agents suffer from context amnesia. Decisions, assumptions, and dependencies drift out of view as the session grows. A related failure is unreliable self-reporting: the agent declares work complete without sufficient evidence. This happens not out of deception, but because nothing in the environment prevents it.

Standard task trackers inherently trust the executor. When a human checks a box in Jira, the work is assumed done. That is a reasonable default for humans. For autonomous agents it is a silent failure mode. Premature "done" declarations compound across long sessions into structural errors, until the codebase no longer matches what anyone believes it to be, and nobody can say why a given line exists.

This is not theoretical. Grove evolved from a crude Markdown hypothesis into a protocol that today manages Merlin Guild, a closed-source production project of 200k+ lines of Rust and TypeScript, heavy on blockchain and cryptography. It scales because the protocol does not rely on the agent remembering or obeying the workflow correctly.

Structure instead of compression

The obvious response to context amnesia is more tooling: summarization, compaction, retrieval. All of these compress context, and compression loses information while hoping the loss does not matter.

Grove does not compress context. It structures it.

As a project evolves, its work is continuously organized into areas, goals, questions, assumptions, decisions, and executable work items. This hierarchy gives the agent a way to identify the context relevant to the current step instead of repeatedly carrying the entire project history into its context window.

The result is not just better continuity; it also reduces token usage. The agent no longer loads unrelated project context simply to recover where it is and why the current task exists.

Map the entire codebase in a single prompt

What happens when you point a frontier model at a raw codebase with Grove attached?

Without a protocol, an agent skims the files, hallucinates a quick summary, and loses the plot after a few steps. With Grove, it maps the territory. In a real-world test on a complex codebase, a single prompt initiated a 5-hour autonomous Discovery session.

The agent burned through its context window limit, but the result was a fully populated reasoning graph: 44 Areas, 47 Goals, and 89 Work items targeting test coverage gaps and logic bugs. It didn't just dump a flat to-do list; it formally declared its open unknowns as Questions and grouped related efforts into Themes.

Here is the exact prompt used to bootstrap the project:

Load the Grove skill and connect to the MCP server. Study the skill fully to
understand the protocol constraints.
Your objective is to run a complete Discovery phase across the entire
codebase. Do not write implementation code yet, your job is project analysis
and graph construction.
1. Break the project down into Areas. Note that a single package may contain
multiple logical areas.
2. Iterate through each Area and create Goals to address missing test coverage
and explicit logic bugs.
3. For each Goal, create Work items strictly formatted according to the Grove
protocol.
4. Group related work into Themes.
5. Declare open unknowns as Questions and formalize architectural choices as
Decisions where necessary.

Because Grove enforces a Definition of Ready (DoR), the agent couldn't fake progress. Over the next day, the agent systematically executed the delivery phase, turning 75 tasks to Done. The remaining tasks correctly stalled in proposed or ready states, waiting for human answers to the blocking Questions the agent had raised.

One project state, multiple interfaces

The unit of memory is not the conversation. It is the project.
The unit of progress is not the agent's claim. It is verified evidence.

Grove replaces polite prompt instructions with a strict, mechanically enforced protocol. Agents interact with project state through the CLI, MCP, and desktop interfaces. The protocol itself enforces the rules:

  • A work item cannot be marked done without an evidence record.
  • Work cannot start until every precondition is machine-verified.
  • Goal progress cannot be updated by hand; fitness deltas are applied atomically

at close time or not at all.

The state either satisfies the protocol, or Grove refuses to advance it. An agent cannot advance protocol state by merely claiming that work is complete.

Give agents only the context they need

Grove forces the agent to decompose the product into a strict typed hierarchy. Instead of a raw list of tasks, every piece of planning context lives explicitly in a node taxonomy. Nothing hides in side documents or the agent's internal state:

Node · ID · What it holds Area · A-NN · Permanent scope skeleton above goals; never archived. Goal · G-NN · Outcome with a measurable fitness function. Theme · T-NN · Optional grouping of related work items. Work · W-NN · Executable unit with Definition of Ready + Definition of Done. Decision · D-NN · ADR: immutable once accepted, superseded only with recorded rationale. Question · Q-NN · Open unknown, declared instead of pretended away. Assumption · B-NN · Falsifiable hypothesis with a validation method and result. Discovery · Y-NN · Reusable, evidence-backed knowledge distilled from finished work.

Typed edges connect these nodes into a graph, with blocks remaining acyclic. This structure lets Grove answer both why does this task exist? and what breaks if I change it? without relying on the agent's internal state.

Once this graph exists, the routing promised above becomes mechanical. grove next picks the current step; grove packet emits exactly its context. Nothing irrelevant enters the context window.

Before touching a line of code, the agent queries the causality cone. grove packet W-NN --cone maps the backward cone (everything that must finish first, in topological contraction order), the forward cone (the blast radius if this item changes), and a fragility score per affected goal.

Turn reasoning into reusable knowledge

Grove introduces a unified methodology for AI-driven software development, informed by Dual-Track Agile, Hypothesis-Driven Development, ADRs, Continuous Discovery, Cynefin, and the Mikado method. These influences are integrated into a single workflow designed around the constraints of autonomous LLM agents and enforced through machine-checkable invariants.

Most AI workflows are tiny waterfalls: specify everything, then build everything. Grove runs discovery and delivery in parallel, each track feeding the other:

  • Discovery takes open unknowns and operationalizes them. A question becomes

a falsifiable assumption; validated outcomes become curated discoveries.

  • Delivery executes ready work items and writes verified code on top of

those assumptions.

The joints are mechanical. Questions are asked against goals; assumptions target work and gate it; discoveries guide the next goals; finished work distills back into discoveries. When a test falsifies an assumption, the plan reshapes at once; dependent work cannot proceed on a broken foundation.

Knowledge has a lifecycle

Grove does not treat distilled knowledge as permanent truth. Discoveries can become stale as the project evolves; reactivating one requires a fresh anchor. Distillation debt is tracked rather than silently accumulating, while goal fitness is re-derived on every close.

The dashboard reflects actual protocol state after every mutation, not intended state. Grove assumes that a project keeps moving: knowledge changes, assumptions are invalidated, and unfinished reasoning accumulates. The protocol makes those changes visible instead of letting them disappear into project history.

Ideas behind the protocol

  • Discovery and Delivery run in parallel (Dual-Track Agile, Cagan). A work item

cannot enter Delivery until every open question and unvalidated assumption that blocks it is resolved in Discovery.

  • Every executable unit has explicit acceptance criteria before code is written

(HDD, Definition of Ready). The DoR is not a checklist anyone can override; it is a boolean conjunction the CLI evaluates on every status=progress transition.

  • Long-lived design choices are first-class artifacts (ADR, Nygard). Decisions