工具适配器
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 install 或 apothem update 运行时,适配器都会读取 Apothem
的共享配置档案,并渲染仓库范围的 Copilot 指令文件。共享配置档案才是真实
来源;在下一次同步替换 Apothem 管理的内容之前,会先备份对生成文件所做的
项目本地修改。
兼容性说明
GitHub Copilot 没有为该适配器暴露可供管理的、基于文件的用户全局指令路径。 Apothem 以文档记载的项目范围指令文件为目标,并将 IDE 级别的用户设置留给 操作者自有。
Apothem 将 copilot-instructions.md 视为项目各助手指令界面中的一个声音:
合规门的多界面一致性检查会验证其共享主张与项目的其他指令文件在语义上
保持一致,因此 Copilot 绝不会收到与工具链其余部分所读取内容相矛盾的指导。
验证
apothem verify --harness github-copilot --project /path/to/projectverify 命令确认:
- 平台原生配置存在于预期路径。
- 来自共享配置档案的所有必填字段都存在。
- 适配器专属的验证例程报告成功。
更新
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-run | false | 预览安装而不写入文件。 |