ruvnet/ruflo/tree/main/plugins/ruflo-daa
ruflo-daa
動態代理架構:8 個 daa_* MCP 工具,支援自適應代理(create/adapt)、認知模式、工作流程(create/execute)、知識共享與學習/效能指標。為 4 步智慧管線的 JUDGE 階段提供輸入。
關於這個 mod
動態代理架構,提供認知模式、知識共享和自適應代理。
安裝
/plugin marketplace add ruvnet/ruflo
/plugin install ruflo-daa@ruflo
功能
- 自適應代理:會從互動中學習並持續演進的代理
- 認知模式:用於決策的結構化推理策略
- 知識共享:跨代理學習與集體改進
- 效能追蹤:隨時間記錄效率與準確度指標
命令
/daa-- 顯示學習指標和活動代理的 DAA 儀表板
技能
daa-agent-- 建立並調整動態代理架構代理cognitive-pattern-- 為代理推理定義認知模式
MCP 介面
所有工具都定義在 v3/@claude-flow/cli/src/mcp-tools/daa-tools.ts:
| 工具 | 用途 |
|------|---------|
| daa_agent_create | 初始化自適應代理 |
| daa_agent_adapt | 根據回饋觸發手動調整 |
| daa_workflow_create | 定義認知工作流程 |
| daa_workflow_execute | 執行認知工作流程 |
| daa_knowledge_share | 在代理之間傳播學習成果 |
| daa_learning_status | 調整進度指標 |
| daa_cognitive_pattern | 定義推理模式 |
| daa_performance_metrics | 效率 / 準確度統計 |
相容性
- **CLI:**固定於
@claude-flow/cliv3.6 的 major+minor。 - 驗證:
bash plugins/ruflo-daa/scripts/smoke.sh是契約。
智慧管線對齊
DAA 認知模式為 4 步智慧管線的 JUDGE 階段提供輸入(RETRIEVE → JUDGE → DISTILL → CONSOLIDATE)。管線由 ruflo-intelligence ADR-0001 定義。當任務經由 hooks_route 路由且找到了相似的過往軌跡時,DAA 認知模式會提供結構化推理,在調整前評估是否適合。
daa_knowledge_share 會寫入模式傳播事件,hooks_intelligence_learn 可在 DISTILL 階段消費這些事件。
命名空間協調
此外掛程式擁有 daa-patterns AgentDB 命名空間(kebab-case,遵循 ruflo-agentdb ADR-0001 "Namespace convention" 的慣例)。保留的命名空間(pattern、claude-memories、default)MUST NOT 被遮蔽。
daa-patterns 透過 memory_* 工具存取(工具會依命名空間路由)。代理檔案中的 CLI 範例是正確的(memory store --namespace daa-patterns)。
驗證
bash plugins/ruflo-daa/scripts/smoke.sh
# Expected: "10 passed, 0 failed"
架構決策
作為 mod
從此版本起,此外掛程式也是 function-hook mod(ADR-445 模式;需要 Claude Code 2.1.287 或更新版本)。它從不連線或啟動程序,只會收緊規則:可以拒絕呼叫,但絕不允許呼叫通過。
- Guard(預設開啟):拒絕攜帶金鑰、權杖或密碼的
daa_*工具呼叫。原因只說明機密類型,絕不顯示值。 /daa-mod:在本機回答,不啟動模型回合:status、scan <text>(Guard 是否會拒絕這段文字?)和tools(已連線的daa_*工具)。- 狀態檔:
.claude-flow/daa-mod/status.json({version, updatedMs, guard, blocked}),在工作階段開始和呼叫遭阻擋時寫入。 - 選項:外掛程式的
userConfig中有guard(on|off,預設on)。
使用 claude plugin test plugins/ruflo-daa 和 bash plugins/ruflo-daa/scripts/smoke.sh 測試。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add ruvnet/ruflo claude plugin install ruflo-daa
原文 / README
ruflo-daa
Dynamic Agentic Architecture with cognitive patterns, knowledge sharing, and adaptive agents.
Install
/plugin marketplace add ruvnet/ruflo
/plugin install ruflo-daa@ruflo
Features
- Adaptive agents: Agents that learn and evolve from interactions
- Cognitive patterns: Structured reasoning strategies for decision-making
- Knowledge sharing: Cross-agent learning and collective improvement
- Performance tracking: Efficiency and accuracy metrics over time
Commands
/daa-- DAA dashboard with learning metrics and active agents
Skills
daa-agent-- Create and adapt Dynamic Agentic Architecture agentscognitive-pattern-- Define cognitive patterns for agent reasoning
MCP surface (8 tools)
All defined at v3/@claude-flow/cli/src/mcp-tools/daa-tools.ts:
| Tool | Purpose |
|------|---------|
| daa_agent_create | Initialize an adaptive agent |
| daa_agent_adapt | Trigger manual adaptation from feedback |
| daa_workflow_create | Define a cognitive workflow |
| daa_workflow_execute | Run a cognitive workflow |
| daa_knowledge_share | Propagate learnings across agents |
| daa_learning_status | Adaptation progress metrics |
| daa_cognitive_pattern | Define a reasoning pattern |
| daa_performance_metrics | Efficiency / accuracy stats |
Compatibility
- CLI: pinned to
@claude-flow/cliv3.6 major+minor. - Verification:
bash plugins/ruflo-daa/scripts/smoke.shis the contract.
Intelligence-pipeline alignment
DAA cognitive patterns feed the JUDGE phase of the 4-step intelligence pipeline (RETRIEVE → JUDGE → DISTILL → CONSOLIDATE) defined by ruflo-intelligence ADR-0001. When a task is routed via hooks_route and a similar past trajectory is retrieved, DAA cognitive patterns provide the structured reasoning to evaluate fit before adaptation.
daa_knowledge_share writes pattern propagation events that hooks_intelligence_learn can consume during the DISTILL phase.
Namespace coordination
This plugin owns the daa-patterns AgentDB namespace (kebab-case, follows the convention from ruflo-agentdb ADR-0001 §"Namespace convention"). Reserved namespaces (pattern, claude-memories, default) MUST NOT be shadowed.
daa-patterns is accessed via memory_* tools (which route by namespace). The agent file's CLI examples are correct (memory store --namespace daa-patterns).
Verification
bash plugins/ruflo-daa/scripts/smoke.sh
# Expected: "10 passed, 0 failed"
Architecture Decisions
As a mod
Since this version the plugin is also a function-hook mod (ADR-445 pattern; needs Claude Code 2.1.287 or later). It never calls the network or spawns a process, and it only tightens: it can refuse a call, never allow one.
- Guard (default on): refuses
daa_*tool calls that hold a key, token or password. The reason names the kind of secret, never the value. /daa-mod: answered locally, no model turn:status,scan <text>(would the guard refuse this?), andtools(the connecteddaa_*tools).- Status file:
.claude-flow/daa-mod/status.json({version, updatedMs, guard, blocked}), written at session start and when a call is blocked. - Option:
guard(on|off, defaulton) in the plugin'suserConfig.
Test it: claude plugin test plugins/ruflo-daa and bash plugins/ruflo-daa/scripts/smoke.sh.