Open Source Story: Contributing the /subagents Command to oh-my-opencode

Open Source Story: Contributing the /subagents Command to oh-my-opencode

Open Source Story: Contributing the /subagents Command to oh-my-opencode

Dante Quokka conducting the AI agent orchestra

Hello, I'm Dante from Quokka Labs.

Today, I want to share my experience contributing the /subagents command to the oh-my-opencode pluginโ€”why this feature was needed, and how AI coding agents work under the hood.

๐Ÿ“Ž PR Link: github.com/code-yeongyu/oh-my-opencode/pull/710

๐ŸŽฌ Watch the Video: OpenCode & oh-my-opencode Introduction (YouTube)

Background: What are OpenCode and oh-my-opencode?

OpenCode

OpenCode is a terminal-based AI coding assistant. Like GitHub Copilot, AI helps you write code, but it operates in a terminal (CLI) environment.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  $ opencode                             โ”‚
โ”‚                                         โ”‚
โ”‚  You: "Fix the bug in login.ts"         โ”‚
โ”‚                                         โ”‚
โ”‚  AI: [reads files, suggests fixes]      โ”‚
โ”‚                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

oh-my-opencode

oh-my-opencode is a plugin that extends OpenCode with extra features:

  • Multiple specialized AI agents (oracle, librarian, explore, etc.)
  • Custom slash commands (/init-deep, /refactor, /subagents)
  • Tool integrations (LSP, AST-Grep, etc.)

Think of it like "oh-my-zsh" for your shellโ€”it supercharges the base tool.


Problem Recognition: Why Was /subagents Needed?

Quokka Problem
Quokka exhausted after wrestling with complex JSON configuration

oh-my-opencode provides multiple Subagents. Each subagent is optimized for specific tasks:

SubagentRole
SisyphusBreaks complex tasks into subtasks and manages them
oracleAnswers questions requiring advanced reasoning
librarianCodebase exploration and documentation
exploreNew codebase analysis

The problem was that configuring which LLM model to use for each subagent required manually editing JSON configuration files:

{
  "agents": {
    "oracle": {
      "model": "claude-opus-4-5"
    },
    "Sisyphus": {
      "model": "gpt-5.1-codex"
    }
  }
}

While not difficult for developers, there were several pain points:

  1. Not knowing available models - You need to know the list of available models
  2. Finding config file locations - Global vs project config paths differ
  3. JSON syntax errors - Missing a comma breaks the entire config

It would be much more convenient to change subagent models interactively through natural conversation in the terminal.


The Solution: /subagents Command

Quokka Solution
Quokka satisfied with the clean TUI interface

The /subagents command I contributed configures subagent models through an interactive TUI (Terminal User Interface).

User: /subagents

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  ๐Ÿค– Subagent Configuration                      โ”‚
โ”‚                                                 โ”‚
โ”‚  Current Assignments:                           โ”‚
โ”‚  1. Sisyphus     โ†’ gpt-5.1-codex               โ”‚
โ”‚  2. oracle       โ†’ claude-opus-4-5              โ”‚
โ”‚  3. librarian    โ†’ haiku-4.5                    โ”‚
โ”‚  4. explore      โ†’ (default)                    โ”‚
โ”‚                                                 โ”‚
โ”‚  Enter number to change model (or 'q' to quit) โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

When users enter a number, available models for that agent are displayed:

User: 2

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  Available models for: oracle                   โ”‚
โ”‚                                                 โ”‚
โ”‚  1. claude-opus-4-5                            โ”‚
โ”‚  2. claude-sonnet-4.5                          โ”‚
โ”‚  3. gpt-5.1-codex                              โ”‚
โ”‚  4. haiku-4.5                                  โ”‚
โ”‚                                                 โ”‚
โ”‚  Enter number to select model                   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Once a model is selected, the configuration file is automatically updated.


Implementation: Template-Based Command Architecture

The Big Picture

Understanding how AI coding agent commands work makes this contribution more interesting.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         USER TYPES: /subagents                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚
                                    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     STEP 1: COMMAND LOOKUP                            โ”‚
