@plumpslabs/kuma 2.3.20 → 2.3.23
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.
- package/README.md +18 -0
- package/dist/index.js +10316 -380
- package/package.json +2 -2
- package/packages/ide/studio/dist/index.js +90 -9
- package/packages/ide/studio/public/index.html +528 -233
- package/dist/agentDetector-YOWQVJFR.js +0 -186
- package/dist/chunk-3BRBJZ7P.js +0 -1055
- package/dist/chunk-3OHYYXYN.js +0 -71
- package/dist/chunk-ABKE45T4.js +0 -1264
- package/dist/chunk-E2KFPEBT.js +0 -183
- package/dist/chunk-FKRSI5U5.js +0 -282
- package/dist/chunk-GFLSAXAH.js +0 -155
- package/dist/chunk-L7F67KUP.js +0 -172
- package/dist/chunk-LVKOGXLC.js +0 -658
- package/dist/chunk-PRUTTZBS.js +0 -1113
- package/dist/contextDigest-QB5XHPXE.js +0 -177
- package/dist/domainRules-QLPAQASB.js +0 -20
- package/dist/init-PL4XL662.js +0 -15
- package/dist/kumaAstValidator-CNM7FHYA.js +0 -150
- package/dist/kumaCheckpoint-J2LDQMEO.js +0 -207
- package/dist/kumaCodeScanner-J6B2EHGI.js +0 -563
- package/dist/kumaContractEngine-KX27T4N7.js +0 -305
- package/dist/kumaDb-4XZ5S2LH.js +0 -65
- package/dist/kumaDriftDetector-TOORILSZ.js +0 -237
- package/dist/kumaGotchas-XRGFFBTA.js +0 -151
- package/dist/kumaGraph-UMXZNGYF.js +0 -44
- package/dist/kumaMemory-FBJMV77G.js +0 -16
- package/dist/kumaMiner-XJETL7TL.js +0 -176
- package/dist/kumaPolicyEngine-2QDJDLM7.js +0 -311
- package/dist/kumaProgressiveContext-MWEDRXOH.js +0 -231
- package/dist/kumaSearch-PV4QTKE7.js +0 -321
- package/dist/kumaTrajectory-7NOAVNG2.js +0 -460
- package/dist/kumaVerifier-6YEGC77M.js +0 -265
- package/dist/kumaVisualize-264OEBGJ.js +0 -264
- package/dist/pathValidator-V4DC6U6Z.js +0 -22
- package/dist/safetyAudit-O45SPNTS.js +0 -12
- package/dist/safetyScore-TMMRD2MV.js +0 -333
- package/dist/sessionMemory-YPKVIOMV.js +0 -6
- package/dist/skillGenerator-PWEJKZNX.js +0 -304
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getGitDiffStat,
|
|
3
|
-
getSessionStats,
|
|
4
|
-
getUnresolvedCount
|
|
5
|
-
} from "./chunk-3OHYYXYN.js";
|
|
6
|
-
import {
|
|
7
|
-
sessionMemory
|
|
8
|
-
} from "./chunk-LVKOGXLC.js";
|
|
9
|
-
import "./chunk-E2KFPEBT.js";
|
|
10
|
-
|
|
11
|
-
// src/engine/safetyScore.ts
|
|
12
|
-
async function computeSafetyScore(inputGoal) {
|
|
13
|
-
const stats = getSessionStats(inputGoal);
|
|
14
|
-
const checks = [];
|
|
15
|
-
let totalScore = 0;
|
|
16
|
-
const maxScore = 100;
|
|
17
|
-
const gitStat = getGitDiffStat();
|
|
18
|
-
if (gitStat && gitStat !== "clean") {
|
|
19
|
-
const lines = gitStat.split("\n").filter(Boolean).length;
|
|
20
|
-
if (lines === 0) {
|
|
21
|
-
checks.push({
|
|
22
|
-
label: "Git Clean",
|
|
23
|
-
status: "pass",
|
|
24
|
-
message: "Working tree is clean",
|
|
25
|
-
weight: 20
|
|
26
|
-
});
|
|
27
|
-
totalScore += 20;
|
|
28
|
-
} else if (lines <= 3) {
|
|
29
|
-
checks.push({
|
|
30
|
-
label: "Git Clean",
|
|
31
|
-
status: "warn",
|
|
32
|
-
message: `${lines} file(s) modified`,
|
|
33
|
-
weight: 15
|
|
34
|
-
});
|
|
35
|
-
totalScore += 15;
|
|
36
|
-
} else {
|
|
37
|
-
checks.push({
|
|
38
|
-
label: "Git Clean",
|
|
39
|
-
status: "warn",
|
|
40
|
-
message: `${lines} file(s) modified \u2014 consider committing or stashing`,
|
|
41
|
-
weight: 10
|
|
42
|
-
});
|
|
43
|
-
totalScore += 10;
|
|
44
|
-
}
|
|
45
|
-
} else if (gitStat === "clean") {
|
|
46
|
-
checks.push({
|
|
47
|
-
label: "Git Clean",
|
|
48
|
-
status: "pass",
|
|
49
|
-
message: "Working tree is clean",
|
|
50
|
-
weight: 20
|
|
51
|
-
});
|
|
52
|
-
totalScore += 20;
|
|
53
|
-
} else {
|
|
54
|
-
checks.push({
|
|
55
|
-
label: "Git Status",
|
|
56
|
-
status: "pass",
|
|
57
|
-
message: "Not a git repository or git unavailable",
|
|
58
|
-
weight: 20
|
|
59
|
-
});
|
|
60
|
-
totalScore += 20;
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
const { getDb } = await import("./kumaDb-4XZ5S2LH.js");
|
|
64
|
-
const db = await getDb();
|
|
65
|
-
const nodeCount = db.exec("SELECT COUNT(*) as c FROM nodes")[0]?.values[0][0] ?? 0;
|
|
66
|
-
const edgeCount = db.exec("SELECT COUNT(*) as c FROM edges")[0]?.values[0][0] ?? 0;
|
|
67
|
-
if (nodeCount > 0) {
|
|
68
|
-
checks.push({
|
|
69
|
-
label: "Graph Health",
|
|
70
|
-
status: "pass",
|
|
71
|
-
message: `${nodeCount} nodes, ${edgeCount} edges`,
|
|
72
|
-
weight: 10
|
|
73
|
-
});
|
|
74
|
-
totalScore += 10;
|
|
75
|
-
} else {
|
|
76
|
-
checks.push({
|
|
77
|
-
label: "Graph Health",
|
|
78
|
-
status: "warn",
|
|
79
|
-
message: "Empty knowledge graph \u2014 run research first",
|
|
80
|
-
weight: 5
|
|
81
|
-
});
|
|
82
|
-
totalScore += 5;
|
|
83
|
-
}
|
|
84
|
-
} catch {
|
|
85
|
-
checks.push({
|
|
86
|
-
label: "Graph Health",
|
|
87
|
-
status: "warn",
|
|
88
|
-
message: "Could not check graph health",
|
|
89
|
-
weight: 5
|
|
90
|
-
});
|
|
91
|
-
totalScore += 5;
|
|
92
|
-
}
|
|
93
|
-
try {
|
|
94
|
-
const { getDb } = await import("./kumaDb-4XZ5S2LH.js");
|
|
95
|
-
const db = await getDb();
|
|
96
|
-
const researchCount = db.exec("SELECT COUNT(*) as c FROM research_cache")[0]?.values[0][0] ?? 0;
|
|
97
|
-
checks.push({
|
|
98
|
-
label: "Research Cached",
|
|
99
|
-
status: researchCount > 0 ? "pass" : "warn",
|
|
100
|
-
message: researchCount > 0 ? `${researchCount} research scope(s) cached` : "No research cached \u2014 run kuma_context research first",
|
|
101
|
-
weight: 10
|
|
102
|
-
});
|
|
103
|
-
totalScore += researchCount > 0 ? 10 : 5;
|
|
104
|
-
} catch {
|
|
105
|
-
checks.push({
|
|
106
|
-
label: "Research Cached",
|
|
107
|
-
status: "warn",
|
|
108
|
-
message: "Could not check research cache",
|
|
109
|
-
weight: 5
|
|
110
|
-
});
|
|
111
|
-
totalScore += 5;
|
|
112
|
-
}
|
|
113
|
-
const unresolvedCount = getUnresolvedCount(stats.failedFiles);
|
|
114
|
-
const allFailures = stats.failedFiles.flatMap((f) => f.failures);
|
|
115
|
-
const testFailures = allFailures.filter((f) => f.error.toLowerCase().includes("test") || f.error.toLowerCase().includes("fail"));
|
|
116
|
-
const hasRunTests = stats.hasRunTests;
|
|
117
|
-
let latestVerif = null;
|
|
118
|
-
try {
|
|
119
|
-
const { getLatestVerifications } = await import("./kumaDb-4XZ5S2LH.js");
|
|
120
|
-
const verifs = await getLatestVerifications(1);
|
|
121
|
-
if (verifs.length > 0) latestVerif = verifs[0];
|
|
122
|
-
} catch {
|
|
123
|
-
}
|
|
124
|
-
if (!hasRunTests && !latestVerif) {
|
|
125
|
-
checks.push({
|
|
126
|
-
label: "Tests Status",
|
|
127
|
-
status: "warn",
|
|
128
|
-
message: "No tests run yet this session \u2014 run kuma_safety({ action: 'verify' })",
|
|
129
|
-
weight: 10
|
|
130
|
-
});
|
|
131
|
-
totalScore += 10;
|
|
132
|
-
} else if (latestVerif) {
|
|
133
|
-
if (latestVerif.passed) {
|
|
134
|
-
checks.push({
|
|
135
|
-
label: "Tests Status",
|
|
136
|
-
status: "pass",
|
|
137
|
-
message: `Auto-verified passed (${latestVerif.scope})`,
|
|
138
|
-
weight: 15
|
|
139
|
-
});
|
|
140
|
-
totalScore += 15;
|
|
141
|
-
} else {
|
|
142
|
-
checks.push({
|
|
143
|
-
label: "Tests Status",
|
|
144
|
-
status: "fail",
|
|
145
|
-
message: `Auto-verification failed (${latestVerif.scope}) \u2014 fix before shipping`,
|
|
146
|
-
weight: 0
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
} else if (testFailures.length === 0 && unresolvedCount === 0) {
|
|
150
|
-
checks.push({
|
|
151
|
-
label: "Tests Status",
|
|
152
|
-
status: "pass",
|
|
153
|
-
message: "All tests passing",
|
|
154
|
-
weight: 15
|
|
155
|
-
});
|
|
156
|
-
totalScore += 15;
|
|
157
|
-
} else if (testFailures.length <= 2) {
|
|
158
|
-
checks.push({
|
|
159
|
-
label: "Tests Status",
|
|
160
|
-
status: "warn",
|
|
161
|
-
message: `${testFailures.length} test failure(s) \u2014 needs attention`,
|
|
162
|
-
weight: 8
|
|
163
|
-
});
|
|
164
|
-
totalScore += 8;
|
|
165
|
-
} else {
|
|
166
|
-
checks.push({
|
|
167
|
-
label: "Tests Status",
|
|
168
|
-
status: "fail",
|
|
169
|
-
message: `${testFailures.length} test failure(s) \u2014 fix before proceeding`,
|
|
170
|
-
weight: 3
|
|
171
|
-
});
|
|
172
|
-
totalScore += 3;
|
|
173
|
-
}
|
|
174
|
-
const modifiedCount = stats.modifiedFiles.length;
|
|
175
|
-
if (modifiedCount === 0) {
|
|
176
|
-
checks.push({
|
|
177
|
-
label: "Modified Files",
|
|
178
|
-
status: "pass",
|
|
179
|
-
message: "No files modified yet",
|
|
180
|
-
weight: 15
|
|
181
|
-
});
|
|
182
|
-
totalScore += 15;
|
|
183
|
-
} else if (modifiedCount <= 3) {
|
|
184
|
-
checks.push({
|
|
185
|
-
label: "Modified Files",
|
|
186
|
-
status: "warn",
|
|
187
|
-
message: `${modifiedCount} file(s) modified`,
|
|
188
|
-
weight: 12
|
|
189
|
-
});
|
|
190
|
-
totalScore += 12;
|
|
191
|
-
} else if (modifiedCount <= 8) {
|
|
192
|
-
checks.push({
|
|
193
|
-
label: "Modified Files",
|
|
194
|
-
status: "warn",
|
|
195
|
-
message: `${modifiedCount} file(s) modified \u2014 consider a checkpoint`,
|
|
196
|
-
weight: 8
|
|
197
|
-
});
|
|
198
|
-
totalScore += 8;
|
|
199
|
-
} else {
|
|
200
|
-
checks.push({
|
|
201
|
-
label: "Modified Files",
|
|
202
|
-
status: "fail",
|
|
203
|
-
message: `${modifiedCount} file(s) modified \u2014 consider committing`,
|
|
204
|
-
weight: 4
|
|
205
|
-
});
|
|
206
|
-
totalScore += 4;
|
|
207
|
-
}
|
|
208
|
-
const loop = sessionMemory.detectLoop();
|
|
209
|
-
if (loop.isLooping) {
|
|
210
|
-
checks.push({
|
|
211
|
-
label: "Loop Detection",
|
|
212
|
-
status: "fail",
|
|
213
|
-
message: loop.message || "Potential tool call loop detected",
|
|
214
|
-
weight: 0
|
|
215
|
-
});
|
|
216
|
-
} else {
|
|
217
|
-
checks.push({
|
|
218
|
-
label: "Loop Detection",
|
|
219
|
-
status: "pass",
|
|
220
|
-
message: "No loops detected",
|
|
221
|
-
weight: 10
|
|
222
|
-
});
|
|
223
|
-
totalScore += 10;
|
|
224
|
-
}
|
|
225
|
-
if (unresolvedCount === 0) {
|
|
226
|
-
checks.push({
|
|
227
|
-
label: "Unresolved Failures",
|
|
228
|
-
status: "pass",
|
|
229
|
-
message: "No unresolved failures",
|
|
230
|
-
weight: 10
|
|
231
|
-
});
|
|
232
|
-
totalScore += 10;
|
|
233
|
-
} else if (unresolvedCount <= 2) {
|
|
234
|
-
checks.push({
|
|
235
|
-
label: "Unresolved Failures",
|
|
236
|
-
status: "warn",
|
|
237
|
-
message: `${unresolvedCount} unresolved failure(s)`,
|
|
238
|
-
weight: 6
|
|
239
|
-
});
|
|
240
|
-
totalScore += 6;
|
|
241
|
-
} else {
|
|
242
|
-
checks.push({
|
|
243
|
-
label: "Unresolved Failures",
|
|
244
|
-
status: "fail",
|
|
245
|
-
message: `${unresolvedCount} unresolved failure(s) \u2014 fix before continuing`,
|
|
246
|
-
weight: 2
|
|
247
|
-
});
|
|
248
|
-
totalScore += 2;
|
|
249
|
-
}
|
|
250
|
-
const hasConventions = !!sessionMemory.getConventions();
|
|
251
|
-
if (hasConventions) {
|
|
252
|
-
checks.push({
|
|
253
|
-
label: "Project Detected",
|
|
254
|
-
status: "pass",
|
|
255
|
-
message: "Framework, test runner, and conventions detected",
|
|
256
|
-
weight: 5
|
|
257
|
-
});
|
|
258
|
-
totalScore += 5;
|
|
259
|
-
} else {
|
|
260
|
-
checks.push({
|
|
261
|
-
label: "Project Detected",
|
|
262
|
-
status: "warn",
|
|
263
|
-
message: "Run project_conventions() to detect stack",
|
|
264
|
-
weight: 2
|
|
265
|
-
});
|
|
266
|
-
totalScore += 2;
|
|
267
|
-
}
|
|
268
|
-
const goal = inputGoal || sessionMemory.getSummary().currentGoal || "";
|
|
269
|
-
if (goal) {
|
|
270
|
-
checks.push({
|
|
271
|
-
label: "Goal Set",
|
|
272
|
-
status: "pass",
|
|
273
|
-
message: `Current goal: "${goal.substring(0, 60)}"`,
|
|
274
|
-
weight: 5
|
|
275
|
-
});
|
|
276
|
-
totalScore += 5;
|
|
277
|
-
} else {
|
|
278
|
-
checks.push({
|
|
279
|
-
label: "Goal Set",
|
|
280
|
-
status: "warn",
|
|
281
|
-
message: "No goal set \u2014 use goal parameter or setGoal to track intent",
|
|
282
|
-
weight: 2
|
|
283
|
-
});
|
|
284
|
-
totalScore += 2;
|
|
285
|
-
}
|
|
286
|
-
let risk;
|
|
287
|
-
if (totalScore >= 85) risk = "LOW";
|
|
288
|
-
else if (totalScore >= 65) risk = "MEDIUM";
|
|
289
|
-
else if (totalScore >= 40) risk = "HIGH";
|
|
290
|
-
else risk = "CRITICAL";
|
|
291
|
-
const passCount = checks.filter((c) => c.status === "pass").length;
|
|
292
|
-
const warnCount = checks.filter((c) => c.status === "warn").length;
|
|
293
|
-
const failCount = checks.filter((c) => c.status === "fail").length;
|
|
294
|
-
const summaryParts = [];
|
|
295
|
-
if (passCount > 0) summaryParts.push(`${passCount} check(s) passed`);
|
|
296
|
-
if (warnCount > 0) summaryParts.push(`${warnCount} warning(s)`);
|
|
297
|
-
if (failCount > 0) summaryParts.push(`${failCount} failure(s)`);
|
|
298
|
-
return {
|
|
299
|
-
score: totalScore,
|
|
300
|
-
maxScore,
|
|
301
|
-
risk,
|
|
302
|
-
checks,
|
|
303
|
-
summary: summaryParts.join(", "),
|
|
304
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
305
|
-
};
|
|
306
|
-
}
|
|
307
|
-
function formatSafetyScore(report) {
|
|
308
|
-
const barLength = 20;
|
|
309
|
-
const filledBars = Math.round(report.score / report.maxScore * barLength);
|
|
310
|
-
const emptyBars = barLength - filledBars;
|
|
311
|
-
const bar = "\u2588".repeat(filledBars) + "\u2591".repeat(emptyBars);
|
|
312
|
-
const riskEmoji = report.risk === "LOW" ? "\u{1F7E2}" : report.risk === "MEDIUM" ? "\u{1F7E1}" : report.risk === "HIGH" ? "\u{1F7E0}" : "\u{1F534}";
|
|
313
|
-
const lines = [
|
|
314
|
-
`\u{1F6E1}\uFE0F **Safety Score: ${report.score}/${report.maxScore}** ${riskEmoji}`,
|
|
315
|
-
` ${bar}`,
|
|
316
|
-
` Risk: **${report.risk}** \u2014 ${report.summary}`,
|
|
317
|
-
"",
|
|
318
|
-
"**Checks:**"
|
|
319
|
-
];
|
|
320
|
-
for (const check of report.checks) {
|
|
321
|
-
const icon = check.status === "pass" ? "\u2705" : check.status === "warn" ? "\u26A0\uFE0F" : "\u274C";
|
|
322
|
-
lines.push(` ${icon} **${check.label}:** ${check.message}`);
|
|
323
|
-
}
|
|
324
|
-
lines.push(
|
|
325
|
-
"",
|
|
326
|
-
"\u{1F4A1} Run kuma_safety_score() at any time to re-evaluate project health."
|
|
327
|
-
);
|
|
328
|
-
return lines.join("\n");
|
|
329
|
-
}
|
|
330
|
-
export {
|
|
331
|
-
computeSafetyScore,
|
|
332
|
-
formatSafetyScore
|
|
333
|
-
};
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
// src/utils/skillGenerator.ts
|
|
2
|
-
var BOOTSTRAP = [
|
|
3
|
-
"Kuma MCP tools are available (kuma_context, kuma_memory, kuma_safety).",
|
|
4
|
-
'**Before coding, call `kuma_context({ action: "init" })`** to load project context and session memory.',
|
|
5
|
-
"Project knowledge persists in `.kuma/memories/*.md` across sessions.",
|
|
6
|
-
"",
|
|
7
|
-
"\u26A0\uFE0F **MANDATORY WORKFLOW** \u2014 Follow in order every session (including research-only):",
|
|
8
|
-
"",
|
|
9
|
-
' 1. `kuma_context({ action: "init" })` \u2014 Load context (START HERE)',
|
|
10
|
-
' 2. `kuma_safety({ action: "guard" })` \u2014 Safety check before work',
|
|
11
|
-
' 3. `kuma_context({ action: "research", scope: "<area>" })` \u2014 Research before editing',
|
|
12
|
-
" 4. *(edit/read using native tools)*",
|
|
13
|
-
' 5. `kuma_memory({ action: "research_save", ... })` \u2014 After exploring area (creates search cache)',
|
|
14
|
-
' 6. `kuma_memory({ action: "gotcha" })` \u2014 \u{1F525} IMMEDIATELY when bug found (exponential value)',
|
|
15
|
-
' 7. `kuma_memory({ action: "arch_flow" })` \u2014 \u{1F525} IMMEDIATELY after each flow hop (exponential value)',
|
|
16
|
-
' 8. `kuma_memory({ action: "decision" })` \u2014 When choosing between options (preserves rationale)',
|
|
17
|
-
' 9. `kuma_safety({ action: "verify", ... })` \u2014 Run tests / confirm nothing broken',
|
|
18
|
-
' 10. `kuma_context({ action: "changes" })` \u2014 Review session activity',
|
|
19
|
-
"",
|
|
20
|
-
"\u{1F525} **Power Curve:** `arch_flow` + `gotcha` are EXPONENTIAL \u2014 each record saves 5-10 files next session.",
|
|
21
|
-
" The more you record, the more overpowered the agent becomes. These are the highest-value actions.",
|
|
22
|
-
"\u{1F7E2} **SKIP** recording function/class/component nodes \u2014 grep/glob is faster.",
|
|
23
|
-
"\u{1F9E0} Knowledge graph is persistent \u2014 nodes/edges accumulate across sessions, getting richer over time.",
|
|
24
|
-
"",
|
|
25
|
-
"\u26D4 Do NOT skip steps 5-10 after research \u2014 even if no code was changed.",
|
|
26
|
-
"\u{1F4D6} Full rules: `.kuma/init.md`",
|
|
27
|
-
"\u{1F9E0} Tools: `kuma_context` | `kuma_memory` | `kuma_safety`"
|
|
28
|
-
].join("\n");
|
|
29
|
-
function generateSkill(type) {
|
|
30
|
-
switch (type) {
|
|
31
|
-
case "claude":
|
|
32
|
-
return generateClaudeSkill();
|
|
33
|
-
case "cursor":
|
|
34
|
-
return generateCursorSkill();
|
|
35
|
-
case "cline":
|
|
36
|
-
return generateClineSkill();
|
|
37
|
-
case "antigravity":
|
|
38
|
-
return generateAntigravitySkill();
|
|
39
|
-
case "codex":
|
|
40
|
-
return generateCodexSkill();
|
|
41
|
-
case "opencode":
|
|
42
|
-
return generateOpencodeSkill();
|
|
43
|
-
case "aider":
|
|
44
|
-
return generateAiderSkill();
|
|
45
|
-
case "windsurf":
|
|
46
|
-
return generateWindsurfSkill();
|
|
47
|
-
case "copilot":
|
|
48
|
-
return generateCopilotSkill();
|
|
49
|
-
case "qwen":
|
|
50
|
-
return generateQwenSkill();
|
|
51
|
-
case "kiro":
|
|
52
|
-
return generateKiroSkill();
|
|
53
|
-
case "openclaw":
|
|
54
|
-
return generateOpenclawSkill();
|
|
55
|
-
case "codewhale":
|
|
56
|
-
return generateCodewhaleSkill();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function getSecondaryFiles(type) {
|
|
60
|
-
switch (type) {
|
|
61
|
-
case "antigravity":
|
|
62
|
-
return [{ path: ".agents/mcp_config.json", content: generateAntigravityMcpConfig() }];
|
|
63
|
-
case "codex":
|
|
64
|
-
return [{ path: ".codex/config.toml", content: generateCodexConfigToml() }];
|
|
65
|
-
case "qwen":
|
|
66
|
-
return [{ path: "settings.json", content: generateQwenSettings() }];
|
|
67
|
-
case "aider":
|
|
68
|
-
return [{ path: ".aider.conf.yml", content: generateAiderConfig() }];
|
|
69
|
-
case "codewhale":
|
|
70
|
-
return [{ path: ".codewhale/mcp.json", content: generateCodewhaleMcpConfig() }];
|
|
71
|
-
default:
|
|
72
|
-
return [];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function generateClaudeSkill() {
|
|
76
|
-
return [
|
|
77
|
-
"---",
|
|
78
|
-
"name: kuma-mcp",
|
|
79
|
-
"description: Kuma MCP \u2014 safety toolkit for AI coding agents",
|
|
80
|
-
"---",
|
|
81
|
-
"",
|
|
82
|
-
BOOTSTRAP,
|
|
83
|
-
"",
|
|
84
|
-
"\u{1F4D6} **Usage:**",
|
|
85
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
86
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check before risky ops',
|
|
87
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
88
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules",
|
|
89
|
-
" \u2022 `.kuma/memories/` \u2014 persistent project knowledge"
|
|
90
|
-
].join("\n");
|
|
91
|
-
}
|
|
92
|
-
function generateCursorSkill() {
|
|
93
|
-
return [
|
|
94
|
-
"---",
|
|
95
|
-
"description: Kuma MCP \u2014 safety and context runtime for AI agents",
|
|
96
|
-
"alwaysApply: true",
|
|
97
|
-
"---",
|
|
98
|
-
"",
|
|
99
|
-
BOOTSTRAP,
|
|
100
|
-
"",
|
|
101
|
-
"\u{1F4D6} **Usage:**",
|
|
102
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
103
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check before risky ops',
|
|
104
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
105
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules",
|
|
106
|
-
" \u2022 `.kuma/memories/` \u2014 persistent project knowledge"
|
|
107
|
-
].join("\n");
|
|
108
|
-
}
|
|
109
|
-
function generateClineSkill() {
|
|
110
|
-
return [
|
|
111
|
-
"---",
|
|
112
|
-
"description: Kuma MCP \u2014 safety toolkit for AI coding agents",
|
|
113
|
-
"paths:",
|
|
114
|
-
' - "*"',
|
|
115
|
-
"---",
|
|
116
|
-
"",
|
|
117
|
-
BOOTSTRAP,
|
|
118
|
-
"",
|
|
119
|
-
"\u{1F4D6} **Usage:**",
|
|
120
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
121
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check before risky ops',
|
|
122
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
123
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules"
|
|
124
|
-
].join("\n");
|
|
125
|
-
}
|
|
126
|
-
function generateAntigravitySkill() {
|
|
127
|
-
return [
|
|
128
|
-
"---",
|
|
129
|
-
"name: kuma-mcp",
|
|
130
|
-
"description: Kuma MCP \u2014 safety toolkit for AI coding agents",
|
|
131
|
-
"---",
|
|
132
|
-
"",
|
|
133
|
-
BOOTSTRAP,
|
|
134
|
-
"",
|
|
135
|
-
"\u{1F4D6} **Usage:**",
|
|
136
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
137
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check',
|
|
138
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
139
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules"
|
|
140
|
-
].join("\n");
|
|
141
|
-
}
|
|
142
|
-
function generateAntigravityMcpConfig() {
|
|
143
|
-
return JSON.stringify({
|
|
144
|
-
mcpServers: {
|
|
145
|
-
kuma: {
|
|
146
|
-
command: "npx",
|
|
147
|
-
args: ["-y", "@plumpslabs/kuma"],
|
|
148
|
-
env: {}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}, null, 2) + "\n";
|
|
152
|
-
}
|
|
153
|
-
function generateCodexSkill() {
|
|
154
|
-
return generateAntigravitySkill();
|
|
155
|
-
}
|
|
156
|
-
function generateCodexConfigToml() {
|
|
157
|
-
return [
|
|
158
|
-
"# Generated by Kuma MCP - https://github.com/plumpslabs/kuma",
|
|
159
|
-
"# Kuma MCP server config for Codex CLI",
|
|
160
|
-
"",
|
|
161
|
-
"[mcp_servers.kuma]",
|
|
162
|
-
'command = "npx"',
|
|
163
|
-
'args = ["-y", "@plumpslabs/kuma"]',
|
|
164
|
-
""
|
|
165
|
-
].join("\n");
|
|
166
|
-
}
|
|
167
|
-
function generateOpencodeSkill() {
|
|
168
|
-
return [
|
|
169
|
-
"---",
|
|
170
|
-
"name: kuma-mcp",
|
|
171
|
-
"description: Kuma MCP \u2014 safety toolkit for AI coding agents. Research, memory, and safety guard.",
|
|
172
|
-
"---",
|
|
173
|
-
"",
|
|
174
|
-
"\u26A0\uFE0F **OpenCode platform note:** Tool names use `kuma_kuma_*` prefix",
|
|
175
|
-
" (server name `kuma` + already-prefixed `kuma_context`).",
|
|
176
|
-
' Example: `kuma_kuma_context({ action: "init" })`',
|
|
177
|
-
"",
|
|
178
|
-
BOOTSTRAP,
|
|
179
|
-
"",
|
|
180
|
-
"\u{1F4D6} Read `.kuma/init.md` for detailed rules."
|
|
181
|
-
].join("\n");
|
|
182
|
-
}
|
|
183
|
-
function generateAiderSkill() {
|
|
184
|
-
return [
|
|
185
|
-
"# Kuma MCP \u2014 Aider Conventions",
|
|
186
|
-
"",
|
|
187
|
-
BOOTSTRAP,
|
|
188
|
-
"",
|
|
189
|
-
"\u{1F4D6} **Usage:**",
|
|
190
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
191
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check',
|
|
192
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
193
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules"
|
|
194
|
-
].join("\n");
|
|
195
|
-
}
|
|
196
|
-
function generateAiderConfig() {
|
|
197
|
-
return [
|
|
198
|
-
"# Generated by Kuma MCP - https://github.com/plumpslabs/kuma",
|
|
199
|
-
"# Aider will read CONVENTIONS.md for coding conventions",
|
|
200
|
-
"",
|
|
201
|
-
"read: CONVENTIONS.md",
|
|
202
|
-
""
|
|
203
|
-
].join("\n");
|
|
204
|
-
}
|
|
205
|
-
function generateWindsurfSkill() {
|
|
206
|
-
return [
|
|
207
|
-
"# Kuma MCP \u2014 Windsurf",
|
|
208
|
-
"",
|
|
209
|
-
BOOTSTRAP,
|
|
210
|
-
"",
|
|
211
|
-
"Also auto-detected via `.windsurf/skills/` and `.agents/skills/`."
|
|
212
|
-
].join("\n");
|
|
213
|
-
}
|
|
214
|
-
function generateCopilotSkill() {
|
|
215
|
-
return [
|
|
216
|
-
"---",
|
|
217
|
-
"name: kuma-mcp",
|
|
218
|
-
"description: Kuma MCP \u2014 safety toolkit for AI coding agents",
|
|
219
|
-
"---",
|
|
220
|
-
"",
|
|
221
|
-
BOOTSTRAP,
|
|
222
|
-
"",
|
|
223
|
-
"\u{1F4D6} **Usage:**",
|
|
224
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
225
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check',
|
|
226
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
227
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules"
|
|
228
|
-
].join("\n");
|
|
229
|
-
}
|
|
230
|
-
function generateQwenSkill() {
|
|
231
|
-
return [
|
|
232
|
-
"## Kuma MCP",
|
|
233
|
-
"",
|
|
234
|
-
BOOTSTRAP,
|
|
235
|
-
"",
|
|
236
|
-
"\u{1F4D6} **Usage:**",
|
|
237
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
238
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check',
|
|
239
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
240
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules"
|
|
241
|
-
].join("\n");
|
|
242
|
-
}
|
|
243
|
-
function generateQwenSettings() {
|
|
244
|
-
return JSON.stringify({
|
|
245
|
-
mcpServers: {
|
|
246
|
-
kuma: {
|
|
247
|
-
command: "npx",
|
|
248
|
-
args: ["-y", "@plumpslabs/kuma"],
|
|
249
|
-
env: {}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}, null, 2) + "\n";
|
|
253
|
-
}
|
|
254
|
-
function generateKiroSkill() {
|
|
255
|
-
return [
|
|
256
|
-
"---",
|
|
257
|
-
"name: kuma-mcp",
|
|
258
|
-
"description: Kuma MCP \u2014 safety toolkit for AI coding agents",
|
|
259
|
-
"inclusion: always",
|
|
260
|
-
"---",
|
|
261
|
-
"",
|
|
262
|
-
BOOTSTRAP,
|
|
263
|
-
"",
|
|
264
|
-
"\u{1F4D6} **Usage:**",
|
|
265
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
266
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check',
|
|
267
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
268
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules"
|
|
269
|
-
].join("\n");
|
|
270
|
-
}
|
|
271
|
-
function generateOpenclawSkill() {
|
|
272
|
-
return [
|
|
273
|
-
"---",
|
|
274
|
-
"name: kuma-mcp",
|
|
275
|
-
"description: Kuma MCP \u2014 safety toolkit for AI coding agents",
|
|
276
|
-
"---",
|
|
277
|
-
"",
|
|
278
|
-
BOOTSTRAP,
|
|
279
|
-
"",
|
|
280
|
-
"\u{1F4D6} **Usage:**",
|
|
281
|
-
' \u2022 `kuma_context({ action: "init" })` \u2014 load project context (call first)',
|
|
282
|
-
' \u2022 `kuma_safety({ action: "guard" })` \u2014 safety check',
|
|
283
|
-
' \u2022 `kuma_safety({ action: "verify", scope: "<area>" })` \u2014 verify after edits',
|
|
284
|
-
" \u2022 `.kuma/init.md` \u2014 full behavioral rules"
|
|
285
|
-
].join("\n");
|
|
286
|
-
}
|
|
287
|
-
function generateCodewhaleSkill() {
|
|
288
|
-
return generateOpenclawSkill();
|
|
289
|
-
}
|
|
290
|
-
function generateCodewhaleMcpConfig() {
|
|
291
|
-
return JSON.stringify({
|
|
292
|
-
mcpServers: {
|
|
293
|
-
kuma: {
|
|
294
|
-
command: "npx",
|
|
295
|
-
args: ["-y", "@plumpslabs/kuma"],
|
|
296
|
-
env: {}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}, null, 2) + "\n";
|
|
300
|
-
}
|
|
301
|
-
export {
|
|
302
|
-
generateSkill,
|
|
303
|
-
getSecondaryFiles
|
|
304
|
-
};
|