No slash command · from spec-autopilot
Use when the autopilot orchestrator has finished Phase 7 archive and needs to aggregate Episode records into the L1/L2/L3 learning tiers, cluster failure/success patterns, and emit L3 promotion candidates. ONLY for autopilot orchestrator; not for direct user invocation.
Ships in spec-autopilot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
前置条件自检:本 Skill 仅在 autopilot 编排主线程的 Phase 7 归档之后使用。非 autopilot 流程请立即停止并忽略。
| 层级 | 粒度 | 存储 | 生命周期 |
|---|---|---|---|
| L1 Episode | 单次 Phase 执行轨迹 | docs/reports/{version}/episodes/phase{N}.json + claude-mem create_observations | 永久 |
| L2 Pattern | 跨 Episode 聚类得到的成功/失败模式 | claude-mem build_corpus(name="autopilot-lessons") | 按需重建 |
| L3 Skill-Rule | 命中次数 ≥ 3 且无反例的晋升规则 | docs/learned/<pattern_id>.md 或 CLAUDE.md "习得规则"区块 | 人工审核后长期持有 |
| 参数 | 来源 |
|---|---|
| phase | Phase 7 传入(默认 "phase7") |
| checkpoint | openspec/changes/{slug}/phase-results/phase{N}.json |
| version | 当前发布版本号(用于 docs/reports/{version}/episodes/ 路径) |
bash "${CLAUDE_PLUGIN_ROOT}/runtime/scripts/learn-episode-write.sh" \
--phase "$phase" \
--checkpoint "$checkpoint" \
--version "$version"
脚本负责:
gate_result ∈ {blocked, failed},强制生成 Reflexion 风格的自然语言反思(失败归因 + 可复用教训)learn-episode-schema-validate.sh 校验 schemadocs/reports/{version}/episodes/phase{N}.jsoncreate_observations(obs_type=phase_reflection|success_pattern|failure_pattern)Phase 7 之后触发一次聚合:
# dry-run:MCP 不可用时输出规范化 JSON 产物
claude-mem build_corpus \
--name "autopilot-lessons" \
--types "phase_reflection,failure_pattern,success_pattern" \
--limit 200
聚类规则参见 references/pattern-clustering.md:
failure_trace.root_cause + phase 做 hash clusteringpattern_idbash "${CLAUDE_PLUGIN_ROOT}/runtime/scripts/learn-promote-candidate.sh" \
--episodes-root docs/reports \
--out-dir docs/learned/candidates
脚本负责:
docs/reports/*/episodes/*.json(若 MCP 可用,切换到 autopilot-lessons corpus)pattern_id 聚合,命中次数 ≥ 3 且无反例(无成功 fingerprint 抵消)→ 输出候选到 docs/learned/candidates/{pattern_id}.mdstatus: pending_review,需人工审核后晋升到正式 docs/learned/<skill>.md 或 CLAUDE.md "习得规则"区块bash "${CLAUDE_PLUGIN_ROOT}/runtime/scripts/learn-inject-top-lessons.sh" \
--raw-requirement "$raw_requirement"
输出 JSON 数组(top-3 教训),主线在 Phase 0 banner 之后注入到 dispatch prompt。
{
"status": "ok|warning|blocked|failed",
"summary": "episode 写入 + 候选扫描结果",
"artifacts": [
"docs/reports/{version}/episodes/phase{N}.json",
"docs/learned/candidates/{pattern_id}.md"
]
}
references/episode-schema.md — L1 Episode 字段定义references/pattern-clustering.md — L2 聚类策略references/promotion-rules.md — L3 晋升门槛与反例判定What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub stoicatom/claude-autopilot --plugin spec-autopilot22 skills in this plugin
/autopilotUse when the user requests an end-to-end spec-driven delivery pipeline (requirements → OpenSpec → implementation → testing → archive); orchestrates Phase 0-7./autopilot-agentsUse when the user wants to discover, install, list, hot-swap, or get recommendations for phase-specific autopilot sub-agents sourced from community catalogs (OMC, Anthropic official, VoltAgent, etc.), or when the autopilot setup flow needs to resolve a missing agent for a given phase./autopilot-dispatchUse when the autopilot orchestrator main thread is about to dispatch a phase-specific sub-agent via the Task tool and needs the JSON envelope contract, explicit path injection, and parameterized prompt templates. Not for direct user invocation; skip when the current context is not the autopilot orchestrator.Other plugins' skills for the same job