Skip to content

Introduction

@maestria/opencode is an npm plugin for OpenCode that transforms your AI coding environment into a disciplined engineering workstation. It bundles 8 specialized agents and global workflow rules — all installed with a single line of configuration.

Without a plugin like this, every OpenCode session starts from scratch. You need to:

  • Manually configure agent prompts and permissions
  • Remember to set context management rules
  • Re-establish delegation patterns
  • Hope the AI remembers its methodology

This is inconsistent, error-prone, and wastes context window on setup that should be automatic.

@maestria/opencode solves this with three layers:

LayerWhat it doesHow
Agents8 specialized subagents for different work phasesBundled .md files registered via OpenCode’s config hook
RulesCross-cutting directives injected into every sessioninput.instructions path to rules/AGENTS.md
HooksSelf-wiring plugin architectureOpenCode lifecycle hooks (config, session.compacting)

The plugin provides one manager agent and 7 specialist subagents:

AgentModeRole
@orchestratorallManager — decomposes work, delegates to specialists, integrates results
@adventurersubagentCodebase reconnaissance — maps unfamiliar code, traces call chains
@architectsubagentArchitecture decisions — evaluates options with weighted criteria
@buildersubagentFocused implementation — one atomic task per invocation
@diagnosesubagentSystematic debugging — 6-step regression tracing
@plannersubagentImplementation plans — phased milestones with verification
@reviewersubagentCode review — 7-dimension quality checklist
@writersubagentDocumentation — structured patterns for any document type