Mstar Compound 标志

Mstar Compound

社区
btspoony
mstar-compound

知识结晶 (compound):把已解决的问题沉淀为 `{KNOWLEDGE_DIR}` 下的结构化知识文档,迭代收口时提升 specs/guides;双轨 Bug/Knowledge,含重叠与可发现性检查。无结晶时以 reasoned `skipped` 结束。

概览

发布者btspoony
代码仓库mstar-harness
技能名称mstar-compound
星标数
67
复刻数
4
附带文件
5
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 5 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 btspoony 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Mstar Compound AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/btspoony/mstar-harness/tree/main/skills/mstar-compound
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/btspoony/mstar-harness.git /tmp/mstar-harness
mkdir -p .claude/skills
cp -r /tmp/mstar-harness/skills/mstar-compound .claude/skills/mstar-compound
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Mstar Compound,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Mstar Compound。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Mstar Compound 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

mstar-compound(知识结晶)

Load order

Read mstar-harness-core first. Path symbols ({KNOWLEDGE_DIR}, {HARNESS_DIR}) → mstar-conventions. On conflict, mstar-harness-core wins.

Purpose

After solving a non-trivial problem, mstar-compound captures the learning as a structured document in {KNOWLEDGE_DIR}, so future plan research, debugging, and implementation can find and reuse it.

In the mstar lifecycle, compound is invoked by lifecycle flows — the iteration-close round or a standalone-development delivery tail — sharing one step sequence (see「Integration with mstar lifecycle」). It is never triggered at per-plan Done, and stays invocable standalone for ad-hoc captures.

Knowledge that isn't captured evaporates when the session ends. Knowledge that is captured but not discoverable is equally lost. This skill addresses both.

产物存储位置

SSOT: mstar-conventions/references/artifact-storage-paths.md。本 skill 不重定义路径;知识文档 → {HARNESS_DIR}/knowledge/<category>/<slug>.md,CONCEPTS.md → <repo-root>/CONCEPTS.md。<category> 取值见 references/category-mapping.md。

是否值得结晶(自检门禁)

调用本 skill 前,PM(或触发方)必须对候选问题逐条自检 Q1–Q8(诊断耗时 / 非显而易见性 / 可复用性 / 项目特异性 / 既有重叠 / 架构影响 / 失败尝试价值 / 跨模块)。完整问题表、决策矩阵(Yes≥4 强烈建议;Yes=3 Lightweight;Yes≤2 跳过;Q5=Yes 高重叠不新建)与示例判定 → references/compound-workflow.md「是否值得结晶」。

快判:Q5 高重叠 → 更新已有文档,不新建;其余按决策矩阵 Yes 数。

Integration with mstar lifecycle

Compound 是被生命周期流程调用的知识结晶流程:本 SKILL 只拥有执行步骤(下方 + references/compound-workflow.md);触发时机、cwd、写入面与结果记录面由调用方流程声明。本 SKILL 不复述调用方细节,也不维护调用方清单 —— 调用方各自指向本技能的步骤文件。

iteration-start → [plan lifecycle × N] → iteration-close → mstar-compound → {KNOWLEDGE_DIR} → feeds next iteration's specify/plan。per-plan Done 不是触发点:迭代内 plan 行不各自运行(迭代整体收口时一次),独立交付 plan 走其交付尾段 disposition,不强制新文档(reasoned skipped 有效)。

Iteration package promotion(package 盘点方法)

调用方声明需要盘点迭代 package 时,compound 的盘点方法如下。

