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 從公開儲存庫中收錄這些內容。

檢舉或申請下架