Cabbage
OpenCode 全流程开发插件 — 需求→设计→任务→编码→测试→审查→自动合并,支持自动编排与并行 Subagent
3
61
4 in 7 days
35.9
Multi-signal model
5 days ago
2026-10-16
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@devcxl/opencode-cabbage@2.0.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@devcxl/opencode-cabbage@2.0.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @devcxl/opencode-cabbageOpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
@devcxl/opencode-cabbage
A full-lifecycle development plugin for OpenCode, covering requirements, design, tasks, coding, testing, review, and release with automated orchestration and parallel subagents.
English | 简体中文
OpenCode Compatibility
Requires OpenCode v2 (tested on v2.0.28). Version 2.0.0 is a V2-only line built on the @opencode/plugin 2.x API (Plugin.define setup, domain transforms, turn-end-event driven auto-continuation). OpenCode v1 users should stay on the 1.x release line.
Installation
opencode plugin add @devcxl/opencode-cabbage
This installs the plugin and registers it in the global OpenCode configuration (plugins: ["@devcxl/opencode-cabbage"]). Restart OpenCode or run opencode reload to activate.
Once started, the plugin automatically injects 7 slash commands, 12 flow skills, 6 agents, and 2 tools (goal for flow state, cabbage for change records).
⚠️ Plugin conflict — do not combine with other goal plugins. cabbage ships its own
goaltool with an auto-continuation loop driven by turn-end events. Installing it together with another goal / auto-continue plugin (e.g.@prevalentware/opencode-goal-plugin,opencode-goal-mode) risks both loops reacting to the same session activity and injecting continuation prompts: work gets continued twice, continuation counts and token budgets drift out of sync, and abort handling interferes across plugins. Use exactly one goal engine per session — if you rely on an external goal plugin, do not trigger cabbage's goal tool (it is restricted to thedev-lifecycle/goal-verifyagents).
Built-in change records (Cabbage engine)
The plugin bundles the Cabbage engine (vendor/cabbage, version-pinned by scripts/sync-cabbage.mjs) and injects a flow-change skill plus a cabbage tool: create a change record, declare risk flags, verify stages, pass gates, sync current-state docs, and archive after merge. A record is one directory under .cabbage/changes/<id>/ — a single tasks.md by default; specialist documents (design / rfc / adr / api / database / security / release) open only for declared risks.
- Requirements: Python 3.10+ on the machine. The CLI is released per plugin version to
~/.config/opencode/cabbage/cli@<version>/; without Python the tool returns a readable error and everything else keeps working. - Bootstrap a project:
cabbage({op:"init"})scaffolds.cabbage/, the docs skeleton, the CI template, and a vendored CLI copy for GitHub Actions. Existing docs:cabbage({op:"adopt"})inventories markdown outside the docs tree (moves stay manual). - Light path:
new→ filltasks.md→verify→gate merge→archiveafter the merge is confirmed. The tool is restricted to thedev-lifecycleorchestrator.
Codex Installation (Compatibility Layer)
This package also ships a Codex plugin compatibility layer (codex-skills/ + hooks/ + .codex-plugin/) so the flow skills and agent prompts work in Codex as well.
The repository is a Codex marketplace: add it as a marketplace source, then install the plugin from it.
# 1. Add this repository as a Codex marketplace
codex plugin marketplace add devcxl/opencode-cabbage
# 2. Confirm the plugin is available
codex plugin list --available
# 3. Install the plugin (pulled from the npm package, which bundles all Codex files)
codex plugin add opencode-cabbage@cabbage
Notes:
- Build artifact included: the SessionStart hook (
dist/hooks/session-start.js) ships inside the published npm package — no local build required. - Hook trust review: Codex requires interactive trust approval for hooks (
/hookscommand) on first run — approve theSessionStarthook to enable context injection. - Marketplace name: the marketplace is named
cabbage(see.agents/plugins/marketplace.json); useopencode-cabbage@cabbageas the plugin selector. - Platform differences: the Codex layer is a pure-Prompt downgrade — no
goaltool, no slash commands, no automatic continuation. Agents are plain skills (referenced as@agent-*), and flow state is tracked via GitHub Issue checklists. Seecodex-skills/agent-dev-lifecycle/SKILL.mdfor details.
Command Overview
| Command | Stage | Output |
|---|---|---|
/setup |
Setup | docs/ directory structure, Project Profile, CI/release workflow validation |
/requirements |
Requirements | PRD → docs/prd/ + Draft Parent Issue |
/design |
Design | Technical specification + necessary ADR → docs/dev/specs/ + docs/adr/ |
/tasks |
Task decomposition | DAG tasks + Sub Issues (GitHub 权威源) |
/code |
Coding | Task + PR (TDD enforced by CI) |
/review |
Review | Dual-axis review + merge |
/release |
⚠️ Manual release | Version proposal → Release PR → tag push → workflow monitor |
Quick Start
# 1. Install
opencode plugin add @devcxl/opencode-cabbage
# 2. Run in OpenCode
# /setup → /requirements → @dev-lifecycle
Two Modes
- Manual mode — Run each command sequentially for fine-grained control
- Automatic mode — Once the requirements are confirmed, enter
@dev-lifecycleto automatically complete the remaining workflow
Architecture
src/ # Thin TypeScript layer (OpenCode V2 plugin)
├── index.ts # Default export (Plugin.define)
├── plugin.ts # Plugin definition: id + setup wiring
├── plugin/ # Setup glue + built-in tools
│ ├── server.ts # setup(ctx): domain transforms (skills/commands/agents/tools), hooks, event dispatch
│ ├── continuation.ts # Turn-end driven continuation + auto-resume + child-session activity tracker
│ ├── goal.ts # goal tool (status machine + goal-verify authorization)
│ ├── goal-store.ts # Goal persistence (session metadata)
│ ├── cabbage-cli.ts # Releases the bundled Cabbage engine per plugin version; python detection + exec
│ ├── cabbage-tool.ts # `cabbage` tool: change records (ops mapped to the bundled CLI, agent-gated)
│ ├── install-dir.ts # Versioned dir install (lock + completeness check; shared by skills and the engine)
│ ├── session-abort.ts # User-interrupt markers (shared by events/tool/continuation)
│ ├── commands.ts # Command loader (execute-style registration)
│ ├── skills.ts # Skill loader + V2 registration entries
│ ├── prompts.ts # Prompt loader
│ ├── bootstrap.ts # Startup guidance
│ ├── agents.ts # Agent loader + native V2 permissions (placeholder rendering)
│ ├── shell.ts # Agent shell env isolation
│ └── prompt-lint.ts # Prompt asset consistency checks
└── kernel/ # Minimal supporting modules
├── context.ts # root CONTEXT.md discovery/injection
├── profile.ts # AGENTS.md Project Profile parsing
├── session-index.ts # Flow→session index (goal binding + auto-resume)
├── permission.ts # Permission matching semantics
└── mutex.ts # Keyed async mutex
vendor/cabbage/ # Bundled Cabbage engine (synced via scripts/sync-cabbage.mjs; hash-pinned)
assets/ # Runtime assets (pure Prompt flows)
├── commands/ # 7 slash commands
├── skills/ # 12 flow-* skills (Prompt-driven, direct git/gh)
├── agents/ # 6 agent definitions
└── prompts/ # Guidance prompts and templates
codex-skills/ # Codex compatibility layer (mirrors assets/, agent-* prefixed)
hooks/ # Codex SessionStart hook (hooks.json + compiled dist/hooks/)
.codex-plugin/ # Codex plugin manifest (plugin.json)
Documentation
| Document | Link |
|---|---|
| Quick Start | docs/guides/quickstart.md |
| Configuration Guide | docs/guides/configuration.md |
| Usage Guide | docs/guides/usage.md |
| Architecture Overview | docs/guides/architecture.md |
| Contributing Guide | docs/dev/guides/contributing.md |
License
MIT
Similar plugins
Courier
opencode-courier
Multi-session orchestration for OpenCode V2: spawn child sessions, be woken by them. No polling.
Rolebox
rolebox
Agent plugin for major harnesses — DeepSeek Harness (DSH), OpenCode, Pi and Codex: define custom AI agent roles with per-role prompts, models, skills, permissions, memory and multi-agent orchestration.
Herdr
opencode-herdr
Route OpenCode agents through Herdr panes as herdr/<adapter>/<model> (Cursor, Claude, Codex, OpenCode)