โ”‚                                                                       โ”‚
โ”‚  OpenCode sees "/subagents" and looks in the command registry         โ”‚
โ”‚  (commands.ts) to find the matching definition.                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚
                                    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     STEP 2: TEMPLATE INJECTION                        โ”‚
โ”‚                                                                       โ”‚
โ”‚  The template from subagents.ts gets injected into the AI's           โ”‚
โ”‚  "system prompt"โ€”essentially instructions the AI must follow.         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚
                                    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     STEP 3: AI FOLLOWS TEMPLATE                       โ”‚
โ”‚                                                                       โ”‚
โ”‚  The AI reads the template instructions and:                          โ”‚
โ”‚  - Displays the TUI (text-based UI)                                   โ”‚
โ”‚  - Waits for user input                                               โ”‚
โ”‚  - Performs actions (read/write config files)                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

File-by-File Breakdown

1. templates/subagents.ts - The Brain

This file contains instructions for the AI written in plain English. It's NOT code that runsโ€”it's a prompt that tells the AI what to do.

export const SUBAGENTS_TEMPLATE = `You are helping the user configure...

## TWO-STEP TUI FLOW

### STEP 1: List Subagents
Display the current subagent configurations...

### STEP 2: Model Selection
When user enters a number, show available models...
`
Why plain English?
  • AI (GPT, Claude, etc.) understands natural language
  • We're essentially "programming" the AI's behavior through instructions
  • This is called "prompt engineering"
Key sections in the template:
SectionWhat it tells the AI
## CONTEXTBackground info about subagents
## STEP 0"First, discover what models the user has"
## STEP 1"Show this numbered list format"
## STEP 2"When user picks a number, show models"
## CRITICAL RULES"Wait for input, don't auto-proceed"

2. commands.ts - The Registry

This file registers all available commands so OpenCode knows they exist.

const BUILTIN_COMMAND_DEFINITIONS = {
  // Other commands...
  
  subagents: {
    description: "(builtin) Configure subagent-model assignments via interactive TUI",
    template: `<command-instruction>
${SUBAGENTS_TEMPLATE}    // โ† Injects the template here
</command-instruction>

<user-request>
$ARGUMENTS              // โ† Replaced with what user typed after /subagents
</user-request>`,
  },
}

3. types.ts - TypeScript Safety

export type BuiltinCommandName = 
  | "init-deep" 
  | "ralph-loop" 
  | "subagents"   // โ† Added

TypeScript checks that only valid command names are used at compile time.

4. config/schema.ts - Runtime Validation

export const BuiltinCommandNameSchema = z.enum([
  "init-deep",
  "start-work",
  "subagents",   // โ† Added
])

Validates user configuration files at runtime.


Key Insight: Programming AI with Natural Language

The most fascinating aspect of this contribution was the concept of "programming AI with natural language."

Traditional Code vs Template-Based

Traditional Code:           Template-Based:
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€           โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
if (input === "2") {        "When user enters a number,
  showModels(2);             show available models for
}                            that subagent"

AI as the Executor

