opencode-magi 0.10.0 → 0.11.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.
Files changed (126) hide show
  1. package/README.ja.md +254 -0
  2. package/README.md +31 -26
  3. package/dist/commands.js +11 -9
  4. package/dist/config/index.js +2 -0
  5. package/dist/config/resolve.js +120 -246
  6. package/dist/config/validate.js +103 -1110
  7. package/dist/constant.js +135 -0
  8. package/dist/graphql/index.generated.js +125 -0
  9. package/dist/graphql/index.js +49 -0
  10. package/dist/index.js +12 -800
  11. package/dist/magi.js +357 -0
  12. package/dist/permissions/common.json +22 -22
  13. package/dist/permissions/editor.json +12 -12
  14. package/dist/prompts/index.js +98 -0
  15. package/dist/prompts/merge/ci-classification/output-contract.md +22 -0
  16. package/dist/prompts/merge/ci-classification/task.md +10 -0
  17. package/dist/prompts/merge/ci-classification/validate.json +20 -0
  18. package/dist/prompts/merge/conflict/output-contract.md +12 -0
  19. package/dist/prompts/merge/conflict/task.md +9 -0
  20. package/dist/prompts/merge/conflict/validate.json +4 -0
  21. package/dist/prompts/merge/edit/output-contract.md +26 -0
  22. package/dist/prompts/merge/edit/task.md +10 -0
  23. package/dist/prompts/merge/edit/validate.json +60 -0
  24. package/dist/prompts/review/ci-classification/output-contract.md +21 -0
  25. package/dist/prompts/review/ci-classification/task.md +7 -0
  26. package/dist/prompts/review/ci-classification/validate.json +20 -0
  27. package/dist/prompts/review/close-reconsideration/output-contract.md +21 -0
  28. package/dist/prompts/review/close-reconsideration/task.md +6 -0
  29. package/dist/prompts/review/close-reconsideration/validate.json +44 -0
  30. package/dist/prompts/review/comment/output-contract.md +11 -0
  31. package/dist/prompts/review/comment/task.md +3 -0
  32. package/dist/prompts/review/comment/validate.json +8 -0
  33. package/dist/prompts/review/finding-validation/output-contract.md +25 -0
  34. package/dist/prompts/{templates/review/finding-validation.md → review/finding-validation/task.md} +2 -3
  35. package/dist/prompts/review/finding-validation/validate.json +21 -0
  36. package/dist/prompts/review/rereview/output-contract.md +30 -0
  37. package/dist/prompts/{templates/review/rereview.md → review/rereview/task.md} +8 -11
  38. package/dist/prompts/review/rereview/validate.json +87 -0
  39. package/dist/prompts/review/review/output-contract.md +25 -0
  40. package/dist/prompts/{templates/review/review.md → review/review/task.md} +2 -5
  41. package/dist/prompts/review/review/validate.json +54 -0
  42. package/dist/prompts/triage/acceptance/output-contract.md +16 -0
  43. package/dist/prompts/triage/acceptance/validate.json +23 -0
  44. package/dist/prompts/triage/category/output-contract.md +16 -0
  45. package/dist/prompts/triage/category/validate.json +23 -0
  46. package/dist/prompts/triage/comment-classification/output-contract.md +15 -0
  47. package/dist/prompts/triage/comment-classification/validate.json +28 -0
  48. package/dist/prompts/triage/create/output-contract.md +28 -0
  49. package/dist/prompts/triage/create/validate.json +73 -0
  50. package/dist/prompts/triage/deplicate/output-contract.md +16 -0
  51. package/dist/prompts/triage/deplicate/validate.json +20 -0
  52. package/dist/prompts/triage/existing/output-contract.md +16 -0
  53. package/dist/prompts/triage/existing/validate.json +13 -0
  54. package/dist/prompts/triage/reconsider/output-contract.md +16 -0
  55. package/dist/prompts/triage/reconsider/validate.json +23 -0
  56. package/dist/prompts/triage/signal/output-contract.md +19 -0
  57. package/dist/prompts/triage/signal/validate.json +18 -0
  58. package/dist/tools/clear/index.js +21 -0
  59. package/dist/tools/index.js +12 -0
  60. package/dist/tools/merge/action.js +47 -0
  61. package/dist/tools/merge/context.js +118 -0
  62. package/dist/tools/merge/editor.js +264 -0
  63. package/dist/tools/merge/index.js +151 -0
  64. package/dist/tools/merge/index.type.js +1 -0
  65. package/dist/tools/merge/merge.js +42 -0
  66. package/dist/tools/merge/report.js +73 -0
  67. package/dist/tools/review/action.js +429 -0
  68. package/dist/tools/review/check.js +295 -0
  69. package/dist/tools/review/context.js +258 -0
  70. package/dist/tools/review/index.js +104 -0
  71. package/dist/tools/review/index.type.js +1 -0
  72. package/dist/tools/review/report.js +143 -0
  73. package/dist/tools/review/review.js +145 -0
  74. package/dist/tools/review/reviewer.js +409 -0
  75. package/dist/tools/triage/index.js +16 -0
  76. package/dist/tools/validate/index.js +28 -0
  77. package/dist/utils/array.js +6 -0
  78. package/dist/utils/assertion.js +38 -0
  79. package/dist/utils/exec.js +14 -0
  80. package/dist/utils/fs.js +24 -0
  81. package/dist/utils/function.js +37 -0
  82. package/dist/utils/github.js +63 -0
  83. package/dist/utils/index.js +10 -0
  84. package/dist/utils/index.type.js +1 -0
  85. package/dist/utils/object.js +21 -0
  86. package/dist/utils/opencode.js +25 -0
  87. package/dist/utils/string.js +38 -0
  88. package/dist/utils/worker.js +30 -0
  89. package/package.json +20 -8
  90. package/schema.json +6 -4
  91. package/dist/config/load.js +0 -62
  92. package/dist/config/output.js +0 -25
  93. package/dist/config/worktree.js +0 -25
  94. package/dist/github/commands.js +0 -905
  95. package/dist/github/retry.js +0 -44
  96. package/dist/orchestrator/abort.js +0 -9
  97. package/dist/orchestrator/ci.js +0 -579
  98. package/dist/orchestrator/findings.js +0 -88
  99. package/dist/orchestrator/inline-comments.js +0 -73
  100. package/dist/orchestrator/majority.js +0 -62
  101. package/dist/orchestrator/merge.js +0 -1260
  102. package/dist/orchestrator/model.js +0 -216
  103. package/dist/orchestrator/pool.js +0 -15
  104. package/dist/orchestrator/report.js +0 -175
  105. package/dist/orchestrator/review-context.js +0 -342
  106. package/dist/orchestrator/review.js +0 -1480
  107. package/dist/orchestrator/run-manager.js +0 -2132
  108. package/dist/orchestrator/safety.js +0 -44
  109. package/dist/orchestrator/triage.js +0 -1370
  110. package/dist/prompts/compose.js +0 -473
  111. package/dist/prompts/contracts.js +0 -300
  112. package/dist/prompts/output.js +0 -401
  113. package/dist/prompts/templates/merge/ci-classification.md +0 -16
  114. package/dist/prompts/templates/merge/conflict.md +0 -10
  115. package/dist/prompts/templates/merge/edit.md +0 -15
  116. package/dist/prompts/templates/review/ci-classification.md +0 -9
  117. package/dist/prompts/templates/review/close-reconsideration.md +0 -6
  118. /package/dist/{types.js → config/index.type.js} +0 -0
  119. /package/dist/prompts/{templates/triage/acceptance.md → triage/acceptance/task.md} +0 -0
  120. /package/dist/prompts/{templates/triage/category.md → triage/category/task.md} +0 -0
  121. /package/dist/prompts/{templates/triage/comment-classification.md → triage/comment-classification/task.md} +0 -0
  122. /package/dist/prompts/{templates/triage/create.md → triage/create/task.md} +0 -0
  123. /package/dist/prompts/{templates/triage/duplicate.md → triage/deplicate/task.md} +0 -0
  124. /package/dist/prompts/{templates/triage/existing-pr.md → triage/existing/task.md} +0 -0
  125. /package/dist/prompts/{templates/triage/reconsider.md → triage/reconsider/task.md} +0 -0
  126. /package/dist/prompts/{templates/triage/signal.md → triage/signal/task.md} +0 -0
