terraphim / terraphim/terraphim-ai

Wire terraphim_agent_evolution into ADF orchestrator (Phase 1)

Open
#727 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
62
Forks
5
Avg merge
2h 27m
Merged PRs (30d)
1

Description

Summary

Wire the existing terraphim_agent_evolution crate into the ADF orchestrator reconciliation loop to give agents persistent memory of prior runs (solution lineage).

Approach

  • Add HashMap<String, AgentEvolutionSystem> field to orchestrator
  • On each output event: parse structured content (NDJSON for opencode, JSON for Claude), store as MemoryItem in agent's MemoryEvolution
  • On agent exit: record success/failure as Lesson, call create_snapshot()
  • On handoff: include evolution_snapshot_key so receiving agent can load prior state

Critical Files

  • crates/terraphim_orchestrator/src/lib.rs -- add evolution system field, feed output events, snapshot on exit
  • crates/terraphim_agent_evolution/src/evolution.rs -- AgentEvolutionSystem (MemoryEvolution, TasksEvolution, LessonsEvolution)
  • crates/terraphim_orchestrator/src/handoff.rs -- add evolution_snapshot_key to HandoffContext
  • New: crates/terraphim_orchestrator/src/output_parser.rs -- parse agent output formats

Acceptance Criteria

  • After agent run, VersionedMemory snapshot exists in persistence
  • LessonsState contains at least one lesson per run
  • Handoff includes evolution key
  • cargo test --workspace passes

Dependencies

  • Blocked by: Gitea #117 (Phase 0: ADF remediation)
  • Related: #639 (session persistence), #641 (activity log), #692 (operational skill store)
  • Part of: Agentic Knowledge Evolution plan (knowledge/external/ai-agents/avo-agentic-variation-operators-nvidia-2026.md)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

First check the dependency on Gitea #117, then read crates/terraphim_orchestrator/src/lib.rs, handoff.rs, and crates/terraphim_agent_evolution/src/evolution.rs. Review the planned output_parser.rs formats and run cargo test --workspace. Done means persisted VersionedMemory and LessonsState exist after a run, and handoffs include the evolution key.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.