audit-observability

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/audit-observability

/audit-observability

Audit the current working directory for the Observability dimension.
Paths in this file are relative to this skill's own directory (the folder that contains this SKILL.md), not to the repository being audited. Run all detection commands in the repository being audited (the current working directory).
审计当前工作目录的可观测性维度。
此文件中的路径相对于此 skill 自身的目录(即包含此 SKILL.md 的文件夹),而不是相对于被审计的仓库。所有检测命令都应在被审计的仓库(当前工作目录)中运行。

Inputs

输入

  • Optional
    discovery_context
    (JSON) injected by the orchestrator.
  • Optional output path (from the orchestrator): write the JSON there instead of printing it.
  • Flags:
    --json
    (emit JSON only, no markdown summary).
  • 可选的
    discovery_context
    (JSON),由 orchestrator 注入。
  • 可选的输出路径(来自 orchestrator):将 JSON 写入该路径,而不是打印出来。
  • 标志:
    --json
    (仅输出 JSON,不提供 markdown 摘要)。

Steps

步骤

  1. Discovery: if
    discovery_context
    was NOT injected, follow
    references/discovery.md
    and build it. If injected, use it as-is (do not re-run discovery).
  2. Filter: read
    references/detection/11-observability.md
    . Drop any checklist item whose
    applies_to
    shares no archetype with
    discovery_context.archetypes
    → emit it with
    status: "skipped"
    .
  3. Detect (two-stage, spec §5a.2 / §9a.4): a. For each applicable item, run its
    signals
    (ripgrep) to get candidate
    file:line
    . Prefer external-tool output if available. Do NOT read the whole repo. b. Read only candidate snippets; apply each item's
    confirm
    rule. Assign severity honoring any severity floors. Consult
    references/detection/examples/11-observability.md
    only when a candidate is ambiguous.
  4. Emit: produce one
    AuditResult
    JSON object conforming to
    references/schema.json
    with
    audit: "observability"
    ,
    iso_characteristic: "Operability"
    , the checklist (with statuses), and findings. Leave
    score
    as
    0
    — the engine computes it.
    • If an output path was given: write ONLY the JSON object to it (UTF-8), then reply with one line:
      <audit key>: <n> findings -> <path>
      .
    • With
      --json
      or as a subagent without an output path: output ONLY the JSON.
    • Standalone: also print a short markdown summary (counts + top findings).
When invoked as a subagent, return only valid JSON — or, when an output path was given, only the one-line confirmation.
  1. 发现(Discovery):如果未注入
    discovery_context
    ,则遵循
    references/discovery.md
    并构建它。如果已注入,则按原样使用(不要重新运行发现过程)。
  2. 筛选(Filter):读取
    references/detection/11-observability.md
    。如果某个检查项的
    applies_to
    与
    discovery_context.archetypes
    没有任何共同的 archetype,则将其丢弃 → 输出该检查项,并设置
    status: "skipped"
    。
  3. 检测(Detect,两阶段,spec §5a.2 / §9a.4): a. 对于每个适用的检查项,运行其
    signals
    (ripgrep),以获取候选的
    file:line
    。如果可以获得外部工具的输出,则优先使用。不要读取整个仓库。 b. 仅阅读候选代码片段;应用每个检查项的
    confirm
    规则。在遵守任何严重性下限(severity floor)的前提下分配严重性。仅当候选项存在歧义时,才查阅
    references/detection/examples/11-observability.md
    。
  4. 输出(Emit):生成一个符合
    references/schema.json
    的
    AuditResult
    JSON 对象,其中包含
    audit: "observability"
    、
    iso_characteristic: "Operability"
    、检查清单(包含各项状态)以及发现项。将
    score
    保留为
    0
    ——分数由引擎计算。
    • 如果提供了输出路径:将仅包含该 JSON 对象的文件以 UTF-8 写入该路径,然后回复一行:
      <audit key>: <n> findings -> <path>
      。
    • 使用
      --json
      ,或作为子 Agent 运行且未提供输出路径时:仅输出 JSON。
    • 独立运行时:另外打印一份简短的 markdown 摘要(计数及主要发现项)。
作为子 Agent 调用时,仅返回有效的 JSON——如果提供了输出路径,则仅返回一行确认信息。