package/README.ja.md ADDED
@@ -0,0 +1,254 @@
1
+ <p align='center'>
2
+ <a href='./README.md'>English</a> | 日本語
3
+ </p>
4
+
5
+ # OpenCode Magi
6
+
7
+ OpenCodeのマルチエージェントによるGitHubプルリクエストレビューとマージのオーケストレーション。
8
+
9
+ ## なぜ、Magiなのか?
10
+
11
+ Magiは、三賢者に着想を得ています。独立した視点が集まり、共に意思決定する仕組みです。
12
+
13
+ 1つのAIモデルだけを盲目的に信頼するには、まだ十分ではありません。OpenCode Magiは、複数のモデルに同じプルリクエストを異なる視点から検査させ、過半数を必須にすることで信頼性を高めます。
14
+
15
+ 一つのAIの回答を最終判断として扱うことせず、多様な観点、明示的な意見の不一致、そして合意に裏付けられた最終判断によって、AIレビューを実際のチームに近づけることです。
16
+
17
+ ## 機能
18
+
19
+ OpenCode Magiは、人間がGitHub上で行っているレビューサイクルを再現します。複数のレビュアーがプルリクエストを確認し、変更を要求し、修正を検証し、スレッドを解決し、準備ができたら承認します。
20
+
21
+ - 3人以上のレビュアーによる、多数決制のマルチエージェントレビュー。
22
+ - 変更リクエストを投稿する前に多数決を行い、過半数に承認された指摘だけをリクエストします。
23
+ - デフォルトのシングルモードに加え、複数のGitHubアカウントを使用するマルチモードも用意しています。マルチモードでは、まるでチームでレビューを行っているかのように、各レビュアーが異なるGitHubアカウントでレビューを行うことができます。
24
+ - 編集やスレッドの返信があるPRの再レビューに対応。修正済みのスレッドを解決し、修正に応じてレビュアーは承認し、まだ修正が必要な指摘は追加のコメントとして投稿します。
25
+ - 任意のマージおよびクローズ自動化。エディターエージェントが作者の代わりに応答し、変更リクエストされた指摘を修正し、必要に応じてコミットをプッシュし、PRがマージ、またはクローズできるまでレビュアーとエディターのサイクルを繰り返します。
26
+ - レビュアーやエディターごとに権限の割り振り、フェーズごとのプロンプト、ペルソナを設定できます。
27
+
28
+ ## クイックスタート
29
+
30
+ ### インストール
31
+
32
+ `opencode.json`にプラグインを追加します。
33
+
34
+ ```json
35
+ {
36
+ "$schema": "https://opencode.ai/config.json",
37
+ "plugin": ["opencode-magi"]
38
+ }
39
+ ```
40
+
41
+ OpenCodeを再起動します。これで完了です。
42
+
43
+ ### 設定
44
+
45
+ グローバルのデフォルトは `~/.config/opencode/magi.json`に、プロジェクトごとの上書きは、`<project>/.opencode/magi.json`に設定します。
46
+
47
+ Magiの設定ファイルは、OpenCodeではなくOpenCode Magiによってマージされます。プロジェクトの設定ファイルは、グローバルの設定ファイルをオーバーライドします。
48
+
49
+ 1. `~/.config/opencode/magi.json`
50
+ 2. `<project>/.opencode/magi.json`
51
+
52
+ #### グローバル設定を作成する
53
+
54
+ プロジェクト設定に値が存在する場合、グローバル設定値を設定する必要はありません。ただし、複数のプロジェクトで共通の値を適用したい場合は、グローバル設定が便利です。
55
+
56
+ ```bash
57
+ mkdir -p ~/.config/opencode
58
+ touch ~/.config/opencode/magi.json
59
+ ```
60
+
61
+ 設定ファイルに次の内容を追加します。
62
+
63
+ ```json
64
+ {
65
+ "$schema": "https://raw.githubusercontent.com/magi-ai/opencode-magi/main/schema.json",
66
+ "account": "your-account",
67
+ "agents": {
68
+ "refs": {
69
+ "account-1": {
70
+ "model": "openai/gpt-5.5"
71
+ },
72
+ "account-2": {
73
+ "model": "anthropic/claude-opus-4-7"
74
+ },
75
+ "account-3": {
76
+ "model": "opencode/kimi-k2-6"
77
+ }
78
+ }
79
+ },
80
+ "review": {
81
+ "reviewers": [
82
+ {
83
+ "ref": "account-1"
84
+ },
85
+ {
86
+ "ref": "account-2"
87
+ },
88
+ {
89
+ "ref": "account-3"
90
+ }
91
+ ]
92
+ }
93
+ }
94
+ ```
95
+
96
+ デフォルトでは、シングルモード(`mode: "single"`)です。複数のアカウントを使用するマルチモードにする場合は、`mode: "multi"`を設定し、各エージェントごとにアカウントを設定します。
97
+
98
+ ```json
99
+ {
100
+ "mode": "multi",
101
+ "review": {
102
+ "reviewers": [
103
+ {
104
+ "id": "general",
105
+ "model": "openai/gpt-5.5",
106
+ "account": "account-1"
107
+ },
108
+ {
109
+ "id": "security",
110
+ "model": "anthropic/claude-opus-4-7",
111
+ "account": "account-2"
112
+ },
113
+ {
114
+ "id": "compat",
115
+ "model": "opencode/kimi-k2-6",
116
+ "account": "account-3"
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ ```
122
+
123
+ #### プロジェクト設定を作成する
124
+
125
+ Magiの設定ファイルは少なくとも1つ必要です。プロジェクト固有の設定には、プロジェクト設定を使用します。
126
+
127
+ ```bash
128
+ cd <project>
129
+ mkdir -p .opencode
130
+ touch .opencode/magi.json
131
+ ```
132
+
133
+ 設定ファイルに次の内容を追加します。
134
+
135
+ ```json
136
+ {
137
+ "$schema": "https://raw.githubusercontent.com/magi-ai/opencode-magi/main/schema.json",
138
+ "account": "your-account",
139
+ "github": {
140
+ "owner": "your-owner",
141
+ "repo": "your-repo"
142
+ },
143
+ "agents": {
144
+ "refs": {
145
+ "account-1": {
146
+ "model": "openai/gpt-5.5"
147
+ },
148
+ "account-2": {
149
+ "model": "anthropic/claude-opus-4-7"
150
+ },
151
+ "account-3": {
152
+ "model": "opencode/kimi-k2-6"
153
+ },
154
+ "account-4": {
155
+ "model": "openai/gpt-5.5",
156
+ "author": {
157
+ "name": "account-4",
158
+ "email": "your-email@example.com"
159
+ }
160
+ }
161
+ }
162
+ },
163
+ "review": {
164
+ "reviewers": [
165
+ {
166
+ "ref": "account-1"
167
+ },
168
+ {
169
+ "ref": "account-2"
170
+ },
171
+ {
172
+ "ref": "account-3"
173
+ }
174
+ ]
175
+ },
176
+ "merge": {
177
+ "editor": {
178
+ "ref": "account-4"
179
+ }
180
+ },
181
+ "triage": {
182
+ "voters": [
183
+ {
184
+ "ref": "account-1"
185
+ },
186
+ {
187
+ "ref": "account-2"
188
+ },
189
+ {
190
+ "ref": "account-3"
191
+ }
192
+ ]
193
+ }
194
+ }
195
+ ```
196
+
197
+ `agents.refs`のキーを`ref`に設定すると、そのエージェントの設定が展開されます。`ref`以外でフィールドを設定した場合は、そのエージェントの設定をオーバーライドします。
198
+
199
+ `model`には、文字列(`provider/model`)、`id`と`variant`のオブジェクト、または配列を指定できます。配列は、先頭から順々に利用可能なモデルかどうかを検証し、利用可能なモデルが見つかったら、そのモデルを採用します。
200
+
201
+ ```json
202
+ {
203
+ "model": {
204
+ "id": "openai/gpt-5.1",
205
+ "variant": "high"
206
+ }
207
+ }
208
+ ```
209
+
210
+ ```json
211
+ {
212
+ "model": [
213
+ {
214
+ "id": "anthropic/claude-opus-4-7",
215
+ "variant": "high"
216
+ },
217
+ {
218
+ "id": "openai/gpt-5.5",
219
+ "variant": "medium"
220
+ }
221
+ ]
222
+ }
223
+ ```
224
+
225
+ #### 設定を検証する
226
+
227
+ グローバル設定またはプロジェクト設定を作成または更新した後、検証します。
228
+
229
+ ```txt
230
+ /magi:validate
231
+ ```
232
+
233
+ ### コマンド
234
+
235
+ OpenCodeからコマンドを実行します。
236
+
237
+ ```txt
238
+ /magi:review 123 124
239
+ /magi:review 123 --dry-run
240
+ /magi:merge 123
241
+ /magi:merge 123 --dry-run
242
+ /magi:triage 47 48
243
+ /magi:triage 47 --dry-run
244
+ /magi:clear
245
+ ```
246
+
247
+ ## ドキュメント
248
+
249
+ - [コマンド](docs/commands/index.ja.md)
250
+ - [設定](docs/config.ja.md)
251
+
252
+ ## コントリビュート
253
+
254
+ 貢献してみませんか?素晴らしいです!貢献を支援するための [コントリビューションガイド](CONTRIBUTING.ja.md) を用意しています。
package/README.md CHANGED
@@ -1,27 +1,29 @@
1
+ <p align='center'>
2
+ English | <a href='./README.ja.md'>日本語</a>
3
+ </p>
4
+
1
5
  # OpenCode Magi
