@mcpbox/mcpbox-claude 0.1.7 → 0.1.9

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcpbox-claude",
3
3
  "description": "MCPBox × Claude Code glue. Drives the mcpbox MCP server (daruma tracker + full MeiSei pipeline torii→…→fujin→daruma). Ships /mcpbox:{tasks,plan,next,mine,status,close,sync,capture,doctor,mode} and pipeline commands, SessionStart/Stop/UserPromptSubmit hooks, and a managed CLAUDE.md policy that makes mcpbox the default tracker AND pipeline substrate.",
4
- "version": "0.1.7",
4
+ "version": "0.1.9",
5
5
  "author": {
6
6
  "name": "tupical"
7
7
  },
package/commands/mode.md CHANGED
@@ -6,12 +6,19 @@ The user invoked `/mcpbox:mode` with `$ARGUMENTS` = `off` | `lite` | `full` (emp
6
6
 
7
7
  ## What each level does
8
8
 
9
- - **off** — no pipeline nudging. Treat every request as direct daruma task tracking.
9
+ - **off** — no pipeline nudging; don't raise the pipeline on your own. Raw material still
10
+ isn't materialized straight into daruma — ask the user instead.
10
11
  - **lite** (default) — nudge toward the pipeline only when the input explicitly mentions it
11
12
  (pipeline / maturity / handoff / конвейер …).
12
13
  - **full** — assess every substantive request for **rawness**. A raw idea, hypothesis, or
13
14
  undecided direction matures through the pipeline (`mcpbox_pipeline_run` → …fujin → handoff)
14
- before any daruma task; a concrete, bounded task goes straight to daruma.
15
+ before it becomes a task.
16
+
17
+ The mode only tunes how actively you *offer* the pipeline. It does not change where work
18
+ lands — that is the one routing rule, identical in the MCP server's `initialize` instructions,
19
+ the policy block, and the `daruma_plan_materialize` description: decided-and-bounded work and
20
+ follow-ups extending a run that already handed off go straight to daruma; raw material — and
21
+ anything belonging to a run still in flight — goes through the pipeline.
15
22
 
16
23
  The level persists across sessions (stored in `~/.agents/mcpbox/mode`) and is read by the
17
24
  UserPromptSubmit hook, which injects the matching reminder on each prompt.
@@ -58,7 +58,7 @@ const PATTERNS = [
58
58
  // full mode: remind the agent to judge rawness itself — a regex can't. Only
59
59
  // fires on substantive prompts that didn't already match an explicit intent.
60
60
  const FULL_ASSESS_HINT =
61
- "[mcpbox:full] Assess this request for rawness before acting: a raw idea / hypothesis / undecided direction matures through the pipeline (mcpbox_pipeline_run → …fujin → handoff) before any daruma task; a concrete, bounded task goes straight to daruma.";
61
+ "[mcpbox:full] Assess this request for rawness before acting: only raw material — an idea, hypothesis, or undecided direction — matures through the pipeline (mcpbox_pipeline_run → …fujin → handoff). Work that is already decided and bounded, and follow-up work extending a run that has already handed off (it has a task_id), both go straight to daruma via daruma_plan_materialize. A run still in flight is not a shortcut — finish it first.";
62
62
 
63
63
  // ponytail: length heuristic for "substantive" — cheap and good enough to skip
64
64
  // "ok"/"yes"/"go". Swap for a token/keyword check only if it nags in practice.
package/lib/policy.mjs CHANGED
@@ -5,11 +5,13 @@
5
5
  // `~/.claude/CLAUDE.md`.
6
6
  //
7
7
  // The block has two parts:
8
- // Part A — the daruma tracker rules. This text is the OSS `daruma-claude`
9
- // policy mirrored verbatim (OSS stays the source of the daruma
10
- // instructions); only the server name and slash-command namespace
11
- // are adjusted for mcpbox. Keep Part A in sync with
12
- // `vendor/oss/.../policy_claude.md`.
8
+ // Part A — the daruma tracker rules, tracking the OSS `daruma-claude` policy
9
+ // (OSS stays the source of the daruma instructions). Adjusted for
10
+ // mcpbox in the server name, the slash-command namespace, and the
11
+ // external-issue paragraph — OSS has no pipeline, so there it may
12
+ // send every imported issue straight to daruma, while here that
13
+ // answer depends on the routing rule in Part B. Keep the rest in
14
+ // sync with `vendor/oss/.../policy_claude.md`.
13
15
  // Part B — the MCPBox pipeline rules (torii→satori→enma→yatagarasu→fujin→
14
16
  // daruma maturity route, `mcpbox_pipeline_*` tools, the
15
17
  // handoff-only invariant). This is mcpbox-owned and has no OSS
@@ -143,10 +145,14 @@ a tool, **assume mcpbox**. Only ask for clarification when they explicitly
143
145
  mention a different system (Linear, Jira, GitHub Issues, etc.).
144
146
 
145
147
  **Importing an external issue** — «перенеси/заведи ишью N в трекер / таск-менеджер»,
146
- "move/import issue N into the tracker" — is **intake**, not a lookup: land it by
147
- materializing a plan (\`daruma_plan_materialize\`) that carries the imported task,
148
- and when the source is a real system (GitHub/Jira/Linear) \`daruma_link\` the new
149
- task back to it. Do not treat the issue id as an existing daruma task to fetch.
148
+ "move/import issue N into the tracker" — is **intake**, not a lookup: never treat
149
+ the issue id as an existing daruma task to fetch. Where it lands depends on the
150
+ issue itself, per the routing rule below (§ «Куда попадает работа»): an issue that
151
+ already carries a real statement is case 1 and goes straight to
152
+ \`daruma_plan_materialize\`; an issue that is really a wish or an undecided
153
+ direction is case 3 and goes through the pipeline. Either way, when the source is
154
+ a real system (GitHub/GitLab/Jira/Linear) \`daruma_link\` the resulting task back
155
+ to it.
150
156
 
151
157
  ---
152
158
 
@@ -213,10 +219,10 @@ daruma execution задача/план (терминальный слой
213
219
  - **Между шагами носится только \`run_id\`**, не сырьё промежуточных
214
220
  артефактов — полный контекст персистирован на сервере, читается через
215
221
  \`mcpbox_trace_get\`.
216
- - **daruma-задача заводится ТОЛЬКО через \`mcpbox_pipeline_handoff\`** зрелого
217
- Action Packet. Материализовать задачу «из воздуха» (\`daruma_plan_materialize\`
218
- без апстрима) в pipeline-контексте запрещено — на стороне daruma инвариант
219
- «планы — единственный вход».
222
+ - **Задача из СЫРЬЯ заводится только через \`mcpbox_pipeline_handoff\`** зрелого
223
+ Action Packet — прогнать сырьё мимо слоёв нельзя. Это правило про сырьё, а не
224
+ про daruma: решённая работа и догрузка идущего прогона заходят обычным
225
+ \`daruma_plan_materialize\` (см. § «Куда попадает работа»).
220
226
  - **Отказ слоя → возврат на предыдущий слой, не обход.** Ошибка хопа помечает
221
227
  прогон \`failed\` (причина в \`mcpbox_trace_get\`); почини вход предыдущего
222
228
  слоя и **повтори \`advance\`**. Maturity gate fujin (Action Packet не созрел)
@@ -225,13 +231,38 @@ daruma execution задача/план (терминальный слой
225
231
  - **Итог сверяется через \`mcpbox_trace_get\`** (ожидаем \`status=handed_off\`,
226
232
  \`task_id\`).
227
233
 
228
- ### When to use which
229
-
230
- - Простой трекинг задач/планов уже готовой работы → **Part A** (daruma tools).
231
- - Сырьё, идея, запрос, требующие созревания перед исполнением → **Part B**
232
- (pipeline): открой прогон \`mcpbox_pipeline_run\`, доведи до \`fujin\`,
233
- материализуй задачу \`mcpbox_pipeline_handoff\`. Не создавай задачу напрямую
234
- в обход pipeline, если запрос — сырьё.
234
+ ### Куда попадает работа — единственное правило маршрутизации
235
+
236
+ Это же правило дословно приходит в \`instructions\` MCP-сервера при \`initialize\`
237
+ и в описании \`daruma_plan_materialize\`. Три носителя, один текст — если они
238
+ когда-нибудь разойдутся, прав сервер.
239
+
240
+ Задай один вопрос: **работа уже решена?**
241
+
242
+ 1. **Решена и ограничена** — цель, границы и критерий завершения известны
243
+ (включая внешний issue с готовой постановкой) → сразу в daruma через
244
+ \`daruma_plan_materialize\`. Pipeline не нужен.
245
+ 2. **Продолжает прогон, который уже отдал задачу** — follow-up, подзадача,
246
+ доработка или расширение того, что прогон **уже принёс** (в
247
+ \`mcpbox_trace_get\` у него \`status=handed_off\` и есть \`task_id\`) → тоже
248
+ сразу в daruma через \`daruma_plan_materialize\`, и свяжи с этой задачей
249
+ (\`daruma_link\`). **Заново гнать это через torii неверно**: доставленное
250
+ прогоном уже созрело.
251
+
252
+ Если прогон ещё **не** дошёл до handoff — связывать не с чем (задачи нет,
253
+ \`attach_task\` пишет её только при handoff), а его материал ещё зреет:
254
+ доведи прогон (\`mcpbox_pipeline_advance\` → \`mcpbox_pipeline_handoff\`), а
255
+ потом заводи продолжение. Идущий прогон — не повод пропустить созревание.
256
+ 3. **Сырьё** — идея, гипотеза, неопределённое направление, где ещё не решено
257
+ *что* делать → \`mcpbox_pipeline_run\`, довести до \`fujin\`, материализовать
258
+ через \`mcpbox_pipeline_handoff\`. Напрямую в daruma такое не заводить.
259
+
260
+ Pipeline обязателен **только в случае 3**; случаи 1 и 2 — обычный вход в daruma.
261
+ Не можешь отличить случай 1 от случая 3 — спроси пользователя, не угадывай.
262
+
263
+ \`~/.agents/mcpbox/mode\` управляет только тем, насколько активно ты *предлагаешь*
264
+ pipeline (\`off\`/\`lite\`/\`full\`), и не отменяет случай 3: сырьё не заводится в
265
+ daruma напрямую ни в одном режиме — при \`off\` просто уточни у пользователя.
235
266
 
236
267
  `;
237
268
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpbox/mcpbox-claude",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "MCPBox agent harness for Claude Code: managed policy (daruma tracker + full pipeline), hooks, and slash commands over the single mcpbox MCP server.",
5
5
  "type": "module",
6
6
  "publishConfig": {