Package Exports
- opencode-kolchoz-loop
Readme
opencode-kolchoz-loop
Multi-agent Ralph Loop plugin for OpenCode.
Four agents work in a Ralph Loop workflow and autonomously execute tasks from requirements analysis to code review.
Agents
| Agent | Role | Mode | Color |
|---|---|---|---|
| Januszek 👔 | Orchestrator - talks to the user, delegates work | primary | orange |
| Grazynka 📋 | Requirements analyst - creates PRDs with user stories | subagent | purple |
| Areczek 🔧 | Builder - implements code, tests, commits | subagent | cyan |
| Anetka 🔍 | Reviewer - quality gate: tests, lint, typecheck, diff | subagent | pink |
Installation
Add the package to opencode.json in your project:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-kolchoz-loop"]
}On the next OpenCode start it will automatically:
- Install the package via Bun
- Initialize
beads(bd init) if needed - Synchronize bundled markdown agents into the global OpenCode directory:
~/.config/opencode/agents/(or$XDG_CONFIG_HOME/opencode/agents/)- existing files are updated when package content changes
- Ensure
AGENTS.mdcontains aREQUIRED SKILLSbaseline section
The plugin does not copy agents into the current project's .opencode/agents/.
If agents are not visible immediately in the current UI session, restart OpenCode once.
From a private npm registry (internal)
{
"plugin": ["@your-company/opencode-kolchoz-loop"]
}From a local folder (testing)
Copy the full src/ directory into .opencode/plugins/ in your project:
cp -r src/ /path/to/project/.opencode/plugins/kolchoz-loop/Usage
Interactive mode
After OpenCode starts, Januszek is the default agent. Describe the task:
Implement an authentication system with OAuth2 and 2FAJanuszek then:
- Delegates requirement clarification to
@grazynka - Grazynka creates a PRD with user stories
- Januszek delegates implementation to
@areczek - Areczek codes, tests, and commits
@anetkaperforms code review- If FAIL -> Areczek fixes. If PASS -> next story.
- After PRD completion -> Januszek reports back.
Manual agent calls
@grazynka Analyze requirements for the payments module
@areczek Fetch the next task and implement it
@anetka Review the latest changesCheck status
Januszek uses kolchoz_status, but you can also inspect state manually:
bd list --type epic --label kolchoz:session --label kolchoz:active --json
bd list --parent <epicId> --jsonReset (new task)
kolchoz_reset closes the active beads session while preserving accumulated knowledge in AGENTS.md.
File structure
After installation this appears in your project:
your-project/
├── .beads/ ← beads data (tasks, epic, history)
└── AGENTS.md ← accumulated knowledge, COMMITTEDGlobal agent files are managed here:
~/.config/opencode/agents/Tools (custom tools)
The plugin registers 8 tools:
| Tool | Used by | Description |
|---|---|---|
kolchoz_start_prd |
Grazynka | Starts a PRD session |
kolchoz_add_story |
Grazynka | Adds one user story to the session |
kolchoz_next_task |
Areczek | Fetches next task |
kolchoz_submit_for_review |
Areczek | Submits work for review |
kolchoz_review_verdict |
Anetka | Pass/fail verdict |
kolchoz_status |
Everyone | Loop status |
kolchoz_learn |
Everyone | Writes knowledge to AGENTS.md |
kolchoz_reset |
Januszek | Closes active session, keeps knowledge |
Model configuration
You can override agent models in opencode.json:
{
"agent": {
"januszek": { "model": "<provider>/<model-name>" },
"areczek": { "model": "<provider>/<model-name>" },
"anetka": { "model": "<provider>/<model-name>" }
}
}Commit gate
Before Areczek can submit a story for review, kolchoz_submit_for_review validates Git:
- no uncommitted changes in the working tree (excluding
.beads/**) - latest commit message starts with
feat(<storyId>):
If either check fails, submission is blocked until Areczek creates the correct commit.
After finishing a full PRD/session, commit .beads updates to keep beads history in the repository.
Required skills baseline
During setup, the plugin ensures AGENTS.md contains baseline skills:
vercel-labs/skills@find-skillsgithub/awesome-copilot@git-commit
Grazynka also adds project-specific skill: ... entries to PRD constraints when needed.
Compound engineering
The system builds knowledge in AGENTS.md automatically:
- Areczek discovers a pattern ->
kolchoz_learn("pattern", "...") - Anetka discovers a gotcha ->
kolchoz_learn("gotcha", "...") - Future sessions read AGENTS.md -> better context -> better outcomes
Release automation
This repository includes GitHub Actions workflows for a release cycle:
- Run
Prepare Release Draftmanually from GitHub Actions onmainormaster. - Choose
RELEASE_TYPE:major,minor, orpatch. - Workflow bumps
package.jsonversion, commits it, creates a tag, and opens a draft release. - Publish the draft release in GitHub Releases.
- Publishing the release triggers npm publishing from the release tag.
Workflow files:
.github/workflows/prepare-release.yml.github/workflows/publish-on-release.yml
Required npm setup:
- Configure npm Trusted Publisher for this GitHub repository and workflow file
publish-on-release.yml. - Trusted publishing uses GitHub OIDC, so
NPM_TOKENis not required for package publishing.
Important:
Prepare Release Draftguarantees matchingtagandpackage.jsonversion.- If branch protection blocks direct pushes by Actions, allow
GITHUB_TOKENpushes for this workflow.
License
MIT