Update docs: goals, index split, namespace changes

- README: Add goal/goalstatus/goalwait, fix plan location, add agent/new and agent/idx
- architecture-9p: Add goal files to session namespace, document index formats
- evolution: Add Phase 26 for goals, workflows, and index split
This commit is contained in:
Levi Neely 2026-08-17 13:51:04 +02:00
parent 655378174b
commit d279bbae86
3 changed files with 86 additions and 18 deletions

View File

@ -35,21 +35,27 @@ session/
├── new create a session by writing key=value arguments
├── idx tab-separated session index
└── {session}/
├── plan persistent Markdown checklist
├── goal session goal text (triggers workflow on write)
├── goalstatus goal status (running/complete/blocked)
├── goalwait blocks until goal status changes
├── env session environment
└── agent/{agent}/
├── cfg configuration
├── ctl control commands
├── state current state
├── statewait block until state changes
├── prompt submit a prompt
├── chat conversation history
├── context rendered model context
├── systemprompt rendered system prompt
├── tools tool discovery and loading
├── usage token statistics
├── cost cost estimate
└── proc/ detached process output
└── agent/
├── new create agent by writing key=value
├── idx tab-separated agent index
└── {agent}/
├── plan persistent Markdown checklist
├── cfg configuration
├── ctl control commands
├── state current state
├── statewait block until state changes
├── prompt submit a prompt
├── chat conversation history
├── context rendered model context
├── systemprompt rendered system prompt
├── tools tool discovery and loading
├── usage token statistics
├── cost cost estimate
└── proc/ detached process output
```
## Providers, tools, and security

View File

@ -56,9 +56,12 @@ echo '{"prompt":"explain recursion"}' | ollie-9p rdwr generate
| Path | Mode | Purpose |
|---|---:|---|
| `session/new` | rdwr | Create a session. Write `name=X [remote=Y]`; read the resulting name. |
| `session/idx` | r | Session index. |
| `session/idx` | r | Session index: `session-id\tsession-name\tpaused\tconnected\tremote\tcwd`. |
| `session/{sname}/env` | r | Session environment and runtime variables. |
| `session/{sname}/paused` | r | Pause state. |
| `session/{sname}/goal` | r/w | Session goal text. Writing triggers the workflow if not running. |
| `session/{sname}/goalstatus` | r/w | Goal status: running, complete, blocked, or error. |
| `session/{sname}/goalwait` | r | Blocks until goal status changes. |
| `session/{sname}/ctl` | rdwr | `kill`, `save`, `invalidate`, `pause`, and `resume`. |
| `session/{sname}/name` | r/w | Mutable session display name. |
| `session/{sname}/id` | r | Immutable session UUID. |
@ -75,8 +78,8 @@ echo "name=coding cwd=$PWD" | ollie-9p write session/myproj/agent/new
| Path | Mode | Purpose |
|---|---:|---|
| `agent/new` | rdwr | Create an agent from `name=X cwd=Y`. |
| `agent/idx` | r | Agent index. |
| `agent/new` | rdwr | Create an agent from `name=X cwd=Y`. With `prompt=`, runs as sub-agent. |
| `agent/idx` | r | Agent index: `session-id\tagent-id\tagent-name\tparent-id\tdepth\tstate`. |
| `agent/{aname}/prompt` | w | Queue a user turn. |
| `agent/{aname}/fifo` | r/w | Prompt queue. |
| `agent/{aname}/feed` | r/w | Change-detecting input stream. |

View File

@ -59,6 +59,8 @@ gantt
Go file tools + cleanup :done, 2026-08-16, 1d
OptMem persistent memory :done, 2026-08-16, 1d
Markdown parsing + output cap :done, 2026-08-16, 1d
Goals + conductor workflow :done, 2026-08-17, 1d
Split session/agent indexes :done, 2026-08-17, 1d
```
## Phase 1: Monorepo Bootstrap (Apr 11)
Started as independent git repos unified under a monorepo with submodules.
@ -1745,4 +1747,61 @@ or external workflow. The client supplies context and writes a prompt; Ollie
supplies the runtime and 9P state surface. `virtfs` separates namespace
declaration from 9P transport. Tool authoring, remote execution, prompting, and
editor integration remain separate concerns documented by the focused
architecture documents.
architecture documents.
## Phase 26: Goals, Workflows, and Index Split (Aug 17)
Session-level goals and the conductor workflow pattern became first-class features.
The session and agent index formats were split for cleaner parsing and better
sub-agent tree support in the GUI.
### Goals and Workflows
Sessions gained goal-related files:
- `session/{s}/goal` — write goal text to trigger a workflow
- `session/{s}/goalstatus` — read/write status (running/complete/blocked)
- `session/{s}/goalwait` — block until status changes
Writing to `goal` triggers `runWorkflow()` if status is empty, complete, blocked,
or error. The workflow script (default: `conductor`) creates a conductor agent
that reads the goal, explores the codebase, breaks work into tasks, and delegates
to sub-agents via `subagent_spawn`.
The conductor agent profile includes code intelligence tools (`code_outline`,
`code_symbols`, `code_query`, `codebase_overview`) and LSP tools (`lsp_definition`,
`lsp_references`, etc.) for understanding the codebase before delegating.
### Index Format Split
The single `session/idx` line that crammed session and agent data together was
split into two files:
**`session/idx`** — session list only:
```
session-id\tsession-name\tpaused\tconnected\tremote\tcwd
```
**`session/{s}/agent/idx`** — agent tree per session:
```
session-id\tagent-id\tagent-name\tparent-id\tdepth\tstate
```
This enabled:
- Simpler GUI parsing with no embedded semicolon-separated agent lists
- Proper sub-agent tree display with parent-id and depth
- Expandable/collapsible agent hierarchy in the session tree
- Auto-selection of top-level agents (depth 0) instead of first-in-list
### GUI Sub-Agent Tree
The KDE GUI's `SessionModel` gained:
- `hasChildren` role for agents with sub-agents
- `m_agentExpanded` map for tracking agent expansion state
- Recursive `appendAgentTree` that respects parent expansion
- Expand/collapse arrows for agents with children
### Bug Fix: ollie-9p UNAME Fallback
`ollie-9p` previously required `$OLLIE_UNAME` when `$OLLIE_SESSION_ID` was set,
making it unusable from non-agent contexts. The fallback to `$USER` was added,
allowing normal users to read session files like `goal` and `goalstatus`.