neural-train
它能做什么
这项技能根据进展顺利的任务训练智能体的学习模式,并把它们整合进长期记忆。适合希望 AI 助手从自己成功的工作中不断改进的人。
适用场景
- ✓当你完成了一项成功的任务,想记录其中有效的做法时。
- ✓当你已完成足够多的任务,应该把经验整合起来时。
- ✓当你想用独立的学习适配器训练一个新领域时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-intelligence/skills/neural-train/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请从我刚完成的任务中学习,让智能体下次更好地处理类似的工作。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能记录任务的操作轨迹,将其标记为成功或失败,然后提炼经验。它会整合这些经验,并可以基于结果训练模式模型。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Neural Training
Train and consolidate neural patterns. Implements the DISTILL and CONSOLIDATE phases of the 4-step intelligence pipeline.
When to use
- After completing a successful task — capture what worked.
- After accumulating ≥10 task completions — run consolidation to fold patterns into long-term storage.
- When training a new domain — create a MicroLoRA adapter for it.
Standard flow (DISTILL)
- Check current neural status —
mcp__plugin_ruflo-core_ruflo__neural_status. - Start a trajectory —
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-startwith the task context. - Record steps — for each significant action,
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step. - End trajectory —
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-endwith{ trajectoryId, success: true|false, feedback? }(the tool takes a booleansuccess, not a verdict string). - Learn from the trajectory —
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_learn(optionally{ trajectoryIds: [...] }). It runs a distill + EWC++ consolidation cycle;consolidatedefaults to true. - Train patterns —
mcp__plugin_ruflo-core_ruflo__neural_trainwith{ modelType: "classifier", data: [{ "text": "<what the task was>", "label": "<outcome or lesson>" }] }(modelTypeis required:moe|transformer|classifier|embedding). It only learns from thedatayou pass: it does not read trajectories, SONA or the ReasoningBank, and withoutdatait answerssuccess: false, status: "empty"(ruflo 3.56.9 and earlier reportedstatus: "ready"withpatternsStored: 0). The CLI form isneural train --pattern coordination --epochs 10. - Store patterns —
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_pattern-store. - Verify —
mcp__plugin_ruflo-core_ruflo__neural_patternswith{ action: "list" }lists only whatneural_trainstored. What steps 2-5 and 7 learned (trajectories, SONA, ReasoningBank,hooks_intelligence_pattern-store) is a separate store: check it withmcp__plugin_ruflo-core_ruflo__hooks_intelligence_pattern-searchorhooks_intelligence_stats, notneural_patternsorneural_predict.neural_predictreturns a match only above a cosine-similarity floor (default 0.5,minSimilarityto change it) and an emptypredictionslist otherwise.
SONA adaptation (single-domain, <0.05ms)
For real-time micro-adaptation:
# ruvllm_sona_create returns { sonaId }; pass it to ruvllm_sona_adapt with a 0..1 quality signal
npx @claude-flow/cli@latest mcp exec -t ruvllm_sona_create -p '{"hiddenDim": 256}'
npx @claude-flow/cli@latest mcp exec -t ruvllm_sona_adapt -p '{"sonaId": "<id from create>", "quality": 0.9}'
MicroLoRA adaptation (multi-domain)
When you have ≥3 distinct domains, create a MicroLoRA adapter per domain rather than overloading SONA:
# Create the adapter: returns { loraId }. inputDim and outputDim are required
npx @claude-flow/cli@latest mcp exec -t ruvllm_microlora_create -p '{"inputDim": 384, "outputDim": 384, "rank": 4}'
# Adapt with a 0..1 quality signal (loraId and quality are required)
npx @claude-flow/cli@latest mcp exec -t ruvllm_microlora_adapt -p '{"loraId": "<id from create>", "quality": 0.9}'
ruvllm_microlora_adapt has no consolidate option. EWC++ consolidation is a separate call: hooks_intelligence_learn (runs a distill + EWC++ cycle, consolidate defaults to true) or agentdb_consolidate, below.
CONSOLIDATE phase (separate from training)
After every ~10 trajectory completions, run a full consolidation pass:
npx @claude-flow/cli@latest mcp exec -t agentdb_consolidate
npx @claude-flow/cli@latest mcp exec -t neural_compress # storage efficiency
This folds patterns into long-term storage under EWC++ semantics.
Bootstrapping from scratch
If the system has no learned patterns yet:
# hooks_pretrain analyses the repository: { path, depth: shallow|medium|deep, skipCache }
npx @claude-flow/cli@latest mcp exec -t hooks_pretrain -p '{"path": ".", "depth": "medium"}'
# hooks_build-agents generates agent configs: { focus: v3-implementation|security|performance|all, outputDir, format: yaml|json, persist }
npx @claude-flow/cli@latest mcp exec -t hooks_build-agents -p '{"focus": "all"}'
hooks_pretrain writes to the patterns (plural) namespace — distinct from the pattern (singular) ReasoningBank target. See ruflo-agentdb ADR-0001 for the n
常见问题
什么时候应该整合?
来源建议在至少完成十项任务之后再进行整合。
一个训练条目是什么样子?
每个条目包含任务的文字描述,以及其结果或经验的标签。
我能检查训练状态吗?
可以。状态步骤会显示神经模式的当前情况。
详情
作者的原始描述
Train SONA + MicroLoRA neural patterns from successful task completions; runs the DISTILL + CONSOLIDATE phases of the 4-step pipeline
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1631
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。