Commit Graph

188 Commits

Author SHA1 Message Date
Levi Neely 989aa0400d o: fix tmux session name handling for dots
Session names like 'r7.20' caused 'duplicate session' errors because
tmux interprets dots as window.pane separators.

Fix: Use '=' prefix for exact match in all tmux -t arguments.
From tmux(1): 'If the session name is prefixed with an =, only an
exact match is accepted.'
2026-09-04 15:35:21 +02:00
Levi Neely 9307cc86de o: set tmux mouse option globally
Use -g instead of -t to apply mouse support to all tmux sessions.
2026-08-27 16:26:08 +02:00
Levi Neely 3a39041e26 o tui: drop tmux -CC, enable mouse support 2026-08-27 15:04:14 +02:00
Levi Neely a3dfbcefc1 o: strip ANSI escapes on dumb terminals
Detect TERM=dumb or non-tty stdout and use plain '> ' prompt
instead of bold ANSI escape sequences.
2026-08-27 14:46:18 +02:00
Levi Neely 59c19cace9 acme-ollie-ensure: use PWD (acme sets it), tag fallback for HOME
Confirmed acme calls threadspawnd with window dir.
Added tag-based fallback when PWD is HOME (top-level window).
2026-08-24 15:29:55 +02:00
Levi Neely 53baa43203 acme-ollie-ensure: update session cwd on every invocation 2026-08-24 15:26:06 +02:00
Levi Neely 89db742a04 Redesign acme sessions: one session per project, not per agent
Model: acme-{hash} (session with project cwd) / assistant (agent)
- Git worktree aware (uses --show-toplevel)
- CWD set on session, not agent
- Agent always named 'assistant'
2026-08-24 15:23:24 +02:00
Levi Neely aae861adae Fix acme-ollie-ensure: use existing namespace paths
session/$S/id and agent/$A/id don't exist in the 9P namespace.
Use env and cfg which do exist, fixing OllieHere and all acme scripts.
2026-08-24 15:14:51 +02:00
Levi Neely 6b5d3fd0b6 agents: align autoLoad with agent roles
Each agent now has tools matching its purpose:

- Read-only agents (explorer, navigator, observer, theo, copilot):
  No shell, file_write, file_edit. Code analysis tools only.

- Workflow agents (author, reviewer, panelist, foreman):
  9p client for peer messaging and goalstatus.
  Analysis tools for verification.

- Orchestration agents (conductor):
  subagent_spawn, 9p client, analysis tools.
  No direct file editing (delegates to sub-agents).

- Full coding agents (default, driver):
  Complete toolset including shell, file ops, LSP, code intel.

- Support agents (librarian, taskmanager):
  Scoped to their domain (docs, task files).

Removed tools that violate agent constraints.
2026-08-21 10:14:42 +02:00
Ollie Agent 263ea51d29 restored autoload tools 2026-08-20 19:07:27 +02:00
Ollie Agent 3f8c8df38a Improve workflow-aware tool ranking 2026-08-20 19:01:21 +02:00
Ollie Agent 4bf46ae85d Load hinted tools through the agent namespace 2026-08-20 18:29:10 +02:00
Levi Neely 07dcd60d19 skills: add embedding-based skill matching
Add semantic skill matching using all-MiniLM-L6-v2 sentence embeddings.
Skills are automatically injected into user turns based on relevance.

New packages:
- embedding: ONNX-based text embedding with MiniLM model
- skills: skill discovery, embedding cache, and semantic matching

Integration:
- InitSkillIndex called at startup in fs.NewRoot
- matchSkills called per-turn in executeTurn
- Matched skills injected in <context> block alongside user prompts

Makefile:
- install-models target downloads model and ONNX runtime
- Model files stored in ~/.local/share/ollie/models/

Config:
- Threshold: 0.2 cosine similarity
- Limit: 3 skills per turn
- Skill dirs: ~/.kiro/skills (user), ~/.config/ollie/skills (installed)
2026-08-20 15:54:43 +02:00
Levi Neely ade1092fab prompts: clarify skill_list() must be called, not grepped 2026-08-20 14:10:24 +02:00
Levi Neely cd9da5ed27 quirks: reject shell calls to native tools
- Add quirks package for stupid model behavior workarounds
- ShellInvokesNativeTool blocks shell(cmd="tool_name") patterns
- Add client_9p tool: native wrapper for ollie-9p operations
- Block ollie-9p in shell — use client_9p instead
- Update all prompts to use client_9p, not shell+ollie-9p
- Clarify 9P namespace is complete (tools are NOT in 9P)
- Registry.All() lists all available tools for validation
2026-08-20 14:08:53 +02:00
Levi Neely b1a59e3e84 tweak user prefs 2026-08-20 12:07:28 +02:00
Levi Neely aad9c4f6e5 agents: move user-preferences to userPrompts
user-preferences.md is meant to be prepended to every user message,
not part of the system prompt. Moved from 'prompt' to 'userPrompts'
in: author, conductor, default, foreman, panelist, reviewer.

