gm-kilo 2.0.1060 → 2.0.1061

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 CHANGED
@@ -4,97 +4,59 @@
4
4
 
5
5
  ### One-liner (recommended)
6
6
 
7
- Install directly from npm using bun x:
7
+ Install directly from npm:
8
8
 
9
9
  ```bash
10
10
  bun x gm-kilo@latest
11
11
  ```
12
12
 
13
- This command will automatically install gm-kilo to the correct location for your platform and restart Kilo to activate.
13
+ This copies the plugin to `~/.config/kilo/` and registers it in your config. Restart Kilo to activate.
14
14
 
15
- ### Manual installation
15
+ ### Via npm install
16
16
 
17
- **Windows and Unix:**
18
17
  ```bash
19
- git clone https://github.com/AnEntrypoint/gm-kilo ~/.config/kilo/plugin && cd ~/.config/kilo/plugin && bun install
20
- ```
21
-
22
- **Windows PowerShell:**
23
- ```powershell
24
- git clone https://github.com/AnEntrypoint/gm-kilo "\$env:APPDATA\kilo\plugin" && cd "\$env:APPDATA\kilo\plugin" && bun install
25
- ```
26
-
27
- ### Step 2: Configure MCP Servers
28
-
29
- Kilo uses the OpenCode configuration format. Create or update `~/.config/kilo/opencode.json`:
30
-
31
- ```json
32
- {
33
- "\$schema": "https://opencode.ai/config.json",
34
- "mcp": {
35
- "dev": {
36
- "type": "local",
37
- "command": ["bun x", "mcp-gm"],
38
- "timeout": 360000,
39
- "enabled": true
40
- },
41
- "code-search": {
42
- "type": "local",
43
- "command": ["bun x", "codebasesearch"],
44
- "timeout": 360000,
45
- "enabled": true
46
- }
47
- }
48
- }
49
- ```
50
-
51
- ### Step 3: Update Kilo Configuration
52
-
53
- Update `~/.config/kilo/kilocode.json` to reference the plugin:
54
-
55
- ```json
56
- {
57
- "\$schema": "https://kilo.ai/config.json",
58
- "default_agent": "gm",
59
- "plugin": ["/home/user/.config/kilo/plugin"]
60
- }
18
+ npm install -g gm-kilo
19
+ gm-kilo
61
20
  ```
62
21
 
63
- Replace `/home/user` with your actual home directory path.
22
+ ### Manual installation
64
23
 
65
- ### Step 4: Verify Installation
24
+ Clone to the global plugin directory:
66
25
 
67
- Start Kilo and verify the tools appear:
68
26
  ```bash
69
- kilo
27
+ git clone https://github.com/AnEntrypoint/gm-kilo ~/.config/kilo/plugin
70
28
  ```
71
29
 
72
- Check MCP tools are connected:
73
- ```bash
74
- kilo mcp list
75
- ```
30
+ ## Features
76
31
 
77
- You should see `dev` and `code-search` marked as connected.
32
+ - **State machine agent** PLAN→EXECUTE→EMIT→VERIFY→COMPLETE orchestration
33
+ - **Skill chain** — gm, planning, gm-execute, gm-emit, gm-complete, update-docs
34
+ - **exec: dispatch** — code execution via spool watcher (nodejs, python, bash, typescript, go, rust)
35
+ - **Code search** — semantic codebase exploration via exec:codesearch
36
+ - **Git enforcement** — blocks session end with uncommitted changes or unpushed commits
37
+ - **Memory** — rs-learn integration for cross-session knowledge retention
78
38
 
79
- ## Features
39
+ ## How it works
40
+
41
+ The plugin installs:
42
+ - **Agent** (`agents/gm.md`) — primary orchestrator with skill-chain instructions
43
+ - **Skills** (`skills/`) — PLAN, EXECUTE, EMIT, VERIFY, UPDATE-DOCS skill definitions
44
+ - **Plugin** (`plugins/gm-kilo.mjs`) — hooks for session lifecycle, tool gating, exec: dispatch
45
+ - **Lang runners** (`lang/`) — language-specific execution plugins
80
46
 
