@plumpslabs/kuma 2.3.14 → 2.3.15

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.
@@ -70,17 +70,20 @@ var BOOTSTRAP_LINES = [
70
70
  '**Before coding, call `kuma_context({ action: "init" })`** to load project context and session memory.',
71
71
  "Project knowledge persists in `.kuma/memories/*.md` across sessions.",
72
72
  "",
73
- "\u26A0\uFE0F **MANDATORY WORKFLOW** \u2014 Follow in order every session:",
73
+ "\u26A0\uFE0F **MANDATORY WORKFLOW** \u2014 Follow in order every session (including research-only):",
74
74
  "",
75
- ' 1. `kuma_context({ action: "init" })` \u2014 Load context (START HERE)',
76
- ' 2. `kuma_safety({ action: "guard" })` \u2014 Safety check before work',
75
+ ' 1. `kuma_context({ action: "init" })` \u2014 Load context (START HERE)',
76
+ ' 2. `kuma_safety({ action: "guard" })` \u2014 Safety check before work',
77
77
  ' 3. `kuma_context({ action: "research", scope: "<area>" })` \u2014 Research before editing',
78
- " 4. *(edit using native tools)*",
79
- ' 5. `kuma_memory({ action: "research_save", scope: "<area>" })` \u2014 Save findings',
80
- ' 6. `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 Verify changes',
81
- ' 7. `kuma_context({ action: "changes" })` \u2014 Review changes',
78
+ " 4. *(edit/read using native tools)*",
79
+ ' 5. `kuma_memory({ action: "research_save", ... })` \u2014 Save all findings',
80
+ ' 6. `kuma_memory({ action: "gotcha" })` \u2014 Record bugs/quirks found',
81
+ ' 7. `kuma_memory({ action: "arch_flow" })` \u2014 Record data flow if mapped',
82
+ ' 8. `kuma_memory({ action: "decision" })` \u2014 Record key findings/decisions',
83
+ ' 9. `kuma_safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
84
+ ' 10. `kuma_context({ action: "changes" })` \u2014 Review session activity',
82
85
  "",
83
- "\u26D4 Skipping workflow = stale context, missed decisions, unverified code.",
86
+ "\u26D4 Do NOT skip steps 5-10 after research \u2014 even if no code was changed.",
84
87
  "\u{1F4D6} Full rules: `.kuma/init.md`",
85
88
  "\u{1F9E0} Tools: `kuma_context` | `kuma_memory` | `kuma_safety`"
86
89
  ].join("\n");