2
6
 
3
7
  Multi-agent GitHub pull request review and merge orchestration for OpenCode.
4
8
 
5
9
  ## Why Magi?
6
10
 
7
- Magi is inspired by the three wise men: independent perspectives that reach a decision together.
11
+ Magi is inspired by the three wise men: independent perspectives that gather and make decisions together.
8
12
 
9
- One AI model is still not enough to trust blindly. OpenCode Magi improves confidence by asking multiple models to inspect the same pull request from different perspectives, then requiring an odd-number majority before approving, requesting changes, or closing.
13
+ One AI model is still not enough to trust blindly. OpenCode Magi improves confidence by asking multiple models to inspect the same pull request from different perspectives, then requiring a majority decision.
10
14
 
11
- The goal is not to treat a single AI answer as final, but to make AI review behave more like a real team: diverse viewpoints, explicit disagreement, and a final decision backed by consensus.
15
+ Instead of treating one AI answer as the final judgment, the goal is to make AI review closer to a real team through diverse viewpoints, explicit disagreement, and final decisions backed by consensus.
12
16
 
13
17
  ## Features
14
18
 
15
- OpenCode Magi recreates the review cycle humans already run on GitHub: multiple reviewers inspect a pull request, request changes, verify fixes, resolve threads, and approve when the work is ready.
19
+ OpenCode Magi recreates the review cycle humans already run on GitHub. Multiple reviewers inspect a pull request, request changes, verify fixes, resolve threads, and approve when the work is ready.
16
20
 
17
- - Multi-agent reviews with an odd-number majority of 3 or more reviewers.
18
- - Optional unanimous approval policy for merge automation when every reviewer must approve before a PR is merged.
19
- - Finding-level voting before posting change requests, so only findings accepted by reviewer majority are submitted.
20
- - Single-account identity mode by default, where one GitHub account posts consensus-backed review and triage results for multiple logical agents, plus multi-account mode for setups that need separate GitHub identities.
21
- - Re-review support for edited PRs: fixed threads are resolved, satisfied reviewers approve, and remaining issues are posted as additional comments.
22
- - Optional merge and close automation where an editor agent responds on behalf of the author, fixes changes it agrees with, pushes commits when needed, and repeats the reviewer/editor cycle until the PR can be approved, queued, merged, or closed.
23
- - Per-agent OpenCode permissions for reviewer, CI classifier, and editor child sessions.
24
- - Prompt customization that adds repository-specific guidance without replacing the fixed output contracts.
21
+ - Multi-agent reviews with majority voting by 3 or more reviewers.
22
+ - Majority voting before posting change requests, so only findings accepted by the majority are requested.
23
+ - Single mode by default, plus multi mode for using multiple GitHub accounts. In multi mode, each reviewer can review from a different GitHub account, as if a team were reviewing together.
24
+ - Re-review support for PRs with edits or thread replies. Fixed threads are resolved, reviewers approve based on fixes, and findings that still need changes are posted as additional comments.
25
+ - Optional merge and close automation. An editor agent responds on behalf of the author, fixes requested findings, pushes commits when needed, and repeats the reviewer/editor cycle until the PR can be merged or closed.
26
+ - Configure permissions, phase-specific prompts, and personas for each reviewer and editor.
25
27
 