The AI isn't just answering questionsโ€”it's executing a program defined by the template:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ USER                          OPENCODE                        AI        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                         โ”‚
โ”‚  Types: /subagents                                                      โ”‚
โ”‚         โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ                                                    โ”‚
โ”‚                          Looks up "subagents"                           โ”‚
โ”‚                          in commands.ts                                 โ”‚
โ”‚                                 โ”‚                                       โ”‚
โ”‚                                 โ–ผ                                       โ”‚
โ”‚                          Finds template                                 โ”‚
โ”‚                          Injects into prompt                            โ”‚
โ”‚                                 โ”‚                                       โ”‚
โ”‚                                 โ–ผ                                       โ”‚
โ”‚                          Sends to AI โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  Receives template       โ”‚
โ”‚                                                                         โ”‚
โ”‚                                                 Reads instructions      โ”‚
โ”‚                                                 "Step 0: Discover       โ”‚
โ”‚                                                  available models"      โ”‚
โ”‚                                                        โ”‚                โ”‚
โ”‚                                                        โ–ผ                โ”‚
โ”‚                                                 Reads config files:     โ”‚
โ”‚                                                 - opencode.yaml         โ”‚
โ”‚                                                 - oh-my-opencode.json   โ”‚
โ”‚                                                        โ”‚                โ”‚
โ”‚                                                        โ–ผ                โ”‚
โ”‚  Sees TUI:               โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Displays Step 1:         โ”‚
โ”‚  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ                       "Current subagents..."   โ”‚
โ”‚  โ”‚ ๐Ÿค– Subagent Config  โ”‚                                                โ”‚
โ”‚  โ”‚ 1. Sisyphus         โ”‚                                                โ”‚
โ”‚  โ”‚ 2. oracle           โ”‚                                                โ”‚
โ”‚  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ                                                โ”‚
โ”‚                                                                         โ”‚
โ”‚  Types: 2                                                               โ”‚
โ”‚         โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  Sees "2"                  โ”‚
โ”‚                                               Follows Step 2:           โ”‚
โ”‚                                               "Show models for #2"      โ”‚
โ”‚                                                        โ”‚                โ”‚
โ”‚                                                        โ–ผ                โ”‚
โ”‚  Sees model list:        โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Displays models          โ”‚
โ”‚  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ                                                โ”‚
โ”‚  โ”‚ Models for: oracle  โ”‚                                                โ”‚
โ”‚  โ”‚ 1. claude-opus-4-5  โ”‚                                                โ”‚
โ”‚  โ”‚ 2. gpt-5.1          โ”‚                                                โ”‚
โ”‚  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ                                                โ”‚
โ”‚                                                                         โ”‚
โ”‚  Types: 1                                                               โ”‚
โ”‚         โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  Sees "1"                  โ”‚
โ”‚                                               Follows Step 3:           โ”‚
โ”‚                                               "Update config file"      โ”‚
โ”‚                                                        โ”‚                โ”‚
โ”‚                                                        โ–ผ                โ”‚
โ”‚                                               Writes to:                โ”‚
โ”‚                                               oh-my-opencode.json       โ”‚
โ”‚                                                        โ”‚                โ”‚
โ”‚  Sees toast:             โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Shows success            โ”‚
โ”‚  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ                                                โ”‚
โ”‚  โ”‚ โœ… oracle updated!  โ”‚                                                โ”‚
โ”‚  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ                                                โ”‚
โ”‚                                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The Value of Open Source Contribution

Quokka Contribution
Quokka celebrating the successful PR merge

What I Gained as a Developer

  1. Deep Understanding of Prompt Engineering - A new paradigm for programming AI
  2. Real Production Code Experience - Contributing to tools used by many
  3. Learning Through Code Reviews - Growing through maintainer feedback

Why Quokka Labs Contributes to Open Source

At Quokka Labs, we believe in contributing to the tech ecosystem, not just providing services.

  • Proving Capabilities: Demonstrating real implementation skills that blog posts alone can't show
  • Leading with Latest Tech: Developing at the forefront of AI coding tools
  • Growing with the Community: Not just using, but giving back

Conclusion

The /subagents command may be a small feature, but understanding the template-based architecture of AI agents and actually contributing was a deeply meaningful experience.

If you're interested in open source contribution, projects like oh-my-opencode can be a great starting point. Even without writing code, improving prompt templates is a valuable contribution.

Related Links:

Summary

ComponentRole
Template (subagents.ts)Instructions for AI - "here's what to do"
Registry (commands.ts)Maps /subagents โ†’ template
Types (types.ts)TypeScript compile-time safety
Schema (schema.ts)Runtime config validation
AIExecutes the template instructions
Config filesStore user's model preferences

The magic is that we're programming the AI with natural language, and the AI handles all the complex parts (file I/O, JSON parsing, user interaction).

Comments0
No comments yet.

Related Posts