https://github.com/frap129/opencode-workflow
https://github.com/frap129/opencode-workflow
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/frap129/opencode-workflow
- Owner: frap129
- Created: 2026-05-29T16:38:35.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-06-04T19:56:09.000Z (about 1 month ago)
- Last Synced: 2026-06-04T21:38:32.846Z (about 1 month ago)
- Language: TypeScript
- Size: 214 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# opencode-workflow
A plugin for [opencode](https://opencode.ai) that adds a structured brainstorm-plan-implement workflow with specialized agents and artifact management.
## Overview
This plugin introduces a three-phase development workflow, each backed by a dedicated agent with scoped tool access:
1. **Brainstorm** (`/brainstorm`) — Explore ideas, gather context, and refine requirements into a spec
2. **Plan** (`/plan`) — Turn an approved spec into a detailed, step-by-step implementation plan
3. **Implement** (`/implement`) — Execute against an approved plan using focused subagents
Each phase has its own primary agent with restricted tool permissions, ensuring agents stay focused on their role. Supporting subagents handle codebase exploration, research, implementation, and review tasks.
## Agents
| Agent | Mode | Role |
|---|---|---|
| `workflow-brainstorm` | primary | Requirements gathering and spec authoring |
| `workflow-plan` | primary | Implementation planning from specs |
| `workflow-implement` | primary | Plan execution via subagent delegation |
| `workflow-explore` | subagent | Read-only codebase inspection |
| `workflow-research` | subagent | Documentation and technical research |
| `workflow-programmer` | subagent | Focused coding tasks |
| `workflow-reviewer` | subagent | Structured artifact review |
Agent files are auto-generated in `.opencode/agents/` on first use. Run `/workflow-init` to regenerate them after plugin updates.
## Tools
### Artifact tools
- `read_spec` / `write_spec` — Read and write spec files in `.opencode/plans/`
- `read_plan` / `write_plan` — Read and write plan files in `.opencode/plans/`
### Artifact edit tools
- `edit_spec` — Apply targeted edits to a spec file
- `edit_plan` — Apply targeted edits to a plan file
### Wrapper tools (dispatch subagent tasks)
- `explore` — Dispatch codebase exploration to `workflow-explore`
- `research` — Dispatch investigation to `workflow-research`
- `programmer` — Dispatch implementation to `workflow-programmer`
- `review_spec` — Dispatch spec review to `workflow-reviewer`
- `review_plan` — Dispatch plan review to `workflow-reviewer`
### Verification and review tools
- `verify_spec_compliance` — Verify implementation against spec requirements
- `code_review` — Dispatch structured code review to `workflow-reviewer`
- `investigate` — Dispatch deep investigation tasks to `workflow-explore`
## Installation
Add the plugin to your `opencode.jsonc`:
```jsonc
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"file://path/to/opencode-workflow/src/index.ts"
]
}
```
## Development
```bash
# Install dependencies
bun install
# Run tests
bun test
# Type check
bun x tsc --noEmit
```
## Artifact conventions
- Spec files: `-spec.md` in `.opencode/plans/`
- Plan files: `-plan.md` in `.opencode/plans/`
- Filenames must start with a lowercase alphanumeric character and contain only `[a-z0-9._-]`
## Optional: Hide workflow tools from non-workflow agents
If you want these workflow-specific tools to be unavailable by default outside the workflow agents created by this plugin, add the following to your global or project `opencode.jsonc`:
```jsonc
{
"permission": {
"read_spec": "deny",
"write_spec": "deny",
"edit_spec": "deny",
"read_plan": "deny",
"write_plan": "deny",
"edit_plan": "deny",
"review_spec": "deny",
"review_plan": "deny",
"explore": "deny",
"research": "deny",
"programmer": "deny",
"verify_spec_compliance": "deny",
"code_review": "deny",
"investigate": "deny"
}
}
```
The workflow agents generated by this plugin explicitly `allow` the tools they need, so those agent-specific rules override the global deny list.