Phase 4: Nightly extraction -- automated workflow crystallisation via ADF
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Rust
- 星标
- 62
- 派生
- 5
- 平均合并
- 2 小时 27 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
terraphim/terraphim-ai 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
terraphim/terraphim-ai#885 ·
-
难度 4/5 3-5 天 新手友好度 55/100
terraphim/terraphim-ai#871 ·
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
terraphim/terraphim-ai#810 · 2 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
terraphim/terraphim-ai#729 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
terraphim/terraphim-ai#728 ·
查看 terraphim/terraphim-ai 的全部 Issue
相似的 Issue
-
risk:low runtime status:in-progress type:test
难度 1/5 1 小时以内 新手友好度 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 84/100
EricSpencer00/Resilient#4835 · 1 条评论 ·
-
agent:ready documentation
难度 2/5 1-3 小时 新手友好度 88/100
cesarferreira/stax#890 ·
-
bug
难度 1/5 1 小时以内 新手友好度 90/100