indexion-identity

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Identity Audit Workflow

Identity Audit 工作流

Use this skill when checking whether function, file, or folder names still match their contents.
The CLI scans files, folders, and graph-level declaration symbols. It does not treat every local variable, parameter, or field as an independent naming target; those can still influence the containing file summary. File names are evaluated with parent scope, and declaration-heavy files should normally be read as evidence-thin until follow-up inspection proves an actual rename or split.
当你需要检查函数、文件或文件夹名称是否仍与其内容匹配时,可以使用此技能。
CLI会扫描文件、文件夹以及图级别的声明符号。它不会将每个局部变量、参数或字段视为独立的命名检查目标;但这些元素仍会影响所在文件的摘要。文件名会结合父级作用域进行评估,对于以声明为主的文件,在后续检查证实确实需要重命名或拆分之前,通常应视为证据不足。

Pipeline

流程

  1. Run the mechanical scan:
    bash
    indexion identity audit .
    For a machine-readable queue:
    bash
    indexion identity audit --format=json --output=.indexion/cache/identity/report.json .
  2. Treat each row as a review candidate, not proof. Compare:
    • name
      : the scoped name inferred by the identity package
    • expected_summary
      : what the path/name/scope predicts
    • actual_summary
      : graph-derived declarations, docs, module notes, and path terms
    • assessment
      : whether this is actual drift, overbroad content, or insufficient content
    • recommendation
      : first operation to verify
  3. Verify before editing:
    bash
    indexion doc graph --format=text <path>
    indexion grep --semantic=name:<symbol> .
    rg "<name-or-term>" <path>
  4. Choose the smallest confirmed operation:
    • Treat
      insufficient-content
      as an evidence problem, not a naming-drift proof. Inspect whether the file is intentionally declarative/thin, unsupported by the graph extractor, empty, or missing doc/declaration material before renaming.
    • Rename a symbol when its implementation is cohesive but the name is stale.
    • Rename a file when its declarations are cohesive but the file name is stale.
    • Rename a folder when contained files share a clearer parent concept.
    • Move a file when it fits an existing folder better than its current one.
    • Split a file when candidates show multiple dominant responsibilities.
  5. After changes:
    bash
    moon info && moon fmt
    moon test
    indexion identity audit .
The audit is designed to surface review work. Do not maximize the score mechanically; verify the actual code ownership and references first.
  1. 运行机械扫描:
    bash
    indexion identity audit .
    若要生成机器可读的队列:
    bash
    indexion identity audit --format=json --output=.indexion/cache/identity/report.json .
  2. 将每一行视为待审核候选项,而非确凿证据。对比以下内容:
    • name
      :由identity包推断出的带作用域名称
    • expected_summary
      :路径/名称/作用域所预期的内容摘要
    • actual_summary
      :基于图推导的声明、文档、模块注释以及路径术语
    • assessment
      :判断这是真实的漂移问题、内容过于宽泛还是内容不足
    • recommendation
      :首先需要验证的操作
  3. 编辑前先验证:
    bash
    indexion doc graph --format=text <path>
    indexion grep --semantic=name:<symbol> .
    rg "<name-or-term>" <path>
  4. 选择最小的已确认操作:
    • insufficient-content
      视为证据问题,而非命名漂移的确凿证据。在重命名之前,检查该文件是否是故意设计为声明性/精简型、未被图提取器支持、为空,或是缺少文档/声明材料。
    • 当符号的实现内聚但名称过时,重命名该符号。
    • 当文件的声明内聚但文件名过时,重命名该文件。
    • 当包含的文件共享一个更清晰的父概念时,重命名文件夹。
    • 当文件更适合现有其他文件夹时,移动该文件。
    • 当候选项显示存在多个主要职责时,拆分文件。
  5. 变更完成后:
    bash
    moon info && moon fmt
    moon test
    indexion identity audit .
此审计工具旨在梳理待审核工作。请勿机械地追求高分;请先验证实际的代码归属和引用关系。