vtemian/micode

RPI OpenCode Plugin

481

stars

386

commits

TypeScript

primary language

Sep 7, 2026

updated

README

micode

Quality Gate npm version

OpenCode plugin with structured Brainstorm → Plan → Implement workflow and session continuity.

https://github.com/user-attachments/assets/85236ad3-e78a-4ff7-a840-620f6ea2f512

Quick Start

Add to ~/.config/opencode/opencode.json:

{ "plugin": ["micode"] }

Then run /init to generate ARCHITECTURE.md and CODE_STYLE.md.

Workflow

Brainstorm → Plan → Implement
     ↓         ↓        ↓
  research  research  executor

Brainstorm

Refine ideas into designs through collaborative questioning. Fires research subagents in parallel. Output: thoughts/shared/designs/YYYY-MM-DD-{topic}-design.md

Plan

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

Implement

Execute in git worktree for isolation. The Executor orchestrates implementer→reviewer cycles with parallel execution via fire-and-check pattern.

Session Continuity

Maintain context across sessions with structured compaction. Run /ledger to create/update thoughts/ledgers/CONTINUITY_{session}.md.

Commands

CommandDescription
/initInitialize project docs
/ledgerCreate/update continuity ledger
/searchSearch past plans and ledgers

Agents

AgentPurpose
commanderOrchestrator
brainstormerDesign exploration
plannerImplementation plans
executorOrchestrate implement→review
implementerExecute tasks
reviewerCheck correctness
codebase-locatorFind file locations
codebase-analyzerDeep code analysis
pattern-finderFind existing patterns
project-initializerGenerate project docs
ledger-creatorContinuity ledgers
artifact-searcherSearch past work

Tools

ToolDescription
ast_grep_searchAST-aware code pattern search
ast_grep_replaceAST-aware code pattern replacement
look_atExtract file structure
artifact_searchSearch past plans/ledgers
btca_askQuery library source code
pty_spawnStart background terminal session
pty_writeSend input to PTY
pty_readRead PTY output
pty_listList PTY sessions
pty_killTerminate PTY

Hooks

  • Think Mode - Keywords like "think hard" enable 128k 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

Configuration

Model Configuration

micode reads your default model from opencode.json:

{
  "model": "github-copilot/gpt-5-mini",
  "plugin": ["micode"]
}

All micode agents will use this model automatically.

micode.json

Create ~/.config/opencode/micode.json for micode-specific settings:

{
  "agents": {
    "brainstormer": { "model": "openai/gpt-4o", "temperature": 0.8 },
    "commander": {
      "maxTokens": 8192,
      // Configure reasoning effort per agent
      "thinking": { "type": "enabled", "budgetTokens": 100000 }
    }
  },
  "features": {
    "mindmodelInjection": true,
    "context7": false
  },
  "compactionThreshold": 0.5,
  "fragments": {
    "commander": ["custom-instructions.md"]
  }
}

Note: Both .json and .jsonc formats are supported. JSONC allows comments and trailing commas.

Options

OptionTypeDescription
agentsobjectPer-agent overrides (model, temperature, maxTokens, thinking)
features.mindmodelInjectionbooleanEnable mindmodel context injection
features.context7booleanRegister the bundled context7 MCP server. Set false when it already comes from another tool or proxy. Default: true
compactionThresholdnumberContext usage threshold (0-1) for auto-compaction. Default: 0.7
fragmentsobjectAdditional prompt fragments per agent

Model Resolution Priority

  1. Per-agent override in micode.json (highest)
  2. Default model from opencode.json "model" field
  3. Plugin default (fallback)

Model Syntax

Models use provider/model format. The provider must match exactly what's in your opencode.json:

{
  "provider": {
    "github-copilot": {
      "models": { "gpt-5-mini": {} }
    }
  }
}

Use "model": "github-copilot/gpt-5-mini" (not github/copilot:gpt-5-mini).

Development

git clone git@github.com:vtemian/micode.git ~/.micode
cd ~/.micode && bun install && bun run build
// Use local path
{ "plugin": ["~/.micode"] }

Release

npm version patch  # or minor, major
git push --follow-tags

