一键导入
cotx-enrich
Enrich stale nodes in the cognitive map with semantic descriptions. Run after cotx compile or cotx update when stale enrichments are reported.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Enrich stale nodes in the cognitive map with semantic descriptions. Run after cotx compile or cotx update when stale enrichments are reported.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | cotx-enrich |
| description | Enrich stale nodes in the cognitive map with semantic descriptions. Run after cotx compile or cotx update when stale enrichments are reported. |
After cotx compile or cotx update reports stale enrichments, or when cotx lint shows STALE_ENRICHMENT warnings.
Use cotx context tools before reading source files directly.
For MCP clients:
cotx_minimal_context project_root=<project_root> task="enrich stale semantic descriptions" budget=standard
cotx_query project_root=<project_root> filter=stale layer=all
For CLI-only usage, start with:
cotx lint --json
Do not read the full repository. Use the returned modules, contracts, flows, files, and recommendations to pick a small set of enrichment targets.
Run: cotx lint --json
This returns a JSON array of issues. Filter for type: "STALE_ENRICHMENT" entries.
Read the node: cotx context <node_id>
layer and struct_hashUse cotx graph context first:
Read source only when the cotx context is insufficient: Use targeted file reads for the small file set referenced by the node.
appears_inUnderstand the change: Compare what the old enrichment says vs what the code actually does now
Write updated enrichment:
cotx write <node_id> enriched.responsibility "new description based on code"
cotx write <node_id> enriched.key_patterns "observed patterns"
Run: cotx lint --json
Confirm the stale enrichment warnings are resolved (source_hash now matches struct_hash).
| Layer | Enrichable Fields | What to Write |
|---|---|---|
| Module | enriched.responsibility | One-sentence module purpose |
| Module | enriched.key_patterns | Key design patterns used |
| Concept | enriched.definition | Natural language definition |
| Contract | enriched.guarantees | What the interface promises |
| Contract | enriched.invariants | Rules that must hold |
| Flow | enriched.error_paths | What happens when steps fail |