Other agents already had it in the correct location.
2026-08-20 11:48:10 +02:00
Levi Neely 4ff37741e2 subagent: fix timeout and premature response issues
Timeout fix:
- Add Timeout field to ToolInfo (protocol) and MetaFile (metadata)
- proc.go respects tool-declared timeout before falling back to 30s default
- subagent_spawn.meta declares timeout=0 (no timeout) so the tool is
  never killed prematurely while waiting for the sub-agent to finish
- Tool schema declares timeout with 'do not set' guidance to prevent
  the LLM from adding a short timeout

Premature response fix:
- Inject behavioral prefix into sub-agent prompt: complete all work
  before responding, report results not intentions
- Sub-agent's final text is returned to parent; this instruction ensures
  it contains accomplished work, not a plan
2026-08-20 10:59:23 +02:00
Levi Neely 5fdd80c26c Implement workflow variants system
- runWorkflow accepts a variant parameter; sources {workflow}-{variant}.conf
  as env vars before exec'ing the script
- Session stores variant; persisted and restored
- session/new accepts variant= parameter
- 'run' ctl command accepts optional variant as second arg
- workflows file now lists variants: name<TAB>default,variant1,...
- review workflow reads AUTHOR_PROFILE/REVIEWER_PROFILE env vars
- Add review-code.conf and review-writing.conf example variants
2026-08-19 17:57:22 +02:00
Levi Neely 59f729f591 Add review workflow: iterative author/reviewer refinement loop 2026-08-19 17:41:24 +02:00
Levi Neely 5a1f16610b consensus: don't write to goal file, synthesis lives in foreman chat 2026-08-19 17:27:36 +02:00
Levi Neely 80a9f7ecc4 consensus workflow: foreman + panelist agents with peer messaging
New workflow that spawns N independent panelists (default 3) and a
foreman. Each panelist analyzes the goal from a different angle:
- correctness/completeness
- simplicity/maintainability
- edge cases/failure modes

Panelists report findings to foreman via peer/ links. The foreman
synthesizes agreement, resolves disagreements, and writes the verdict.

Files:
- data/workflows/consensus — orchestration script
- data/agents/foreman.json — low-temp synthesis profile
- data/agents/panelist.json — high-temp analysis profile
- data/prompts/agent-foreman.md — synthesis behavior
- data/prompts/agent-panelist.md — investigation behavior

Usage:
  printf 'name=review\ncwd=%s\nworkflow=consensus\n' $PWD | ollie-9p write session/new
  echo 'Review error handling in agent/loop.go' | ollie-9p write session/review/goal
2026-08-19 17:26:31 +02:00
Levi Neely 28085e4de0 update user prefs 2026-08-19 16:23:33 +02:00
Levi Neely a73ef13fb5 tools: remove old individual cmd/ binaries
All tool logic lives in the multicall main.go at each family root.
Move .meta files to data/tools/ (single canonical location).
Expand test-core to cover all tools.
2026-08-19 13:56:21 +02:00
Levi Neely b4baddd826 Memory tools: never expose raw memo commands to agents
- Add MEMO_TOOLS=1 env var to memo script; when set, all printed
  instructions reference native tool names instead of memo paths
- Set MEMO_TOOLS=1 in all memory tool .meta wrappers
- Add memory_nap tool for compressions
- Add memory_zoom tool for tree navigation
- Add part/T pagination args to memory_wake
- Update system prompt to use memory_zoom tool call
- Fix inject ctl: submit as user message when agent is idle
2026-08-19 10:13:02 +02:00
Ollie Agent 94b4c4be3f Integrate OptMem wake into agent memory prompting 2026-08-18 14:01:18 +02:00
Ollie Agent 35c6ee6b44 Simplify file tool interfaces 2026-08-18 08:19:48 +02:00
Ollie Agent 9bd9539b6a Simplify file read ranges 2026-08-18 08:15:18 +02:00
Ollie Agent d90bd77fa0 Make file read integer arguments explicit 2026-08-18 08:07:59 +02:00
Levi Neely d0ecc0c689 Update conductor agent: add code*/lsp* tools, fix prompt ordering
- Add code_outline, code_symbols, code_query, code_dependencies, codebase_overview
- Add lsp_definition, lsp_references, lsp_hover, lsp_symbols, lsp_diagnostics
- Reorder prompt: analyze goal first, then explore relevant codebase areas
2026-08-17 13:20:56 +02:00
Levi Neely a17dd683df Split session/idx and agent/idx, fix sub-agent tree display
Server:
- session/idx now outputs: session-id, session-name, paused, connected, remote, cwd
- session/{s}/agent/idx now outputs: session-id, agent-id, agent-name, parent-id, depth, state
- Add error if parent agent not found during sub-agent spawn