@@ -294,54 +297,60 @@ function generateInitMdContent() {
294
297
  "",
295
298
  "> \u26D4 DO NOT EDIT FILES BEFORE STEP 3 \u2014 Unless trivial/minor change",
296
299
  "",
297
- "### STEP 4: EDIT \u2014 Implement (Use Agent Native Tools)",
300
+ "### STEP 4: EDIT/READ \u2014 Implement (Use Agent Native Tools)",
298
301
  "```",
299
302
  "# Use agent BUILT-IN tools to read, grep, edit, create files",
300
303
  "# Kuma does NOT manage files \u2014 that's your agent's job",
301
304
  "```",
302
305
  "",
306
+ "> \u26A0\uFE0F **Research-only sessions included.** Workflow ini wajib meskipun session hanya membaca/riset tanpa code changes.",
307
+ "",
303
308
  "**AUTO-RECORDED nodes/edges** (Kuma scanner detects these automatically):",
304
309
  "- Files, Functions, Classes \u2192 created as graph nodes",
305
310
  "- Imports, Calls, Extends \u2192 created as graph edges",
306
311
  "- Variables, Components, Routes \u2192 created when detected",
307
312
  "",
308
- "**MANUAL \u2014 When to call these yourself:**",
309
- '- `kuma_memory({ action: "research_save" })` \u2014 after exploring/learning something new',
310
- '- `kuma_memory({ action: "decision" })` \u2014 after making an architecture/design choice',
311
- '- `kuma_memory({ action: "context" })` \u2014 inject arbitrary context notes',
312
- '- `kuma_memory({ action: "domain_rules" })` \u2014 record business rules',
313
- '- `kuma_memory({ action: "arch_flow" })` \u2014 document architecture flow',
314
- '- `kuma_memory({ action: "gotcha" })` \u2014 log known quirks/workarounds',
315
- '- `kuma_memory({ action: "todo" })` \u2014 create persistent task',
316
- '- `kuma_memory({ action: "mine" })` \u2014 extract historical decisions from git',
317
- "",
318
- "### STEP 5: Save Research (AFTER Editing)",
313
+ "### STEP 5: Save Research (MANDATORY \u2014 After Research/Editing)",
319
314
  "```",
320
315
  'kuma_memory({ action: "research_save", scope: "<area>", confidence: 0.8 })',
321
316
  "```",
322
- "**When:** After exploring a new area or finishing edits",
317
+ "**When:** IMMEDIATELY after exploring code or finishing edits. Jangan tunda.",
323
318
  "**Why:** Persist findings into knowledge graph + research cache",
324
319
  "",
325
- "### STEP 6: Record Decision (AFTER Significant Changes)",
320
+ "### STEP 6: Record Gotchas (MANDATORY \u2014 After Research)",
321
+ "```",
322
+ 'kuma_memory({ action: "gotcha", filePath: "<file>", description: "...", severity: "medium" })',
323
+ "```",
324
+ "**When:** IMMEDIATELY after discovering bugs, quirks, unexpected behavior, or workarounds.",
325
+ "**Why:** Prevents future agents from hitting the same issues. Every bug = a gotcha.",
326
+ "",
327
+ "### STEP 7: Record Arch Flow (MANDATORY \u2014 After Tracing Data/Code Flow)",
328
+ "```",
329
+ 'kuma_memory({ action: "arch_flow", content: "..." })',
330
+ "```",
331
+ "**When:** IMMEDIATELY after mapping out how data flows between components.",
332
+ "**Why:** Architecture knowledge dissipates fast. Record it before moving to next task.",
333
+ "",
334
+ "### STEP 8: Record Decision (MANDATORY \u2014 After Research/Findings)",
326
335
  "```",
327
336
  'kuma_memory({ action: "decision", decisionAction: "record", title: "...", outcome: "..." })',
328
337
  "```",
329
- "**When:** After making architecture/design decisions",
330
- "**Why:** Saves ADR (Architecture Decision Record) to the decision log",
338
+ "**When:** Setelah setiap session riset. Bukan cuma code changes \u2014 temuan, bug analysis, design tradeoffs juga.",
339
+ "**Why:** Saves ADR (Architecture Decision Record) \u2014 future agents need context from your discoveries.",
331
340
  "",
332
- "### STEP 7: Verify (AFTER Editing)",
341
+ "### STEP 9: Verify (MANDATORY \u2014 After Research/Editing)",
333
342
  "```",
334
343
  'kuma_safety({ action: "verify", scope: "<area or file>" })',
335
344
  "```",
336
- "**When:** After edits are done, before switching tasks",
337
- "**Why:** Auto-run scoped tests + AST code validation",
345
+ "**When:** After research/edits are done, before switching tasks. Even for research-only \u2014 confirms nothing is broken.",
346
+ '**Why:** Auto-run scoped tests + AST code validation. If no test framework, at minimum report "No tests to run".',
338
347
  "",
339
- "### STEP 8: Check Changes (BEFORE Commit / End of Session)",
348
+ "### STEP 10: Check Changes (MANDATORY \u2014 End of Session)",
340
349
  "```",
341
350
  'kuma_context({ action: "changes" })',
342
351
  "```",
343
- "**When:** End of session or before git commit",
344
- "**Why:** Review all modifications made in this session",
352
+ "**When:** End of session or before git commit. Even 0 changes = valid result to confirm.",
353
+ "**Why:** View session log of all modifications + tool calls made in this session.",
345
354
  "",
346
355
  "---",
347
356
  "",
@@ -355,7 +364,7 @@ function generateInitMdContent() {
355
364
  "| `research` | 5-step research pipeline | STEP 3 \u2014 Before edits |",
356
365
  "| `impact` | Analyze change effects on symbol | After research, before design |",
357
366
  "| `navigate` | Trace code flow | When need to understand call flow |",
358
- "| `changes` | View session change log | STEP 8 \u2014 End of session |",
367
+ "| `changes` | View session change log | STEP 10 \u2014 End of session |",
359
368
  "| `health` | Project health score 0-100 | Periodic check |",
360
369
  "| `digest` | Ultra-compact project briefing | Session start (alt to init) |",
361
370
  "| `drift` | Detect memory staleness | When suspecting stale context |",
@@ -364,17 +373,17 @@ function generateInitMdContent() {
364
373
  "",
365
374
  "| Action | Description | When to Call |",
366
375
  "|--------|-------------|--------------|",
367
- "| `research_save` | Save research results | STEP 5 \u2014 After exploring/editing |",
368
- "| `decision` | ADR-style decision record | STEP 6 \u2014 After major decisions |",
376
+ "| `research_save` | Save research results | STEP 5 \u2014 IMMEDIATELY after exploring |",
377
+ "| `gotcha` | Record bugs/quirks/workarounds | STEP 6 \u2014 IMMEDIATELY after finding bug |",
378
+ "| `arch_flow` | Document architecture flow | STEP 7 \u2014 IMMEDIATELY after tracing flow |",
379
+ "| `decision` | ADR-style decision record | STEP 8 \u2014 After every research session |",
369
380
  "| `mine` | Mine decisions from git log | When need historical context |",
370
381
  "| `session` | Session summary | End of session |",
371
382
  "| `heal` | Self-heal knowledge graph | When graph has errors |",
372
383
  "| `search` | Search memories + graph | Find stored information |",
373
384
  "| `todo` | Persistent todo CRUD | When managing tasks |",
374
- "| `context` | Inject context notes | Manual \u2014 additional notes |",
375
- "| `domain_rules` | Layer 1: business rules | Manual \u2014 record business rules |",
376
- "| `arch_flow` | Layer 2: architecture flow | Manual \u2014 document architecture |",
377
- "| `gotcha` | Layer 3: known gotchas | Manual \u2014 log quirks/legacy |",
385
+ "| `context` | Inject context notes | Additional notes when needed |",
386
+ "| `domain_rules` | Layer 1: business rules | Record business rules when discovered |",
378
387
  "| `layers` | Show all 3 layers summary | Overview memory layers |",
379
388
  "",
380
389
  "### \u{1F6E1}\uFE0F kuma_safety \u2014 Safety & Policy",
@@ -382,7 +391,7 @@ function generateInitMdContent() {
382
391
  "| Action | Description | When to Call |",
383
392
  "|--------|-------------|--------------|",
384
393
  "| `guard` | Anti-pattern, drift, loop | STEP 2 \u2014 Before work |",
385
- "| `verify` | Auto-run scoped tests | STEP 7 \u2014 After edits |",
394
+ "| `verify` | Auto-run scoped tests + validation | STEP 9 \u2014 After research/edits |",
386
395
  "| `check` | Pre-execution safety check | Before risky operations |",
387
396
  "| `audit` | Query safety audit trail | Security investigation |",
388
397
  "| `lock` | Multi-agent file lock | Multi-agent collaboration |",
@@ -429,20 +438,20 @@ function generateInitMdContent() {
429
438
  "## \u{1F4CC} Workflow Summary",
430
439
  "",
431
440
  "```",
432
- "EVERY SESSION (Mandatory):",
433
- " 1. kuma_context \u2192 init \u2014 Load project context",
434
- " 2. kuma_safety \u2192 guard \u2014 Safety check",
435
- " 3. kuma_context \u2192 research \u2014 Research target area",
436
- " --- EDIT (use native tools) ---",
437
- " 5. kuma_memory \u2192 research_save \u2014 Save findings",
438
- " 6. kuma_memory \u2192 decision \u2014 Record decisions",
439
- " 7. kuma_safety \u2192 verify \u2014 Verify correctness",
440
- " 8. kuma_context \u2192 changes \u2014 Review changes",
441
- "",
442
- "MANUAL (When needed):",
441
+ "EVERY SESSION (Mandatory \u2014 including research-only):",
442
+ " 1. kuma_context \u2192 init \u2014 Load project context",
443
+ " 2. kuma_safety \u2192 guard \u2014 Safety check",
444
+ " 3. kuma_context \u2192 research \u2014 Research target area",
445
+ " --- EDIT/READ (use native tools) ---",
446
+ " 5. kuma_memory \u2192 research_save \u2014 Save ALL findings",
447
+ " 6. kuma_memory \u2192 gotcha \u2014 Record bugs/quirks found",
448
+ " 7. kuma_memory \u2192 arch_flow \u2014 Record data flow if mapped",
449
+ " 8. kuma_memory \u2192 decision \u2014 Record key findings/decisions",
450
+ " 9. kuma_safety \u2192 verify \u2014 Run tests / confirm nothing broken",
451
+ " 10. kuma_context \u2192 changes \u2014 Review session activity",
452
+ "",
453
+ "ON DISCOVERY (When needed):",
443
454
  " kuma_memory \u2192 domain_rules \u2014 Business rules (Layer 1)",
444
- " kuma_memory \u2192 arch_flow \u2014 Architecture flow (Layer 2)",
445
- " kuma_memory \u2192 gotcha \u2014 Known quirks (Layer 3)",
446
455
  " kuma_memory \u2192 context \u2014 Additional notes",
447
456
  " kuma_memory \u2192 todo \u2014 Task management",
448
457
  " kuma_memory \u2192 mine \u2014 Historical context",
@@ -494,15 +503,18 @@ function handleOpencodeSecondary(root, results) {
494
503
  '**Before coding, call `kuma_kuma_context({ action: "init" })`** to load project context and session memory.',
495
504
  "Project knowledge persists in `.kuma/memories/*.md` across sessions.",
496
505
  "",
497
- "\u26A0\uFE0F **MANDATORY WORKFLOW** \u2014 Follow in order every session:",
506
+ "\u26A0\uFE0F **MANDATORY WORKFLOW** \u2014 Follow in order every session (including research-only):",
498
507
  "",
499
- ' 1. `kuma_kuma_context({ action: "init" })` \u2014 Load context (START HERE)',
500
- ' 2. `kuma_kuma_safety({ action: "guard" })` \u2014 Safety check before work',
501
- ' 3. `kuma_kuma_context({ action: "research", scope: "<area>" })` \u2014 Research before editing',
502
- " 4. *(edit using native tools)*",
503
- ' 5. `kuma_kuma_memory({ action: "research_save", scope: "<area>" })` \u2014 Save findings',
504
- ' 6. `kuma_kuma_safety({ action: "verify", scope: "<area>" })` \u2014 Verify changes',
505
- ' 7. `kuma_kuma_context({ action: "changes" })` \u2014 Review changes',
508
+ ' 1. `kuma_kuma_context({ action: "init" })` \u2014 Load context (START HERE)',
509
+ ' 2. `kuma_kuma_safety({ action: "guard" })` \u2014 Safety check before work',
510
+ ' 3. `kuma_kuma_context({ action: "research", scope: "<area>" })` \u2014 Research before editing',
511
+ " 4. *(edit/read using native tools)*",
512
+ ' 5. `kuma_kuma_memory({ action: "research_save", ... })` \u2014 Save all findings',
513
+ ' 6. `kuma_kuma_memory({ action: "gotcha" })` \u2014 Record bugs/quirks found',
514
+ ' 7. `kuma_kuma_memory({ action: "arch_flow" })` \u2014 Record data flow if mapped',
515
+ ' 8. `kuma_kuma_memory({ action: "decision" })` \u2014 Record key findings/decisions',
516
+ ' 9. `kuma_kuma_safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
517
+ ' 10. `kuma_kuma_context({ action: "changes" })` \u2014 Review session activity',
506
518
  "",
507
519
  "\u26A0\uFE0F **OpenCode platform note:** Tool names are prefixed with `kuma_kuma_*`",
508
520
  " (server name `kuma` + already-prefixed tool name `kuma_context`).",
@@ -614,19 +626,25 @@ function getCombinedAgentsMd(selectedTypes) {
614
626
  "",
615
627
  "---",
616
628
  "",
629
+ '> \u26A0\uFE0F **WARNING:** Agent often skip steps due to "research-only" bias. Do NOT skip.',
630
+ "> Follow the full 10-step workflow even for read-only investigations.",
631
+ "",
617
632
  "## \u26A0\uFE0F MANDATORY WORKFLOW",
618
633
  "",
619
- "Follow these steps in order every session (all platforms):",
634
+ "Follow these steps in order every session (including research-only):",
620
635
  "",
621
- ' 1. `[kuma_]context({ action: "init" })` \u2014 Load project context (START HERE)',
622
- ' 2. `[kuma_]safety({ action: "guard" })` \u2014 Safety check before editing',
636
+ ' 1. `[kuma_]context({ action: "init" })` \u2014 Load project context (START HERE)',
637
+ ' 2. `[kuma_]safety({ action: "guard" })` \u2014 Safety check before editing',
623
638
  ' 3. `[kuma_]context({ action: "research", scope: "<area>" })` \u2014 Research before editing',
624
- " 4. *(edit using native tools)*",
625
- ' 5. `[kuma_]memory({ action: "research_save", ... })` \u2014 Save findings',
626
- ' 6. `[kuma_]safety({ action: "verify", ... })` \u2014 Verify correctness',
627
- ' 7. `[kuma_]context({ action: "changes" })` \u2014 Review changes',
639
+ " 4. *(edit/read using native tools)*",
640
+ ' 5. `[kuma_]memory({ action: "research_save", ... })` \u2014 Save all findings',
641
+ ' 6. `[kuma_]memory({ action: "gotcha" })` \u2014 Record bugs/quirks found',
642
+ ' 7. `[kuma_]memory({ action: "arch_flow" })` \u2014 Record data flow if mapped',
643
+ ' 8. `[kuma_]memory({ action: "decision" })` \u2014 Record key findings/decisions',
644
+ ' 9. `[kuma_]safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
645
+ ' 10. `[kuma_]context({ action: "changes" })` \u2014 Review session activity',
628
646
  "",
629
- "\u26D4 Skipping workflow = stale context, missed decisions, unverified code.",
647
+ "\u26D4 Do NOT skip steps 5-10 after research \u2014 even if no code was changed.",
630
648
  "",
631
649
  "Replace `[kuma_]` with the correct prefix for your platform (see below).",
632
650
  "",
@@ -820,6 +838,59 @@ function handleOpenclawSecondary(root, results) {
820
838
  });
821
839
  }
822
840
  }
841
+ function handleQuickrefGeneration(root, results) {
842
+ const quickrefPath = path.resolve(root, ".kuma/quickref.md");
843
+ const content = [
844
+ "# Kuma Quick Reference",
845
+ "",
846
+ "_(Auto-generated by `kuma init` \u2014 simplified workflow cheat sheet)_",
847
+ "",
848
+ "## Every Session (Mandatory \u2014 including research-only)",
849
+ "",
850
+ ' 1. `kuma_context({ action: "init" })` \u2014 Load context',
851
+ ' 2. `kuma_safety({ action: "guard" })` \u2014 Safety check',
852
+ ' 3. `kuma_context({ action: "research", scope: "<area>" })` \u2014 Research',
853
+ " 4. *(edit/read using native tools)*",
854
+ ' 5. `kuma_memory({ action: "research_save", ... })` \u2014 Save findings',
855
+ ' 6. `kuma_memory({ action: "gotcha" })` \u2014 Gotchas!',
856
+ ' 7. `kuma_memory({ action: "arch_flow" })` \u2014 Arch flow',
857
+ ' 8. `kuma_memory({ action: "decision" })` \u2014 Decision',
858
+ ' 9. `kuma_safety({ action: "verify", ... })` \u2014 Verify',
859
+ ' 10. `kuma_context({ action: "changes" })` \u2014 Review changes',
860
+ "",
861
+ "\u26D4 Steps 5-10 are mandatory even for research-only sessions!",
862
+ "",
863
+ "## Platform Tool Names",
864
+ "",
865
+ "- **OpenCode:** Use `kuma_kuma_*` prefix (e.g. `kuma_kuma_context`)",
866
+ "- **Other platforms:** Use `kuma_*` directly (e.g. `kuma_context`)",
867
+ "",
868
+ "\u{1F4D6} Full rules: `.kuma/init.md`",
869
+ "_Generated by Kuma MCP - https://github.com/plumpslabs/kuma_"
870
+ ].join("\n");
871
+ try {
872
+ const kumaDir = path.dirname(quickrefPath);
873
+ if (!fs.existsSync(kumaDir)) fs.mkdirSync(kumaDir, { recursive: true });
874
+ if (fs.existsSync(quickrefPath)) {
875
+ const existing = fs.readFileSync(quickrefPath, "utf-8");
876
+ if (existing.includes("_Generated by Kuma MCP_")) {
877
+ results.push({ type: "claude", filePath: ".kuma/quickref.md", action: "skipped" });
878
+ return;
879
+ }
880
+ results.push({ type: "claude", filePath: ".kuma/quickref.md", action: "skipped" });
881
+ } else {
882
+ fs.writeFileSync(quickrefPath, content, "utf-8");
883
+ results.push({ type: "claude", filePath: ".kuma/quickref.md", action: "created" });
884
+ }
885
+ } catch (err) {
886
+ results.push({
887
+ type: "claude",
888
+ filePath: ".kuma/quickref.md",
889
+ action: "error",
890
+ error: err instanceof Error ? err.message : String(err)
891
+ });
892
+ }
893
+ }
823
894
  function handleInitMdGeneration(root, results) {
824
895
  const initMdPath = path.resolve(root, ".kuma/init.md");
825
896
  try {
@@ -845,6 +916,7 @@ function handleInitMdGeneration(root, results) {
845
916
  error: err instanceof Error ? err.message : String(err)
846
917
  });
847
918
  }
919
+ handleQuickrefGeneration(root, results);
848
920
  }
849
921
  function handleCodewhaleSecondary(root, results) {
850
922
  const mcpPath = path.resolve(root, ".codewhale/mcp.json");
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  ALL_CONFIG_TYPES,
9
9
  formatInitResults,
10
10
  runInit
11
- } from "./chunk-LRO3HWGC.js";
11
+ } from "./chunk-3AN4RSN5.js";
12
12
  import {
13
13
  formatDecisionTemplate,
14
14
  getProactiveMemories,
@@ -2190,7 +2190,7 @@ function registerAllTools(server) {
2190
2190
  );
2191
2191
  server.tool(
2192
2192
  "kuma_memory",
2193
- "**Call AFTER editing** to persist what you learned.\n\nAFTER EDITING (call these yourself):\n\u2022 STEP 5: `research_save` \u2014 save findings into knowledge graph\n\u2022 STEP 6: `decision` \u2014 record architecture decisions (ADR)\n\nMANUAL (call when you discover something):\n\u2022 `gotcha` \u2014 found a quirk/workaround/legacy issue? Log it!\n\u2022 `domain_rules` \u2014 uncovered business rules? Save them!\n\u2022 `arch_flow` \u2014 mapped out architecture flow? Document it!\n\u2022 `context` \u2014 need to inject extra notes? Use this!\n\u2022 `todo` \u2014 create persistent task items\n\u2022 `mine` \u2014 extract historical context from git log\n\nOther actions: session, heal, search, changes, benchmark, layers.",
2193
+ "**Call AFTER research/editing every session** (including research-only).\n\nMANDATORY (call AFTER every research session):\n\u2022 STEP 5: `research_save` \u2014 IMMEDIATELY after exploring/editing. Save ALL findings.\n\u2022 STEP 6: `gotcha` \u2014 IMMEDIATELY after finding bugs/quirks. Every bug = a gotcha!\n\u2022 STEP 7: `arch_flow` \u2014 IMMEDIATELY after tracing data/code flow. Record before next task.\n\u2022 STEP 8: `decision` \u2014 IMMEDIATELY after each research session. Bukan cuma code changes \u2014 temuan juga.\n\nON DISCOVERY (when you encounter something):\n\u2022 `domain_rules` \u2014 uncovered business rules? Save them!\n\u2022 `context` \u2014 need to inject extra notes? Use this!\n\u2022 `todo` \u2014 create persistent task items\n\u2022 `mine` \u2014 extract historical context from git log\n\nOther actions: session, heal, search, changes, benchmark, layers.",
2194
2194
  {
2195
2195
  action: z.enum(["decision", "mine", "research_save", "session", "heal", "search", "changes", "todo", "context", "benchmark", "decision_log", "domain_rules", "arch_flow", "gotcha", "layers", "federated", "gen_test", "trajectory", "skills"]).describe("Memory action: decision=ADR, mine=mine git log & comments, research_save=save, session=summary, heal=repair, search=search, changes=log, todo=manage todos, context=inject notes, benchmark=capture/diff, decision_log=manage decisions, domain_rules=Layer 1 business rules (Issue #17), arch_flow=Layer 2 architecture flow (Issue #17), gotcha=Layer 3 known gotchas (Issue #17/#21), layers=all 3 layers summary, federated=resolve federated kuma:// URI (Issue #27), gen_test=generate test from trajectory (Issue #28), trajectory=list trajectories, skills=list distilled skills"),
2196
2196
  scope: z.string().optional().describe("Scope for research_save/search/todo/context/mine/federated"),
@@ -2257,7 +2257,7 @@ function registerAllTools(server) {
2257
2257
  );
2258
2258
  server.tool(
2259
2259
  "kuma_safety",
2260
- "Safety checks, policy enforcement, and auto-verification.\n\nWORKFLOW:\n\u2022 STEP 2 (BEFORE work): `guard` \u2014 detect anti-patterns, drift, runaway loops\n\u2022 STEP 7 (AFTER edits): `verify` \u2014 auto-run scoped tests + AST validation\n\nOther actions: check (pre-exec safety), audit (query trail), lock (multi-agent), health (score 0-100), policy (evaluate commands), ast (code validation), checkpoint (snapshot before refactors), contract (pre/post-condition check).",
2260
+ "Safety checks, policy enforcement, and auto-verification.\n\nWORKFLOW:\n\u2022 STEP 2 (BEFORE work): `guard` \u2014 detect anti-patterns, drift, runaway loops\n\u2022 STEP 9 (AFTER research/edits): `verify` \u2014 auto-run scoped tests + AST validation\n\nOther actions: check (pre-exec safety), audit (query trail), lock (multi-agent), health (score 0-100), policy (evaluate commands), ast (code validation), checkpoint (snapshot before refactors), contract (pre/post-condition check).",
2261
2261
  {
2262
2262
  action: z.enum(["guard", "verify", "check", "audit", "lock", "health", "override", "security", "gc", "doctor", "portability", "gitignore", "clean", "policy", "ast", "validate", "checkpoint", "rollback_label", "checkpoint_list", "contract"]).describe("Safety action: guard=anti-patterns, verify=auto-run scoped tests, check=pre-exec safety, audit=query trail, lock=multi-agent, health=score, security=scan leaks, gc=garbage collect, doctor=health check, portability=paths, gitignore=config, clean=purge scratch dir & drift, policy=Policy-as-Code engine (Issue #24), ast/validate=AST-based code validation (Issue #22), checkpoint=create atomic snapshot (Issue #29), rollback_label=restore from checkpoint (Issue #29), checkpoint_list=list checkpoints, contract=run contract checks (Issue #26), override=bypass"),
2263
2263
  // Verify params
@@ -2571,7 +2571,7 @@ async function main() {
2571
2571
  });
2572
2572
  (async () => {
2573
2573
  try {
2574
- const { generateInitMdContent } = await import("./init-7MWMONZL.js");
2574
+ const { generateInitMdContent } = await import("./init-RLILMGIK.js");
2575
2575
  const fs7 = await import("fs");
2576
2576
  const path7 = await import("path");
2577
2577
  const initMdPath = path7.resolve(process.cwd(), ".kuma/init.md");
@@ -2588,7 +2588,7 @@ async function main() {
2588
2588
  (async () => {
2589
2589
  try {
2590
2590
  const { detectAgent, getSkillPath, getAgentLabel } = await import("./agentDetector-YOWQVJFR.js");
2591
- const { generateSkill, getSecondaryFiles } = await import("./skillGenerator-JIHFTNH6.js");
2591
+ const { generateSkill, getSecondaryFiles } = await import("./skillGenerator-G4RS74CB.js");
2592
2592
  const fs7 = await import("fs");
2593
2593
  const path7 = await import("path");
2594
2594
  const detection = detectAgent();
@@ -4,7 +4,7 @@ import {
4
4
  formatInitResults,
5
5
  generateInitMdContent,
6
6
  runInit
7
- } from "./chunk-LRO3HWGC.js";
7
+ } from "./chunk-3AN4RSN5.js";
8
8
  import "./chunk-E2KFPEBT.js";
9
9
  export {
10
10
  ALL_CONFIG_TYPES,
@@ -4,17 +4,20 @@ var BOOTSTRAP = [
4
4
  '**Before coding, call `kuma_context({ action: "init" })`** to load project context and session memory.',
5
5
  "Project knowledge persists in `.kuma/memories/*.md` across sessions.",
6
6
  "",
7
- "\u26A0\uFE0F **MANDATORY WORKFLOW** \u2014 Follow in order every session:",
7
+ "\u26A0\uFE0F **MANDATORY WORKFLOW** \u2014 Follow in order every session (including research-only):",
8
8
  "",
9
- ' 1. `kuma_context({ action: "init" })` \u2014 Load context (START HERE)',
10
- ' 2. `kuma_safety({ action: "guard" })` \u2014 Safety check before work',
9
+ ' 1. `kuma_context({ action: "init" })` \u2014 Load context (START HERE)',
10
+ ' 2. `kuma_safety({ action: "guard" })` \u2014 Safety check before work',
11
11
  ' 3. `kuma_context({ action: "research", scope: "<area>" })` \u2014 Research before editing',
12
- " 4. *(edit using native tools)*",
13
- ' 5. `kuma_memory({ action: "research_save", scope: "<area>" })` \u2014 Save findings',
14
- ' 6. `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 Verify changes',
15
- ' 7. `kuma_context({ action: "changes" })` \u2014 Review changes',
12
+ " 4. *(edit/read using native tools)*",
13
+ ' 5. `kuma_memory({ action: "research_save", ... })` \u2014 Save all findings',
14
+ ' 6. `kuma_memory({ action: "gotcha" })` \u2014 Record bugs/quirks found',
15
+ ' 7. `kuma_memory({ action: "arch_flow" })` \u2014 Record data flow if mapped',
16
+ ' 8. `kuma_memory({ action: "decision" })` \u2014 Record key findings/decisions',
17
+ ' 9. `kuma_safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
18
+ ' 10. `kuma_context({ action: "changes" })` \u2014 Review session activity',
16
19
  "",
17
- "\u26D4 Skipping workflow = stale context, missed decisions, unverified code.",
20
+ "\u26D4 Do NOT skip steps 5-10 after research \u2014 even if no code was changed.",
18
21
  "\u{1F4D6} Full rules: `.kuma/init.md`",
19
22
  "\u{1F9E0} Tools: `kuma_context` | `kuma_memory` | `kuma_safety`"
20
23
  ].join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumpslabs/kuma",
3
- "version": "2.3.14",
3
+ "version": "2.3.15",
4
4
  "description": "Safety-first context & orchestration engine for AI coding agents. MCP server with mandatory research pipeline, knowledge graph, impact analysis, decision memory, and safety guard — works with any MCP client.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",