Indexion Identity

作者 trkbt107ad5ad35a668无许可证2 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2周前更新

Detect and review name/content drift in code using `indexion identity audit`, then plan verified renames, moves, folder changes, or splits.

AI 生成的概览

使用 indexion identity audit 检查代码中名称与内容是否脱节,并规划经核实的重命名、移动或拆分。

功能
该技能引导代理执行身份审计流程,检查函数、文件和文件夹名称是否仍与内容相符。它运行 indexion identity audit 命令,可选生成 JSON 报告,并将每一行视为待复核候选而非确凿证据。代理随后用图查询、语义 grep 和文本搜索命令核实候选,再选择最小的已确认操作,例如重命名符号、文件或文件夹,移动文件,或拆分文件。更改后会重新运行格式化、测试和审计。
适用场景
当需要检查函数、文件或文件夹名称是否仍与内容相符时使用。它适用于代码审查或重构场景,在编辑前核实命名脱节、内容过宽或内容不足的情况。也适合根据审计结果规划重命名、移动、文件夹调整或文件拆分。
运行要求
需要 indexion CLI,包含 identity audit、doc graph 和 grep 子命令,还需要 ripgrep(rg)以及 moon 构建工具用于 moon info、moon fmt 和 moon test。该技能不附带脚本,仅为说明文档。

Identity Audit Workflow

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.

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 fmtmoon testindexion identity audit .

The audit is designed to surface review work. Do not maximize the score mechanically; verify the actual code ownership and references first.

来源与署名

来源:trkbt10/indexion-skills位于skills/indexion-identity提交7ad5ad3

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架