Skip to content
Apothem
工具适配器

GitHub Copilot

适用于 GitHub Copilot(GA)的 Apothem 工具适配器。

厂商: GitHub / Microsoft 安装名称: github-copilot 状态: GA 平台原生配置: <project>/.github/copilot-instructions.md

安装

apothem install --harness github-copilot --project /path/to/project

该适配器从共享的 Apothem 规则与治理界面派生出项目指令文件。

写入的文件: <project>/.github/copilot-instructions.md

配置档案到平台原生配置的映射

在每次 apothem installapothem update 运行时,适配器都会读取 Apothem 的共享配置档案,并渲染仓库范围的 Copilot 指令文件。共享配置档案才是真实 来源;在下一次同步替换 Apothem 管理的内容之前,会先备份对生成文件所做的 项目本地修改。

兼容性说明

GitHub Copilot 没有为该适配器暴露可供管理的、基于文件的用户全局指令路径。 Apothem 以文档记载的项目范围指令文件为目标,并将 IDE 级别的用户设置留给 操作者自有。

Apothem 将 copilot-instructions.md 视为项目各助手指令界面中的一个声音: 合规门的多界面一致性检查会验证其共享主张与项目的其他指令文件在语义上 保持一致,因此 Copilot 绝不会收到与工具链其余部分所读取内容相矛盾的指导。

验证

apothem verify --harness github-copilot --project /path/to/project

verify 命令确认:

  1. 平台原生配置存在于预期路径。
  2. 来自共享配置档案的所有必填字段都存在。
  3. 适配器专属的验证例程报告成功。

更新

apothem update --harness github-copilot --project /path/to/project

从当前的共享配置档案状态重新派生项目指令文件。

卸载

apothem uninstall --harness github-copilot --project /path/to/project

移除适配器写入的平台原生配置文件。 共享配置档案 YAML 和 Apothem 引擎不受影响。

合规门

python -m apothem.conformity.gate --all .

故障排查

症状修复方法
找不到配置文件重新运行 apothem install --harness github-copilot --project /path/to/project
验证失败运行 apothem update --harness github-copilot --project /path/to/project,然后再次验证
意外的配置内容检查 ~/.config/apothem/profile.yaml--profile PATH,然后重新运行 apothem update --harness github-copilot --project /path/to/project

配置开关

标志默认值说明
--dry-runfalse预览安装而不写入文件。

On this page