Skip to content

concept-git/cloud-concept-skills / skills/drafts/kcs-foundry/skills/kcs-extractor

kcs-extractor

Verified

从排障 skill、recipe 或工单中提炼可追溯的 KCS 知识草稿,保留适用条件、诊断分支、原因依据与恢复验证。用于知识迁移、工单沉淀和跨来源去重;不用于执行现场排障或修复。

FileKindSize
SKILL.mdskill md5.1 KB
references/output-contract.mdmarkdown4.8 KB
references/skill-input.mdmarkdown3.6 KB
references/ticket-input.mdmarkdown2.3 KB

references/output-contract.md

View on GitHub
# 输出契约

这是本项目的交付约定,不宣称所有字段和目录都是 KCS 标准。使用请求指定的输出根目录;默认产物组织如下:

```text
articles/<slug>.md
evidence/<slug>.json
extraction-report.md
```

slug 用稳定的小写英文与连字符,表达症状或处理目标。文章与追溯记录同名配对。报告记录文章路径、建议新增/修订对象、未覆盖材料和检查结果。只查看到入口或部分引用时标明部分覆盖。

## 文章

YAML frontmatter 仅写 `status: draft`,一个 H1 标题,依次使用以下四个 H2;来源与审阅细节放在配对记录,不增加维护记录等第五个 H2。诊断导航标题写症状和检查目标;原因尚未确认时,标题也不预先断言某因素“导致”故障。

| 字段 | 内容标准 |
| --- | --- |
| Issue | 请求者可识别的症状、准确且已脱敏的报错或处理诉求;必要时说明与相邻场景的区别 |
| Environment | 产品/平台、系统/版本、访问方向、在线/离线目标、必要通道和适用前提;区分已知条件与尚需确认的输入 |
| Resolution | 编号步骤;每步保留检查目标、需要的观测、证据分支及下一步/退出条件。修复单独说明触发条件与影响;保留来源提供的恢复验证,没有则列为待补充,不编造已验证步骤 |
| Cause | 已确认或有明确机制依据的原因及其确认条件,并注明适用范围;依据不足写“尚未确定”,候选原因留在诊断分支 |

存在目标命令契约时按需链接,不复制整份命令定义。文章中的相对文件链接以当前输出位置解析并检查;外层发布移动文件时重新检查。链接未读、命令未执行与无目标契约分别记录。文章中的条件或步骤可以引用追溯记录的 claim ID(如 `R2`),正文无需暴露内部工单身份。

没有命令契约时,可以交付检查目标或带前提的操作说明,并记录待补项,不要求拼接一键执行脚本。影响本场景处理的关键条件、依赖、修复回退或恢复验证缺失时,`completeness` 为 `partial`;正文写完整四栏并不改变这个状态。

## 配对追溯记录(JSON)

必需字段如下。可按实际材料增加字段,未知值使用 JSON `null` 或空列表,不填虚构版本/时间。文件路径均使用材料包内相对路径或获准来源别名,避免把当前电脑绝对路径写进可移交产物。

| 字段 | 类型与要求 |
| --- | --- |
| `schema_version` | 字符串,当前为 `1` |
| `article` | 相对输出根目录的文章路径 |
| `input_kind` | `skill`、`ticket` 或 `mixed` |
| `target_platform` | 来源保留或明确请求的目标平台 |
| `completeness` | `complete` 或 `partial`;仅表示本次声明范围内材料是否充分,不是技术正确性认证 |
| `sources` | 对象列表:`id`、`kind`、`repository_or_alias`、`revision`、`path`、`sha256`、`locators_read`;原文可读时计算哈希,有版本则记录版本,否则留 `null` 并注明限制 |
| `claims` | 对象列表:`id`、`article_locator`、`statement`、`basis`、`refs`;每个关键步骤、环境限制与原因至少有一项 |
| `gaps` | 对象列表:`area`、`detail`、`affected_claims`;包含不可读链接、冲突、缺少目标契约或未提供验证方法 |
| `checks` | `structure`、`source_review`、`runtime_validation` 三项,各含 `status` 与 `detail`;状态为 `passed`、`failed`、`partial` 或 `not_run` |

`basis` 取以下一个值:

- `source_guidance`:来源描述的操作、机制或建议,尚非本次实测。
- `recorded_observation`:工单中实际记录的观测或处理结果。
- `confirmed_in_source`:来源有证据确认的原因,或明确给出适用机制与确认条件;statement 说明依据与范围。
- `extraction_inference`:提炼时新增的判断或建议;不能单独支撑确定性的 Cause。

`refs` 每项包含 `source_id`、`locator`。定位采用 Markdown 标题及段落、代码函数及行号、工单消息别名/附件位置等,足以在记录版本或哈希对应的材料中找到依据。关键内容来自推断时同样指向推断所据材料,缺少依据就转为缺口。

## 交付检查

1. 文章四字段、编号步骤和草稿状态正确;每个关键判断都能从 claims 定位回材料。
2. claims 不夸大原文:建议、历史事件、推测和实测分别表达;空数据不是健康证明。
3. 平台、对象、版本和操作性质正确;原文矛盾与无法核验的内容均有 gaps。
4. 文件引用可解析,产物不依赖当前机器路径,不包含未获准的敏感信息。
5. `runtime_validation` 如实记录;本技能只做材料提炼时为 `not_run`。结构或来源检查通过不能将文章升级为已验证。
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall