OpenCode plugin with structured Brainstorm → Plan → Implement workflow and session continuity.
micode.mp4
Add to ~/.config/opencode/opencode.json:
{ "plugin": ["micode"] }Then run /init to generate ARCHITECTURE.md and CODE_STYLE.md.
Brainstorm → Plan → Implement
↓ ↓ ↓
research research executor
Refine ideas into designs through collaborative questioning. Fires research subagents in parallel. Output: thoughts/shared/designs/YYYY-MM-DD-{topic}-design.md
Transform designs into implementation plans with bite-sized tasks (2-5 min each), exact file paths, and TDD workflow. Output: thoughts/shared/plans/YYYY-MM-DD-{topic}.md
Execute in git worktree for isolation. The Executor orchestrates implementer→reviewer cycles with parallel execution via fire-and-check pattern.
Maintain context across sessions with structured compaction. Run /ledger to create/update thoughts/ledgers/CONTINUITY_{session}.md.
| Command | Description |
|---|---|
/init |
Initialize project docs |
/ledger |
Create/update continuity ledger |
/search |
Search past plans and ledgers |
| Agent | Purpose |
|---|---|
| commander | Orchestrator |
| brainstormer | Design exploration |
| planner | Implementation plans |
| executor | Orchestrate implement→review |
| implementer | Execute tasks |
| reviewer | Check correctness |
| codebase-locator | Find file locations |
| codebase-analyzer | Deep code analysis |
| pattern-finder | Find existing patterns |
| project-initializer | Generate project docs |
| ledger-creator | Continuity ledgers |
| artifact-searcher | Search past work |
| Tool | Description |
|---|---|
ast_grep_search |
AST-aware code pattern search |
ast_grep_replace |
AST-aware code pattern replacement |
look_at |
Extract file structure |
artifact_search |
Search past plans/ledgers |
btca_ask |
Query library source code |
pty_spawn |
Start background terminal session |
pty_write |
Send input to PTY |
pty_read |
Read PTY output |
pty_list |
List PTY sessions |
pty_kill |
Terminate PTY |
- Think Mode - Keywords like "think hard" enable 32k token thinking budget
- Ledger Loader - Injects continuity ledger into system prompt
- Auto-Compact - At 50% context usage, automatically summarizes session to reduce context
- File Ops Tracker - Tracks read/write/edit for deterministic logging
- Artifact Auto-Index - Indexes artifacts in thoughts/ directories
- Context Injector - Injects ARCHITECTURE.md, CODE_STYLE.md
- Token-Aware Truncation - Truncates large tool outputs
git clone [email protected]:vtemian/micode.git ~/.micode
cd ~/.micode && bun install && bun run build// Use local path
{ "plugin": ["~/.micode"] }npm version patch # or minor, major
git push --follow-tags- Brainstorm first - Refine ideas before coding
- Research before implementing - Understand the codebase
- Plan with human buy-in - Get approval before coding
- Parallel investigation - Spawn multiple subagents
- Isolated implementation - Use git worktrees
- Continuous verification - Implementer + Reviewer per task
- Session continuity - Never lose context
- oh-my-opencode - Plugin architecture
- HumanLayer ACE-FCA - Structured workflows
- Factory.ai - Structured compaction research