路径:{ITERATION_DIR}/<iteration-id>/**(含 guides/、specs/、扁平 .md;默认排除 delivery-compass.md 除非 PM 显式纳入。Legacy 根目录 *-delivery-compass.md 同理排除)。

步骤动作
1. Inventory列出 package 下全部 .md(除默认排除 compass);读各文件 + package README.md(若有)
2. Triage每篇:Promote / Keep snapshot / Skip(理由写入 compound 摘要)
3. Promote值得跨迭代复用 → 走 Q1–Q8(或轻量判定)→ Phase 2 重叠检测 → Phase 3–6 结构化重写进 {KNOWLEDGE_DIR}/(禁止无改写整文件复制)
4. Trace源文件顶栏或 package README:Promoted to: <knowledge-path>;provenance 记在 catalog 关系(mstar catalog link,关系取 derived-from),不在 README 表格加列
5. Summary记录本轮提升篇数、保留快照、跳过及原因(记录面由调用方承载)

Promote 典型:迭代 spec 已验证且指导未来实现;guide 含非显而易见过程知识或失败尝试。Keep snapshot:仅迭代史、已被 {SPECS_DIR}/ 取代的草案、或自检 ≤2 Yes 的琐碎笔记。边界 SSOT → mstar-iteration/references/iteration-artifact-boundaries.md。

When to use / Skip

Use:迭代收口(mstar-iteration § iteration-close)批量回顾;独立触发(非迭代或紧急,任何非平凡问题解决后);重大 bug 修复后(mstar-iteration 未启用时手动);独立 development plan 交付前的 disposition review(PR head 定稿前,见「Integration with mstar lifecycle」)。

Skip:自检 ≤2 Yes;Q5 高重叠(更新已有而非新建);纯机械工作(格式化、依赖升级、typo);问题未经验证。独立交付 plan 的 disposition 义务不因跳过结晶而消失——结晶跳过时以 reasoned skipped 记录结果(记录在 workflow,见「Integration with mstar lifecycle」)。

Two tracks

TrackWhat it capturesSection structure
BugIncident-level fix — "X broke, here's why and how we fixed it"Problem, Symptoms, What Didn't Work, Solution, Why This Works, Prevention
KnowledgeDurable guidance — "this is how we do X, and why"Context, Guidance, Why This Matters, When to Apply, Examples

Track 由 problem_type 决定,完整映射见 references/category-mapping.md。

Execution modes

ModeWhenBehavior
Full (default)Most casesDispatches research subagents for context analysis, solution extraction, overlap detection
LightweightSimple fixes, context-tight sessionsSingle-pass documentation, no subagents, faster

In Cursor, Full mode dispatches subagents via Task tool. PM selects mode.

Workflow skeleton(Phase 1–7)

完整步骤细节(Gather context / Overlap detection / Write document 含 frontmatter schema + path + validate / Discoverability check / CONCEPTS.md synergy / Catalog registration / Refresh trigger)→ references/compound-workflow.md。每 Phase 一个关键决策:

  1. Gather — 读对话史 + iteration package;分类 track/category(references/category-mapping.md)
  2. Overlap — 高重叠 → 更新已有(加 last_updated);中度 → 新建并标 consolidation review;低/无 → 正常新建
  3. Write — path + frontmatter(SSOT references/schema.yaml)+ body(assets/resolution-template.md)+ YAML validate
  4. Discoverability — 若 root AGENTS.md/CLAUDE.md 未提 {KNOWLEDGE_DIR},提议最小补充(需用户同意;拒绝则仅跳过该编辑,doc 仍写)
  5. CONCEPTS.md — 项目特定领域词满足 qualifying bar 时提议入 CONCEPTS.md(规则见 references/concepts-vocabulary.md);全仓 bootstrap 归 mstar-compound-refresh
  6. Catalog — 新文档在 {HARNESS_DIR}/store.db 的 catalog 中登记为 kind=document(document_kind=knowledge):单行 mstar catalog register,或 reviewed mstar catalog discover + mstar catalog import;provenance/supersession 用 mstar catalog link(derived-from / supersedes 关系);生命周期变更用 mstar catalog update(active / archived / superseded;revision 守卫见 help)。不再要求 {KNOWLEDGE_DIR}/README.md 索引行(README 是散文,不是登记表)。知识关联载体是 catalog relations(mstar catalog link);snapshot plans[].metadata.knowledge_refs 仅 legacy 只读,不是写入面。每篇新 doc 必须完成本 Phase
  7. Refresh trigger — 新知识暗示旧 doc 过时 → 推荐 /pm compound-refresh <scope>(不自动跑,仅 flag)

Engine check (when available): run mstar compound validate <doc-path> [--knowledge-dir <dir>] (or import { validateSchemaYaml, assertKnowledgeCatalogCompleteness } from "@mstar-harness/engine" in a host hook) to validate the frontmatter against references/schema.yaml (Phase 3 Write) and assert that every knowledge body under {KNOWLEDGE_DIR} has a catalog row (Phase 6 Catalog, contract §4). The former README index-row assert is retired: the assertIndexRows export refuses actionably (compound.index.retired) instead of passing, and the mstar compound validate --knowledge-dir index-row check fails for the same reason. On fail -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.

Support files

读 references/compound-workflow.md(Q1–Q8 + Phase 1–7)、references/schema.yaml(frontmatter)、references/category-mapping.md(track/path 映射)、references/concepts-vocabulary.md(CONCEPTS.md 规则)、assets/resolution-template.md(track 正文结构)。

Skill dependencies

  • mstar-conventions — path symbols({KNOWLEDGE_DIR}、{HARNESS_DIR})
  • mstar-artifacts — store.db catalog 登记与生命周期(snapshot 为迁移源;project register 仅迁移历史)(README index maintenance retired)
  • mstar-compound-refresh — capture 后知识维护;CONCEPTS.md 全仓 bootstrap

NOT to do

  • Do not create a doc for trivial fixes (typos, formatting, dep bumps)
  • Do not write the doc before the solution is verified
  • Do not skip the overlap check — creating duplicates degrades the knowledge store
  • Do not edit AGENTS.md without user consent
  • Do not create CONCEPTS.md entries for general programming vocabulary
  • Do not modify product code — this skill writes documentation only

Evidence

正确结果 = 一篇可发现的结晶文档:{KNOWLEDGE_DIR}/<category>/<slug>.md 通过 references/schema.yaml frontmatter 校验(Phase 3 Write)+ catalog 登记为 kind=document(document_kind=knowledge,Phase 6 Catalog;mstar catalog list 可查到)+ 达标领域词入 CONCEPTS.md(Phase 5)+ 源文件 / package README 标注 Promoted to: <knowledge-path>(Phase 4 Trace)。

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Mstar Compound AI 技能有什么作用?

知识结晶 (compound):把已解决的问题沉淀为 `{KNOWLEDGE_DIR}` 下的结构化知识文档,迭代收口时提升 specs/guides;双轨 Bug/Knowledge,含重叠与可发现性检查。无结晶时以 reasoned `skipped` 结束。

为什么在 TypingMind 中使用 Mstar Compound?

因为您只需安装一次,就能搭配任何模型使用。Mstar Compound 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Mstar Compound?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/btspoony/mstar-harness/tree/main/skills/mstar-compound。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Mstar Compound?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Mstar Compound 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Mstar Compound 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Mstar Compound AI 技能免费吗?

是的。btspoony 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