副驾驶MCP集成(深度架构)
此存储库使用 上下文感知 GitHub Copilot的架构。它会自动在GitLab编码和Confluence文档任务之间切换上下文。
📂 结构
- 全球规则:
.github/copilot-instructions.md(始终处于活动状态) - GitLab上下文:
.github/instructions/gitlab_api.instructions.md(自动应用于*.py,*.yml,CI文件) - 汇流背景:
.github/instructions/confluence_docs.instructions.md(自动应用于docs/*.md) - 行动(提示):
.github/prompts/*.prompt.md(可通过上下文菜单访问)
🚀 快速开始
- 环境:
cp .env.example .env并填写您的代币。 - 安装: 在VS Code中打开并单击 “在容器中重新打开” (推荐)或运行
pip install -r requirements.txt. - 检查提示: 浏览中的可用操作
.github/prompts/*.prompt.md或查看docs/quick-reference.md作为使用示例。
🤖 如何使用Actions
在Copilot聊天中,单击 附加上下文(+) 按钮或类型 # 要选择提示,请执行以下操作:
#create-issue--起草一个带有标签/里程碑的GitLab问题。#create-merge-request--支架MR描述。#review-merge-request--进行结构化的MR审查。#trigger-pipeline或#manage-milestones--CI/CD和里程碑助手。#migrate-confluence-space--将Confluence内容迁移到markdown。#query-issues,#prepare-release-notes,#implement-issue--额外的工作流程。
📚 文档网站(Zensical)
我们提供Zensical配置(zensical.toml)这将打开Markdown docs/ 进入一个静态网站。
在当地服务
python3 -m venv .venv && source .venv/bin/activatepip install zensicalzensical serve然后打开http://localhost:8000
构建静态站点
- 确保
zensical已安装(见上文)。 zensical build(输出转到site/,忽略git)。
导航定义见 zensical.toml 包括:
- 主页(
docs/index.md) - 概述与安全(
docs/copilot-mcp-notes.md) - 快速参考(
docs/quick-reference.md) - 工作流程(
docs/workflow/example-workflows.md)
发布到GitHub页面
- CI:
.github/workflows/publish-docs.yml在以下位置构建网站main并部署到GitHub Pages。 - 配置:更新
site_url在zensical.toml到您的页面URL(例如。,https://.github.io/copilot-mcp-integration). - 启用页面:在仓库设置中,将页面源设置为“GitHub操作”。
