makdoong2-team 1.3.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 (97) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +193 -0
  3. package/agents/makdoong2-analyzer.md +135 -0
  4. package/agents/makdoong2-engineer.md +165 -0
  5. package/agents/makdoong2-planner.md +267 -0
  6. package/agents/makdoong2-publisher.md +481 -0
  7. package/agents/makdoong2-team-leader.md +249 -0
  8. package/agents/makdoong2-verifier.md +353 -0
  9. package/assets/makdoong2-team.default.json +46 -0
  10. package/assets/makdoong2-team.schema.json +357 -0
  11. package/bin/cli.js +404 -0
  12. package/dist/agent-stage-config.d.ts +15 -0
  13. package/dist/agent-stage-config.js +119 -0
  14. package/dist/config.d.ts +79 -0
  15. package/dist/config.js +96 -0
  16. package/dist/logger.d.ts +14 -0
  17. package/dist/logger.js +131 -0
  18. package/dist/mcp-secret-injector.d.ts +56 -0
  19. package/dist/mcp-secret-injector.js +89 -0
  20. package/dist/model-chain-cli.d.ts +1 -0
  21. package/dist/model-chain-cli.js +21 -0
  22. package/dist/model-fallback-policy.d.ts +69 -0
  23. package/dist/model-fallback-policy.js +211 -0
  24. package/dist/opencode-plugin.d.ts +8 -0
  25. package/dist/opencode-plugin.js +2457 -0
  26. package/dist/poll-sub-session.d.ts +139 -0
  27. package/dist/poll-sub-session.js +494 -0
  28. package/dist/redact-secrets.d.ts +3 -0
  29. package/dist/redact-secrets.js +68 -0
  30. package/dist/session-index.d.ts +11 -0
  31. package/dist/session-index.js +71 -0
  32. package/dist/skill-mcp-registry.d.ts +59 -0
  33. package/dist/skill-mcp-registry.js +178 -0
  34. package/dist/stall-escalation.d.ts +1 -0
  35. package/dist/stall-escalation.js +22 -0
  36. package/dist/tmux-monitor.d.ts +193 -0
  37. package/dist/tmux-monitor.js +694 -0
  38. package/dist/verdict-hash.d.ts +1 -0
  39. package/dist/verdict-hash.js +62 -0
  40. package/gates/stage-analysis-verify.sh +84 -0
  41. package/gates/stage2-requirements-verify.sh +13 -0
  42. package/gates/stage3-scope-verify.sh +45 -0
  43. package/gates/stage4-dev-post-verify.sh +64 -0
  44. package/gates/stage4-dev-verify.sh +36 -0
  45. package/gates/stage5-coverage-verify.sh +36 -0
  46. package/gates/stage5-test-verify.sh +24 -0
  47. package/gates/stage6-commit-verify.sh +41 -0
  48. package/gates/stage6-post-commit-verify.sh +131 -0
  49. package/gates/stage7-post-pr-verify.sh +53 -0
  50. package/gates/stage7-pr-verify.sh +48 -0
  51. package/gates/stage8-post-review-verify.sh +84 -0
  52. package/gates/stage8-review-verify.sh +45 -0
  53. package/gates/verify.sh +44 -0
  54. package/opencode.json.example +40 -0
  55. package/package.json +84 -0
  56. package/postinstall.mjs +56 -0
  57. package/references/commit-convention.md +130 -0
  58. package/references/jira-issue-templates.md +203 -0
  59. package/references/pr-template.md +381 -0
  60. package/scripts/config.sh +46 -0
  61. package/scripts/coverage-record.sh +67 -0
  62. package/scripts/gate-policy-test.sh +152 -0
  63. package/scripts/install-lib.mjs +1029 -0
  64. package/scripts/lint-agent-prompts.sh +74 -0
  65. package/scripts/log-event.sh +44 -0
  66. package/scripts/model-policy.mjs +183 -0
  67. package/scripts/publish-if-changed.sh +207 -0
  68. package/scripts/release.sh +276 -0
  69. package/scripts/rollback-commits.sh +35 -0
  70. package/scripts/smoke-test.mjs +194 -0
  71. package/scripts/state.sh +192 -0
  72. package/scripts/test-postinstall.mjs +141 -0
  73. package/scripts/with-fallback.sh +56 -0
  74. package/scripts/wt-sync-ignored.sh +193 -0
  75. package/skills/_lib/load-secret.sh +149 -0
  76. package/skills/bamboo-ci/SKILL.md +81 -0
  77. package/skills/bamboo-ci/run-bamboo.sh +23 -0
  78. package/skills/bitbucket-research/SKILL.md +87 -0
  79. package/skills/bitbucket-research/run-repos.sh +23 -0
  80. package/skills/confluence-research/SKILL.md +75 -0
  81. package/skills/confluence-research/run-docs.sh +23 -0
  82. package/skills/github-oss-research/SKILL.md +59 -0
  83. package/skills/jira-research/SKILL.md +75 -0
  84. package/skills/jira-research/run-works.sh +23 -0
  85. package/src/hooks/guard-bash.sh +67 -0
  86. package/src/hooks/session-start.sh +96 -0
  87. package/src/hooks/sync-state.sh +47 -0
  88. package/stages/01-jira.md +43 -0
  89. package/stages/01-planning.md +229 -0
  90. package/stages/02-requirements.md +298 -0
  91. package/stages/03-scope.md +81 -0
  92. package/stages/04-analysis.md +281 -0
  93. package/stages/05-worktree-dev.md +124 -0
  94. package/stages/06-test.md +161 -0
  95. package/stages/07-commit.md +229 -0
  96. package/stages/08-pr.md +177 -0
  97. package/stages/09-review-comments.md +277 -0