26
28
  ## Quick Start
27
29
 
@@ -42,7 +44,7 @@ Restart OpenCode. Done.
42
44
 
43
45
  Configure global defaults in `~/.config/opencode/magi.json` and project overrides in `<project>/.opencode/magi.json`.
44
46
 
45
- Magi config files are merged by OpenCode Magi, not by OpenCode. Priority, lowest to highest.
47
+ Magi config files are merged by OpenCode Magi, not by OpenCode. The project config file overrides the global config file.
46
48
 
47
49
  1. `~/.config/opencode/magi.json`
48
50
  2. `<project>/.opencode/magi.json`
@@ -85,9 +87,7 @@ Add the following content to the configuration file.
85
87
  }
86
88
  ```
87
89
 
88
- By default, `mode` is `"single"`. Magi uses one top-level `account` to post reviewer- and triage-originated GitHub mutations while still running multiple logical agents and preserving majority voting, finding validation, and close reconsideration. The account must be authenticated with `gh auth token --user <account>`.
89
-
90
- For advanced team setups that need GitHub to see separate review or triage identities, set top-level `mode: "multi"` and configure unique accounts for each reviewer or triage voter.
90
+ By default, Magi uses single mode (`mode: "single"`). To use multi mode with multiple accounts, set `mode: "multi"` and configure an account for each reviewer.
91
91
 
92
92
  ```json
