一键导入
auto-harness-learn
分析 session 观察数据,提取行为模式生成 instinct,给出改进建议和 Token 优化提议。Use when user says "分析学习数据"、"看看有什么模式"、"harness learn"。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
分析 session 观察数据,提取行为模式生成 instinct,给出改进建议和 Token 优化提议。Use when user says "分析学习数据"、"看看有什么模式"、"harness learn"。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
为当前项目初始化完整的 Harness Engineering 配置(Rules、Hooks、Constraints、QA 标准)。Use when bootstrapping a new project or adding harness to an existing project.
执行 5 层 QA 金字塔检查,生成量化验证报告。Use when completing a feature, before committing, or before creating a PR.
执行交付前 5 项复盘检查,确保流程合规和质量达标。Use when about to deliver work to users, before final handoff, or when completing a development cycle.
启动 Harness 任务(交互式收集需求,自动带上全部流程约束)。Use when starting a new feature, task, or any development work in a Harness-enabled project.
在 AI 工具内执行受控自动修复 loop。Use when tests, E2E, quality gate, or verification fails and the user expects the agent to fix and rerun instead of only reporting failure.
执行 Santa Method 双独立对抗验证。Use when reviewing high-risk changes, production deployments, or complex logic before shipping.
| name | auto-harness-learn |
| description | 分析 session 观察数据,提取行为模式生成 instinct,给出改进建议和 Token 优化提议。Use when user says "分析学习数据"、"看看有什么模式"、"harness learn"。 |
从 .harness/observations.jsonl 分析行为模式,生成 instinct(原子化行为片段),给出改进和 Token 优化建议。
HARNESS_LOG 和 HARNESS_LEARN 都不是 off).harness/observations.jsonl 存在且有数据(建议 20+ 条)node scripts/hooks/harness-learn.js --report
.harness/instincts/*.json — 生成的 instinct 文件.harness/learn-report.md — 分析报告(展示给用户)observation 积累
↓ harness-learn 分析
instinct (置信度 0.3)
↓ 多次观察确认
instinct (置信度 0.9)
↓ --promote 建议
Rule (.claude/rules/) ← 零 token 消耗
↓ 如果可强制
Hook (脚本) ← 100% 可靠
| 维度 | ECC | 我们 |
|---|---|---|
| Hook 开销 | 重(Bash 414行 + Python ×3-4 fork) | 轻(Node.js 单进程,<50ms) |
| 分析方式 | 后台 Agent 调 Haiku(消耗 API) | 纯本地规则匹配(零 API 调用) |
| 触发方式 | 自动后台轮询 | 按需手动(/harness-learn) |
| 后台进程 | nohup + PID + flock | 无 |
| Instinct 粒度 | 用户全局 ↔ 项目级 | 用户级(团队多人相同才提议晋升项目级) |