feat: Implement GenAgent trait framework (unblock terraphim_kg_agents)
まだ誰も着手していません。
評価
調査の方向性
Start by reading crates/terraphim_kg_agents/src/lib.rs and the commented worker.rs, planning.rs, and coordination.rs modules, then inspect crates/terraphim_agent_supervisor/ for the proposed integration point. Define the trait and lifecycle types only after understanding those consumers. Done means all three modules compile, an integration test covers init → handle_call → terminate, and the existing terraphim_kg_agents tests pass.
索引モデルが issue の本文から書いたものです。
説明
UPLIFT-2: Implement GenAgent trait framework
Source: medgemma-competition multi-agent integration plan
Priority: High (unblocks ~2,500 lines of disabled agent code)
Problem
terraphim_kg_agents has ~2,500 lines of agent code (worker, planning, coordination) that is ALL commented out in lib.rs because it references a non-existent terraphim_gen_agent crate and GenAgent<S> trait. The trait is conceptually similar to Erlang's gen_server but with typed state and async lifecycle hooks.
Proposed Change
Define GenAgent<S> trait in a new terraphim_gen_agent crate (or inside terraphim_agent_supervisor).
Minimum viable trait:
#[async_trait]
pub trait GenAgent<S: Send + Sync + 'static>: Send + Sync {
async fn init(&self) -> Result<S>;
async fn handle_call(&self, state: &mut S, msg: Box<dyn Any + Send>) -> Result<Box<dyn Any + Send>>;
async fn handle_cast(&self, state: &mut S, msg: Box<dyn Any + Send>) -> Result<()>;
async fn handle_info(&self, state: &mut S, info: SystemInfo) -> Result<()>;
async fn terminate(&self, state: &mut S, reason: ExitReason) -> Result<()>;
}
Then uncomment and fix the three agent modules in terraphim_kg_agents.
Files to Change
- New crate or addition to
crates/terraphim_agent_supervisor/ crates/terraphim_kg_agents/src/lib.rs(uncomment modules)crates/terraphim_kg_agents/src/worker.rscrates/terraphim_kg_agents/src/planning.rscrates/terraphim_kg_agents/src/coordination.rs
Acceptance Criteria
-
GenAgent<S>trait defined with async lifecycle hooks - All three agent modules in
terraphim_kg_agentsuncommented and compiling - At least one integration test demonstrating a GenAgent lifecycle (init -> handle_call -> terminate)
- Existing tests in
terraphim_kg_agentspass
- 主要言語
- Rust
- スター
- 62
- フォーク
- 5
- 平均マージ
- 2時間 27分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
terraphim/terraphim-ai のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
terraphim/terraphim-ai#885 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
terraphim/terraphim-ai#871 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
terraphim/terraphim-ai#810 · コメント 2 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
terraphim/terraphim-ai#729 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 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時間 初心者へのやさしさ 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
bevyengine/bevy#25861 ·