@plumpslabs/kuma 2.4.3 โ 2.4.5
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/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +10 -0
- package/INSTALL.md +265 -0
- package/README.md +32 -20
- package/agents/kuma-guardian.md +37 -0
- package/agents/kuma-researcher.md +36 -0
- package/commands/kuma:checkpoint.md +12 -0
- package/commands/kuma:guard.md +16 -0
- package/commands/kuma:impact.md +16 -0
- package/commands/kuma:init.md +16 -0
- package/commands/kuma:research.md +17 -0
- package/commands/kuma:rollback.md +12 -0
- package/commands/kuma:studio.md +17 -0
- package/commands/kuma:verify.md +15 -0
- package/dist/index.js +2510 -618
- package/hooks/kuma-agy-hooks.js +37 -0
- package/hooks.json +17 -0
- package/install.sh +129 -0
- package/mcp_config.json +11 -0
- package/package.json +13 -3
- package/packages/ide/studio/dist/index.js +25 -2
- package/packages/ide/studio/public/index.html +901 -1266
- package/plugin.json +60 -0
- package/skills/kuma/SKILL.md +28 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
|
+
"name": "plumpslabs-kuma",
|
|
4
|
+
"description": "Safety-first context & orchestration engine for AI coding agents.",
|
|
5
|
+
"owner": {
|
|
6
|
+
"name": "plumpslabs",
|
|
7
|
+
"url": "https://github.com/plumpslabs"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [
|
|
10
|
+
{
|
|
11
|
+
"name": "kuma",
|
|
12
|
+
"description": "Safety-first context & orchestration engine for AI coding agents. Shadow memory, gotcha lifecycle, blast radius impact analysis, and test verification.",
|
|
13
|
+
"source": "./",
|
|
14
|
+
"category": "safety"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kuma",
|
|
3
|
+
"version": "2.4.4",
|
|
4
|
+
"description": "Safety-first context & orchestration engine for AI coding agents. Shadow memory, gotcha lifecycle, blast radius impact analysis, and test verification.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "plumpslabs",
|
|
7
|
+
"url": "https://github.com/plumpslabs"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT"
|
|
10
|
+
}
|
package/INSTALL.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# ๐ป Kuma โ Complete Installation & Provider Setup Guide
|
|
2
|
+
|
|
3
|
+
> Universal guide to installing and configuring **Kuma MCP** for every major AI coding agent and IDE.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## โก Quick Start (Universal)
|
|
8
|
+
|
|
9
|
+
The fastest way to install Kuma in any repository:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# 1-Liner auto-detect installer (auto-configures rules, hooks, and MCP)
|
|
13
|
+
curl -fsSL https://raw.githubusercontent.com/plumpslabs/kuma/main/install.sh | bash
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or via `npx` with zero installation:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Auto-detects your IDE/agent and creates tailored rules & hooks
|
|
20
|
+
npx @plumpslabs/kuma init
|
|
21
|
+
|
|
22
|
+
# Or initialize for ALL supported providers at once
|
|
23
|
+
npx @plumpslabs/kuma init --all
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ๐ Provider Setup Matrix
|
|
29
|
+
|
|
30
|
+
| Provider / IDE | Install Method | Config Files Generated | MCP Integration |
|
|
31
|
+
|---|---|---|---|
|
|
32
|
+
| **Claude Code** | Marketplace / `kuma init` | `CLAUDE.md`, `.claude/settings.json` (hooks) | `.mcp.json` / `~/.claude.json` |
|
|
33
|
+
| **Google Antigravity** | Plugin / `kuma init` | `.agents/rules/kuma.md`, `.agents/skills/`, `GEMINI.md` | `.agents/mcp_config.json` |
|
|
34
|
+
| **Cursor** | `kuma init --cursor` | `.cursor/rules/kuma.mdc`, `.cursorrules` | `.cursor/mcp.json` |
|
|
35
|
+
| **Windsurf** | `kuma init --windsurf` | `.windsurfrules`, `.windsurf/rules/kuma.md` | `~/.codeium/windsurf/mcp_config.json` |
|
|
36
|
+
| **OpenCode** | `kuma init --opencode` | `AGENTS.md`, `.opencode/plugins/kuma.js` | `opencode.json` (array command) |
|
|
37
|
+
| **GitHub Copilot** | `kuma init --copilot` | `.github/copilot-instructions.md`, `.github/skills/` | Extension settings |
|
|
38
|
+
| **Zed** | `kuma init` | `AGENTS.md` | `settings.json` (`context_servers`) |
|
|
39
|
+
| **Cline / Roo / Trae** | `kuma init --cline` | `.clinerules/kuma.md`, `.roo/rules/`, `.trae/rules/` | Cline MCP UI |
|
|
40
|
+
| **Codex (OpenAI)** | `kuma init --codex` | `AGENTS.md`, `.codex/config.toml` | Codex MCP config |
|
|
41
|
+
| **Aider** | `kuma init --aider` | `CONVENTIONS.md`, `.aider.conf.yml` | Native config |
|
|
42
|
+
| **Qwen / Kiro** | `kuma init --qwen --kiro` | `AGENTS.md`, `.kiro/steering/kuma.md` | Local config |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## ๐ 1. Claude Code
|
|
47
|
+
|
|
48
|
+
### Method A: Claude Code Marketplace (Recommended)
|
|
49
|
+
Add the Kuma marketplace and install the plugin directly:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
/plugin marketplace add plumpslabs/kuma
|
|
53
|
+
/plugin install kuma@plumpslabs-kuma
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Method B: Via `kuma init`
|
|
57
|
+
Run inside your project directory:
|
|
58
|
+
```bash
|
|
59
|
+
npx @plumpslabs/kuma init --claude
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This creates:
|
|
63
|
+
- `CLAUDE.md` โ Project context and safety obedience guidelines.
|
|
64
|
+
- `.claude/settings.json` โ PreToolUse hooks (`kuma hook pre-edit` and `kuma hook pre-bash`) that auto-inject known gotchas before file modifications.
|
|
65
|
+
|
|
66
|
+
### MCP Configuration
|
|
67
|
+
Add to `.mcp.json` in your project root or `~/.claude.json` globally:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"kuma": {
|
|
73
|
+
"command": "npx",
|
|
74
|
+
"args": ["-y", "@plumpslabs/kuma"]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## ๐ฃ 2. Google Antigravity (AGY) / Gemini CLI
|
|
83
|
+
|
|
84
|
+
### Method A: Plugin Installation (System-Wide)
|
|
85
|
+
Install Kuma directly into your Antigravity plugins directory:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Clone to Antigravity global plugins
|
|
89
|
+
git clone https://github.com/plumpslabs/kuma.git ~/.gemini/config/plugins/kuma
|
|
90
|
+
```
|
|
91
|
+
Or via AGY plugin command:
|
|
92
|
+
```bash
|
|
93
|
+
agy plugin add https://github.com/plumpslabs/kuma
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Antigravity will automatically read `plugin.json`, mount the `kuma-mcp` skill, and launch Kuma via `mcp_config.json`.
|
|
97
|
+
|
|
98
|
+
### Method B: Per-Project via `kuma init`
|
|
99
|
+
```bash
|
|
100
|
+
npx @plumpslabs/kuma init --antigravity
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
This creates:
|
|
104
|
+
- `.agents/skills/kuma/SKILL.md` โ Core workflow skill.
|
|
105
|
+
- `.agents/rules/kuma.md` โ Antigravity behavioral safety rules.
|
|
106
|
+
- `GEMINI.md` โ Root workspace instructions.
|
|
107
|
+
- `.agents/mcp_config.json` โ Preconfigured MCP server configuration.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## โก 3. Cursor
|
|
112
|
+
|
|
113
|
+
Run inside your project:
|
|
114
|
+
```bash
|
|
115
|
+
npx @plumpslabs/kuma init --cursor
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Files Created:
|
|
119
|
+
- `.cursor/rules/kuma.mdc` โ Modern Cursor rule with XML delimiters and gotcha query triggers.
|
|
120
|
+
- `.cursorrules` โ Fallback universal rule for all Cursor versions.
|
|
121
|
+
|
|
122
|
+
### MCP Configuration:
|
|
123
|
+
Create or edit `.cursor/mcp.json` in your workspace or global settings:
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"mcpServers": {
|
|
127
|
+
"kuma": {
|
|
128
|
+
"command": "npx",
|
|
129
|
+
"args": ["-y", "@plumpslabs/kuma"]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## ๐ 4. Windsurf
|
|
138
|
+
|
|
139
|
+
Run:
|
|
140
|
+
```bash
|
|
141
|
+
npx @plumpslabs/kuma init --windsurf
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Files Created:
|
|
145
|
+
- `.windsurfrules` โ Cascade behavioral guidelines.
|
|
146
|
+
- `.windsurf/rules/kuma.md` โ Detailed safety and gotcha workflow instructions.
|
|
147
|
+
|
|
148
|
+
### MCP Configuration:
|
|
149
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"mcpServers": {
|
|
153
|
+
"kuma": {
|
|
154
|
+
"command": "npx",
|
|
155
|
+
"args": ["-y", "@plumpslabs/kuma"]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## ๐ต 5. OpenCode
|
|
164
|
+
|
|
165
|
+
Run:
|
|
166
|
+
```bash
|
|
167
|
+
npx @plumpslabs/kuma init --opencode
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Files Created:
|
|
171
|
+
- `AGENTS.md` โ Shared agent instructions.
|
|
172
|
+
- `.opencode/plugins/kuma.js` โ Native OpenCode plugin for pre-edit gotcha interception.
|
|
173
|
+
- `.opencode/skills/kuma/SKILL.md` โ OpenCode skill with `kuma_kuma_*` prefixed actions.
|
|
174
|
+
|
|
175
|
+
### MCP Configuration:
|
|
176
|
+
Add to `opencode.json` in your project root:
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"$schema": "https://opencode.ai/config.json",
|
|
180
|
+
"mcp": {
|
|
181
|
+
"kuma": {
|
|
182
|
+
"type": "local",
|
|
183
|
+
"command": ["npx", "-y", "@plumpslabs/kuma"],
|
|
184
|
+
"enabled": true
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
*(Note: OpenCode requires `command` to be an array containing the binary and its arguments together).*
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## ๐ 6. GitHub Copilot Editor
|
|
194
|
+
|
|
195
|
+
Run:
|
|
196
|
+
```bash
|
|
197
|
+
npx @plumpslabs/kuma init --copilot
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Files Created:
|
|
201
|
+
- `.github/copilot-instructions.md` โ Workspace instructions for Copilot Chat.
|
|
202
|
+
- `.github/skills/kuma/SKILL.md` โ Copilot skills definition.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## โก 7. Zed
|
|
207
|
+
|
|
208
|
+
Add to your Zed `settings.json`:
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"context_servers": {
|
|
212
|
+
"kuma": {
|
|
213
|
+
"command": "npx",
|
|
214
|
+
"args": ["-y", "@plumpslabs/kuma"]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## ๐ก๏ธ 8. Cline / Roo-Code / Trae
|
|
223
|
+
|
|
224
|
+
Run:
|
|
225
|
+
```bash
|
|
226
|
+
npx @plumpslabs/kuma init --cline
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Files Created:
|
|
230
|
+
- `.clinerules/kuma.md`
|
|
231
|
+
- `.roo/rules/kuma.md`
|
|
232
|
+
- `.trae/rules/kuma.md`
|
|
233
|
+
|
|
234
|
+
Configure the MCP server via Cline's MCP Settings UI:
|
|
235
|
+
- **Server Name:** `kuma`
|
|
236
|
+
- **Command:** `npx`
|
|
237
|
+
- **Args:** `["-y", "@plumpslabs/kuma"]`
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## ๐ต Companion Mode: Kuma + Matcha
|
|
242
|
+
|
|
243
|
+
Kuma works standalone, but if you use [Matcha](https://github.com/plumpslabs/matcha):
|
|
244
|
+
- **Matcha** handles the cognitive planning gate, stack audits, and code review.
|
|
245
|
+
- **Kuma** handles runtime safety, blast radius impact analysis, gotchas memory, and post-edit verification.
|
|
246
|
+
|
|
247
|
+
Install both in 1 line:
|
|
248
|
+
```bash
|
|
249
|
+
curl -fsSL https://raw.githubusercontent.com/plumpslabs/matcha/main/install.sh | bash
|
|
250
|
+
curl -fsSL https://raw.githubusercontent.com/plumpslabs/kuma/main/install.sh | bash
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## ๐ Kuma Studio Dashboard
|
|
256
|
+
|
|
257
|
+
To launch the web dashboard:
|
|
258
|
+
```bash
|
|
259
|
+
npx @plumpslabs/kuma studio
|
|
260
|
+
```
|
|
261
|
+
Access at `http://localhost:3322` to view:
|
|
262
|
+
- **Gotcha Shield** (filters, 1-click workaround copy)
|
|
263
|
+
- **Domain Sequence Flows**
|
|
264
|
+
- **Workspace & Blast Radius Simulator**
|
|
265
|
+
- **Health & Efficiency Metrics**
|
package/README.md
CHANGED
|
@@ -31,32 +31,44 @@ Kuma is an MCP (Model Context Protocol) server that acts as a **pre-modification
|
|
|
31
31
|
|
|
32
32
|
## Quick Start
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
# Run with npx (zero setup)
|
|
36
|
-
npx -y @plumpslabs/kuma
|
|
34
|
+
### โก Universal 1-Liner (Auto-detects your IDE/Agent)
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
kuma
|
|
36
|
+
```bash
|
|
37
|
+
curl -fsSL https://raw.githubusercontent.com/plumpslabs/kuma/main/install.sh | bash
|
|
41
38
|
```
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
### ๐งฉ Or Install as a Native Plugin
|
|
41
|
+
|
|
42
|
+
* **Claude Code Marketplace:**
|
|
43
|
+
```bash
|
|
44
|
+
/plugin marketplace add plumpslabs/kuma
|
|
45
|
+
/plugin install kuma@plumpslabs-kuma
|
|
46
|
+
```
|
|
47
|
+
* **Antigravity CLI (AGY):**
|
|
48
|
+
```bash
|
|
49
|
+
agy plugin add https://github.com/plumpslabs/kuma
|
|
50
|
+
```
|
|
51
|
+
* **Via NPX (Zero Install):**
|
|
52
|
+
```bash
|
|
53
|
+
npx @plumpslabs/kuma init --all
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
๐ See [INSTALL.md](INSTALL.md) for the complete provider matrix (Cursor, Windsurf, OpenCode, Copilot, Zed, Cline, Aider, etc.).
|
|
47
57
|
|
|
48
58
|
---
|
|
49
59
|
|
|
50
60
|
## Core Architecture: 3 Pipeline-Driven Tools
|
|
51
61
|
|
|
52
|
-
Kuma exposes **3 coarse-grained tools** with **
|
|
62
|
+
Kuma exposes **3 coarse-grained tools** with **15 core actions** โ the full agent surface. Anything else (impact, navigate, changes, digest, drift, resume, mine, session, delete_node, clear, goal_progress, check, audit, security, gc, ast, validate, gotcha_staleness) was **removed** โ not hidden, gone โ so the agent never has to choose from 30+ options and there is no dead surface to maintain.
|
|
53
63
|
|
|
54
64
|
### ๐ง `kuma_context` โ Context & Research
|
|
55
65
|
|
|
56
66
|
| Action | Purpose | Impact |
|
|
57
67
|
|--------|---------|--------|
|
|
58
|
-
| `init` | Lean project brief + restore session | ๐ด Required first |
|
|
68
|
+
| `init` | Lean project brief + restore session + branch tracking | ๐ด Required first |
|
|
59
69
|
| `research` | 5-step pipeline: cache โ graph โ scan โ impact โ decision | ๐ด Required before edits |
|
|
70
|
+
| `map` | Monorepo package topology & workspace boundary mapping | ๐ด High |
|
|
71
|
+
| `impact` | Blast radius analysis: affected consumers & risk scoring | ๐ด High |
|
|
60
72
|
| `history` | Why is this file written this way (cross-session trace) | ๐ด High |
|
|
61
73
|
| `flow` | Read a recorded architecture flow | ๐ด High |
|
|
62
74
|
|
|
@@ -64,7 +76,7 @@ Kuma exposes **3 coarse-grained tools** with **13 core actions** โ the full ag
|
|
|
64
76
|
|
|
65
77
|
| Action | Purpose | Impact |
|
|
66
78
|
|--------|---------|--------|
|
|
67
|
-
| `gotcha` | Record bugs/quirks
|
|
79
|
+
| `gotcha` | Record bugs/quirks + lifecycle (`active` โ `resolved` โ `deprecated`) | ๐ด Exponential |
|
|
68
80
|
| `arch_flow` | Record architecture flow (max 5 core files) | ๐ด Exponential |
|
|
69
81
|
| `decision` | Record ADR-style decision with rationale | ๐ด Exponential |
|
|
70
82
|
| `research_save` | Save research findings to cache | ๐ก Linear |
|
|
@@ -87,7 +99,7 @@ Kuma exposes exactly **3 coarse-grained tools** โ the agent picks an *action*,
|
|
|
87
99
|
|
|
88
100
|
| Tool | Core Actions | Purpose |
|
|
89
101
|
|------|--------------|---------|
|
|
90
|
-
| `kuma_context` | `init`, `research`, `history`, `flow` | Load project context, understand unfamiliar code |
|
|
102
|
+
| `kuma_context` | `init`, `research`, `history`, `flow`, `map`, `impact` | Load project context, understand unfamiliar code |
|
|
91
103
|
| `kuma_memory` | `gotcha`, `decision`, `arch_flow`, `research_save`, `search` | Persistent knowledge that saves future sessions |
|
|
92
104
|
| `kuma_safety` | `guard`, `verify`, `checkpoint`, `rollback_label` | Pre-risk check, post-edit verification, snapshot/restore |
|
|
93
105
|
|
|
@@ -106,15 +118,15 @@ Everything else is an internal action โ not exposed to the agent. The agent us
|
|
|
106
118
|
|
|
107
119
|
## Kuma Studio
|
|
108
120
|
|
|
109
|
-
Kuma Studio is a **web
|
|
121
|
+
Kuma Studio is a **streamlined, modular web dashboard** for visualizing your codebase intelligence, gotchas shield, and workspace topology without visual clutter.
|
|
110
122
|
|
|
111
123
|
### Features
|
|
112
124
|
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
125
|
+
- **๐ก๏ธ Gotcha Shield** โ Filter gotchas by status (`active`, `verified`, `resolved`), severity, and copy workarounds in 1 click
|
|
126
|
+
- **๐ Domain Sequence Flows** โ Linear architecture hops and execution sequences
|
|
127
|
+
- **๐ฆ Workspace & Blast Radius** โ Monorepo package dependency matrix and real-time blast radius impact simulator
|
|
128
|
+
- **โก Health & Efficiency** โ Session metrics, estimated hours saved, verification pass rates, and injection statistics
|
|
129
|
+
- **๐ธ๏ธ Calm Knowledge Graph** โ Clean node-link visualization with optional physics simulation and depth controls
|
|
118
130
|
|
|
119
131
|
### Usage
|
|
120
132
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kuma-guardian
|
|
3
|
+
description: Runtime safety guardian. Pre-flight check, architecture boundary audit, circular dependency detection, and anti-pattern prevention. Read-only.
|
|
4
|
+
mode: subagent
|
|
5
|
+
mainAgent: false
|
|
6
|
+
subagent: true
|
|
7
|
+
permission:
|
|
8
|
+
read: allow
|
|
9
|
+
grep: allow
|
|
10
|
+
glob: allow
|
|
11
|
+
list: allow
|
|
12
|
+
bash: deny
|
|
13
|
+
webfetch: deny
|
|
14
|
+
websearch: deny
|
|
15
|
+
task: deny
|
|
16
|
+
edit:
|
|
17
|
+
"*": deny
|
|
18
|
+
disallowedTools: Write, Edit, Task
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<agent_persona>
|
|
22
|
+
You are the Kuma Safety Guardian. Your directive is pre-modification safety enforcement and architectural protection.
|
|
23
|
+
You analyze proposed changes, detect anti-patterns, circular dependencies, and verify that the agent does not edit code blindly.
|
|
24
|
+
</agent_persona>
|
|
25
|
+
|
|
26
|
+
<strict_boundaries>
|
|
27
|
+
- READ-ONLY: Never modify any source code files.
|
|
28
|
+
- Inspect codebase via kuma_context, kuma_safety, grep, glob, and read tools.
|
|
29
|
+
- If high risk or circular dependency is detected, raise explicit safety blocking recommendation.
|
|
30
|
+
</strict_boundaries>
|
|
31
|
+
|
|
32
|
+
<workflow>
|
|
33
|
+
1. Run `kuma_safety({ action: "guard" })` to check session state and edit loops.
|
|
34
|
+
2. Check file boundaries and package dependencies using `kuma_context({ action: "map" })`.
|
|
35
|
+
3. If circular imports or boundary violations are found, report exact import chains.
|
|
36
|
+
4. Render verdict: PASS or BLOCK.
|
|
37
|
+
</workflow>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kuma-researcher
|
|
3
|
+
description: Codebase intelligence & blast radius researcher. Maps monorepo packages, traces dependency trees, inspects past decisions, and gathers gotchas before changes. Read-only.
|
|
4
|
+
mode: subagent
|
|
5
|
+
mainAgent: false
|
|
6
|
+
subagent: true
|
|
7
|
+
permission:
|
|
8
|
+
read: allow
|
|
9
|
+
grep: allow
|
|
10
|
+
glob: allow
|
|
11
|
+
list: allow
|
|
12
|
+
bash: deny
|
|
13
|
+
webfetch: deny
|
|
14
|
+
websearch: deny
|
|
15
|
+
task: deny
|
|
16
|
+
edit:
|
|
17
|
+
"*": deny
|
|
18
|
+
disallowedTools: Write, Edit, Task
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<agent_persona>
|
|
22
|
+
You are the Kuma Codebase Researcher. You explore unfamiliar code, compute blast radius, discover domain flows, and extract historical gotchas so the main agent has 100% clarity before modifying code.
|
|
23
|
+
</agent_persona>
|
|
24
|
+
|
|
25
|
+
<strict_boundaries>
|
|
26
|
+
- READ-ONLY: Never modify any source code files.
|
|
27
|
+
- Focus strictly on research, dependency traversal, and impact scoring.
|
|
28
|
+
</strict_boundaries>
|
|
29
|
+
|
|
30
|
+
<workflow>
|
|
31
|
+
1. Initialize context via `kuma_context({ action: "init" })`.
|
|
32
|
+
2. Inspect area via `kuma_context({ action: "research", scope: "<target>" })`.
|
|
33
|
+
3. Calculate blast radius via `kuma_context({ action: "impact", target: "<target>" })`.
|
|
34
|
+
4. Check cross-session history via `kuma_context({ action: "history", target: "<file>" })`.
|
|
35
|
+
5. Return structured report with affected files, consumers, and known gotchas.
|
|
36
|
+
</workflow>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "๐ธ Kuma Checkpoint โ Create an atomic named snapshot before risky work"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:checkpoint
|
|
5
|
+
|
|
6
|
+
Take an atomic rollback snapshot of current files and knowledge graph.
|
|
7
|
+
|
|
8
|
+
```javascript
|
|
9
|
+
kuma_safety({ action: "checkpoint", label: "[pre-refactor-feature-x]" })
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Creates `<label>/` snapshot with `kuma.db` + modified files.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "๐ก๏ธ Kuma Guard โ Pre-flight safety check against anti-patterns, drift, and circular deps"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:guard
|
|
5
|
+
|
|
6
|
+
Verify safety boundaries before applying complex refactors or multi-file edits.
|
|
7
|
+
|
|
8
|
+
```javascript
|
|
9
|
+
kuma_safety({ action: "guard", guardGoal: "[what you are doing]" })
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**What it checks:**
|
|
13
|
+
- Missing pre-modification research
|
|
14
|
+
- Architecture boundary violations & circular imports
|
|
15
|
+
- Scope drift (editing files outside declared goal)
|
|
16
|
+
- Runaway execution loops
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "๐ฅ Kuma Impact โ Calculate blast radius, affected consumers, and safety risk score"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:impact
|
|
5
|
+
|
|
6
|
+
Evaluate blast radius before modifying high-leverage files or shared packages.
|
|
7
|
+
|
|
8
|
+
```javascript
|
|
9
|
+
kuma_context({ action: "impact", target: "[file or package path]" })
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**What it returns:**
|
|
13
|
+
- Direct and transitive consumers
|
|
14
|
+
- Downstream affected packages in monorepos
|
|
15
|
+
- Mapped test suites to run
|
|
16
|
+
- Safety risk level (`low`, `medium`, `high`, `critical`)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "๐ป Kuma Init โ Initialize session context, lean brief (<500 tokens), and branch tracking"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:init
|
|
5
|
+
|
|
6
|
+
Initialize Kuma session context before writing any code.
|
|
7
|
+
|
|
8
|
+
```javascript
|
|
9
|
+
kuma_context({ action: "init", goal: "[current task goal]" })
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**What it does:**
|
|
13
|
+
- Restores cross-session shadow memory
|
|
14
|
+
- Loads fresh gotchas for the active branch
|
|
15
|
+
- Evaluates repository rules and path constraints
|
|
16
|
+
- Informs about branch switches
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "๐ฌ Kuma Research โ 5-step pre-edit research pipeline before editing unfamiliar code"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:research
|
|
5
|
+
|
|
6
|
+
Run research pipeline before editing code you haven't touched before.
|
|
7
|
+
|
|
8
|
+
```javascript
|
|
9
|
+
kuma_context({ action: "research", scope: "[module or feature area]" })
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Pipeline Stages:**
|
|
13
|
+
1. Check research cache in `.kuma/kuma.db`
|
|
14
|
+
2. Query knowledge graph for related nodes and edges
|
|
15
|
+
3. Scan references and entry points
|
|
16
|
+
4. Compute blast radius and test coverage
|
|
17
|
+
5. Retrieve historical ADR decisions and gotchas
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "โช Kuma Rollback โ Restore codebase from a labeled checkpoint snapshot"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:rollback
|
|
5
|
+
|
|
6
|
+
Restore codebase to the exact state captured in a previous checkpoint.
|
|
7
|
+
|
|
8
|
+
```javascript
|
|
9
|
+
kuma_safety({ action: "rollback_label", label: "[label-name]" })
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
If the label is not found, Kuma lists all available snapshots.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "๐ Kuma Studio โ Web dashboard for gotchas, flows, workspace matrix, and metrics"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:studio
|
|
5
|
+
|
|
6
|
+
Launch or view Kuma Studio web dashboard.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx @plumpslabs/kuma studio
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Opens `http://localhost:3322` featuring:
|
|
13
|
+
- **Gotcha Shield** (status filters & 1-click workaround copy)
|
|
14
|
+
- **Domain Sequence Flows**
|
|
15
|
+
- **Workspace & Blast Radius Simulator**
|
|
16
|
+
- **Health & Efficiency Metrics**
|
|
17
|
+
- **Calm Knowledge Graph** (physics toggle)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "๐งช Kuma Verify โ Post-edit scoped test verification and validation"
|
|
3
|
+
---
|
|
4
|
+
# /kuma:verify
|
|
5
|
+
|
|
6
|
+
Run scoped tests and verify that changes did not introduce regressions.
|
|
7
|
+
|
|
8
|
+
```javascript
|
|
9
|
+
kuma_safety({ action: "verify", scope: "[modified scope or file]" })
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**What it does:**
|
|
13
|
+
- Automatically identifies appropriate test runner (Jest, Vitest, Pytest, Go test, Cargo)
|
|
14
|
+
- Executes tests restricted to the modified blast radius
|
|
15
|
+
- Records pass/fail metrics in session memory
|