Sync: add integration and agent file notes

This commit is contained in:
2026-04-25 18:43:06 +08:00
parent 7cb331a532
commit 2613a74c73
18 changed files with 2366 additions and 40 deletions

View File

@@ -1,42 +1,40 @@
---
title: "Aider Integration"
title: "OpenCode Integration"
type: source
tags: []
date: 2026-05-02
date: 2026-04-26
---
## Source File
- [[Agent/agency-agents/integrations/aider/README.md]]
- [[Agent/agency-agents/integrations/opencode/README.md]]
## Summary用中文描述
- 核心主题:Aider 编辑器集成 The Agency Agent 资产的安装与使用指南
- 问题域:如何在 Aider 项目中激活并调用 The Agency 的多智能体 Agent 角色
- 方法/机制:通过 `install.sh --tool aider` 安装,将 Agent 配置注入 Aider 项目Aider 自动读取项目根目录下的 `CONVENTIONS.md` 文件以激活 Agent 角色
- 结论/价值:The Agency 的 Agent 资产可通过 CONVENTIONS.md 机制无缝集成到 Aider 工作流中,实现项目级的多智能体编码辅助
- 核心主题:OpenCode 的子 Agent 集成机制——如何将 .md 文件格式的 Agent 转换为 OpenCode 可调用的子代理
- 问题域:OpenCode IDE 中的多 Agent 协作与按需调用
- 方法/机制:通过 YAML frontmatter 中的 `mode: subagent` 标记,将具名 Agent 从 Tab 循环列表中分离,改为按需 `@agent-name` 调用;颜色通过命名颜色到十六进制的自动映射实现
- 结论/价值:提供了一种轻量级、无需修改主 Agent 系统的子 Agent 扩展方案,支持项目级和全局级两种安装范围
## Key Claims用中文描述
- Aider 会自动检测并读取项目根目录中的 `CONVENTIONS.md` 文件
- 安装脚本 `install.sh --tool aider` 将 The Agency 的 Agent 配置转换为 Aider 可识别的格式
- 用户可通过 `convert.sh --tool aider` 重新生成配置文件
- 在 Aider 会话中直接通过名称引用 Agent如 "Frontend Developer"
- OpenCode Agent 通过在 `.opencode/agents/` 目录存储 .md 文件(带 YAML frontmatter实现——文件格式与 The Agency 的 Agent 定义格式兼容
- `mode: subagent` 配置使 Agent 仅在 `@agent-name` 触发时出现,不会在 Tab 循环列表中占位——保持主 Agent 列表的简洁性
- 命名颜色(如 `cyan`)在安装脚本中被自动转换为十六进制颜色代码——无需手动查表
- Agent 支持两种安装范围:项目级(`.opencode/agents/`)和全局级(`~/.config/opencode/agents/`)——通过不同路径实现作用域隔离
- 转换脚本 `./scripts/convert.sh --tool opencode` 负责将 The Agency 的标准 Agent 文件转换为 OpenCode 兼容格式
## Key Quotes
> "The full Agency roster is consolidated into a single `CONVENTIONS.md` file" — 所有 Agent 角色汇总在单一的 CONVENTIONS.md 文件中
> "Aider reads this file automatically when it's present in your project root" — Aider 自动读取项目根目录的 CONVENTIONS.md
> "Use the Frontend Developer agent to refactor this component" — Aider 会话中按名称调用 Agent
> "mode: subagent — agent is available on-demand, not shown in the primary Tab-cycle list"
> — Agent YAML frontmatter 的核心语义,说明 subagent 模式与普通 agent 的本质区别
## Key Concepts
- [[CONVENTIONS.md]]The Agency Agent 角色配置文件Aider 自动读取
- [[Project-Scoped-Integration]]:项目级工具集成模式(需在项目根目录安装)
- [[Agent-Activation]]Agent 激活机制,通过名称引用在对话中调用
- [[Subagent]]:按需调用的辅助 Agent通过 `@agent-name` 语法触发,不参与 Tab 循环
- [[OpenCode]]:一个支持多 Agent 协作的 IDE/编辑器扩展平台
## Key Entities
- [[Aider]]Aider CLI 编码工具AI 结对编程编辑器
- [[The-Agency]]The Agency 多智能体编码框架147+ Agent 角色)
- [[The Agency]]OpenCode Agent 的来源框架,提供 147 个专业化 Agent 定义
## Connections
- [[The-Agency]] ← provides_agents_to ← [[Aider]]
- [[Aider]] ← reads ← [[CONVENTIONS.md]]
- [[contributing]] ← 贡献来源 ← [[Agent/agency-agents/integrations/opencode/README.md]]
- [[The Agency]] ← Agent 定义来源 ← [[Agent/agency-agents/integrations/opencode/README.md]]
## Contradictions
- 无已知内容冲突
- (未检测到与其他页面的明显冲突