Philosophy

  1. Brainstorm first - Refine ideas before coding
  2. Research before implementing - Understand the codebase
  3. Plan with human buy-in - Get approval before coding
  4. Parallel investigation - Spawn multiple subagents
  5. Isolated implementation - Use git worktrees
  6. Continuous verification - Implementer + Reviewer per task
  7. Session continuity - Never lose context

micode vs oh-my-opencode

Both are OpenCode plugins, but with different philosophies:

Aspectmicodeoh-my-opencode
PhilosophyOpinionated workflow (brainstorm→plan→implement)Batteries-included framework
Agent DesignRole-based (Brainstormer, Planner, Executor)Greek mythology theme (Sisyphus, Atlas, Prometheus)
ParallelismBatch-first: 10-20 concurrent micro-tasks (2-5 min each)Background tasks with tmux visual monitoring
Code GuidanceMindmodel system with project-specific patternsComment checker, keyword modes (ultrawork)
Context RecoveryLedger system (CONTINUITY files)AGENTS.md hierarchy, preemptive compaction
WorkflowTDD-enforced with adaptation over escalationCategory-based delegation (visual-engineering, ultrabrain)
ConfigurationFocused optionsExtensive (34 hooks, 11 agents, fallback chains)

When to Choose micode

  • You want a structured brainstorm→plan→implement workflow
  • You prefer TDD-driven implementation with test-first development
  • You need project-specific pattern enforcement via mindmodel
  • You want high parallelism on granular tasks (10-20 concurrent micro-tasks)
  • You value session continuity via structured ledgers

When to Choose oh-my-opencode

  • You want maximum flexibility and configuration options
  • You prefer keyword-driven modes (e.g., "ultrawork", "analyze")
  • You need extensive model fallback chains with subscription detection
  • You like category-based task delegation (visual-engineering, infrastructure)
  • You want visual monitoring via tmux integration

Inspiration

Contributors

vtemian

362 commits

dependabot[bot]

19 commits

Copilot

3 commits

fengjikui

1 commits

vtemian/micode

RPI OpenCode Plugin

481

stars

386

commits

TypeScript

primary language

Sep 7, 2026

updated

README

micode

Quality Gate npm version

OpenCode plugin with structured Brainstorm → Plan → Implement workflow and session continuity.

https://github.com/user-attachments/assets/85236ad3-e78a-4ff7-a840-620f6ea2f512

Quick Start

Add to ~/.config/opencode/opencode.json:

{ "plugin": ["micode"] }

Then run /init to generate ARCHITECTURE.md and CODE_STYLE.md.

Workflow

Brainstorm → Plan → Implement
     ↓         ↓        ↓
  research  research  executor

Brainstorm

Refine ideas into designs through collaborative questioning. Fires research subagents in parallel. Output: thoughts/shared/designs/YYYY-MM-DD-{topic}-design.md

Plan

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

Implement

Execute in git worktree for isolation. The Executor orchestrates implementer→reviewer cycles with parallel execution via fire-and-check pattern.

Session Continuity

Maintain context across sessions with structured compaction. Run /ledger to create/update thoughts/ledgers/CONTINUITY_{session}.md.

Commands

CommandDescription
/initInitialize project docs
/ledgerCreate/update continuity ledger
/searchSearch past plans and ledgers

Agents

AgentPurpose
commanderOrchestrator
brainstormerDesign exploration
plannerImplementation plans
executorOrchestrate implement→review
implementerExecute tasks
reviewerCheck correctness
codebase-locatorFind file locations
codebase-analyzerDeep code analysis
pattern-finderFind existing patterns
project-initializerGenerate project docs
ledger-creatorContinuity ledgers
artifact-searcherSearch past work

Tools

ToolDescription
ast_grep_searchAST-aware code pattern search
ast_grep_replaceAST-aware code pattern replacement
look_atExtract file structure
artifact_searchSearch past plans/ledgers
btca_askQuery library source code
pty_spawnStart background terminal session
pty_writeSend input to PTY
pty_readRead PTY output
pty_listList PTY sessions
pty_killTerminate PTY

