dev-manager-tauri/docs/ai-context/project-context.yaml
lanrtop 327f3d78ab feat(agent/access): 强化项目级运行态接入
MCP 改为 loopback 并绑定项目 scope,补齐越界拒绝、风险元数据和结构化状态。

新增分层 readiness、配置迁移与设置页投影;正式安装版可选择登录自启动,debug 与非安装路径明确拒绝。

Feature-Confirmed: true

Rules-Applied: R01,R06,R07,R08,R10,R12,R13
2026-09-23 03:21:38 +09:00

42 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 项目契约路径映射
# 由炼境根据技术栈扫描生成,技术栈变更后重新运行接入包生成
# 供 AGENTS.md 元规则 T1 查询:「哪个文件是这个项目的外部契约?」
contracts:
- label: API 接口(Axum)
paths:
- "src-tauri/src/mcp_server.rs"
doc: "MCP 仅监听 127.0.0.1;新项目使用 /mcp/projects/<project_id> scoped route,连接 scope 拒绝跨项目参数和全局管理写工具。旧 /mcp 只作兼容迁移。路由变更需同步 Agent 按钮体系文档。"
- label: MCP 工具接口
paths:
- "src-tauri/src/mcp_tools.rs"
- "src-tauri/src/commands/delivery_status.rs"
- "src-tauri/src/commands/toolchain.rs"
- "src-tauri/src/commands/cicd.rs"
- "src-tauri/src/commands/gitea.rs"
doc: "工具 schema、dispatch 与调用说明必须同步;外部来源不可用时返回显式降级状态,不得伪造成功。verify_onboarding 必须同时返回静态接入 checks 与 configured/reachable/handshake/tools_ready/reload_required 运行态证据,配置存在不得替代运行可用。CI workflow 使用 plan_cicd_workflow 只读预览,用户确认相同 digest 后方可 apply_cicd_workflow 写入;该接口不接收凭证值且不触发 CI 或部署。"
- label: 被管理项目身份上下文
paths:
- "src-tauri/src/mcp_inject.rs"
- "src-tauri/src/commands/onboarding.rs"
- ".lian-jing/context.json"
- ".lian-jing/capability-packs.json"
- ".claude/liangjing.json"
doc: "`.lian-jing/context.json` 是 project_id 的工具无关单一事实来源;`.claude/liangjing.json` 仅为兼容投影;`.lian-jing/capability-packs.json` 是炼境分发基线的版本描述。迁移必须保留未知字段;验证必须返回显式状态与 upgrade_hint;升级仅覆盖炼境托管文件,绝不覆盖项目定制或手工 MCP 配置,且不得以客户端全局配置或项目 UI 身份替代项目根目录上下文。"
- label: Tauri command 接口(前后端契约)
paths:
- "src-tauri/src/commands/**/*.rs"
- "src/lib/commands.ts"
doc: "新增 command 时前后端必须同步。Agent readiness 必须保留 configured/reachable/handshake/tools_ready/reload_required 分层;Windows autostart 默认关闭,只允许正式安装版,debug/target 构建必须拒绝启用。"
architecture_docs:
- "AGENTS.md"
- "docs/ai-context/agent-button-system.md"
agent_docs:
- "AGENTS.md"
- "docs/ai-context/project-brief.md"