GUI:
- refreshSessions() reads session index, then agent/idx per session
- Auto-select first top-level agent (depth 0) instead of first in list
- SessionModel tracks agent expansion separately from session expansion
- Agents with children show expand/collapse arrows and are collapsible
- Add hasChildren role to SessionModel

Tools:
- subagent_spawn now passes parent= argument for proper depth tracking
- Remove hardcoded max_depth=5, use server default of 1
- Makefile installs shell script tools from data/tools/

KRunner:
- Update to parse new session/idx format
2026-08-17 13:03:26 +02:00
Levi Neely 958d3d2ddf workflows: script-based workflows with session-level CWD
- Workflows are executable scripts in data/workflows/
- New 'workflows' 9P file lists available workflows
- Goal file stores text; writing triggers workflow if status allows
- goalstatus file for status read/write, goalwait for blocking
- Session ctl accepts 'run [workflow]' command
- Session now owns CWD; agents inherit via callback
- Conductor workflow: creates agent, primes with instructions, exits
- GUI workflow combo reads from workflows, not agents
- Persistence includes goal, goalstatus, workflow, and session CWD
2026-08-17 12:00:10 +02:00
Levi Neely 8b71b34fdf prompt: ban file_write from memory (prevents hallucination corruption) 2026-08-17 10:20:28 +02:00
Levi Neely 2cde59ac3b session-level goals: goal file + goalwait + conductor workflow
Write to session/{s}/goal to set a session-level objective.
A conductor agent is spawned automatically in the background,
decomposes the goal, spawns sub-agents, and reports completion.

- goal file: write sets goal + starts conductor; read returns status
- goalwait file: blocks until goal status changes (BlockOnce)
- Conductor writes status=complete/blocked back to goal when done
- Session.Goal() / SetGoal() / GoalSignal() on Session struct
2026-08-17 10:15:00 +02:00
Levi Neely 74ba5ae7ac remove maxSteps and ResetsCounter entirely
The step budget mechanism is gone. Agents run until they finish,
are interrupted by the user, or (for sub-agents) hit the timeout.

No replacement. The human is the kill switch.
2026-08-17 09:48:58 +02:00
Levi Neely da0ee4456f sub-agent guardrails: depth, parallelism, timeout
Enforce three limits on sub-agent spawning:
- depth (default 1): sub-agents cannot spawn their own sub-agents
- parallelism (default unlimited): cap concurrent children per parent
- timeout (default 600s): sub-agents are killed after 10 minutes

Top-level agents are never constrained by timeout.

Also: refactored parseAgentNewRequest to return a struct instead of
4 positional values. Added depth/activeChildren fields to Agent.
OLLIE_SUBAGENT_DEPTH env var set on sub-agents.

Deferred: remove maxSteps (replace entirely with timeout).
2026-08-17 09:37:59 +02:00
Ollie Agent e854e91b7f replace just build orchestration with make 2026-08-17 00:01:27 +02:00
Ollie Agent 7182db56cf fix GUI dialog contrast and focus behavior 2026-08-16 23:55:43 +02:00
Ollie Agent 45ff8a2864 Remove legacy backend environment configuration 2026-08-16 19:48:52 +02:00
Ollie Agent e51a1d4ff7 Update architecture documentation and remove obsolete frontends 2026-08-16 19:21:26 +02:00
Ollie Agent e972b5666a add metrics queries and agent-scoped plans 2026-08-16 17:00:11 +02:00
Ollie Agent 6d6b49f2bb improve acme tools, fix focus stealing in kde gui 2026-08-16 16:00:59 +02:00
Ollie Agent e54f494458 Use web_fetch for API documentation 2026-08-16 13:13:16 +02:00
Ollie Agent f82b36ea80 Integrate OptMem memory backend 2026-08-16 11:10:50 +02:00
Ollie Agent e5eab98699 remove logseq tool 2026-08-16 10:42:05 +02:00
Ollie Agent 36649367eb remove obsolete process tools 2026-08-16 10:41:42 +02:00
Ollie Agent 8567ddaa36 replace file tools with Go binaries and add tests 2026-08-16 10:39:45 +02:00
Ollie Agent 929b94e34d Clarify workspace path placeholders 2026-08-16 10:30:56 +02:00
Ollie Agent ccb731adf2 Guide agents to use code intelligence tools 2026-08-15 21:16:03 +02:00
Ollie Agent 50e465336e Add Tree-sitter code intelligence tools 2026-08-15 21:13:40 +02:00