Hooks

  • Think Mode - Keywords like "think hard" enable 128k 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

Configuration

Model Configuration

micode reads your default model from opencode.json:

{
  "model": "github-copilot/gpt-5-mini",
  "plugin": ["micode"]
}

All micode agents will use this model automatically.

micode.json

Create ~/.config/opencode/micode.json for micode-specific settings:

{
  "agents": {
    "brainstormer": { "model": "openai/gpt-4o", "temperature": 0.8 },
    "commander": {
      "maxTokens": 8192,
      // Configure reasoning effort per agent
      "thinking": { "type": "enabled", "budgetTokens": 100000 }
    }
  },
  "features": {
    "mindmodelInjection": true,
    "context7": false
  },
  "compactionThreshold": 0.5,
  "fragments": {
    "commander": ["custom-instructions.md"]
  }
}

Note: Both .json and .jsonc formats are supported. JSONC allows comments and trailing commas.

Options

OptionTypeDescription
agentsobjectPer-agent overrides (model, temperature, maxTokens, thinking)
features.mindmodelInjectionbooleanEnable mindmodel context injection
features.context7booleanRegister the bundled context7 MCP server. Set false when it already comes from another tool or proxy. Default: true
compactionThresholdnumberContext usage threshold (0-1) for auto-compaction. Default: 0.7
fragmentsobjectAdditional prompt fragments per agent

Model Resolution Priority

  1. Per-agent override in micode.json (highest)
  2. Default model from opencode.json "model" field
  3. Plugin default (fallback)

Model Syntax

Models use provider/model format. The provider must match exactly what's in your opencode.json:

{
  "provider": {
    "github-copilot": {
      "models": { "gpt-5-mini": {} }
    }
  }
}

Use "model": "github-copilot/gpt-5-mini" (not github/copilot:gpt-5-mini).

Development

git clone git@github.com:vtemian/micode.git ~/.micode
cd ~/.micode && bun install && bun run build
// Use local path
{ "plugin": ["~/.micode"] }

Release

npm version patch  # or minor, major
git push --follow-tags

Philosophy

  1. Brainstorm first - Refine ideas before coding
  2. Research before implementing - Understand the codebase
  3. Plan with human buy-in - Get approval before coding
  4. Parallel investigation - Spawn multiple subagents
  5. Isolated implementation - Use git worktrees
  6. Continuous verification - Implementer + Reviewer per task
  7. Session continuity - Never lose context

micode vs oh-my-opencode

Both are OpenCode plugins, but with different philosophies:

Aspectmicodeoh-my-opencode
PhilosophyOpinionated workflow (brainstorm→plan→implement)Batteries-included framework
Agent DesignRole-based (Brainstormer, Planner, Executor)Greek mythology theme (Sisyphus, Atlas, Prometheus)
ParallelismBatch-first: 10-20 concurrent micro-tasks (2-5 min each)Background tasks with tmux visual monitoring
Code GuidanceMindmodel system with project-specific patternsComment checker, keyword modes (ultrawork)
Context RecoveryLedger system (CONTINUITY files)AGENTS.md hierarchy, preemptive compaction
WorkflowTDD-enforced with adaptation over escalationCategory-based delegation (visual-engineering, ultrabrain)
ConfigurationFocused optionsExtensive (34 hooks, 11 agents, fallback chains)

When to Choose micode

  • You want a structured brainstorm→plan→implement workflow
  • You prefer TDD-driven implementation with test-first development
  • You need project-specific pattern enforcement via mindmodel
  • You want high parallelism on granular tasks (10-20 concurrent micro-tasks)
  • You value session continuity via structured ledgers

When to Choose oh-my-opencode

  • You want maximum flexibility and configuration options
  • You prefer keyword-driven modes (e.g., "ultrawork", "analyze")
  • You need extensive model fallback chains with subscription detection
  • You like category-based task delegation (visual-engineering, infrastructure)
  • You want visual monitoring via tmux integration

Inspiration

Contributors

vtemian

362 commits

dependabot[bot]

19 commits

Copilot

3 commits

fengjikui

1 commits

Languages

TypeScript

99.0%