@@ -0,0 +1,357 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/y00njinuk/makdoong2-team/master/assets/makdoong2-team.schema.json",
4
+ "title": "makdoong2-team Configuration",
5
+ "description": "Single configuration file for the makdoong2-team opencode plugin. Lives at ${XDG_CONFIG_HOME:-$HOME/.config}/opencode/makdoong2-team.json. Replaces all MAKDOONG2 environment variables.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "$schema": {
10
+ "type": "string"
11
+ },
12
+ "model_policy": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "description": "Site-level model policy. Extends the built-in primary allow-list so per-agent overrides can reference models beyond the defaults (sonnet-4.6, gpt-5.1-codex).",
16
+ "properties": {
17
+ "allowed_primaries": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string"
21
+ },
22
+ "description": "Extra primary model IDs (provider/model) allowed on top of the built-in defaults. Built-in defaults are always allowed."
23
+ }
24
+ }
25
+ },
26
+ "agents": {
27
+ "type": "object",
28
+ "description": "Per-agent model overrides. Merged onto the built-in POLICIES; primary must stay within the runtime allow-list (defaults ∪ model_policy.allowed_primaries) and fallback tier must be strictly lower than primary tier.",
29
+ "additionalProperties": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "model": {
34
+ "type": "string",
35
+ "description": "provider/model, e.g. github-copilot/claude-sonnet-4.6"
36
+ },
37
+ "variant": {
38
+ "type": "string",
39
+ "enum": [
40
+ "low",
41
+ "medium",
42
+ "high",
43
+ "xhigh",
44
+ "max"
45
+ ]
46
+ },
47
+ "fallback_models": {
48
+ "description": "Ordered fallback model(s). Tried in order on failure. String form (tier defaults to 'low') OR object form {id, tier?} to set an explicit tier; mixing both in an array is allowed.",
49
+ "anyOf": [
50
+ {
51
+ "type": "string"
52
+ },
53
+ {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": [
57
+ "id"
58
+ ],
59
+ "properties": {
60
+ "id": {
61
+ "type": "string"
62
+ },
63
+ "tier": {
64
+ "type": "string",
65
+ "enum": [
66
+ "low",
67
+ "medium",
68
+ "high",
69
+ "max"
70
+ ]
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "type": "array",
76
+ "items": {
77
+ "anyOf": [
78
+ {
79
+ "type": "string"
80
+ },
81
+ {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "id"
86
+ ],
87
+ "properties": {
88
+ "id": {
89
+ "type": "string"
90
+ },
91
+ "tier": {
92
+ "type": "string",
93
+ "enum": [
94
+ "low",
95
+ "medium",
96
+ "high",
97
+ "max"
98
+ ]
99
+ }
100
+ }
101
+ }
102
+ ]
103
+ }
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "coverage": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "properties": {
114
+ "threshold": {
115
+ "type": "number",
116
+ "minimum": 0,
117
+ "maximum": 100,
118
+ "description": "Minimum line-coverage percent the stage-5 coverage gate enforces. Default 95."
119
+ }
120
+ }
121
+ },
122
+ "timeout": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "description": "Substage polling timeout settings.",
126
+ "properties": {
127
+ "substage_minutes": {
128
+ "type": "number",
129
+ "minimum": 1,
130
+ "description": "Maximum minutes to wait for a single dispatch_stage or dispatch_verifier sub-agent to complete. Default 30. Minimum 1 (enforced at runtime)."
131
+ },
132
+ "per_agent": {
133
+ "type": "object",
134
+ "additionalProperties": {
135
+ "type": "number",
136
+ "minimum": 1
137
+ },
138
+ "description": "Per-agent timeout overrides in minutes. Key is the agent name (e.g. \"makdoong2-engineer\"). Takes precedence over substage_minutes. Minimum 1 (enforced at runtime)."
139
+ },
140
+ "stall_escalate_threshold": {
141
+ "type": "integer",
142
+ "minimum": 1,
143
+ "description": "Accumulated hang_history entries (message_stall / status_absent) per substage that block further dispatch_stage calls and force user escalation. Counts across tool calls, unlike the per-call MAX_ATTEMPTS budget which resets on every re-dispatch. Default 5."
144
+ }
145
+ }
146
+ },
147
+ "tmux": {
148
+ "type": "object",
149
+ "additionalProperties": false,
150
+ "description": "Sub-session pane monitor. Only active when run inside tmux AND enabled=true.",
151
+ "properties": {
152
+ "enabled": {
153
+ "type": "boolean",
154
+ "description": "Spawn a tmux pane per dispatched 막둥이. Default false."
155
+ },
156
+ "placement": {
157
+ "type": "string",
158
+ "enum": [
159
+ "window",
160
+ "pane"
161
+ ],
162
+ "description": "Where each 막둥이 is spawned. 'window' (default) opens a separate tmux window, leaving 부장님's pane geometry untouched. 'pane' splits 부장님's window (legacy) — this resizes the source pane on every spawn/kill, which makes the opencode TUI re-run OSC palette detection and can leak reply fragments like '/0c0c/0c0c' into the prompt. layout / main_pane_size / agent_pane_min_width / split_direction apply only when placement='pane'."
163
+ },
164
+ "layout": {
165
+ "type": "string",
166
+ "enum": [
167
+ "main-vertical",
168
+ "main-horizontal",
169
+ "tiled",
170
+ "even-horizontal",
171
+ "even-vertical"
172
+ ],
173
+ "description": "tmux layout applied after each spawn. Default main-vertical."
174
+ },
175
+ "main_pane_size": {
176
+ "type": "number",
177
+ "description": "Percent of window width kept for 부장님. Default 60."
178
+ },
179
+ "agent_pane_min_width": {
180
+ "type": "number",
181
+ "description": "Minimum 막둥이 pane width (chars). Default 52."
182
+ },
183
+ "split_direction": {
184
+ "type": "string",
185
+ "enum": [
186
+ "-h",
187
+ "-v"
188
+ ],
189
+ "description": "-h side-by-side, -v top/bottom. Default -h."
190
+ },
191
+ "attach_command": {
192
+ "type": "string",
193
+ "description": "Command run inside the pane. Default 'opencode attach'."
194
+ },
195
+ "server_url": {
196
+ "type": [
197
+ "string",
198
+ "null"
199
+ ],
200
+ "description": "If set, appended as ' --server <url>' to the attach command."
201
+ },
202
+ "keep_pane_on_success": {
203
+ "type": "boolean",
204
+ "description": "Keep pane open after successful dispatch_stage (user can read output). Default false."
205
+ },
206
+ "auto_close_on_failure": {
207
+ "type": "boolean",
208
+ "description": "Auto-close pane on dispatch failure (clean up for retry). Default false — failed 막둥이 panes are kept for diagnosis. The kept pane shows the placeholder until 부장님 focuses it; focusing swaps in the real session view."
209
+ },
210
+ "pane_close_delay_seconds": {
211
+ "type": "number",
212
+ "minimum": 0,
213
+ "description": "Seconds to wait before closing pane (0 = immediate). Default 0."
214
+ }
215
+ }
216
+ },
217
+ "worktree": {
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "properties": {
221
+ "extra_exclude": {
222
+ "type": "string",
223
+ "description": "Extra newline/space-separated patterns excluded by scripts/wt-sync-ignored.sh."
224
+ }
225
+ }
226
+ },
227
+ "logging": {
228
+ "type": "object",
229
+ "additionalProperties": false,
230
+ "description": "Plugin runtime logging. Controls level threshold, output destination (console vs file), and log file path.",
231
+ "properties": {
232
+ "level": {
233
+ "type": "string",
234
+ "enum": [
235
+ "silent",
236
+ "error",
237
+ "warn",
238
+ "info",
239
+ "debug",
240
+ "trace"
241
+ ],
242
+ "description": "Log level threshold. Only messages at or below this level are emitted. Default 'error' — only errors/BLOCKED messages surface; set to 'debug' or 'trace' for full audit trail."
243
+ },
244
+ "mode": {
245
+ "type": "string",
246
+ "enum": [
247
+ "stdin",
248
+ "file"
249
+ ],
250
+ "description": "Output destination. 'stdin' (default) writes to console (stderr/stdout) — legacy behaviour. 'file' appends to `path`. Appending (never truncating) is required because every opencode process on the host shares one log file; size is bounded by `max_bytes` rotation instead."
251
+ },
252
+ "path": {
253
+ "type": [
254
+ "string",
255
+ "null"
256
+ ],
257
+ "description": "Absolute or relative path to the log file. Consulted only when mode='file' — ignored when mode='stdin' even if set. When mode='file' this MUST be a non-empty string; missing/empty path causes plugin initialization to fail."
258
+ },
259
+ "max_bytes": {
260
+ "type": "integer",
261
+ "minimum": 1,
262
+ "description": "Rotation threshold in bytes for mode='file'. When the log exceeds this size it is renamed to `<path>.1` and a fresh file is started. Default 10485760 (10 MiB)."
263
+ }
264
+ },
265
+ "allOf": [
266
+ {
267
+ "if": {
268
+ "properties": {
269
+ "mode": {
270
+ "const": "file"
271
+ }
272
+ },
273
+ "required": [
274
+ "mode"
275
+ ]
276
+ },
277
+ "then": {
278
+ "required": [
279
+ "path"
280
+ ],
281
+ "properties": {
282
+ "path": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ }
286
+ }
287
+ }
288
+ }
289
+ ]
290
+ },
291
+ "paths": {
292
+ "type": "object",
293
+ "additionalProperties": false,
294
+ "description": "Optional path overrides. Defaults derive from the opencode config dir; set these only for non-standard installs.",
295
+ "properties": {
296
+ "hooks": {
297
+ "type": "string"
298
+ },
299
+ "gates": {
300
+ "type": "string"
301
+ },
302
+ "scripts": {
303
+ "type": "string"
304
+ },
305
+ "stages": {
306
+ "type": "string"
307
+ }
308
+ }
309
+ },
310
+ "hosts": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "description": "On-prem endpoint hosts consumed by research-skill MCP wrappers. Read at runtime by skills/*/run-*.sh via jq. The wrapper exits with instructions when a host is missing.",
314
+ "properties": {
315
+ "JIRA_HOST": {
316
+ "type": "string",
317
+ "description": "Jira DC host (no scheme), e.g. jira.example.com. Consumed by skills/jira-research/run-works.sh."
318
+ },
319
+ "CONFLUENCE_HOST": {
320
+ "type": "string",
321
+ "description": "Confluence DC host (no scheme), e.g. confluence.example.com. Consumed by skills/confluence-research/run-docs.sh."
322
+ },
323
+ "BITBUCKET_API_BASE_PATH": {
324
+ "type": "string",
325
+ "description": "Bitbucket DC REST base URL, e.g. https://bitbucket.example.com/rest. Consumed by skills/bitbucket-research/run-repos.sh."
326
+ },
327
+ "BAMBOO_URL": {
328
+ "type": "string",
329
+ "description": "Bamboo base URL, e.g. https://bamboo.example.com. Consumed by skills/bamboo-ci/run-bamboo.sh."
330
+ }
331
+ }
332
+ },
333
+ "secrets": {
334
+ "type": "object",
335
+ "additionalProperties": false,
336
+ "description": "Credentials consumed by research-skill MCP wrappers. Read at runtime by skills/*/run-*.sh via jq. Leave empty to disable the corresponding skill — the wrapper exits with instructions when the token is missing. NEVER commit real tokens to a shared repo; keep this file at chmod 600.",
337
+ "properties": {
338
+ "BITBUCKET_API_TOKEN": {
339
+ "type": "string",
340
+ "description": "Bitbucket Data Center personal-access token consumed by skills/bitbucket-research/run-repos.sh."
341
+ },
342
+ "JIRA_API_TOKEN": {
343
+ "type": "string",
344
+ "description": "JIRA Data Center personal-access token consumed by skills/jira-research/run-works.sh."
345
+ },
346
+ "CONFLUENCE_API_TOKEN": {
347
+ "type": "string",
348
+ "description": "Confluence Data Center personal-access token consumed by skills/confluence-research/run-docs.sh."
349
+ },
350
+ "BAMBOO_TOKEN": {
351
+ "type": "string",
352
+ "description": "Bamboo personal-access token consumed by skills/bamboo-ci/run-bamboo.sh."
353
+ }
354
+ }
355
+ }
356
+ }
357
+ }