# aiuicode **Repository Path**: iflytek-aibot/aiuicode ## Basic Information - **Project Name**: aiuicode - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 0 - **Created**: 2026-06-08 - **Last Updated**: 2026-07-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AIUI Code 多平台 AI 编码助手插件,支持 Claude Code、Codex、OpenCode。为 AIUI 语音交互产品开发提供专属工作流,同时具备通用开发能力。 ## 核心工作流 ``` aiui-brainstorming → aiui-planning → aiui-executing → finishing-development (写设计文档) (写实现计划) (执行计划) (git 收尾,可选) ``` 三份文档分离,职责清晰: | Skill | 输入 | 输出 | |-------|------|------| | `aiui-brainstorming` | 用户需求 | `docs/specs/YYYY-MM-DD--design.md`(设计文档:做什么、为什么) | | `aiui-planning` | 设计文档路径 | `docs/plans/YYYY-MM-DD-.md`(实现计划:怎么做、每步代码) | | `aiui-executing` | 实现计划路径 | 按计划执行的代码变更 | | `finishing-development` | 实现完成 | git 收尾(合并/PR/保留/丢弃) | ### 对抗审查 每个产物都有独立子代理对抗评审: - `aiui-brainstorming` 生成设计文档后,派发 `spec-reviewer` 评审(Completeness / Consistency / Clarity / Scope / YAGNI) - `aiui-planning` 生成计划后,派发 `plan-reviewer` 评审。只找阻塞问题,最多 2 轮 - `aiui-executing` 每步代码完成后,派发 `code-reviewer` / `aiui-code-reviewer` 评审 ### 通用实现与领域适配 执行阶段默认使用通用主干: ``` code-writer → code-reviewer ``` 只有任务本身涉及 AIUI SDK、语音链路、音频采集/唤醒/降噪、端侧语音硬件或相关日志协议时,才切换到领域适配器: ``` aiui-code-writer → aiui-code-reviewer ``` 运行级验证由 `aiui-e2e-runner` 承担,核心协议是通用的 Launch / Readiness / Stimulus / Observe / Assert / Teardown,不绑定特定行业栈。 ### 跨平台结构化提问 访谈阶段使用各平台原生选择 UI,降低用户回答成本: - Claude Code:`AskUserQuestion`(2-4 个选项,如宿主提供) - OpenCode:`question`(字段为 `multiple` / `custom`,如宿主提供) - Codex:`request_user_input`(2-3 个选项,仅单选) - 无工具时退化为 Markdown 文本选项 ### 语音领域支持 当任务涉及语音(AIUI SDK、麦克风阵列、降噪、唤醒等),`aiui-brainstorming` 自动加载语音决策树进行专属访谈。 ## AIUI SDK 技能体系 针对 AIUI SDK 集成开发的完整技能集,覆盖从首次接入到生产排障的全流程。 ### 入口与分流 | Skill | 用途 | |-------|------| | `aiui-workflow-entry` | 明确问题快速路由,分发到具体技能 | | `aiui-config-authoring` | 根据用例描述选择服务链路和配置模板 | | `aiui-preflight` | 集成任务环境前置门禁(首次接入、最小可跑验证) | ### 平台与工具链 | Skill | 用途 | |-------|------| | `aiui-audio-environment` | 平台+设备确认(OS/架构/音频通道) | | `aiui-toolchain-android` | Android 集成(AAR/NDK/Gradle) | | `aiui-toolchain-linux` | Linux 集成(gcc/CMake/ALSA) | | `aiui-toolchain-windows` | Windows 集成(MSVC/CMake) | | `aiui-multimodal-socket` | RK3588 多模态套件(USB 麦克风阵列) | ### 配置与 API | Skill | 用途 | |-------|------| | `aiui-config-authoring` | aiui.cfg 编写、参数校验、冲突定位、v1/v2/v3 版本选择 | | `aiui-api-command-cookbook` | SDK API 调用顺序、命令发送、事件解析 | | `aiui-permissions-setup` | 减少构建过程中的权限确认提示 | ### 资源与高级功能 | Skill | 用途 | |-------|------| | `aiui-artifact-download` | 下载 SDK 包、唤醒资源、模型文件 | | `aiui-sdk-setup` | SDK 集成编译、链接问题排查 | | `aiui-sync-and-voice` | 声音复刻、声纹识别、自定义实体同步 | ### 排障与验证 | Skill | 用途 | |-------|------| | `aiui-troubleshoot` | 通用故障排查(无结果/截断/状态异常) | | `aiui-troubleshoot` | 日志分析(aiui.log/sessinfo/事件链路) | | `aiui-audio-environment` | 音频验证(采样率/声道/VAD/唤醒链路) | ### 集成指南 | Skill | 用途 | |-------|------| | `aiui-integration-guides/android-native` | Android 原生集成 | | `aiui-integration-guides/embedded-linux` | 嵌入式 Linux 集成 | | `aiui-integration-guides/qt-desktop` | Qt 桌面集成 | | `aiui-integration-guides/rtos` | RTOS 集成 | ## 安装 ### Claude Code ```bash claude plugin add ./aiuicode ``` ### Codex ```bash codex plugin add ./aiuicode ``` ### OpenCode ```bash cd aiuicode/.opencode && npm install opencode ``` 项目级 OpenCode 配置示例: ```json { "$schema": "https://opencode.ai/config.json", "model": "Iflytek-Mass/xopglm51", "plugin": [ "/home/iflytek/work/aiuicode/ai_agent_study/aiuicode/.opencode/plugins" ], "aiuicode": { "agents": { "plan-writer": { "model": "AstronCodingPlan/xopkimik25" }, "code-writer": { "model": "AstronCodingPlan/xopkimik25" }, "aiui-code-writer": { "model": "AstronCodingPlan/xopkimik25" }, "aiui-e2e-runner": { "model": "AstronCodingPlan/xminimaxm25" }, "plan-reviewer": { "model": "Iflytek-Mass/xopglm51" }, "code-reviewer": { "model": "Iflytek-Mass/xopglm51" }, "aiui-code-reviewer": { "model": "Iflytek-Mass/xopglm51" } } } } ``` `model` 控制主代理模型;`aiuicode.agents..model` 控制 aiuicode 注入的指定子代理模型,同时保留插件注入的 prompt、tools 和 skills 路由。上面的示例使用当前可用的讯飞侧三组模型:主代理和审查类子代理使用 `Iflytek-Mass/xopglm51`,写代码/计划类子代理使用 `AstronCodingPlan/xopkimik25`,运行验证类子代理使用 `AstronCodingPlan/xminimaxm25`。不要为了改 aiuicode 子代理模型而直接覆盖 OpenCode 原生 `agent.`,否则容易绕开插件注入。 模型解析优先级: 1. `aiuicode.agents..model` 2. `aiuicode.agents["*"].model` 3. `aiuicode.models.opus` / `aiuicode.models.sonnet` 4. `aiuicode.models.default` 5. `AIUI_MODEL_OPUS` / `AIUI_MODEL_SONNET` 6. 未设置时不写入子代理 `model` 字段,由 OpenCode 继承顶层 `model` ## 目录结构 ``` aiuicode/ ├── .claude-plugin/ # Claude Code 平台适配 ├── .codex-plugin/ # Codex 平台适配 ├── .opencode/ # OpenCode 平台适配(TypeScript 插件) ├── agents/ # 子代理定义 │ ├── plan-writer.md # 计划生成子代理 │ ├── plan-reviewer.md # 计划对抗审查子代理 │ ├── code-writer.md # 通用代码实现子代理 │ ├── code-reviewer.md # 通用代码审查子代理 │ ├── aiui-code-writer.md # AIUI/语音领域实现适配器 │ ├── aiui-code-reviewer.md # AIUI/语音领域审查适配器 │ └── aiui-e2e-runner.md # 通用运行级验证子代理 ├── skills/ # 工作流(唯一工作流表面) │ ├── aiui-brainstorming/ # 需求澄清 │ │ ├── SKILL.md │ │ └── references/ │ │ └── interview-voice.md │ ├── aiui-planning/ # 计划生成 │ │ └── SKILL.md │ ├── aiui-executing/ # 计划执行 │ │ └── SKILL.md │ ├── aiui-workflow-entry/ # AIUI 明确问题快速路由 │ ├── aiui-preflight/ # 环境门禁(6 步检查) │ ├── aiui-verification/ # 静态验证(7 phase) │ ├── aiui-config-authoring/ # AIUI 配置编写 + 版本选择 │ ├── aiui-artifact-download/ # SDK/资源下载 │ ├── aiui-sdk-setup/ # SDK 编译链接 │ ├── aiui-credentials/ # 凭据获取 │ ├── aiui-api-command-cookbook/ # 事件/命令/Agent 生命周期 │ ├── aiui-audio-environment/ # 音频环境确认 │ ├── aiui-mic-record/ # 麦克风采集 │ ├── aiui-vtn-sdk-integration/ # 外部 VTN 集成 │ ├── aiui-acoustic-test/ # 声学测试 │ ├── aiui-troubleshoot/ # 错误排查 │ ├── aiui-sync-and-voice/ # 动态实体/声纹 │ ├── aiui-multimodal-socket/ # RK3588 多模态 │ ├── aiui-multimodal-avvad/ # 唇形降噪/人脸唤醒 │ ├── aiui-permissions-setup/ # 权限申请 │ ├── aiui-toolchain-{android,linux,windows}/ # 工具链 │ ├── aiui-integration-guides/ # 平台集成指南 │ │ ├── android-native/ │ │ ├── embedded-linux/ │ │ ├── qt-desktop/ │ │ └── rtos/ │ ├── aiui-sdk/ # AIUI SDK vendor 文档 │ │ └── docs/ │ └── shared/ # 通用工具 skill │ ├── finishing-development/ # git 收尾(合并/PR/保留/丢弃) │ └── ...(其他 shared skill) ├── rules/ # 始终遵循的规则 ├── config/ # 程序化配置 ├── AGENTS.md # Agent 使用说明 ├── CLAUDE.md # 项目指令 └── package.json ``` ## 设计理念 取各家开源框架精华: | 来源 | 取什么 | |------|--------| | Superpowers | brainstorming/planning/executing 三阶段分离 | | ECC Blueprint | 冷启动执行、对抗审查门(独立子代理)、并行步骤检测 | | Oh My OpenAgent | 意图分类、"必须没有"护栏、自动检测工程信息、按意图分化访谈 | ## 扩展 后续按需添加独立 agent(不塞进 planning 里): - `agents/tdd-guide.md` — TDD 工作流 - `agents/security-reviewer.md` — 安全审查 ## 开发约定 参见 [CLAUDE.md](CLAUDE.md)。