Spec as Source — 意图即程序
OpenCode 插件,提供多代理系统、编排器和质量门禁。
git clone https://github.com/jonnyhoo/menkan
cd menkan
bun install
bun run build
cd packages/opencode && bun link在 OpenCode 配置目录链接:
cd ~/.config/opencode
bun link @menkan/opencode创建插件加载器 ~/.config/opencode/plugin/menkan-opencode.ts:
export { default } from "@menkan/opencode"创建 ~/.config/opencode/oh-my-opencode.jsonc:
menkan/
├── packages/
│ ├── gate/ # @menkan/gate - 状态机核心
│ │ ├── 状态机 (INIT → PRD → DESIGN → TASKS → CODE → REVIEW → MERGED)
│ │ ├── 质量门禁 (rule-validator, semantic-validator)
│ │ ├── AI 缺陷缓解 (loop-detector, circuit-breaker)
│ │ └── 学习闭环 (lesson-capture)
│ │
│ └── opencode/ # @menkan/opencode - OpenCode 插件
│ ├── 17 个专门化 Agents (5 层架构)
│ ├── 成熟 Hooks (session-recovery, preemptive-compaction, rules-injector)
│ └── Skills (code-review, pr-review-toolkit)
| 层级 | Agent | 职责 |
|---|---|---|
| 调度层 | Sisyphus | 主力编排器,多阶段工作流 |
| orchestrator-sisyphus | 超强调度器,委派所有工作 | |
| 探索层 | explore | 代码库搜索专家 |
| librarian | 外部文档/OSS 专家 | |
| 咨询层 | oracle | 高 IQ 调试 + 架构咨询 |
| metis | 计划前咨询 | |
| momus | 计划审查 | |
| 执行层 | frontend-ui-ux-engineer | 前端 UI/UX 专家 |
| document-writer | 技术文档专家 |
INIT → PRD_READY → DESIGN_READY → TASKS_READY → CODE_READY → REVIEW_PASSED → MERGED
- 规范执行 - CONSTITUTION.md 规则强制校验
- 语义验证 - LLM-as-Judge 内容质量评估
- 学习闭环 - 错误信号检测 → 经验提取 → 规则注入
启动 OpenCode 后按 Tab 切换代理:
- Sisyphus - 默认构建代理
- Prometheus (Planner) - 规划代理
- orchestrator-sisyphus - 编排器
SUL-1.0
{ "agents": { "oracle": { "model": "anthropic/claude-sonnet-4-20250514" }, "explore": { "model": "anthropic/claude-sonnet-4-20250514" }, "orchestrator-sisyphus": { "permission": { "task": "allow", "call_omo_agent": "allow" } } }, "menkan": { "enabled": true, "mode": "full", "strictness": "medium" } }