81
- - **MCP tools** - Code execution (`dev`) and semantic search (`code-search`)
82
- - **State machine agent** - Complete `gm` behavioral rule system
83
- - **Git enforcement** - Blocks uncommitted changes and unpushed commits on session idle
84
- - **AST analysis** - Automatic codebase analysis via mcp-thorns on session start
85
- - **.prd enforcement** - Blocks exit if work items remain in .prd file
47
+ All exec: commands route through the spool watcher at `.gm/exec-spool/` for session-isolated task execution.
86
48
 
87
49
  ## Troubleshooting
88
50
 
89
- **MCP tools not appearing:**
90
- - Verify `~/.config/kilo/opencode.json` exists with correct MCP server definitions
91
- - Check that `plugin` path in `kilocode.json` points to the correct directory
92
- - Run `kilo mcp list` to verify servers are connected
51
+ **Plugin not loading:**
52
+ - Verify `~/.config/kilo/plugins/gm-kilo.mjs` exists
53
+ - Check `kilocode.json` has the plugin path in the `plugin` array
93
54
  - Restart Kilo CLI completely
94
55
 
95
- **Plugin not loading:**
96
- - Verify plugin path in `kilocode.json` is absolute (e.g., `/home/user/.config/kilo/plugin`, not relative)
97
- - Check `index.js` and `gm.mjs` exist in the plugin directory
98
- - Run `bun install` in the plugin directory to ensure dependencies are installed
56
+ **Skills not appearing:**
57
+ - Verify `~/.config/kilo/skills/` contains skill directories with SKILL.md files
58
+ - Skill names must be lowercase with hyphens (e.g., `gm`, `gm-execute`)
99
59
 
100
- The plugin activates automatically on session start once MCP servers are configured.
60
+ **exec: commands failing:**
61
+ - Check `.gm/exec-spool/` directory exists in your project
62
+ - Verify plugkit binary is present at `~/.config/kilo/bin/`
package/agents/gm.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: gm
3
2
  description: Agent (not skill) - immutable programming state machine. Always invoke for all work coordination.
3
+ mode: primary
4
4
  ---
5
5
 
6
6
  # GM — Skill-First Orchestrator
