# OpenCodeKit

OpenCodeKit is a Bun + TypeScript CLI and template for running OpenCode with an opinionated multi-agent workflow.

## What This Template Includes

- Beads-first lifecycle: `/create` -> `/start` -> `/ship`
- Custom agents in `.opencode/agent/` (9 in this template)
- Slash commands in `.opencode/command/` (14 workflows)
- Skills in `.opencode/skill/` (large curated library)
- Custom tools in `.opencode/tool/` (memory tools, `observation`, `swarm`, `context7`, `grepsearch`, etc.)
- Plugins in `.opencode/plugin/` for memory, session continuity, swarm workflow enforcement, and skill MCP

## Quick Start

```bash
# Scaffold or initialize
npx opencodekit init

# Or in this repository during development
bun install
bun run src/index.ts --help
```

## Core Slash Command Workflow

Use these inside OpenCode:

1. `/create <description>` - create bead and PRD
2. `/start <bead-id>` - claim bead and prepare branch/workspace
3. `/ship <bead-id>` - implement, verify, review, close

## Available Slash Commands (Template)

- `/create`
- `/start`
- `/ship`
- `/plan`
- `/status`
- `/pr`
- `/resume`
- `/handoff`
- `/research`
- `/review-codebase`
- `/verify`
- `/design`
- `/ui-review`
- `/init`

## CLI Command Surface (`ock`)

The packaged CLI commands are:

- `ock init`
- `ock agent <list|create|view|remove>`
- `ock command <list|create|show|delete>`
- `ock config [action]`
- `ock doctor`
- `ock status`
- `ock upgrade`
- `ock completion [shell]`
- `ock tui`

See `CLI.md` for command usage details.

## Repository Layout

```text
src/                  # CLI implementation
.opencode/            # Agents, commands, skills, tools, plugins
.beads/               # Task tracking database and artifacts
build.ts              # Build pipeline (bundles .opencode template)
dist/                 # Build output (generated)
```

## Development

```bash
npm run typecheck
npm run lint
npm run test
npm run build
```

## Documentation

- `CLI.md` - `ock` command reference
- `.opencode/README.md` - project OpenCode configuration guide
- `.opencode/AGENTS.md` - global agent rules and operating constraints
- `.opencode/plugin/README.md` - plugin architecture and tooling

## Notes

- Do not edit `dist/` directly; it is generated by `npm run build`.
- This repository targets Bun runtime compatibility (`engines.bun >= 1.3.2`).
