JSPM

  • Created
  • Published
  • Downloads 7551
  • Score
    100M100P100Q117384F
  • License MIT

Standardized OpenCode orchestration framework — contract-based, rules-enforced, zero-touch agent workflow. Install as plugin.

Package Exports

  • @ikieaneh/opencode-kit
  • @ikieaneh/opencode-kit/tui

Readme

Contributors Forks Stargazers Issues MIT License npm PRs Welcome CI


Logo

opencode-kit

One plugin. Every project gets 18 agents, 40 skills, 16 slash commands, 5 MCPs, and contract-based orchestration, automatically.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Built With
  3. Getting Started
  4. Usage
  5. Architecture
  6. Agents & Skills
  7. How It Works
  8. Roadmap
  9. Contributing
  10. License
  11. Contact
  12. Acknowledgments

About The Project

AI coding agents are inconsistent. Without structure, they skip conventions, ignore shared state, bypass quality gates, and use different approaches every run.

opencode-kit is an OpenCode plugin that replaces prose conventions with machine-readable enforcement. Install the plugin once, and every project session gets:

  • 18 agents: orchestrator, planner, code-reviewer, council, designer, oracle, and more
  • 40 skills: orchestration, firecrawl, gitnexus, TDD, debugging
  • 16 slash commands: doctor, status, preflight, ADR, version, and more
  • 5 MCPs: lean-ctx, gitnexus, context7, firecrawl, github
  • ADR reports: Architecture Decision Records for every decision
  • Session summaries: auto-persisted state and lessons learned

All from one plugin reference in opencode.json.

(back to top)

Built With

Technology Purpose
Node.js Runtime and plugin system
OpenCode AI coding agent platform
lean-ctx Token-compressed file/shell gateway
graphify Codebase graph intelligence
GitNexus Code intelligence and impact analysis

(back to top)

Getting Started

Prerequisites

  • Node.js >= 18
  • Git
  • OpenCode installed and configured
node --version    # >= 18
git --version     # any recent version

Installation

Step 1: Install globally (one-time)

npm install -g @ikieaneh/opencode-kit

Step 2: Add plugin to your project

Add to your project's opencode.json:

{
  "plugin": ["@ikieaneh/opencode-kit"]
}

That's it. Open your project in OpenCode — the plugin handles everything else.

(back to top)

Usage

On first load, the plugin auto-provisions your project:

opencode.json:   "plugin": ["@ikieaneh/opencode-kit"]
     ↓ (first open)
Plugin writes to opencode.json:
  • 18 agent configs (skills + tools)
  • 16 slash command configs
  • 5 MCP server configs
  • 18 permission configs
Plugin provisions .opencode/:
  • agents/     → 18 agent .md templates
  • skills/     → 39 skill directories
  • rules/      → 4 rule files (from manifest)
  • orchestration/ → contract.json
Plugin registers tui.json:
  • @ikieaneh/opencode-kit/tui (auto-registered)
     ↓
Everything ready — 16 slash commands available

After installation, verify everything loaded:

npx opencode-kit doctor

Expected output:

✅ contract.json
✅ rules.json
✅ 18 agents provisioned
✅ 40 skills provisioned
✅ 7 rule files loaded
✅ All checks passed

(back to top)

Architecture

File Structure

opencode-kit/
├── opencode.json.template    # Framework config (no model/provider)
├── AGENTS.md                 # Agent instructions
├── contract.json             # Contract template
├── contract.schema.json      # Contract schema
├── superpowers-contract.json # Capability manifest (skills, agents, MCPs)
├── agents/                   # 15 agent templates
│   ├── orchestrator.md
│   ├── planner.md
│   ├── code-reviewer.md
│   ├── task-manager.md
│   ├── explorer.md
│   ├── librarian.md
│   ├── architect.md
│   ├── fixer.md
│   ├── learner.md
│   ├── observer.md
│   ├── database-specialist.md
│   ├── devops-agent.md
│   ├── documentation-agent.md
│   ├── security-reviewer.md
│   └── testing-specialist.md
├── skills/                   # 40 skills (40 dirs)
├── rules/                    # 7 rule files
├── src/                      # 22 shell scripts
├── docs/                     # Architecture docs
├── adr/                      # ADR templates
└── package.json

Inheritance Model

opencode-kit uses class inheritance: projects extend the base, not replace it.

// Project's contract.json
{
  "_meta": {
    "extends": "opencode-kit",
    "overrides": ["requirements.goal"],
    "appends": ["scope.included"]
  },
  "requirements": {
    "goal": "Project-specific goal (overrides base)"
  }
}
Layer Extend Via Example
Contract _meta.overrides / _meta.appends Override goal, append scope
Agents _meta.append_skills Add project-specific skills
Rules _meta.appends: ["rules"] Add custom rules
Skills Add to .opencode/skills/ Create my-api-client/SKILL.md

Merge rules:

  • Scalars: project overrides base
  • Arrays: concatenated + deduplicated
  • Objects: deep merged (project wins)
  • Excludes: _meta.excludes removes inherited items

See docs/inheritance-model.md for full architecture.

(back to top)

Agents & Skills

18 Agents

Agent Purpose Key Skills
orchestrator Delegates, validates, drives state machine orchestration-template, dispatching-parallel-agents
planner Analyzes requests, traces impact, produces plans writing-plans, executing-plans
task-manager Breaks plans into tasks, implements each step subagent-driven-dev, test-driven-dev
code-reviewer Read-only code review — quality, security, performance receiving-code-review, requesting-code-review
explorer Fast codebase search across the entire project gitnexus-exploring, firecrawl-search
librarian Authoritative source for library docs and API references firecrawl-scrape, firecrawl-knowledge-base
architect Strategic technical advisor for high-stakes decisions systematic-debugging, gitnexus-exploring
fixer Fast implementation for well-defined bounded tasks lean-ctx_*
learner Post-execution learning — extracts lessons, persists knowledge firecrawl-deep-research, firecrawl-knowledge-base
observer System state monitor — read-only firecrawl-scrape
database-specialist Schema design, queries, migrations, optimization db-design
devops-agent CI/CD, deployment, infrastructure, automation ci-cd, deployment
documentation-agent Maintains README, API docs, inline documentation firecrawl-scrape, firecrawl-knowledge-base
security-reviewer Vulnerability assessment and security best practices security-audit
testing-specialist Unit tests, integration tests, test strategies testing-strategies, test-driven-dev
council Multi-LLM consensus engine for high-stakes decisions using-superpowers, humanizer
designer UI/UX design, review, and implementation using-superpowers, humanizer
oracle Strategic technical advisor for architecture and debugging using-superpowers, simplify

40 Skills

Category Skills
Orchestration orchestration-template, orchestration-workflow, dispatching-parallel-agents, executing-plans, subagent-driven-dev
Quality test-driven-dev, systematic-debugging, verification-before-completion, quality-checks, receiving-code-review, requesting-code-review, simplify
Planning writing-plans, brainstorming, using-git-worktrees
Web Research firecrawl-search, firecrawl-scrape, firecrawl-deep-research, firecrawl-knowledge-base, firecrawl-knowledge-ingest, firecrawl-map, firecrawl-qa, firecrawl-workflows
Code Intelligence gitnexus-exploring, codemap, token-optimize
Domain database-design, sql-optimization, ci-cd, deployment, infrastructure, security-audit, testing-strategies
Learning learner, using-superpowers, system-analyst, scoring-pipeline, qa-expert
Content humanizer
Workflow adr-generator

5 MCPs

MCP Purpose
lean-ctx Token-compressed file/shell gateway (mandatory)
gitnexus Code intelligence and impact analysis
context7 Library documentation lookup
firecrawl Web search, scraping, and interaction
github GitHub API access

Plus graphify (CLI tool, not MCP) for codebase graph intelligence.

16 Slash Commands

Command Description
/opencode-kit:doctor Run project health checks
/opencode-kit:status Show project status
/opencode-kit:analytics Show project analytics
/opencode-kit:preflight Run pre-flight gate checks
/opencode-kit:score Run scoring pipeline
/opencode-kit:contract-lint Validate contract structure
/opencode-kit:checkpoint List saved checkpoints
/opencode-kit:checkpoint-save Save a checkpoint
/opencode-kit:diff Show contract changes
/opencode-kit:audit Query audit trail
/opencode-kit:verify Verify project setup
/opencode-kit:lock Check contract lock status
/opencode-kit:init Initialize opencode-kit
/opencode-kit:update Update templates
/opencode-kit:adr Create Architecture Decision Record
/opencode-kit:version Show version and changelog entry

(back to top)

How It Works

1. Plugin Auto-Provision

When OpenCode starts with @ikieaneh/opencode-kit in the plugin array, the plugin hook fires and provisions files from the package into .opencode/:

  • agents/ — 18 agent templates
  • skills/ — 40 skills
  • rules/ — 7 rule files
  • orchestration/contract.json

2. Auto-Config

The plugin writes directly to the project's opencode.json:

  • 18 agent configs (skills + tools)
  • 16 slash command configs
  • 5 MCP server configs
  • 18 permission configs

Existing entries are preserved and never overwritten.

3. TUI Registration

The plugin auto-registers @ikieaneh/opencode-kit/tui in tui.json for slash command support in the OpenCode terminal UI.

4. MCP Availability Check

On startup, the plugin reads the capability manifest (superpowers-contract.json) and checks for installed MCPs (lean-ctx, gitnexus, graphify, context7, firecrawl). Missing MCPs produce a warning, not an error.

(back to top)

5. Manifest-Driven Architecture

superpowers-contract.json is the single source of truth for toolkit capabilities. It lists all 40 skills, 18 agents, 5 MCPs, 4 rules, and 22 scripts. Shell scripts and the plugin read from this manifest instead of hardcoding lists. The manifest stays in sync with the package. When you add a skill, it appears in the manifest automatically.

(back to top)

Roadmap

  • Auto-provision agents, skills, rules
  • Auto-config opencode.json
  • ADR reports and session summaries
  • Task complexity detection
  • Graphify integration
  • MCP availability checks
  • Inheritance model with overrides and appends
  • Scoring pipeline (PASS/RETRY/BLOCKED)
  • Multi-language agent support
  • Web-based dashboard
  • VS Code extension

See ROADMAP.md for full details.

(back to top)

Contributing

See CONTRIBUTING.md for full guidelines.

Fork → Feature branch → Commit → PR. Follow the enforcement architecture. All rule enforcements must be tested.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

RizkiRachmanGitHub

Project Link: https://github.com/RizkiRachman/opencode-kit

(back to top)

Acknowledgments

(back to top)