package/cli.js CHANGED
@@ -36,19 +36,24 @@ try {
36
36
  copyRecursive(path.join(srcDir, 'scripts'), path.join(kiloConfigDir, 'scripts'));
37
37
 
38
38
  const kiloJsonPath = path.join(kiloConfigDir, 'kilocode.json');
39
+ const configExisted = fs.existsSync(kiloJsonPath);
39
40
  let kiloConfig = {};
40
- try {
41
- const raw = fs.readFileSync(kiloJsonPath, 'utf-8');
42
- kiloConfig = JSON.parse(raw);
43
- if (kiloConfig['']) { delete kiloConfig['']; }
44
- } catch (e) {}
45
- delete kiloConfig.mcp;
46
- kiloConfig['$schema'] = 'https://kilo.ai/config.json';
47
- kiloConfig.default_agent = 'gm';
41
+ if (configExisted) {
42
+ try {
43
+ const raw = fs.readFileSync(kiloJsonPath, 'utf-8');
44
+ kiloConfig = JSON.parse(raw);
45
+ if (kiloConfig['']) { delete kiloConfig['']; }
46
+ } catch (e) {}
47
+ }
48
+ if (!configExisted) {
49
+ kiloConfig['$schema'] = 'https://kilo.ai/config.json';
50
+ kiloConfig.default_agent = 'gm';
51
+ }
48
52
  const kiloPluginPath = path.join(kiloConfigDir, 'plugins', 'gm-kilo.mjs');
49
53
  if (!Array.isArray(kiloConfig.plugin)) kiloConfig.plugin = [];
50
- kiloConfig.plugin = kiloConfig.plugin.filter(p => !p.includes('gm-kilo'));
51
- kiloConfig.plugin.push(kiloPluginPath);
54
+ if (!kiloConfig.plugin.some(p => typeof p === 'string' && p.includes('gm-kilo'))) {
55
+ kiloConfig.plugin.push(kiloPluginPath);
56
+ }
52
57
  fs.writeFileSync(kiloJsonPath, JSON.stringify(kiloConfig, null, 2) + '\n');
53
58
 
54
59
  const oldDir = process.platform === 'win32'
package/gm-kilo.mjs CHANGED
@@ -57,6 +57,14 @@ export async function GmPlugin({ directory }) {
57
57
  const injectedSessions = new Set();
58
58
 
59
59
  return {
60
+ 'session.created': async () => {
61
+ if (!sessionStarted) {
62
+ sessionStarted = true;
63
+ try { runPlugkit(['hook', 'session-start']); } catch(e) {}
64
+ try { runPlugkit(['bootstrap', directory]); } catch(e) {}
65
+ }
66
+ },
67
+
60
68
  'experimental.chat.system.transform': async (input, output) => {
61
69
  const gmDir = join(directory, '.gm');
62
70
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-kilo",
3
- "version": "2.0.1060",
3
+ "version": "2.0.1061",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -30,9 +30,6 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {},
33
- "scripts": {
34
- "postinstall": "node scripts/postinstall-kilo.js"
35
- },
36
33
  "files": [
37
34
  "agents/",
38
35
  "bin/",
@@ -2,17 +2,6 @@
2
2
  name: gm
3
3
  description: Orchestrator dispatching PLAN→EXECUTE→EMIT→VERIFY→UPDATE-DOCS skill chain; spool-driven task execution with session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-cc
7
- - gm-gc
8
- - gm-oc
9
- - gm-kilo
10
- - gm-codex
11
- - gm-copilot-cli
12
- - gm-vscode
13
- - gm-cursor
14
- - gm-zed
15
- - gm-jetbrains
16
5
  end-to-end: true
17
6
  ---
18
7
 
@@ -2,8 +2,6 @@
2
2
  name: gm-cc
3
3
  description: AI-native software engineering via skill-driven orchestration on cc; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-cc
7
5
  ---
8
6
 
9
7
  # GM — cc Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-codex
3
3
  description: AI-native software engineering via skill-driven orchestration on codex; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-codex
7
5
  ---
8
6
 
9
7
  # GM — codex Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-copilot-cli
3
3
  description: AI-native software engineering via skill-driven orchestration on copilot-cli; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-copilot-cli
7
5
  ---
8
6
 
9
7
  # GM — copilot-cli Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-cursor
3
3
  description: AI-native software engineering via skill-driven orchestration on cursor; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-cursor
7
5
  ---
8
6
 
9
7
  # GM — cursor Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-gc
3
3
  description: AI-native software engineering via skill-driven orchestration on gc; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-gc
7
5
  ---
8
6
 
9
7
  # GM — gc Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-jetbrains
3
3
  description: AI-native software engineering via skill-driven orchestration on jetbrains; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-jetbrains
7
5
  ---
8
6
 
9
7
  # GM — jetbrains Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-kilo
3
3
  description: AI-native software engineering via skill-driven orchestration on kilo; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-kilo
7
5
  ---
8
6
 
9
7
  # GM — kilo Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-oc
3
3
  description: AI-native software engineering via skill-driven orchestration on oc; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-oc
7
5
  ---
8
6
 
9
7
  # GM — oc Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-vscode
3
3
  description: AI-native software engineering via skill-driven orchestration on vscode; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-vscode
7
5
  ---
8
6
 
9
7
  # GM — vscode Platform
@@ -2,8 +2,6 @@
2
2
  name: gm-zed
3
3
  description: AI-native software engineering via skill-driven orchestration on zed; bootstraps plugkit for task execution and session isolation
4
4
  allowed-tools: Skill
5
- compatible-platforms:
6
- - gm-zed
7
5
  ---
8
6
 
9
7
  # GM — zed Platform