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.