93
93
  {
@@ -108,7 +108,7 @@ For advanced team setups that need GitHub to see separate review or triage ident
108
108
 
109
109
  #### Set project config
110
110
 
111
- Global config is optional, but project config is required.
111
+ At least one Magi config file is required. Use project config for project-specific settings.
112
112
 
113
113
  ```bash
114
114
  cd <project>
@@ -139,7 +139,6 @@ Add the following content to the configuration file.
139
139
  },
140
140
  "account-4": {
141
141
  "model": "openai/gpt-5.5",
142
- "account": "account-4",
143
142
  "author": {
144
143
  "name": "account-4",
145
144
  "email": "your-email@example.com"
@@ -167,20 +166,27 @@ Add the following content to the configuration file.
167
166
  }
168
167
  ```
169
168
 
170
- Entries with `ref` are expanded from `agents.refs`. Fields set alongside `ref` override fields from the preset.
169
+ Set an `agents.refs` key as `ref` to expand that agent's configuration. Fields set outside `ref` override that agent's configuration.
171
170
 
172
- `model` can be a single `provider/model` string, a single object with `id` and `options`, or an ordered candidate array. Candidate arrays are resolved during validation against OpenCode's model catalog; the first available model is selected. Put provider-specific options on model objects, not on the agent role.
171
+ `model` can be a string (`provider/model`), an object with `id` and `variant`, or an array. Arrays are checked in order to find an available model, and the first available model is selected.
173
172
 
174
173
  ```json
175
174
  {
176
175
  "model": {
177
176
  "id": "openai/gpt-5.1",
178
- "options": { "reasoningEffort": "high" }
177
+ "variant": "high"
179
178
  }
180
179
  }
181
180
  ```
182
181
 
183
- After `refs` are expanded, top-level `account` is the GitHub account used for reviewer- and triage-originated posts and mutations in `single` mode. In `multi` mode, `review.reviewers[].account` and `triage.voters[].account` are used instead and must be unique within their agent lists. `merge.editor.account` is still used by `/magi:merge` to push fixes, close PRs, and merge PRs.
182
+ ```json
183
+ {
184
+ "model": [
185
+ { "id": "anthropic/claude-opus-4-7", "variant": "high" },
186
+ { "id": "openai/gpt-5.5", "variant": "medium" }
187
+ ]
188
+ }
189
+ ```
184
190
 
185
191
  #### Validate config
186
192
 
@@ -196,11 +202,11 @@ Run commands from OpenCode.
196
202
 
197
203
  ```txt
198
204
  /magi:review 123 124
199
- /magi:review --dry-run 123
205
+ /magi:review 123 --dry-run
200
206
  /magi:merge 123
201
- /magi:merge --dry-run 123
207
+ /magi:merge 123 --dry-run
202
208
  /magi:triage 47 48
203
- /magi:triage --dry-run 47
209
+ /magi:triage 47 --dry-run
204
210
  /magi:clear
205
211
  ```
206
212
 
@@ -208,7 +214,6 @@ Run commands from OpenCode.
208
214
 
209
215
  - [Commands](docs/commands/index.md)
210
216
  - [Config](docs/config.md)
211
- - [Prompts](docs/prompts/index.md)
212
217
 
213
218
  ## Contributing
214
219
 
package/dist/commands.js CHANGED
@@ -1,22 +1,24 @@
1
- export const MAGI_COMMANDS = {
1
+ export const commands = {
2
2
  "magi:clear": {
3
- description: "Clear inactive Magi runs, sessions, worktrees, and outputs",
3
+ description: [
4
+ "Clear inactive Magi runs, sessions, worktrees, and outputs",
5
+ ].join("\n"),
4
6
  template: "Call the `magi_clear` tool.",
5
7
  },
6
8
  "magi:merge": {
7
9
  description: "Review and merge pull requests with Magi",
8
- template: [`Call the \`magi_merge\` tool.`, "PR: $ARGUMENTS"].join("\n"),
9
- },
10
- "magi:triage": {
11
- description: "Triage GitHub issues with Magi",
12
- template: [`Call the \`magi_triage\` tool.`, "Issue: $ARGUMENTS"].join("\n"),
10
+ template: ["Call the `magi_merge` tool.", "PR: $ARGUMENTS"].join("\n"),
13
11
  },
14
12
  "magi:review": {
15
13
  description: "Review pull requests with Magi",
16
- template: [`Call the \`magi_review\` tool.`, "PR: $ARGUMENTS"].join("\n"),
14
+ template: ["Call the `magi_review` tool.", "PR: $ARGUMENTS"].join("\n"),
15
+ },
16
+ "magi:triage": {
17
+ description: "Triage issues with Magi",
18
+ template: ["Call the `magi_triage` tool.", "Issue: $ARGUMENTS"].join("\n"),
17
19
  },
18
20
  "magi:validate": {
19
21
  description: "Validate Magi config",
20
- template: "Call the `magi_validate` tool.",
22
+ template: ["Call the `magi_validate` tool."].join("\n"),
21
23
  },
22
24
  };
@@ -0,0 +1,2 @@
1
+ export * from "./resolve";
2
+ export * from "./validate";