terraphim / terraphim/terraphim-ai
Phase 4: Nightly extraction -- automated workflow crystallisation via ADF
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Rust
- Estrellas
- 62
- Forks
- 5
- Merge medio
- 2 h 27 min
- PR fusionados (30 d)
- 1
Descripción
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
CapturedProcedureentries - Run
learn healthacross 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 daily
working_dir = "/home/alex/terraphim-ai"
Session extraction API in terraphim_sessions
pub async fn extract_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
- Phase 1 (#693) -- CapturedProcedure type
- Phase 3 (#695) -- health monitoring
- #637 Paperclip leverage into ADF (orchestrator infrastructure)
- #639 Session persistence for Claude Code agents
- #683 Tree-structured session storage
Acceptance Criteria
-
procedure-crystalliseragent defined in orchestrator config - Session extraction API returns successful command sequences
- KG-based task type classification for discovered sequences
- Aho-Corasick deduplication prevents storing known procedures
- Daily report generated with new/degraded procedure counts
- Integration test with sample session data
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Start with the existing structures in terraphim_orchestrator, terraphim_sessions, and terraphim_agent, then trace the sessions and learn subcommands used by the nightly workflow. Implement the procedure-crystalliser configuration, successful-sequence extraction, classification, deduplication, health checks, and daily report, and validate the result with integration tests using sample session data.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- ai, backend, cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100