skills/assess-docs-code-alignment/SKILL.md
Assess alignment gaps between code changes and required documentation updates.
npx skillsauth add nesnilnehc/ai-cortex assess-docs-code-alignmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
检测代码改动是否有相应文档更新,输出可执行的补文档清单。
首要目标:从代码 diff 推断需要更新的文档,并报告未覆盖缺口。
成功标准:
docs/calibration/code-doc-alignment.md本技能负责:代码变更与文档变更对齐分析。
本技能不负责:文档规范评估(assess-docs)、链接图(assess-docs-links)、SSOT(assess-docs-ssot)。
按 specs/artifact-contract.md §8 Runtime Norms Resolution Protocol 的 §8.2 / §8.3 / §8.5 实现:读项目规范若声明了 code-doc-alignment artifact_type 的 path_pattern,则使用项目值;否则 fall through 到技能默认(docs/calibration/code-doc-alignment.md)。本技能为固定路径治理产出,只用 path_pattern 覆盖机制。
git diff <base>...HEAD --name-status --diff-filter=MADbase 或 diff 范围docs/calibration/code-doc-alignment.mdsrc/api/auth.py 修改但 docs/architecture/api.md 未更新 -> high本技能产出 Code-Doc Alignment Report:
| 元素 | 格式 | 必填字段 | 路径模式 |
| :--- | :--- | :--- | :--- |
| 报告主体 | Markdown | front-matter;章节:摘要 / 对齐缺口 / 推荐文档更新 | docs/calibration/code-doc-alignment.md |
| 缺口条目 | 列表项 | id / category(api_drift / config_drift / behavior_drift / removed_feature)/ code_location / doc_location / evidence / suggested_update | 「对齐缺口」节 |
| 机器可读块 | YAML fenced yaml alignment_gaps: | gaps[] 每项含 id/category/severity/code_ref/doc_ref | 报告末尾 |
development
Generate an LLM agent test suite (golden cases, mock-LLM unit tests, evaluator harness) from an agent implementation and its agent-test contract. Use when an agent has no tests, or a contract exists but the test code is missing.
development
After code changes, auto-detect the project's build system and local deployment method for a given directory, then build the project and restart its locally-deployed environment (Docker Compose / systemd / process manager). Never assumes — asks only when detection is ambiguous. Caches detected commands per project in .cortex/redeploy-local.yaml; re-invocations on the same project skip re-scanning until signal files change, the cache expires (30 days), or the skill version bumps.
tools
Publish a NATS message conforming to a cross-team contract, using NATS MCP tools. Authors the contract on first use if missing. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting basics across sessions.
tools
Drain pending NATS messages from a producer contract via NATS MCP tools (default batch / drain-style). Applies Tolerant Reader semantics and per-message ack/nak/term, returning aggregated stats. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting.