npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@defend-tech/opencode-optima

v0.1.58

Published

> Don't just code with AI. Build enterprise-grade software.

Downloads

6,593

Readme

Optima

Don't just code with AI. Build enterprise-grade software.

Optima is an OpenCode plugin that installs the Optima Collective: an AI-native software development team composed of specialized agents with distinct roles, handoff rules, and verification gates.

Instead of giving you a single generic assistant flow, Optima gives you a small software company inside OpenCode. The collective includes product, architecture, development, QA, review, and design roles that collaborate through explicit artifacts such as SCRs, task files, evidence packets, and documentation updates.

Install

Add the plugin to your OpenCode config:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@defend-tech/opencode-optima"]
}

Then restart OpenCode, open the target repository, and start talking to the product_manager agent (PMA).

PMA will guide the repository setup flow and, when needed, initialize Optima inside the repo for you. The user does not need to manually run Optima commands to get started.

Configure

During setup, PMA can initialize the repository and create .optima/.config/optima.yaml. Optima reads this file for repository-local defaults, feature flags, policy extraction settings, and per-agent config overrides.

Repository-local policy overrides live in .optima/policies/. If a policy file is not present there, Optima falls back to the bundled plugin default from package assets/policies/ automatically.

Repository-local full agent definitions can live in .optima/agents/. Use this folder to override a bundled agent's base prompt or define a brand new custom repository agent.

Repository-specific additive agent instructions can live in .optima/agent-additions/.

Repository Customization

  • .optima/policies/*.md: shared repository policy overrides used by multiple agents
  • .optima/agents/<agent>.md: full repository-local agent definition that overrides a bundled agent or defines a new custom agent
  • .optima/agent-additions/<agent>.md: additive repository-specific instructions appended to a bundled or custom agent prompt
  • .optima/.config/generated/agents/: generated final prompt dumps for inspection when features.debug_dumps is enabled
  • .optima/.config/generated/policies/: generated reference copies of bundled default policies when policies.extract_defaults is set to all

optima_init also creates README placeholders in these folders so repositories can discover what each folder is for without those README files being treated as agents.

The scaffolded README files in .optima/agents/ and .optima/agent-additions/ also list the common available plugin: and policy: includes that custom agents can reuse.

Runtime prompt resolution prefers repository-local policies, agent definitions, and agent additions when present, while keeping the plugin-owned workflow and role model intact by default.

Optima supports two team presets:

  • mini: PMA + BA + Tech Lead for simple repositories and tiny / standard tasks
  • full: the complete collective, including advanced specialists and workflow_runner

If team_mode is not set in an existing repository, Optima treats it as full by default.

Quick links:

Release

Optima ships for this fork as the npm package @defend-tech/opencode-optima.

  • Local verification: npm run release:check
  • Push to dev: auto-publish prerelease (rc)
  • Push to main: auto-publish stable release

For the full release setup, required secrets, and branch-based versioning behavior, see Releasing.

Team Modes

| Team Mode | Available Agents | Supported Task Complexity | Flow Guide | | :--- | :--- | :--- | :--- | | mini | product_manager, business_analyst, tech_lead | tiny, standard | Mini Team Mode | | full | Full Optima Collective, including workflow_runner, technical_architect, developer, qa_engineer, and ui_ux_designer | tiny, standard, complex | Full Team Mode |

Workflow Agents

The Optima Collective operates like a role-based software development team:

  • product_manager (Product Manager Agent, PMA): Default orchestrator and routing agent.
  • workflow_runner (Workflow Runner): Delegated orchestrator for complex implementation tasks.
  • business_analyst (Business Analyst, BA): Requirements and product-truth steward.
  • technical_architect (Technical Architect): Architecture, interfaces, and impact mapping.
  • tech_lead (Tech Lead): Behavioral verification and technical sign-off.
  • developer (Developer): Implementation and test authoring.
  • qa_engineer (QA Engineer): Verification and test coverage.
  • ui_ux_designer (UI/UX Designer): Visual and interaction review.

Together, these agents act as a coordinated delivery team rather than a loose set of tools. PMA manages the work, specialists own their disciplines, and the workflow enforces that major changes are specified, verified, and documented before closure.

Plugin Tools

Optima provides these plugin tools:

  • optima_init
  • optima_validate
  • optima_repair
  • optima_start_discussion
  • optima_stop_discussion
  • optima_run_workflow
  • optima_prompt_workflow
  • optima_session_create
  • optima_session_prompt
  • optima_session_messages
  • optima_session_probe
  • optima_clickup_sync_summary
  • optima_clickup_start_task
  • optima_clickup_transition
  • optima_clickup_create_subtasks
  • optima_clickup_apply_payload

For arguments, behavior, and team-mode availability, see Plugin Tools.

Task Model

  • Complexity: tiny, standard, complex
  • Track: implementation, investigation, spec
  • Slice: foundation, core, logic, ui, polish, qa, docs

Use complex for work that needs an approved SCR, slice-based decomposition, and workflow_runner. Keep tiny and standard tasks direct and bounded.

Discussion Handoffs

Optima also supports tracked discussion handoffs between product_manager, business_analyst, and tech_lead.

When a direct discussion becomes workflow-relevant:

  • create or update a normal task file
  • assign it to the next responsible agent
  • record the reasoning in the task file's Discussion Record
  • track it in .optima/tasks/current.md under Active Discussions

This keeps product and technical discussions durable, visible, and easy to hand over between agents instead of losing them in chat history.

What Is An SCR?

SCR stands for Spec Change Request.

An SCR is the workflow artifact used to define and approve a meaningful change before implementation starts. It records:

  • the problem being solved
  • the proposed specification change
  • the intended implementation direction
  • acceptance criteria
  • review and approval state

Optima uses SCRs so the team does not jump straight from a vague request into code. The SCR gives the Product Manager Agent, Business Analyst, Tech Lead, and other specialists a shared source of truth for what the change is supposed to achieve before delivery work begins.

In practice, SCRs help:

  • reduce missed requirements and hidden assumptions
  • separate proposed change from implemented truth
  • make complex work reviewable before coding starts
  • provide a stable anchor for decomposition into tasks

Task Flow

Optima uses different operating flows depending on the configured team mode.

Parallelism

Until dedicated git worktree support lands, Optima supports limited parallelism:

  • one shared-worktree implementation task at a time
  • parallel investigation and spec tasks when they avoid conflicting edits

For deeper workflow details, use the linked docs above.