@plumpslabs/kuma 2.3.15 → 2.3.16
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.
|
@@ -76,13 +76,16 @@ var BOOTSTRAP_LINES = [
|
|
|
76
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
78
|
" 4. *(edit/read using native tools)*",
|
|
79
|
-
' 5. `kuma_memory({ action: "research_save", ... })` \u2014
|
|
80
|
-
' 6. `kuma_memory({ action: "gotcha" })` \u2014
|
|
81
|
-
' 7. `kuma_memory({ action: "arch_flow" })` \u2014
|
|
82
|
-
' 8. `kuma_memory({ action: "decision" })` \u2014
|
|
79
|
+
' 5. `kuma_memory({ action: "research_save", ... })` \u2014 IMMEDIATELY after every read/grep (inline)',
|
|
80
|
+
' 6. `kuma_memory({ action: "gotcha" })` \u2014 IMMEDIATELY when bug/quirks found (inline)',
|
|
81
|
+
' 7. `kuma_memory({ action: "arch_flow" })` \u2014 IMMEDIATELY after tracing each flow hop (inline)',
|
|
82
|
+
' 8. `kuma_memory({ action: "decision" })` \u2014 IMMEDIATELY when choosing between options (inline)',
|
|
83
83
|
' 9. `kuma_safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
|
|
84
84
|
' 10. `kuma_context({ action: "changes" })` \u2014 Review session activity',
|
|
85
85
|
"",
|
|
86
|
+
"\u{1F504} Record findings INLINE as you work \u2014 not just at steps 5-8. Every read/grep = mini research_save.",
|
|
87
|
+
"\u{1F9E0} Knowledge graph is persistent \u2014 nodes/edges accumulate across sessions, getting richer over time.",
|
|
88
|
+
"",
|
|
86
89
|
"\u26D4 Do NOT skip steps 5-10 after research \u2014 even if no code was changed.",
|
|
87
90
|
"\u{1F4D6} Full rules: `.kuma/init.md`",
|
|
88
91
|
"\u{1F9E0} Tools: `kuma_context` | `kuma_memory` | `kuma_safety`"
|
|
@@ -305,38 +308,49 @@ function generateInitMdContent() {
|
|
|
305
308
|
"",
|
|
306
309
|
"> \u26A0\uFE0F **Research-only sessions included.** Workflow ini wajib meskipun session hanya membaca/riset tanpa code changes.",
|
|
307
310
|
"",
|
|
311
|
+
"> \u{1F9E0} **Graph Philosophy:** Record findings INLINE as you work, not just at the end. Every time you read a",
|
|
312
|
+
"> file, grep a pattern, or trace a flow \u2014 call `research_save` immediately to persist file/func/import nodes.",
|
|
313
|
+
"> The knowledge graph accumulates across sessions. The more you use it, the richer it becomes.",
|
|
314
|
+
"",
|
|
308
315
|
"**AUTO-RECORDED nodes/edges** (Kuma scanner detects these automatically):",
|
|
309
316
|
"- Files, Functions, Classes \u2192 created as graph nodes",
|
|
310
317
|
"- Imports, Calls, Extends \u2192 created as graph edges",
|
|
311
318
|
"- Variables, Components, Routes \u2192 created when detected",
|
|
312
319
|
"",
|
|
313
|
-
"
|
|
320
|
+
"**RECORD INLINE \u2014 Don't wait for steps 5-8:**",
|
|
321
|
+
"- After EVERY `read` that finds new files \u2192 call `research_save` mini (persist file nodes)",
|
|
322
|
+
"- After EVERY `grep` that discovers new functions \u2192 call `research_save` (persist function nodes)",
|
|
323
|
+
"- When you discover a bug/quirk \u2192 call `gotcha` IMMEDIATELY (not at step 6)",
|
|
324
|
+
"- When you trace a data flow hop \u2192 call `arch_flow` IMMEDIATELY (not at step 7)",
|
|
325
|
+
"- When you choose between options \u2192 call `decision` IMMEDIATELY (not at step 8)",
|
|
326
|
+
"",
|
|
327
|
+
"### STEP 5: Save Research (RECORD INLINE \u2014 After Every Read/Grep)",
|
|
314
328
|
"```",
|
|
315
|
-
'kuma_memory({ action: "research_save", scope: "<area>", confidence: 0.8 })',
|
|
329
|
+
'kuma_memory({ action: "research_save", scope: "<file or area>", confidence: 0.8 })',
|
|
316
330
|
"```",
|
|
317
|
-
"**When:**
|
|
318
|
-
"**Why:** Persist findings into knowledge graph + research cache",
|
|
331
|
+
"**When:** After EVERY read/grep that discovers new files, functions, imports, or patterns. Don't wait \u2014 record inline!",
|
|
332
|
+
"**Why:** Persist findings into knowledge graph + research cache. Graph grows richer across sessions.",
|
|
319
333
|
"",
|
|
320
|
-
"### STEP 6: Record Gotchas (
|
|
334
|
+
"### STEP 6: Record Gotchas (RECORD INLINE \u2014 When Bug Found)",
|
|
321
335
|
"```",
|
|
322
336
|
'kuma_memory({ action: "gotcha", filePath: "<file>", description: "...", severity: "medium" })',
|
|
323
337
|
"```",
|
|
324
|
-
"**When:** IMMEDIATELY
|
|
325
|
-
"**Why:** Prevents future agents from hitting the same issues. Every bug = a gotcha.",
|
|
338
|
+
"**When:** IMMEDIATELY when you discover bugs, quirks, unexpected behavior, or workarounds. Record INLINE, don't save for later.",
|
|
339
|
+
"**Why:** Prevents future agents from hitting the same issues. Every bug = a gotcha. Skip now = lost forever.",
|
|
326
340
|
"",
|
|
327
|
-
"### STEP 7: Record Arch Flow (
|
|
341
|
+
"### STEP 7: Record Arch Flow (RECORD INLINE \u2014 When Tracing Flow)",
|
|
328
342
|
"```",
|
|
329
343
|
'kuma_memory({ action: "arch_flow", content: "..." })',
|
|
330
344
|
"```",
|
|
331
|
-
"**When:** IMMEDIATELY after
|
|
332
|
-
"**Why:** Architecture knowledge dissipates fast. Record
|
|
345
|
+
"**When:** IMMEDIATELY after tracing EACH hop in a data/control flow. Record INLINE, then continue tracing the next hop.",
|
|
346
|
+
"**Why:** Architecture knowledge dissipates fast. Record each hop before moving to the next file/task.",
|
|
333
347
|
"",
|
|
334
|
-
"### STEP 8: Record Decision (
|
|
348
|
+
"### STEP 8: Record Decision (RECORD INLINE \u2014 When Choosing)",
|
|
335
349
|
"```",
|
|
336
350
|
'kuma_memory({ action: "decision", decisionAction: "record", title: "...", outcome: "..." })',
|
|
337
351
|
"```",
|
|
338
|
-
"**When:**
|
|
339
|
-
"**Why:** Saves ADR (Architecture Decision Record) \u2014
|
|
352
|
+
"**When:** IMMEDIATELY when you choose between 2+ options, uncover an architecture pattern, or identify a root cause.",
|
|
353
|
+
"**Why:** Saves ADR (Architecture Decision Record). Bukan cuma code changes \u2014 temuan, tradeoffs, root causes juga.",
|
|
340
354
|
"",
|
|
341
355
|
"### STEP 9: Verify (MANDATORY \u2014 After Research/Editing)",
|
|
342
356
|
"```",
|
|
@@ -373,10 +387,10 @@ function generateInitMdContent() {
|
|
|
373
387
|
"",
|
|
374
388
|
"| Action | Description | When to Call |",
|
|
375
389
|
"|--------|-------------|--------------|",
|
|
376
|
-
"| `research_save` | Save research results | STEP 5 \u2014 IMMEDIATELY after
|
|
377
|
-
"| `gotcha` | Record bugs/quirks/workarounds | STEP 6 \u2014 IMMEDIATELY
|
|
378
|
-
"| `arch_flow` | Document architecture flow | STEP 7 \u2014 IMMEDIATELY after
|
|
379
|
-
"| `decision` | ADR-style decision record | STEP 8 \u2014
|
|
390
|
+
"| `research_save` | Save research results | STEP 5 \u2014 IMMEDIATELY after every read/grep (inline) |",
|
|
391
|
+
"| `gotcha` | Record bugs/quirks/workarounds | STEP 6 \u2014 IMMEDIATELY when bug found (inline) |",
|
|
392
|
+
"| `arch_flow` | Document architecture flow | STEP 7 \u2014 IMMEDIATELY after each flow hop (inline) |",
|
|
393
|
+
"| `decision` | ADR-style decision record | STEP 8 \u2014 IMMEDIATELY when choosing (inline) |",
|
|
380
394
|
"| `mine` | Mine decisions from git log | When need historical context |",
|
|
381
395
|
"| `session` | Session summary | End of session |",
|
|
382
396
|
"| `heal` | Self-heal knowledge graph | When graph has errors |",
|
|
@@ -443,13 +457,16 @@ function generateInitMdContent() {
|
|
|
443
457
|
" 2. kuma_safety \u2192 guard \u2014 Safety check",
|
|
444
458
|
" 3. kuma_context \u2192 research \u2014 Research target area",
|
|
445
459
|
" --- EDIT/READ (use native tools) ---",
|
|
446
|
-
" 5. kuma_memory \u2192 research_save \u2014 Save
|
|
447
|
-
" 6. kuma_memory \u2192 gotcha \u2014 Record bugs/quirks found",
|
|
448
|
-
" 7. kuma_memory \u2192 arch_flow \u2014 Record data flow
|
|
449
|
-
" 8. kuma_memory \u2192 decision \u2014 Record key
|
|
460
|
+
" 5. kuma_memory \u2192 research_save \u2014 Save findings (inline after every read/grep)",
|
|
461
|
+
" 6. kuma_memory \u2192 gotcha \u2014 Record bugs/quirks (inline when found)",
|
|
462
|
+
" 7. kuma_memory \u2192 arch_flow \u2014 Record data flow (inline after each hop)",
|
|
463
|
+
" 8. kuma_memory \u2192 decision \u2014 Record key decisions (inline when choosing)",
|
|
450
464
|
" 9. kuma_safety \u2192 verify \u2014 Run tests / confirm nothing broken",
|
|
451
465
|
" 10. kuma_context \u2192 changes \u2014 Review session activity",
|
|
452
466
|
"",
|
|
467
|
+
"\u{1F504} Record INLINE as you work \u2014 not just at steps 5-8. Every read/grep = mini research_save.",
|
|
468
|
+
"\u{1F9E0} Graph is persistent \u2014 nodes/edges accumulate across sessions.",
|
|
469
|
+
"",
|
|
453
470
|
"ON DISCOVERY (When needed):",
|
|
454
471
|
" kuma_memory \u2192 domain_rules \u2014 Business rules (Layer 1)",
|
|
455
472
|
" kuma_memory \u2192 context \u2014 Additional notes",
|
|
@@ -509,13 +526,16 @@ function handleOpencodeSecondary(root, results) {
|
|
|
509
526
|
' 2. `kuma_kuma_safety({ action: "guard" })` \u2014 Safety check before work',
|
|
510
527
|
' 3. `kuma_kuma_context({ action: "research", scope: "<area>" })` \u2014 Research before editing',
|
|
511
528
|
" 4. *(edit/read using native tools)*",
|
|
512
|
-
' 5. `kuma_kuma_memory({ action: "research_save", ... })` \u2014 Save
|
|
513
|
-
' 6. `kuma_kuma_memory({ action: "gotcha" })` \u2014 Record bugs/quirks found',
|
|
514
|
-
' 7. `kuma_kuma_memory({ action: "arch_flow" })` \u2014 Record data flow
|
|
515
|
-
' 8. `kuma_kuma_memory({ action: "decision" })` \u2014 Record key
|
|
529
|
+
' 5. `kuma_kuma_memory({ action: "research_save", ... })` \u2014 Save findings (inline after every read/grep)',
|
|
530
|
+
' 6. `kuma_kuma_memory({ action: "gotcha" })` \u2014 Record bugs/quirks (inline when found)',
|
|
531
|
+
' 7. `kuma_kuma_memory({ action: "arch_flow" })` \u2014 Record data flow (inline after each hop)',
|
|
532
|
+
' 8. `kuma_kuma_memory({ action: "decision" })` \u2014 Record key decisions (inline when choosing)',
|
|
516
533
|
' 9. `kuma_kuma_safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
|
|
517
534
|
' 10. `kuma_kuma_context({ action: "changes" })` \u2014 Review session activity',
|
|
518
535
|
"",
|
|
536
|
+
"\u{1F504} Record findings INLINE as you work \u2014 Every read/grep = mini research_save.",
|
|
537
|
+
"\u{1F9E0} Graph is persistent \u2014 nodes/edges accumulate across sessions.",
|
|
538
|
+
"",
|
|
519
539
|
"\u26A0\uFE0F **OpenCode platform note:** Tool names are prefixed with `kuma_kuma_*`",
|
|
520
540
|
" (server name `kuma` + already-prefixed tool name `kuma_context`).",
|
|
521
541
|
"",
|
|
@@ -644,6 +664,9 @@ function getCombinedAgentsMd(selectedTypes) {
|
|
|
644
664
|
' 9. `[kuma_]safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
|
|
645
665
|
' 10. `[kuma_]context({ action: "changes" })` \u2014 Review session activity',
|
|
646
666
|
"",
|
|
667
|
+
"\u{1F504} Record findings INLINE as you work \u2014 Every read/grep = mini research_save.",
|
|
668
|
+
"\u{1F9E0} Graph is persistent \u2014 nodes/edges accumulate across sessions.",
|
|
669
|
+
"",
|
|
647
670
|
"\u26D4 Do NOT skip steps 5-10 after research \u2014 even if no code was changed.",
|
|
648
671
|
"",
|
|
649
672
|
"Replace `[kuma_]` with the correct prefix for your platform (see below).",
|
|
@@ -851,13 +874,16 @@ function handleQuickrefGeneration(root, results) {
|
|
|
851
874
|
' 2. `kuma_safety({ action: "guard" })` \u2014 Safety check',
|
|
852
875
|
' 3. `kuma_context({ action: "research", scope: "<area>" })` \u2014 Research',
|
|
853
876
|
" 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',
|
|
877
|
+
' 5. `kuma_memory({ action: "research_save", ... })` \u2014 Save findings (inline after every read)',
|
|
878
|
+
' 6. `kuma_memory({ action: "gotcha" })` \u2014 Gotchas (inline when found)',
|
|
879
|
+
' 7. `kuma_memory({ action: "arch_flow" })` \u2014 Arch flow (inline after each hop)',
|
|
880
|
+
' 8. `kuma_memory({ action: "decision" })` \u2014 Decision (inline when choosing)',
|
|
858
881
|
' 9. `kuma_safety({ action: "verify", ... })` \u2014 Verify',
|
|
859
882
|
' 10. `kuma_context({ action: "changes" })` \u2014 Review changes',
|
|
860
883
|
"",
|
|
884
|
+
"\u{1F504} Record INLINE as you work \u2014 Every read/grep = mini research_save.",
|
|
885
|
+
"\u{1F9E0} Graph is persistent \u2014 accumulates across sessions.",
|
|
886
|
+
"",
|
|
861
887
|
"\u26D4 Steps 5-10 are mandatory even for research-only sessions!",
|
|
862
888
|
"",
|
|
863
889
|
"## Platform Tool Names",
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ALL_CONFIG_TYPES,
|
|
9
9
|
formatInitResults,
|
|
10
10
|
runInit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-S7BQGNHQ.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 research/editing every session** (including research-only).\n\
|
|
2193
|
+
"**Call AFTER research/editing every session** (including research-only). Record INLINE as you work.\n\nRECORD INLINE (call IMMEDIATELY during research):\n\u2022 STEP 5: `research_save` \u2014 every read/grep that finds new files/functions. Don't wait!\n\u2022 STEP 6: `gotcha` \u2014 IMMEDIATELY when you discover bugs/quirks. Record INLINE, not at the end.\n\u2022 STEP 7: `arch_flow` \u2014 IMMEDIATELY after EACH flow hop trace. Record before next task.\n\u2022 STEP 8: `decision` \u2014 IMMEDIATELY when choosing between options or finding architecture patterns.\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"),
|
|
@@ -2571,7 +2571,7 @@ async function main() {
|
|
|
2571
2571
|
});
|
|
2572
2572
|
(async () => {
|
|
2573
2573
|
try {
|
|
2574
|
-
const { generateInitMdContent } = await import("./init-
|
|
2574
|
+
const { generateInitMdContent } = await import("./init-P3DAC23E.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-
|
|
2591
|
+
const { generateSkill, getSecondaryFiles } = await import("./skillGenerator-GYEDLFZP.js");
|
|
2592
2592
|
const fs7 = await import("fs");
|
|
2593
2593
|
const path7 = await import("path");
|
|
2594
2594
|
const detection = detectAgent();
|
|
@@ -10,13 +10,16 @@ var BOOTSTRAP = [
|
|
|
10
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
12
|
" 4. *(edit/read using native tools)*",
|
|
13
|
-
' 5. `kuma_memory({ action: "research_save", ... })` \u2014 Save
|
|
14
|
-
' 6. `kuma_memory({ action: "gotcha" })` \u2014 Record bugs/quirks found',
|
|
15
|
-
' 7. `kuma_memory({ action: "arch_flow" })` \u2014 Record data flow
|
|
16
|
-
' 8. `kuma_memory({ action: "decision" })` \u2014 Record key
|
|
13
|
+
' 5. `kuma_memory({ action: "research_save", ... })` \u2014 Save findings (inline after every read/grep)',
|
|
14
|
+
' 6. `kuma_memory({ action: "gotcha" })` \u2014 Record bugs/quirks (inline when found)',
|
|
15
|
+
' 7. `kuma_memory({ action: "arch_flow" })` \u2014 Record data flow (inline after each hop)',
|
|
16
|
+
' 8. `kuma_memory({ action: "decision" })` \u2014 Record key decisions (inline when choosing)',
|
|
17
17
|
' 9. `kuma_safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
|
|
18
18
|
' 10. `kuma_context({ action: "changes" })` \u2014 Review session activity',
|
|
19
19
|
"",
|
|
20
|
+
"\u{1F504} Record findings INLINE as you work \u2014 Every read/grep = mini research_save.",
|
|
21
|
+
"\u{1F9E0} Knowledge graph is persistent \u2014 nodes/edges accumulate across sessions, getting richer over time.",
|
|
22
|
+
"",
|
|
20
23
|
"\u26D4 Do NOT skip steps 5-10 after research \u2014 even if no code was changed.",
|
|
21
24
|
"\u{1F4D6} Full rules: `.kuma/init.md`",
|
|
22
25
|
"\u{1F9E0} Tools: `kuma_context` | `kuma_memory` | `kuma_safety`"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumpslabs/kuma",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.16",
|
|
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",
|