@r_masseater/kogane 0.0.0 → 0.1.1
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/plugin.json +12 -0
- package/LICENSE +661 -0
- package/README.md +48 -1
- package/dist/main.mjs +74482 -0
- package/hooks/hooks.json +17 -0
- package/package.json +46 -5
- package/skills/suggest-workspaces/SKILL.md +50 -0
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "kogane plugin hooks",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"UserPromptSubmit": [
|
|
5
|
+
{
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "node",
|
|
10
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/dist/main.mjs", "hook"],
|
|
11
|
+
"timeout": 15
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@r_masseater/kogane",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Claude Code plugin that suggests existing workspaces of the current pnpm monorepo for each prompt, ranked with EmbeddingGemma 2 on the user's machine.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"claude-code",
|
|
7
|
+
"embeddinggemma",
|
|
8
|
+
"monorepo",
|
|
9
|
+
"pnpm",
|
|
10
|
+
"tanstack-intent"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/masseater/masseater.dev/tree/main/libs/kogane#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/masseater/masseater.dev/issues"
|
|
15
|
+
},
|
|
5
16
|
"license": "MIT",
|
|
6
17
|
"repository": {
|
|
7
18
|
"type": "git",
|
|
8
19
|
"url": "git+https://github.com/masseater/masseater.dev.git",
|
|
9
20
|
"directory": "libs/kogane"
|
|
10
21
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
"bin": {
|
|
23
|
+
"kogane": "./dist/main.mjs"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
".claude-plugin",
|
|
27
|
+
"dist",
|
|
28
|
+
"hooks",
|
|
29
|
+
"skills/suggest-workspaces"
|
|
30
|
+
],
|
|
31
|
+
"type": "module",
|
|
32
|
+
"imports": {
|
|
33
|
+
"#package.json": "./package.json",
|
|
34
|
+
"#/*": "./src/*"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public",
|
|
38
|
+
"provenance": true
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@huggingface/transformers": "^4.3.2",
|
|
42
|
+
"@r_masseater/node-main": "^0.2.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@masseater.dev/local-server": "0.0.0",
|
|
46
|
+
"@pnpm/workspace.projects-reader": "1101.1.9",
|
|
47
|
+
"@pnpm/workspace.workspace-manifest-reader": "1100.3.4",
|
|
48
|
+
"@types/node": "26.6.10",
|
|
49
|
+
"effect": "4.1.7",
|
|
50
|
+
"lapse": "0.0.0",
|
|
51
|
+
"vite-plus": "1.8.0"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": "v26.13.1"
|
|
14
55
|
}
|
|
15
56
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: suggest-workspaces
|
|
3
|
+
description: >
|
|
4
|
+
Use when the @r_masseater/kogane Claude Code plugin adds a "kogane:" list of existing workspaces
|
|
5
|
+
to a prompt, when installing or troubleshooting that plugin, or when writing the package.json
|
|
6
|
+
description that kogane matches prompts against.
|
|
7
|
+
metadata:
|
|
8
|
+
type: core
|
|
9
|
+
library: "@r_masseater/kogane"
|
|
10
|
+
library_version: 0.1.0
|
|
11
|
+
sources:
|
|
12
|
+
- src/**
|
|
13
|
+
- hooks/**
|
|
14
|
+
- .claude-plugin/**
|
|
15
|
+
- README.md
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# suggest-workspaces
|
|
19
|
+
|
|
20
|
+
kogane adds a short list of existing workspaces to a prompt when their `package.json` `description` is close to what the prompt asks for.
|
|
21
|
+
The list starts with `kogane:` and names each workspace with its absolute directory.
|
|
22
|
+
|
|
23
|
+
## Act on a suggestion
|
|
24
|
+
|
|
25
|
+
1. Read the suggested workspace's AGENTS.md or README before writing new code for the task.
|
|
26
|
+
2. Use or extend that workspace when it covers the task.
|
|
27
|
+
3. Do not say a tool does not exist while a suggested workspace may provide it.
|
|
28
|
+
|
|
29
|
+
A suggestion is a lead, not a verdict. When a suggested workspace does not fit, carry on without it.
|
|
30
|
+
|
|
31
|
+
## Write descriptions kogane can match
|
|
32
|
+
|
|
33
|
+
kogane compares the prompt only with the `description` field.
|
|
34
|
+
Write it as one sentence that says what the workspace does, in the words someone asking for it would use.
|
|
35
|
+
A workspace without a description is never suggested.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
claude plugin marketplace add masseater/masseater.dev
|
|
41
|
+
claude plugin install kogane@masseater-dev
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The first prompt starts the background server and gets no suggestion.
|
|
45
|
+
The server downloads the model (about 200 MB) once and keeps it loaded, using about 1 GB of memory, until 30 minutes pass without prompts.
|
|
46
|
+
|
|
47
|
+
## Troubleshoot
|
|
48
|
+
|
|
49
|
+
- No suggestion ever appears: check that `$CLAUDE_PLUGIN_DATA/endpoint.json` exists after the first prompt. `kogane serve --data <dir>` run by hand shows why the server stops.
|
|
50
|
+
- A workspace is never suggested: run `kogane index` in the repository and check that it is listed with its description.
|