Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Wire terraphim_agent_evolution into ADF orchestrator (Phase 1) #727

@AlexMikhalev

Description

@AlexMikhalev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions