Communitygithub.com

VMAFx/ffmpeg-patches

内部注册的“穴居人”风格文本,用于Agent间的通信(简报、返回、研究分发、工作流返回、工具调用记录)。

ffmpeg-patches 是什么?

该技能定义了一种名为“穴居人”(Caveman)的内部文本注册规范,旨在优化AI Agent间的通信效率。它通过去除冠词、代词、系动词等语法元素,使用符号(如`->`、`=`)替代连词,并以碎片化、一行一个事实的格式呈现信息,从而在保持信息完整的前提下显著减少Token消耗。适用于各类Agent内部流量,如子任务简报、工作流返回、研究结果分发等。该规范内置于`.standards.yaml`的`register:`字段,并配有静态检查工具`praetorctl caveman check`来验证格式合规。核心原则是“用更短的文本传递相同的信息”,同时确保不因压缩而降低清晰度,放弃任何可能让阅读者需要猜测的事实。它支持多种输出类型(brief、return、context),并明确规定了证据引用、表格使用、答案优先等规则,是面向Token敏感的AI Agent环境的高效通信协议。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/VMAFx/ffmpeg-patches/tree/HEAD/.agents/skills/caveman

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

穴居人:内部注册(caveman)

改编自 Julius Brussee 和贡献者的 Caveman;改编版本采用 MIT 条款(2026-09-18)。

穴居人 = 文本注册策略中 internal 注册的实现(位于 .standards.yaml 的 register: 字段;参见 AGENTS.md 的“文本注册”章节)。配置值保持为 internal;本技能 = 其具体形式。Agent 流量按 token、按跳数计费 -> 穴居人行携带相同事实,但使用更少 token。

范围

穴居人覆盖另一个 Agent 读取的文本:

  • 简报、子 Agent 或低成本管道的任务提示;
  • Agent 返回、工作流返回;
  • 研究分发结果;
  • Agent 之间的工具调用备注、进度记录。

面向人类的文本保持其自身的注册:锻造文本(issue、PR 正文、评审评论、提交正文、变更日志标题)-> social-text;文档树(docs)、README、ADR 正文 -> 文档注册;对人类操作者的回复 -> 完整散文。

规则

  1. 去掉无事实的语法。

    删除示例
    冠词a、an、the
    代词I、we、it
    系动词is、are、was
    助动词have、will、did
    模糊用语seems、probably、might
    礼貌用语please、thanks
    框架描述I think、note that、it looks like、as requested
  2. 碎片化。 一行一个事实。列表优于句子。

  3. 符号 代替连词短语:

    符号读作示例
    ->导致、引致、然后stale receipt -> push rejected
    =是、等于、表示block = 15 lines
    x2计数、次数retry x3
    !警告、风险! gate not rerun after rebase
    ?开放问题? Windows path untested
  4. 逐字令牌。 代码、路径、file:line、命令、标志、错误文本、ID、sha、版本字符串、数字 = 原样复制,绝不缩写。压缩作用于其周围的英文,从不作用于它们本身。自创缩写(cfg ldr、ctx cmp)使读者付出的解码成本高于其节省的收益;使用完整单词或真实标识符。

  5. 答案优先。 不重新叙述概要,不重复步骤摘要,无结尾行。先给出结论,然后是证据。

  6. 仅当 超过 3 行且比较超过 2 个字段时才使用表格。否则:使用列表。

  7. 返回格式 遵循注册块:结论、变更路径、执行的命令、证据指针、开放问题。

  8. 证据 遵循注册块,措辞一致:证据超过 58 行或 1500 token -> 放入该块命名的证据目录中的文件;返回 evidence: <path> sha256:<12 hex> lines:<n>,仅当决策需要时才获取。Manifest 可收紧这两个数字;AGENTS.md 中的块会打印生效的值。

静态检查器

praetorctl caveman check 默认为运行时消息形式。例外:AGENTS.md + 编译的 vendor 文件位于 --root 下的自身路径(精确、区分大小写)时,默认使用 --kind=context(与 gate 相同的验证结论)。显式指定 --kind 则优先。结构化流量显式选择 kind:

  • brief: --kind=brief;字段 = goal、inputs、return、evidence、task;goal 优先;
  • return: --kind=return;字段 = verdict、changed、ran、evidence、open;verdict 优先;
  • policy text: --kind=context;仅使用 C1-C8 启发式规则,未覆盖的技能规则报告为建议。

PASS 摘要列出机械检查过和技能规则编号的建议。运行时生产者接线部分单独处理;检查器仅验证提供的文本。

清晰度底线

穴居人 = 更短的文本、相同的信息,绝不是让读者猜测的更短文本。发送前:检查每一行 -> 读者能否不追问就依此行动?当压缩删除了读者需要的事实(哪个文件、哪个计数、新故障还是已有故障、检查被绕过还是未被绕过)时,把事实放回去。保持否定明确(no bypass、not rerun);丢掉 not 会反转整行含义。

改进前后

来自 praetor 管道的真实返回:

  • 之前:"First two pushes were rejected by the pre-push gate with 'state synchronization stale' because gate run wrote .standards-receipt.json after the last state sync; fixed by re-running state sync and pushing again. Not bypassed."
  • 之后:push rejected x2: state stale (gate run wrote receipt after sync). fix: resync, push. no bypass.

测试返回:

  • 之前:"I ran the tests for the repository with the race detector and all of them passed. go vet did not report any issues. The only file I changed was .agents/skills/caveman/SKILL.md, where I added an error for a missing end marker."
  • 之后:

    verdict: pass
    changed: .agents/skills/caveman/SKILL.md (missing end marker -> error)
    ran: go test -race -count=1 ./... = pass; go vet = clean
    evidence: none
    open: none
    

清晰度底线实例:

  • 之前:"The dedupe scan reported two clones. Only one of them comes from this change; the other one is in .agents/skills/social-text/SKILL.md and was already present on main, so I left it alone."
  • 过度压缩:dedupe: 2 clones. 读者无法判断更改是否被阻止。
  • 之后:dedupe scan: 2 clones. 1 new (this change), 1 pre-existing on main (.agents/skills/social-text/SKILL.md), left as is.

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

相关技能