opencode-multiagent 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +83 -0
- package/CHANGELOG.md +31 -0
- package/CONTRIBUTING.md +36 -0
- package/README.md +44 -168
- package/README.tr.md +84 -0
- package/RELEASE.md +68 -0
- package/agents/AGENTS.md +91 -0
- package/agents/auditor.md +67 -23
- package/agents/{worker.md → coder.md} +24 -17
- package/agents/docmaster.md +91 -0
- package/agents/executor.md +63 -79
- package/agents/planner.md +78 -58
- package/agents/reviewer.md +31 -15
- package/agents/scout.md +25 -17
- package/agents/sec-coder.md +83 -0
- package/agents/ui-coder.md +77 -0
- package/commands/board.md +17 -0
- package/commands/execute.md +9 -7
- package/commands/init-deep.md +7 -6
- package/commands/init.md +5 -5
- package/commands/inspect.md +6 -5
- package/commands/plan.md +8 -6
- package/commands/quality.md +4 -3
- package/commands/review.md +5 -3
- package/commands/status.md +5 -3
- package/defaults/AGENTS.md +48 -0
- package/defaults/opencode-multiagent.json +180 -0
- package/defaults/opencode-multiagent.schema.json +265 -0
- package/dist/control-plane.d.ts +4 -0
- package/dist/control-plane.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1916 -0
- package/dist/opencode-multiagent/compiler.d.ts +25 -0
- package/dist/opencode-multiagent/compiler.d.ts.map +1 -0
- package/dist/opencode-multiagent/constants.d.ts +128 -0
- package/dist/opencode-multiagent/constants.d.ts.map +1 -0
- package/dist/opencode-multiagent/correlation.d.ts +21 -0
- package/dist/opencode-multiagent/correlation.d.ts.map +1 -0
- package/dist/opencode-multiagent/defaults.d.ts +10 -0
- package/dist/opencode-multiagent/defaults.d.ts.map +1 -0
- package/dist/opencode-multiagent/hooks.d.ts +62 -0
- package/dist/opencode-multiagent/hooks.d.ts.map +1 -0
- package/dist/opencode-multiagent/log.d.ts +2 -0
- package/dist/opencode-multiagent/log.d.ts.map +1 -0
- package/dist/opencode-multiagent/markdown.d.ts +8 -0
- package/dist/opencode-multiagent/markdown.d.ts.map +1 -0
- package/dist/opencode-multiagent/mcp.d.ts +3 -0
- package/dist/opencode-multiagent/mcp.d.ts.map +1 -0
- package/dist/opencode-multiagent/policy.d.ts +5 -0
- package/dist/opencode-multiagent/policy.d.ts.map +1 -0
- package/dist/opencode-multiagent/quality.d.ts +18 -0
- package/dist/opencode-multiagent/quality.d.ts.map +1 -0
- package/dist/opencode-multiagent/runtime.d.ts +7 -0
- package/dist/opencode-multiagent/runtime.d.ts.map +1 -0
- package/dist/opencode-multiagent/session-tracker.d.ts +32 -0
- package/dist/opencode-multiagent/session-tracker.d.ts.map +1 -0
- package/dist/opencode-multiagent/skills.d.ts +17 -0
- package/dist/opencode-multiagent/skills.d.ts.map +1 -0
- package/dist/opencode-multiagent/supervision.d.ts +26 -0
- package/dist/opencode-multiagent/supervision.d.ts.map +1 -0
- package/dist/opencode-multiagent/task-manager.d.ts +54 -0
- package/dist/opencode-multiagent/task-manager.d.ts.map +1 -0
- package/dist/opencode-multiagent/telemetry.d.ts +28 -0
- package/dist/opencode-multiagent/telemetry.d.ts.map +1 -0
- package/dist/opencode-multiagent/tools.d.ts +87 -0
- package/dist/opencode-multiagent/tools.d.ts.map +1 -0
- package/dist/opencode-multiagent/types.d.ts +36 -0
- package/dist/opencode-multiagent/types.d.ts.map +1 -0
- package/dist/opencode-multiagent/utils.d.ts +9 -0
- package/dist/opencode-multiagent/utils.d.ts.map +1 -0
- package/docs/agents.md +148 -0
- package/docs/agents.tr.md +149 -0
- package/docs/configuration.md +244 -0
- package/docs/configuration.tr.md +244 -0
- package/docs/usage-guide.md +224 -0
- package/docs/usage-guide.tr.md +225 -0
- package/examples/opencode.with-overrides.json +3 -7
- package/package.json +23 -13
- package/skills/AGENTS.md +51 -0
- package/skills/advanced-evaluation/SKILL.md +37 -21
- package/skills/advanced-evaluation/manifest.json +2 -13
- package/skills/cek-context-engineering/SKILL.md +159 -87
- package/skills/cek-context-engineering/manifest.json +1 -3
- package/skills/cek-prompt-engineering/SKILL.md +13 -10
- package/skills/cek-prompt-engineering/manifest.json +1 -3
- package/skills/cek-test-prompt/SKILL.md +38 -28
- package/skills/cek-test-prompt/manifest.json +1 -3
- package/skills/cek-thought-based-reasoning/SKILL.md +75 -21
- package/skills/cek-thought-based-reasoning/manifest.json +1 -3
- package/skills/context-degradation/SKILL.md +14 -13
- package/skills/context-degradation/manifest.json +1 -3
- package/skills/debate/SKILL.md +23 -78
- package/skills/debate/manifest.json +2 -12
- package/skills/design-first/manifest.json +2 -13
- package/skills/dispatching-parallel-agents/SKILL.md +14 -3
- package/skills/dispatching-parallel-agents/manifest.json +1 -4
- package/skills/drift-analysis/SKILL.md +50 -29
- package/skills/drift-analysis/manifest.json +2 -12
- package/skills/evaluation/manifest.json +2 -12
- package/skills/executing-plans/SKILL.md +15 -8
- package/skills/executing-plans/manifest.json +1 -3
- package/skills/handoff-protocols/manifest.json +2 -12
- package/skills/parallel-investigation/SKILL.md +25 -12
- package/skills/parallel-investigation/manifest.json +1 -4
- package/skills/reflexion-critique/SKILL.md +21 -10
- package/skills/reflexion-critique/manifest.json +1 -3
- package/skills/reflexion-reflect/SKILL.md +36 -34
- package/skills/reflexion-reflect/manifest.json +2 -10
- package/skills/root-cause-analysis/manifest.json +2 -13
- package/skills/sadd-judge-with-debate/SKILL.md +50 -26
- package/skills/sadd-judge-with-debate/manifest.json +1 -3
- package/skills/structured-code-review/manifest.json +2 -11
- package/skills/task-decomposition/manifest.json +2 -13
- package/skills/verification-before-completion/manifest.json +2 -15
- package/skills/verification-gates/SKILL.md +27 -19
- package/skills/verification-gates/manifest.json +2 -12
- package/agents/advisor.md +0 -57
- package/agents/critic.md +0 -127
- package/agents/deep-worker.md +0 -65
- package/agents/devil.md +0 -36
- package/agents/heavy-worker.md +0 -68
- package/agents/lead.md +0 -155
- package/agents/librarian.md +0 -62
- package/agents/qa.md +0 -50
- package/agents/quick.md +0 -65
- package/agents/scribe.md +0 -78
- package/agents/strategist.md +0 -63
- package/agents/ui-heavy-worker.md +0 -62
- package/agents/ui-worker.md +0 -69
- package/agents/validator.md +0 -47
- package/defaults/agent-settings.json +0 -102
- package/defaults/agent-settings.schema.json +0 -25
- package/defaults/flags.json +0 -35
- package/defaults/flags.schema.json +0 -119
- package/defaults/mcp-defaults.json +0 -47
- package/defaults/mcp-defaults.schema.json +0 -38
- package/defaults/profiles.json +0 -53
- package/defaults/profiles.schema.json +0 -60
- package/defaults/team-profiles.json +0 -83
- package/src/control-plane.ts +0 -21
- package/src/index.ts +0 -8
- package/src/opencode-multiagent/compiler.ts +0 -168
- package/src/opencode-multiagent/constants.ts +0 -178
- package/src/opencode-multiagent/file-lock.ts +0 -90
- package/src/opencode-multiagent/hooks.ts +0 -599
- package/src/opencode-multiagent/log.ts +0 -12
- package/src/opencode-multiagent/mailbox.ts +0 -287
- package/src/opencode-multiagent/markdown.ts +0 -99
- package/src/opencode-multiagent/mcp.ts +0 -35
- package/src/opencode-multiagent/policy.ts +0 -67
- package/src/opencode-multiagent/quality.ts +0 -140
- package/src/opencode-multiagent/runtime.ts +0 -55
- package/src/opencode-multiagent/skills.ts +0 -144
- package/src/opencode-multiagent/supervision.ts +0 -156
- package/src/opencode-multiagent/task-manager.ts +0 -148
- package/src/opencode-multiagent/team-manager.ts +0 -219
- package/src/opencode-multiagent/team-tools.ts +0 -359
- package/src/opencode-multiagent/telemetry.ts +0 -124
- package/src/opencode-multiagent/utils.ts +0 -54
package/AGENTS.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Build, Test, and Validation
|
|
4
|
+
|
|
5
|
+
- **Setup**: `mise run setup`
|
|
6
|
+
- **Build**: `mise run build`
|
|
7
|
+
- **Dev build**: `mise run dev`
|
|
8
|
+
- **Test**: `mise run test`
|
|
9
|
+
- **Lint**: `mise run lint`
|
|
10
|
+
- **Fix lint**: `mise run lint:fix`
|
|
11
|
+
- **Format**: `mise run format`
|
|
12
|
+
- **Typecheck**: `mise run typecheck`
|
|
13
|
+
- **Validate defaults**: `mise run validate-config`
|
|
14
|
+
- **Package preview**: `mise run pack:dry-run`
|
|
15
|
+
- **Full local check**: `mise run ci:check`
|
|
16
|
+
- **Config server**: `mise run config-server` (starts local HTTP API on port 4242 for reading/writing plugin settings)
|
|
17
|
+
- **Telemetry report**: `mise run telemetry-report` (renders JSONL telemetry summary)
|
|
18
|
+
- **Version bump**: `mise run version` (runs `npm version` for release prep)
|
|
19
|
+
- **Publish**: `mise run publish` (publishes to npm)
|
|
20
|
+
- **Package lint**: `mise run pkgjsonlint` (enforces package.json constraints)
|
|
21
|
+
|
|
22
|
+
## Hard Constraints
|
|
23
|
+
|
|
24
|
+
- **No `scripts` in `package.json`.** The `pkgjsonlint` task enforces this. All tasks live in `.mise/tasks/` as executable files. Never add a `scripts` block to `package.json`.
|
|
25
|
+
- **`no-console` in source code.** ESLint enforces `no-console: error` in `src/`. Use the plugin's logging utilities instead. `scripts/` is exempt.
|
|
26
|
+
- **Bilingual documentation.** Files in `docs/` have Turkish translations with `.tr.md` suffix. When updating a doc, update both language versions.
|
|
27
|
+
|
|
28
|
+
## Packaging Context
|
|
29
|
+
|
|
30
|
+
- Runtime package entry is compiled to `dist/index.js`.
|
|
31
|
+
- Type declarations are emitted to `dist/**/*.d.ts`.
|
|
32
|
+
- Raw ecosystem assets are published from `agents/`, `commands/`, `defaults/`, `docs/`, `skills/`, and `examples/`.
|
|
33
|
+
- `@opencode-ai/plugin` stays external during bundling.
|
|
34
|
+
- `scripts/` contains dev-time TypeScript utilities (validation, config server, telemetry). Not shipped. Run via `tsx`.
|
|
35
|
+
- `hk.pkl` at root is the [hk](https://github.com/jdx/hk) git hook configuration. `mise run setup` installs hooks from it.
|
|
36
|
+
|
|
37
|
+
## Code Style Guidelines
|
|
38
|
+
|
|
39
|
+
### Imports and Modules
|
|
40
|
+
|
|
41
|
+
- Use ESM `import` / `export` syntax.
|
|
42
|
+
- Keep explicit `.ts` extensions for internal source imports.
|
|
43
|
+
- Group imports by external modules first, then local modules.
|
|
44
|
+
|
|
45
|
+
### Formatting
|
|
46
|
+
|
|
47
|
+
- Use Prettier defaults from `.prettierrc`.
|
|
48
|
+
- Prefer single quotes.
|
|
49
|
+
- Keep lines near 100 characters.
|
|
50
|
+
- Use semicolons.
|
|
51
|
+
|
|
52
|
+
### TypeScript
|
|
53
|
+
|
|
54
|
+
- Keep `strict` mode clean.
|
|
55
|
+
- Prefer early returns over nested conditionals.
|
|
56
|
+
- Avoid `any` when a real type is available.
|
|
57
|
+
- Public exports should stay intentionally typed.
|
|
58
|
+
|
|
59
|
+
### Runtime Safety
|
|
60
|
+
|
|
61
|
+
- Preserve asset-path correctness for both source execution and bundled `dist/` execution.
|
|
62
|
+
- Do not inline or remove bundled markdown / JSON directories from packaging.
|
|
63
|
+
- Keep `defaults/` schemas and runtime loaders in sync.
|
|
64
|
+
|
|
65
|
+
## Agent Memory
|
|
66
|
+
|
|
67
|
+
- `.magent/` is the runtime agent memory store (gitignored). Only `docmaster` may write here.
|
|
68
|
+
- Plans go in `.magent/plans/` and must include: Objective, Phases, Acceptance Criteria, Risks, Verification Gates.
|
|
69
|
+
- `.magent/board.json` is the live task board (gitignored). Managed by the plugin automatically.
|
|
70
|
+
|
|
71
|
+
## Testing Notes
|
|
72
|
+
|
|
73
|
+
- Add tests under `tests/`.
|
|
74
|
+
- Prefer focused unit tests for runtime helpers and hook behavior.
|
|
75
|
+
- Keep smoke coverage for the published package entry surface.
|
|
76
|
+
|
|
77
|
+
## Project Context
|
|
78
|
+
|
|
79
|
+
- This repository is an OpenCode plugin package.
|
|
80
|
+
- The package ships compiled JavaScript plus bundled agent, command, defaults, and skill assets.
|
|
81
|
+
- Release automation is driven by Release Please and npm trusted publishing.
|
|
82
|
+
- The plugin ships 9 bundled agent definitions, 9 slash commands, and 22 skill directories.
|
|
83
|
+
- Slash commands in `commands/` use YAML frontmatter (`description`, `agent`, `model`) and `$ARGUMENTS` placeholder.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.4.0](https://github.com/vaur94/opencode-multiagent/compare/v0.3.0...v0.4.0) (2026-03-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add task↔session correlation, automatic lifecycle, quality gates, and concurrency control ([9901065](https://github.com/vaur94/opencode-multiagent/commit/99010651a6fe532d505ed722be56d9e0a952c0a1))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove prerelease strategy so releases publish as latest ([f495780](https://github.com/vaur94/opencode-multiagent/commit/f49578042672047a0d5d480c673eb620db712164))
|
|
14
|
+
* use direct command for pack dry-run in publish workflow ([723f9c7](https://github.com/vaur94/opencode-multiagent/commit/723f9c7879eedbfe444da07d4f0124109f249ae7))
|
|
15
|
+
|
|
16
|
+
## [0.3.0](https://github.com/vaur94/opencode-multiagent/compare/v0.2.1...v0.3.0) (2026-03-15)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* adopt bun packaging and unified settings ([281fb23](https://github.com/vaur94/opencode-multiagent/commit/281fb23eec4af1b640f80de0c7963c7419babed3))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* align release tasks with bun-first packaging ([566ceea](https://github.com/vaur94/opencode-multiagent/commit/566ceeaf5aff653d0c67368caabe123b43e8b0aa))
|
|
27
|
+
* upgrade npm in publish workflow ([54ac5ce](https://github.com/vaur94/opencode-multiagent/commit/54ac5ceff566889d021fd8fa6bb38d0ae89de19a))
|
|
28
|
+
|
|
29
|
+
## [0.2.1](https://github.com/vaur94/opencode-multiagent/releases/tag/v0.2.1)
|
|
30
|
+
|
|
31
|
+
- Baseline release before the Bun template packaging migration.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing.
|
|
4
|
+
|
|
5
|
+
## Reporting Issues
|
|
6
|
+
|
|
7
|
+
- Search existing issues before opening a new one.
|
|
8
|
+
- Include reproduction steps, expected behavior, and actual behavior.
|
|
9
|
+
- For runtime bugs, include OpenCode version, Node or Bun version, and OS details when relevant.
|
|
10
|
+
|
|
11
|
+
> **Note:** Issues inactive for 60 days may be marked stale and closed after 7 days.
|
|
12
|
+
|
|
13
|
+
## Submitting Changes
|
|
14
|
+
|
|
15
|
+
1. Fork the repository.
|
|
16
|
+
2. Create a feature branch (`git checkout -b feat/my-change`).
|
|
17
|
+
3. Make your changes.
|
|
18
|
+
4. Run the local verification suite:
|
|
19
|
+
```bash
|
|
20
|
+
mise run ci:check
|
|
21
|
+
```
|
|
22
|
+
5. Commit using [Conventional Commits](https://www.conventionalcommits.org/) format.
|
|
23
|
+
6. Push and open a Pull Request.
|
|
24
|
+
|
|
25
|
+
## Pull Request Guidelines
|
|
26
|
+
|
|
27
|
+
- PR titles must follow Conventional Commits format.
|
|
28
|
+
- Keep PRs focused on one logical change.
|
|
29
|
+
- Add or update tests when behavior changes.
|
|
30
|
+
- Ensure packaged assets and compiled output assumptions still hold.
|
|
31
|
+
|
|
32
|
+
## Code Style
|
|
33
|
+
|
|
34
|
+
- ESLint and Prettier are the source of truth.
|
|
35
|
+
- Run `mise run lint:fix` and `mise run format` before opening a PR.
|
|
36
|
+
- See `AGENTS.md` for project-specific implementation notes.
|
package/README.md
CHANGED
|
@@ -1,54 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
`opencode-multiagent` is a TypeScript OpenCode plugin package for running a disciplined multi-agent control plane through the standard OpenCode plugin system.
|
|
4
|
-
|
|
5
|
-
- 4 primary agents: `lead`, `critic`, `planner`, `executor`
|
|
6
|
-
- 16 subagents for coding, review, research, docs, and repo mapping
|
|
7
|
-
- plugin-managed MCP defaults and MCP tool enforcement
|
|
8
|
-
- central agent settings, profiles, telemetry, file-lock, and QA reminder guards
|
|
9
|
-
- npm-loaded plugin model through `opencode.json`
|
|
10
|
-
|
|
11
|
-
## Install
|
|
12
|
-
|
|
13
|
-
For plugin consumers, the primary integration is `opencode.json`.
|
|
14
|
-
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"$schema": "https://opencode.ai/config.json",
|
|
18
|
-
"plugin": ["opencode-multiagent"]
|
|
19
|
-
}
|
|
20
|
-
```
|
|
1
|
+
> Language: **English** | [Turkish](README.tr.md)
|
|
21
2
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Example configs:
|
|
25
|
-
|
|
26
|
-
- `examples/opencode.json`
|
|
27
|
-
- `examples/opencode.with-overrides.json`
|
|
28
|
-
|
|
29
|
-
## Development
|
|
30
|
-
|
|
31
|
-
For working on this plugin package itself:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install
|
|
35
|
-
npm run ci:check
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Local OpenCode development can use a linked package or a local package path in `opencode.json` while iterating.
|
|
39
|
-
|
|
40
|
-
## Migration from the old setup
|
|
3
|
+
# opencode-multiagent
|
|
41
4
|
|
|
42
|
-
|
|
5
|
+
`opencode-multiagent` is an OpenCode plugin that installs a structured multi-agent control
|
|
6
|
+
plane through the standard plugin system.
|
|
43
7
|
|
|
44
|
-
|
|
8
|
+
- 2 primary agents: `planner`, `executor`
|
|
9
|
+
- 7 subagents for coding, review, research, and documentation
|
|
10
|
+
- plugin-managed MCP defaults, telemetry, file locks, supervision, and a shared task board
|
|
11
|
+
- compiled npm package with bundled `agents/`, `commands/`, `defaults/`, `skills/`,
|
|
12
|
+
`examples/`, and `docs/`
|
|
45
13
|
|
|
46
|
-
|
|
47
|
-
2. Remove duplicated `mcp` definitions unless you are intentionally overriding a bundled server
|
|
48
|
-
3. Remove duplicated bundled `agent` entries unless you are intentionally overriding a field like `steps`
|
|
49
|
-
4. Remove broad tool permission blocks that were only compensating for the old flat config
|
|
14
|
+
## Quick Start
|
|
50
15
|
|
|
51
|
-
|
|
16
|
+
Add the plugin to `opencode.json`:
|
|
52
17
|
|
|
53
18
|
```json
|
|
54
19
|
{
|
|
@@ -57,153 +22,64 @@ Minimal target:
|
|
|
57
22
|
}
|
|
58
23
|
```
|
|
59
24
|
|
|
60
|
-
|
|
25
|
+
Optional host-side override example:
|
|
61
26
|
|
|
62
27
|
```json
|
|
63
28
|
{
|
|
64
29
|
"$schema": "https://opencode.ai/config.json",
|
|
65
30
|
"plugin": ["opencode-multiagent"],
|
|
66
31
|
"agent": {
|
|
67
|
-
"
|
|
68
|
-
"steps":
|
|
32
|
+
"planner": {
|
|
33
|
+
"steps": 300
|
|
69
34
|
}
|
|
70
35
|
}
|
|
71
36
|
}
|
|
72
37
|
```
|
|
73
38
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### Primary agents
|
|
77
|
-
|
|
78
|
-
- `lead` - single entry point, lifecycle owner, 4-tier triage
|
|
79
|
-
- `critic` - challenge mode plus inspection mode
|
|
80
|
-
- `planner` - durable plan authoring
|
|
81
|
-
- `executor` - task orchestration and validation tiers
|
|
82
|
-
|
|
83
|
-
### Subagents
|
|
84
|
-
|
|
85
|
-
- `scout`
|
|
86
|
-
- `worker`, `heavy-worker`, `deep-worker`, `ui-worker`, `ui-heavy-worker`, `quick`
|
|
87
|
-
- `reviewer`, `validator`, `qa`
|
|
88
|
-
- `advisor`, `strategist`, `auditor`, `devil`
|
|
89
|
-
- `scribe`
|
|
90
|
-
- `librarian`
|
|
91
|
-
|
|
92
|
-
### Lead triage
|
|
93
|
-
|
|
94
|
-
- `Tier 0` - trivial work -> `executor`
|
|
95
|
-
- `Tier 1` - bounded work -> `critic` then `executor`
|
|
96
|
-
- `Tier 2` - complex work -> `critic` then `planner` then `executor`
|
|
97
|
-
- `Tier 3` - investigation or repo-memory work -> `critic` inspection mode
|
|
39
|
+
More examples:
|
|
98
40
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
The plugin `config` hook:
|
|
102
|
-
|
|
103
|
-
- injects bundled markdown agents and commands
|
|
104
|
-
- applies central agent setting overrides from `defaults/agent-settings.json`
|
|
105
|
-
- injects plugin-managed MCP defaults from `defaults/mcp-defaults.json`
|
|
106
|
-
- blocks disallowed MCP tool usage using compiled per-agent permission rules
|
|
107
|
-
- disables native user-facing OpenCode agents when the plugin-managed replacements are active
|
|
108
|
-
- prefers `lead` as `default_agent`
|
|
109
|
-
|
|
110
|
-
The runtime hook layer also provides:
|
|
111
|
-
|
|
112
|
-
- telemetry JSONL logging
|
|
113
|
-
- file-lock protection for overlapping edits across sessions
|
|
114
|
-
- repeated QA handoff reminders
|
|
115
|
-
- quality reminders for verification-like follow-up
|
|
116
|
-
- supervision for child sessions
|
|
117
|
-
|
|
118
|
-
## Plugin-owned MCP behavior
|
|
119
|
-
|
|
120
|
-
Bundled MCP defaults:
|
|
121
|
-
|
|
122
|
-
- `code_index`
|
|
123
|
-
- `repo`
|
|
124
|
-
- `context7`
|
|
125
|
-
- `exa`
|
|
126
|
-
- `gh_grep`
|
|
127
|
-
- `github`
|
|
128
|
-
|
|
129
|
-
Behavior:
|
|
130
|
-
|
|
131
|
-
- if the host config does not define one of these servers, the plugin injects its bundled default
|
|
132
|
-
- if the host config already defines one of these servers, the plugin does not overwrite it
|
|
133
|
-
- agent access is shaped by bundled frontmatter permissions and re-checked in runtime hooks
|
|
134
|
-
|
|
135
|
-
That means the plugin owns the baseline MCP layer, while the host config remains the override layer.
|
|
136
|
-
|
|
137
|
-
## Runtime config
|
|
138
|
-
|
|
139
|
-
User overrides live under `~/.config/opencode/plugins/`:
|
|
140
|
-
|
|
141
|
-
- `opencode-multiagent.flags.json`
|
|
142
|
-
- `opencode-multiagent.agent-settings.json`
|
|
143
|
-
- `opencode-multiagent.profiles.json`
|
|
144
|
-
|
|
145
|
-
Bundled defaults live in `defaults/` and are merged conservatively at runtime.
|
|
146
|
-
|
|
147
|
-
## Scripts
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
npm run typecheck
|
|
151
|
-
npm run validate-config
|
|
152
|
-
npm run config-server
|
|
153
|
-
npm run telemetry-report
|
|
154
|
-
npm run ci:check
|
|
155
|
-
npm run pack:dry-run
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## Release model
|
|
159
|
-
|
|
160
|
-
- CI is npm-based
|
|
161
|
-
- publish flow is npm trusted publishing ready
|
|
162
|
-
- plugin consumption stays `opencode.json -> plugin`
|
|
163
|
-
- the package is source-first TypeScript; OpenCode can load the exported TypeScript entry directly
|
|
164
|
-
|
|
165
|
-
## Publishing
|
|
166
|
-
|
|
167
|
-
This repository is set up for npm trusted publishing through GitHub Actions OIDC.
|
|
41
|
+
- `examples/opencode.json`
|
|
42
|
+
- `examples/opencode.with-overrides.json`
|
|
168
43
|
|
|
169
|
-
|
|
44
|
+
## Documentation
|
|
170
45
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
46
|
+
| Document | English | Turkish | Covers |
|
|
47
|
+
| ----------------------- | ------------------------------------------------ | ------------------------------------------------------ | ----------------------------------------------------------------------- |
|
|
48
|
+
| Configuration Reference | [`docs/configuration.md`](docs/configuration.md) | [`docs/configuration.tr.md`](docs/configuration.tr.md) | Flags, profiles, agent settings, MCP defaults, and override rules |
|
|
49
|
+
| Usage Guide | [`docs/usage-guide.md`](docs/usage-guide.md) | [`docs/usage-guide.tr.md`](docs/usage-guide.tr.md) | Installation, workflows, task board usage, profiles, and MCP enablement |
|
|
50
|
+
| Agent Reference | [`docs/agents.md`](docs/agents.md) | [`docs/agents.tr.md`](docs/agents.tr.md) | All primary agents and subagents, routing, models, and roles |
|
|
175
51
|
|
|
176
|
-
|
|
52
|
+
## Development
|
|
177
53
|
|
|
178
|
-
|
|
54
|
+
This repository follows the `bun-module` tooling model with `mise` tasks.
|
|
179
55
|
|
|
180
56
|
```bash
|
|
181
|
-
|
|
182
|
-
|
|
57
|
+
mise run setup
|
|
58
|
+
mise run ci:check
|
|
183
59
|
```
|
|
184
60
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
If npm requires browser or OTP confirmation, complete that locally first.
|
|
188
|
-
|
|
189
|
-
### Trusted publisher setup
|
|
190
|
-
|
|
191
|
-
After the first successful publish, create the npm trusted publisher mapping for this repository:
|
|
61
|
+
Useful commands:
|
|
192
62
|
|
|
193
63
|
```bash
|
|
194
|
-
|
|
64
|
+
mise run build
|
|
65
|
+
mise run dev
|
|
66
|
+
mise run test
|
|
67
|
+
mise run lint
|
|
68
|
+
mise run lint:fix
|
|
69
|
+
mise run format
|
|
70
|
+
mise run validate-config
|
|
71
|
+
mise run pack:dry-run
|
|
195
72
|
```
|
|
196
73
|
|
|
197
|
-
|
|
74
|
+
## Packaging
|
|
198
75
|
|
|
199
|
-
|
|
76
|
+
- runtime entry: `dist/index.js`
|
|
77
|
+
- type declarations: `dist/**/*.d.ts`
|
|
78
|
+
- bundled assets: `agents/`, `commands/`, `defaults/`, `skills/`, `examples/`, `docs/`
|
|
79
|
+
- external peer dependency: `@opencode-ai/plugin`
|
|
200
80
|
|
|
201
|
-
|
|
202
|
-
- manual `workflow_dispatch` runs verification by default and only publish when the `publish` input is enabled
|
|
203
|
-
- release tags must match `v<package.json version>` before the publish step can run
|
|
81
|
+
Release details live in `RELEASE.md`.
|
|
204
82
|
|
|
205
|
-
##
|
|
83
|
+
## License
|
|
206
84
|
|
|
207
|
-
|
|
208
|
-
- no bundled test suite remains; validation is static and structural by design
|
|
209
|
-
- this package is now aligned to the standard OpenCode plugin loading model instead of the old copied-global-file model
|
|
85
|
+
MIT
|
package/README.tr.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
> Dil: [English](README.md) | **Türkçe**
|
|
2
|
+
|
|
3
|
+
# opencode-multiagent
|
|
4
|
+
|
|
5
|
+
`opencode-multiagent`, standart plugin sistemi uzerinden yapilandirilmis bir multi-agent
|
|
6
|
+
kontrol duzlemi kuran bir OpenCode eklentisidir.
|
|
7
|
+
|
|
8
|
+
- 2 ana ajan: `planner`, `executor`
|
|
9
|
+
- kodlama, review, arastirma ve dokumantasyon icin 7 alt ajan
|
|
10
|
+
- plugin tarafindan yonetilen MCP varsayilanlari, telemetry, file lock, supervision ve ortak task board
|
|
11
|
+
- `agents/`, `commands/`, `defaults/`, `skills/`, `examples/` ve `docs/` ile birlikte yayinlanan derlenmis npm paketi
|
|
12
|
+
|
|
13
|
+
## Hizli Baslangic
|
|
14
|
+
|
|
15
|
+
`opencode.json` dosyasina plugin'i ekleyin:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"$schema": "https://opencode.ai/config.json",
|
|
20
|
+
"plugin": ["opencode-multiagent"]
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Host tarafinda override ornegi:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"$schema": "https://opencode.ai/config.json",
|
|
29
|
+
"plugin": ["opencode-multiagent"],
|
|
30
|
+
"agent": {
|
|
31
|
+
"planner": {
|
|
32
|
+
"steps": 300
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Daha fazla ornek:
|
|
39
|
+
|
|
40
|
+
- `examples/opencode.json`
|
|
41
|
+
- `examples/opencode.with-overrides.json`
|
|
42
|
+
|
|
43
|
+
## Dokumantasyon
|
|
44
|
+
|
|
45
|
+
| Dokuman | English | Turkish | Icerik |
|
|
46
|
+
| ----------------------- | ------------------------------------------------ | ------------------------------------------------------ | ----------------------------------------------------------------------------- |
|
|
47
|
+
| Konfigurasyon Referansi | [`docs/configuration.md`](docs/configuration.md) | [`docs/configuration.tr.md`](docs/configuration.tr.md) | Flag'ler, profiller, agent ayarlari, MCP varsayilanlari ve override kurallari |
|
|
48
|
+
| Kullanim Kilavuzu | [`docs/usage-guide.md`](docs/usage-guide.md) | [`docs/usage-guide.tr.md`](docs/usage-guide.tr.md) | Kurulum, is akisleri, task board kullanimi, profiller ve MCP etkinlestirme |
|
|
49
|
+
| Ajan Referansi | [`docs/agents.md`](docs/agents.md) | [`docs/agents.tr.md`](docs/agents.tr.md) | Tum ana ve alt ajanlar, routing mantigi, modeller ve gorevleri |
|
|
50
|
+
|
|
51
|
+
## Gelistirme
|
|
52
|
+
|
|
53
|
+
Bu depo, `bun-module` arac seti modelini `mise` task'lari ile kullanir.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mise run setup
|
|
57
|
+
mise run ci:check
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Sik kullanilan komutlar:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
mise run build
|
|
64
|
+
mise run dev
|
|
65
|
+
mise run test
|
|
66
|
+
mise run lint
|
|
67
|
+
mise run lint:fix
|
|
68
|
+
mise run format
|
|
69
|
+
mise run validate-config
|
|
70
|
+
mise run pack:dry-run
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Paketleme
|
|
74
|
+
|
|
75
|
+
- runtime entry: `dist/index.js`
|
|
76
|
+
- type declaration dosyalari: `dist/**/*.d.ts`
|
|
77
|
+
- paketlenen varliklar: `agents/`, `commands/`, `defaults/`, `skills/`, `examples/`, `docs/`
|
|
78
|
+
- external peer dependency: `@opencode-ai/plugin`
|
|
79
|
+
|
|
80
|
+
Release detaylari `RELEASE.md` icindedir.
|
|
81
|
+
|
|
82
|
+
## Lisans
|
|
83
|
+
|
|
84
|
+
MIT
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Release Process
|
|
2
|
+
|
|
3
|
+
This project uses Release Please and npm Trusted Publishing for automated releases.
|
|
4
|
+
|
|
5
|
+
It follows two release channels:
|
|
6
|
+
|
|
7
|
+
- **Pre-release**: default branch pushes can publish `x.x.x-next.N` builds to the `next` npm dist-tag.
|
|
8
|
+
- **Stable releases**: Release Please merges create stable releases published to the `latest` npm dist-tag.
|
|
9
|
+
|
|
10
|
+
You can also trigger a manual publish workflow with the `latest` or `next` tag.
|
|
11
|
+
|
|
12
|
+
## First Release
|
|
13
|
+
|
|
14
|
+
Before automated releases work for a brand-new npm package, you must perform the first release manually.
|
|
15
|
+
|
|
16
|
+
### Checklist
|
|
17
|
+
|
|
18
|
+
1. Confirm `package.json` metadata is correct.
|
|
19
|
+
2. Run `npm login`.
|
|
20
|
+
3. Run `mise run build`.
|
|
21
|
+
4. Run `mise run publish --otp <your-2fa-code>`.
|
|
22
|
+
5. In npm package settings, add a trusted publisher for GitHub Actions:
|
|
23
|
+
- **Organization or user**: `vaur94`
|
|
24
|
+
- **Repository**: `opencode-multiagent`
|
|
25
|
+
- **Workflow filename**: `publish.yml`
|
|
26
|
+
|
|
27
|
+
## Conventional Commits
|
|
28
|
+
|
|
29
|
+
We follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
30
|
+
|
|
31
|
+
- `fix:` patches
|
|
32
|
+
- `feat:` minor features
|
|
33
|
+
- `feat!:` or `fix!:` breaking changes
|
|
34
|
+
|
|
35
|
+
While the package is still `0.x`, breaking changes bump the minor version.
|
|
36
|
+
|
|
37
|
+
## Automated Release Flow
|
|
38
|
+
|
|
39
|
+
1. Push conventional commits to `master` or `main`.
|
|
40
|
+
2. Release Please analyzes commits and updates the release PR.
|
|
41
|
+
3. Non-release pushes on the default branch publish a `next` build from that exact commit SHA.
|
|
42
|
+
4. When the release PR is merged, GitHub creates the stable release and publishes `latest` from that exact release commit.
|
|
43
|
+
|
|
44
|
+
## Manual Publish Flow
|
|
45
|
+
|
|
46
|
+
Use GitHub Actions `publish.yml` with the desired npm tag when you need a manual publish.
|
|
47
|
+
|
|
48
|
+
## Do Not
|
|
49
|
+
|
|
50
|
+
- Do not edit Release Please PRs by hand.
|
|
51
|
+
- Do not manually bump versions outside Release Please unless you are intentionally doing a one-off prerelease publish.
|
|
52
|
+
- Do not create long-lived npm tokens for CI; use trusted publishing.
|
|
53
|
+
|
|
54
|
+
## Trusted Publishing
|
|
55
|
+
|
|
56
|
+
This repository uses npm Trusted Publishing with GitHub Actions OIDC:
|
|
57
|
+
|
|
58
|
+
- no long-lived npm tokens are required
|
|
59
|
+
- each publish uses short-lived workflow-bound credentials
|
|
60
|
+
- provenance attestations are generated automatically in CI
|
|
61
|
+
|
|
62
|
+
## Helpful Commands
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
mise run ci:check
|
|
66
|
+
mise run pack:dry-run
|
|
67
|
+
mise run publish --dry-run --tag next
|
|
68
|
+
```
|
package/agents/AGENTS.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# agents/
|
|
2
|
+
|
|
3
|
+
Bundled agent definitions for the multi-agent system. Each `.md` file defines one agent's identity, capabilities, and permissions.
|
|
4
|
+
|
|
5
|
+
## Frontmatter Schema
|
|
6
|
+
|
|
7
|
+
Every agent file starts with a YAML frontmatter block:
|
|
8
|
+
|
|
9
|
+
| Field | Type | Required | Description |
|
|
10
|
+
| ------------- | ------ | -------- | -------------------------------------------------------------------------------------- |
|
|
11
|
+
| `description` | string | yes | One-line agent description |
|
|
12
|
+
| `mode` | string | yes | `primary` (user-facing, can be entry point) or `subagent` (dispatched by other agents) |
|
|
13
|
+
| `model` | string | yes | Model identifier in `provider/model` format (e.g., `anthropic/claude-sonnet-4-6`) |
|
|
14
|
+
| `temperature` | number | yes | Sampling temperature (0–2) |
|
|
15
|
+
| `steps` | number | yes | Maximum tool-use steps per session |
|
|
16
|
+
| `permission` | object | yes | Permission map (see below) |
|
|
17
|
+
|
|
18
|
+
## Permission Model
|
|
19
|
+
|
|
20
|
+
Permissions use a **deny-by-default** model. The top-level `'*': deny` blocks everything, then specific capabilities are explicitly allowed.
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
permission:
|
|
24
|
+
'*': deny # deny everything by default
|
|
25
|
+
read:
|
|
26
|
+
'*': allow # allow reading all files
|
|
27
|
+
'*.env': deny # except .env files
|
|
28
|
+
edit: allow # allow editing (or use glob patterns)
|
|
29
|
+
bash: allow # allow shell execution
|
|
30
|
+
task:
|
|
31
|
+
'*': deny # deny dispatching all agents
|
|
32
|
+
coder: allow # except coder
|
|
33
|
+
reviewer: allow # except reviewer
|
|
34
|
+
skill:
|
|
35
|
+
'*': deny # deny all skills
|
|
36
|
+
executing-plans: allow # except specific ones
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Permission keys
|
|
40
|
+
|
|
41
|
+
- `read`, `edit` — file access (supports glob patterns)
|
|
42
|
+
- `bash` — shell command execution
|
|
43
|
+
- `glob`, `grep`, `list`, `lsp` — code navigation tools
|
|
44
|
+
- `todoread`, `todowrite` — task list management
|
|
45
|
+
- `task` — sub-agent dispatch (nested: agent names)
|
|
46
|
+
- `skill` — skill loading (nested: skill names)
|
|
47
|
+
- `task_create`, `task_update`, `task_list` — shared task board
|
|
48
|
+
- `code_index_*`, `repo_git_*` — MCP tool access
|
|
49
|
+
- `webfetch`, `websearch`, `codesearch` — external access
|
|
50
|
+
- `external_directory` — external directory access
|
|
51
|
+
|
|
52
|
+
## agentSettings Coupling
|
|
53
|
+
|
|
54
|
+
Each agent name must have a matching entry in `defaults/opencode-multiagent.json` under `agentSettings`. This entry controls the runtime model, temperature, and step overrides. The frontmatter values are defaults; `agentSettings` overrides take precedence.
|
|
55
|
+
|
|
56
|
+
## Disabled Native Agents
|
|
57
|
+
|
|
58
|
+
The following agent names are reserved and suppressed by the plugin to prevent conflicts with OpenCode's built-in agents:
|
|
59
|
+
|
|
60
|
+
- `build`, `plan`, `general`, `explore`
|
|
61
|
+
|
|
62
|
+
Do not create agent files with these names.
|
|
63
|
+
|
|
64
|
+
## Current Agents (9)
|
|
65
|
+
|
|
66
|
+
**Primary:** `planner`, `executor`
|
|
67
|
+
|
|
68
|
+
**Subagents:** `coder`, `ui-coder`, `sec-coder`, `reviewer`, `auditor`, `scout`, `docmaster`
|
|
69
|
+
|
|
70
|
+
## Agent Hierarchy
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
planner (triage + planning + inspection)
|
|
74
|
+
├── executor (execution coordination)
|
|
75
|
+
│ ├── coder (standard coding)
|
|
76
|
+
│ │ ├── reviewer (self-review)
|
|
77
|
+
│ │ └── scout (context lookup)
|
|
78
|
+
│ ├── ui-coder (UI/UX coding)
|
|
79
|
+
│ │ ├── reviewer (self-review)
|
|
80
|
+
│ │ └── scout (context lookup)
|
|
81
|
+
│ ├── sec-coder (security-sensitive coding)
|
|
82
|
+
│ │ ├── reviewer (self-review)
|
|
83
|
+
│ │ └── scout (context lookup)
|
|
84
|
+
│ ├── reviewer (quality gate)
|
|
85
|
+
│ ├── scout (research)
|
|
86
|
+
│ └── docmaster (.magent + docs + GitHub)
|
|
87
|
+
├── auditor (plan gap finder)
|
|
88
|
+
├── scout (research)
|
|
89
|
+
├── reviewer (evidence)
|
|
90
|
+
└── docmaster (plan persistence)
|
|
91
|
+
```
|