Skip to content

codio-extensions/codio-authoring-opencode-plugin

Repository files navigation

@codio-ai/opencode-authoring-agent

An opencode plugin for authoring Codio guide assignments. Provides a codio-orchestrator primary agent, five subagents (outline-architect, page-author, assessment-author, source-ingester, validator), three tools (create_page, create_assessment, validate_guide), and twelve skills (six workflows + six reference skills).

Install (per Codio workspace)

Published on npm as @codio-ai/opencode-authoring-agent. Add to your workspace's startup.sh:

# Install opencode if missing
command -v opencode >/dev/null || curl -fsSL https://opencode.ai/install | bash

# Install node/npm via nvm if missing
[ -s "$HOME/.nvm/nvm.sh" ] && \. "$HOME/.nvm/nvm.sh"
if ! command -v npm >/dev/null; then
  curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
  export NVM_DIR="$HOME/.nvm"
  \. "$NVM_DIR/nvm.sh"
  nvm install --lts
fi

# Install plugin — postinstall registers it with opencode automatically
npm install -g @codio-ai/opencode-authoring-agent@latest

See startup.sh.example for the full version with error handling.

To pin a version: npm install -g @codio-ai/opencode-authoring-agent@1.2.3.

What gets installed where

After npm install -g, the package's postinstall script writes:

  • ~/.config/opencode/plugins/codio-authoring.js — a tiny wrapper that re-exports the plugin from its installed location (so node_modules resolve correctly)
  • ~/.config/opencode/skills/<name>/SKILL.md — all 12 skills (6 workflow + 6 reference), copied from the package

To remove cleanly: npm uninstall -g @codio-ai/opencode-authoring-agent — the package's preuninstall script removes the wrapper and skills.

To re-run registration manually (e.g. after editing skills locally during development): codio-authoring-register.

AWS Bedrock setup

The plugin auto-registers two AWS Bedrock model definitions in opencode's provider config:

Plugin key AWS Bedrock inference profile ID
amazon-bedrock/sonnet-4-6 us.anthropic.claude-sonnet-4-6
amazon-bedrock/haiku-4-5 us.anthropic.claude-haiku-4-5-20251001-v1:0

Override either by adding to your opencode.json (project-local) or ~/.config/opencode/config.json:

{
  "provider": {
    "amazon-bedrock": {
      "models": {
        "sonnet-4-6": {
          "id": "arn:aws:bedrock:us-east-1:xxx:application-inference-profile/yyy"
        }
      }
    }
  }
}

Auth: set one of —

  • AWS_BEARER_TOKEN_BEDROCK (Bedrock-specific bearer token, simplest)
  • AWS_PROFILE (with AWS_REGION) — uses standard AWS CLI profile
  • AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY + AWS_REGION

The plugin does not manage credentials; it relies on opencode's underlying AWS SDK to pick them up from the environment.

Configuration

Plugin config (optional) lives at <workspace>/codio-authoring.json. All fields optional:

{
  "defaultModels": {
    "primary": "amazon-bedrock/sonnet-4-6",
    "cheap": "amazon-bedrock/haiku-4-5"
  },
  "disabledAgents": [],
  "agents": {
    "codio-orchestrator": {
      // To use a custom model key, first add it to the bedrock models block in
      // opencode.json: provider.amazon-bedrock.models.opus-4-7.id = <profile-id>
      "model": "amazon-bedrock/opus-4-7",
      "temperature": 0.1
    }
  }
}

Usage

Once installed, run opencode from the workspace root. The orchestrator handles natural-language intents directly — no slash commands needed for authoring. Examples:

  • "Start a new assignment on iterators in Python for first-year CS students."
  • "Add a page on list comprehensions to the existing chapter."
  • "Add 3 MCQs on for-loops to the iterators page."
  • "Reorder: move the assessment page to the end."

The only slash command is /validate-guide, which runs the structural validator on demand.

Development

bun install
bun test
bun run typecheck
bun run check
bun run build

Architecture

See docs/superpowers/specs/2026-05-11-codio-authoring-opencode-plugin-design.md (in the parent monorepo) for the full design.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors