Parent Epic
Part of #692 (Operational Skill Store)
Summary
Add a new Core-tier ADF agent that runs nightly to automatically discover and crystallise successful multi-step workflows from session history into reusable procedures. This closes the loop -- instead of manual capture-success, the system learns from its own history.
What Changes
New ADF agent: procedure-crystalliser
Tier: Core (cron-scheduled, runs nightly)
CLI: terraphim-agent (uses sessions + learn subcommands)
Nightly workflow:
terraphim-agent sessions import -- refresh session cache- Scan recent sessions for successful multi-step sequences (exit code 0 chains)
- Classify sequences by task type using KG concept matching
- Deduplicate against existing procedures (Aho-Corasick)
- Store novel sequences as new
CapturedProcedure entries - Run
learn health across all procedures - Generate daily report: new procedures, degraded procedures, statistics
Orchestrator config addition
[[agents]]
name = "procedure-crystalliser"tier = "Core"cli = "terraphim-agent"schedule = "0 2 * * *"# 02:00 dailyworking_dir = "/home/alex/terraphim-ai"
Session extraction API in terraphim_sessions
pubasyncfnextract_successful_sequences(since:DateTime<Utc>,min_steps:usize,) -> Vec<CommandSequence>;
Affected Crates
terraphim_orchestrator (new agent config)terraphim_sessions (extraction API)terraphim_agent (orchestration entry point)
Dependencies
Acceptance Criteria
Parent Epic
Part of #692 (Operational Skill Store)
Summary
Add a new Core-tier ADF agent that runs nightly to automatically discover and crystallise successful multi-step workflows from session history into reusable procedures. This closes the loop -- instead of manual
capture-success, the system learns from its own history.What Changes
New ADF agent:
procedure-crystalliserTier: Core (cron-scheduled, runs nightly)
CLI:
terraphim-agent(usessessions+learnsubcommands)Nightly workflow:
terraphim-agent sessions import-- refresh session cacheCapturedProcedureentrieslearn healthacross all proceduresOrchestrator config addition
Session extraction API in
terraphim_sessionsAffected Crates
terraphim_orchestrator(new agent config)terraphim_sessions(extraction API)terraphim_agent(orchestration entry point)Dependencies
Acceptance Criteria
procedure-crystalliseragent defined in orchestrator config