@kentwynn/kgraph 0.1.19 → 0.1.20
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 +10 -5
- package/dist/cli/help.js +6 -6
- package/dist/config/config.js +12 -1
- package/dist/integrations/adapters/cline.d.ts +2 -0
- package/dist/integrations/adapters/cline.js +17 -0
- package/dist/integrations/adapters/gemini.d.ts +2 -0
- package/dist/integrations/adapters/gemini.js +17 -0
- package/dist/integrations/adapters/windsurf.d.ts +2 -0
- package/dist/integrations/adapters/windsurf.js +17 -0
- package/dist/integrations/integration-registry.js +7 -1
- package/dist/types/config.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Persistent repository intelligence for AI coding tools.
|
|
4
4
|
|
|
5
|
-
KGraph gives Codex, GitHub Copilot, Cursor,
|
|
5
|
+
KGraph gives Codex, GitHub Copilot, Cursor, Claude Code, Gemini CLI, Windsurf, and Cline a local knowledge layer for your repo: file maps, symbols, imports, relationships, and durable notes from previous AI sessions. The goal is simple: your assistant should not spend every session re-learning the same codebase.
|
|
6
6
|
|
|
7
7
|
## The Workflow
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Use KGraph in two steps:
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
# Required once per repository
|
|
13
|
-
kgraph init --integrations codex,copilot,cursor,claude-code
|
|
13
|
+
kgraph init --integrations codex,copilot,cursor,claude-code,gemini,windsurf,cline
|
|
14
14
|
|
|
15
15
|
# Normal daily command
|
|
16
16
|
kgraph "auth token refresh"
|
|
@@ -89,7 +89,7 @@ From the root of a repository:
|
|
|
89
89
|
kgraph init
|
|
90
90
|
|
|
91
91
|
# 2. Optional: connect AI tools so they know the KGraph workflow
|
|
92
|
-
kgraph integrate add codex copilot cursor claude-code
|
|
92
|
+
kgraph integrate add codex copilot cursor claude-code gemini windsurf cline
|
|
93
93
|
|
|
94
94
|
# 3. Run the normal workflow for a topic
|
|
95
95
|
kgraph "auth token refresh"
|
|
@@ -120,7 +120,7 @@ kgraph init
|
|
|
120
120
|
Required once per repo. Creates `.kgraph/` and the local config.
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
|
-
kgraph init --integrations codex,copilot,cursor,claude-code
|
|
123
|
+
kgraph init --integrations codex,copilot,cursor,claude-code,gemini,windsurf,cline
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Initializes KGraph and writes local instruction files for supported AI tools.
|
|
@@ -196,7 +196,7 @@ Show processed cognition sessions.
|
|
|
196
196
|
KGraph integrations are local files. They do not start background agents, call AI providers, or send data anywhere.
|
|
197
197
|
|
|
198
198
|
```bash
|
|
199
|
-
kgraph integrate add codex copilot cursor claude-code
|
|
199
|
+
kgraph integrate add codex copilot cursor claude-code gemini windsurf cline
|
|
200
200
|
kgraph integrate list
|
|
201
201
|
kgraph integrate remove cursor
|
|
202
202
|
```
|
|
@@ -207,6 +207,11 @@ kgraph integrate remove cursor
|
|
|
207
207
|
| GitHub Copilot | `.github/copilot-instructions.md`, `.github/prompts/*` |
|
|
208
208
|
| Cursor | `.cursor/rules/kgraph.mdc` |
|
|
209
209
|
| Claude Code | `CLAUDE.md`, `.claude/commands/*` |
|
|
210
|
+
| Gemini CLI | `GEMINI.md` |
|
|
211
|
+
| Windsurf | `.windsurf/rules/kgraph.md` |
|
|
212
|
+
| Cline | `.clinerules/kgraph.md` |
|
|
213
|
+
|
|
214
|
+
Antigravity is supported through the existing agent instruction surfaces it can read, especially `AGENTS.md` and `GEMINI.md`; it does not need a separate KGraph adapter yet.
|
|
210
215
|
|
|
211
216
|
KGraph preserves existing user-authored content and updates only its marked instruction blocks or generated command files.
|
|
212
217
|
|
package/dist/cli/help.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Chalk } from 'chalk';
|
|
|
2
2
|
import figlet from 'figlet';
|
|
3
3
|
export function renderRootHelp(useColor = supportsColor()) {
|
|
4
4
|
const theme = new Chalk({ level: useColor ? 3 : 0 });
|
|
5
|
-
const command = (name, description) => ` ${theme.green(name.padEnd(
|
|
5
|
+
const command = (name, description) => ` ${theme.green(name.padEnd(42))} ${description}`;
|
|
6
6
|
const logo = renderLogo();
|
|
7
7
|
return [
|
|
8
8
|
'',
|
|
@@ -11,7 +11,7 @@ export function renderRootHelp(useColor = supportsColor()) {
|
|
|
11
11
|
` ${theme.bold('KGraph')} ${theme.dim('Persistent repo intelligence for AI coding tools')}`,
|
|
12
12
|
'',
|
|
13
13
|
` ${theme.hex('#c084fc')('Build a local knowledge layer that helps Codex, Copilot, Cursor,')}`,
|
|
14
|
-
` ${theme.hex('#c084fc')('
|
|
14
|
+
` ${theme.hex('#c084fc')('Claude Code, Gemini, Windsurf, and Cline reuse repo intelligence.')}`,
|
|
15
15
|
'',
|
|
16
16
|
theme.bold('Usage'),
|
|
17
17
|
' kgraph [topic]',
|
|
@@ -19,7 +19,7 @@ export function renderRootHelp(useColor = supportsColor()) {
|
|
|
19
19
|
'',
|
|
20
20
|
theme.bold('Start'),
|
|
21
21
|
command('init', 'Required once: create .kgraph/ workspace'),
|
|
22
|
-
command('init --integrations codex,
|
|
22
|
+
command('init --integrations codex,gemini', 'Initialize and connect AI tools'),
|
|
23
23
|
'',
|
|
24
24
|
theme.bold('Daily workflow'),
|
|
25
25
|
command('kgraph', 'Refresh scan maps and process pending cognition notes'),
|
|
@@ -38,7 +38,7 @@ export function renderRootHelp(useColor = supportsColor()) {
|
|
|
38
38
|
'',
|
|
39
39
|
theme.bold('Integrations'),
|
|
40
40
|
command('integrate list', 'Show configured AI tool integrations'),
|
|
41
|
-
command('integrate add
|
|
41
|
+
command('integrate add gemini windsurf cline', 'Write KGraph instructions for AI tools'),
|
|
42
42
|
command('integrate remove cursor', 'Remove KGraph-managed instruction blocks'),
|
|
43
43
|
'',
|
|
44
44
|
theme.bold('Options'),
|
|
@@ -46,7 +46,7 @@ export function renderRootHelp(useColor = supportsColor()) {
|
|
|
46
46
|
command('-h, --help', 'Show this help'),
|
|
47
47
|
'',
|
|
48
48
|
`${theme.yellow('Examples')}`,
|
|
49
|
-
' kgraph init --integrations codex,copilot,cursor',
|
|
49
|
+
' kgraph init --integrations codex,copilot,cursor,claude-code,gemini,windsurf,cline',
|
|
50
50
|
' kgraph "blog admin token usage"',
|
|
51
51
|
' kgraph doctor',
|
|
52
52
|
'',
|
|
@@ -56,7 +56,7 @@ export function renderRootHelp(useColor = supportsColor()) {
|
|
|
56
56
|
}
|
|
57
57
|
export function renderWorkflowBanner(stats, useColor = supportsColor()) {
|
|
58
58
|
const theme = new Chalk({ level: useColor ? 3 : 0 });
|
|
59
|
-
const command = (name, description) => ` ${theme.green(name.padEnd(
|
|
59
|
+
const command = (name, description) => ` ${theme.green(name.padEnd(42))} ${description}`;
|
|
60
60
|
return [
|
|
61
61
|
'',
|
|
62
62
|
theme.hex('#7dd3fc').bold(renderLogo()),
|
package/dist/config/config.js
CHANGED
|
@@ -25,10 +25,13 @@ export const DEFAULT_CONFIG = {
|
|
|
25
25
|
'specs',
|
|
26
26
|
'.cursor',
|
|
27
27
|
'.claude',
|
|
28
|
+
'.windsurf',
|
|
29
|
+
'.clinerules',
|
|
28
30
|
'.github/copilot-instructions.md',
|
|
29
31
|
'.github/prompts',
|
|
30
32
|
'AGENTS.md',
|
|
31
33
|
'CLAUDE.md',
|
|
34
|
+
'GEMINI.md',
|
|
32
35
|
'REQUIREMENTS.md',
|
|
33
36
|
'*.log',
|
|
34
37
|
'*.tgz',
|
|
@@ -132,7 +135,15 @@ function normalizeIntegrations(value) {
|
|
|
132
135
|
seen.has(candidate.name)) {
|
|
133
136
|
continue;
|
|
134
137
|
}
|
|
135
|
-
if (![
|
|
138
|
+
if (![
|
|
139
|
+
'claude-code',
|
|
140
|
+
'cline',
|
|
141
|
+
'codex',
|
|
142
|
+
'copilot',
|
|
143
|
+
'cursor',
|
|
144
|
+
'gemini',
|
|
145
|
+
'windsurf',
|
|
146
|
+
].includes(candidate.name)) {
|
|
136
147
|
continue;
|
|
137
148
|
}
|
|
138
149
|
seen.add(candidate.name);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const clineAdapter = {
|
|
2
|
+
name: 'cline',
|
|
3
|
+
label: 'Cline',
|
|
4
|
+
targetPath: '.clinerules/kgraph.md',
|
|
5
|
+
instructions: `# KGraph Workflow
|
|
6
|
+
|
|
7
|
+
- **Before exploring the repository**, run \`kgraph "<topic>"\` to refresh maps, process pending inbox notes, and load focused repo intelligence. Use the returned files, symbols, relationships, and cognition before any broad exploration.
|
|
8
|
+
- Run \`kgraph doctor\` when setup, maps, inbox processing, or integrations look wrong. Run \`kgraph doctor --quality\` when context shows stale/noisy cognition references.
|
|
9
|
+
- At the end of any session that changed repository files, check the KGraph capture workflow before finishing.
|
|
10
|
+
- If the file change has future value, write one concise Markdown note to \`.kgraph/inbox/<slug>.md\`; otherwise explicitly skip capture as trivial.
|
|
11
|
+
- Skip capture only for read-only work, trivial formatting, typo-only docs, dependency-only churn, mechanical cleanup with no future value, or sessions where no repo files changed.
|
|
12
|
+
- Do not run KGraph repeatedly. Run it once at the start with \`kgraph "<topic>"\`. If repo files changed, write any needed inbox note first, then run \`kgraph\` once at the end.
|
|
13
|
+
- Run \`kgraph repair --dry-run\` before cleanup when stale/noisy cognition needs fixing. Run \`kgraph repair\` only when the user asks to apply that cleanup.
|
|
14
|
+
- Run \`kgraph visualize\` to open the interactive dependency graph at http://localhost:4242 with PNG export.
|
|
15
|
+
- Run \`kgraph history\` to review the timeline of past cognition sessions with git author attribution.
|
|
16
|
+
`,
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const geminiAdapter = {
|
|
2
|
+
name: 'gemini',
|
|
3
|
+
label: 'Gemini CLI',
|
|
4
|
+
targetPath: 'GEMINI.md',
|
|
5
|
+
instructions: `## KGraph Workflow
|
|
6
|
+
|
|
7
|
+
- **Before exploring the repository**, run \`kgraph "<topic>"\` to refresh maps, process pending inbox notes, and load focused repo intelligence. Use the returned files, symbols, relationships, and cognition before any broad exploration.
|
|
8
|
+
- Run \`kgraph doctor\` when setup, maps, inbox processing, or integrations look wrong. Run \`kgraph doctor --quality\` when context shows stale/noisy cognition references.
|
|
9
|
+
- At the end of any session that changed repository files, check the KGraph capture workflow before finishing.
|
|
10
|
+
- If the file change has future value, write one concise Markdown note to \`.kgraph/inbox/<slug>.md\`; otherwise explicitly skip capture as trivial.
|
|
11
|
+
- Skip capture only for read-only work, trivial formatting, typo-only docs, dependency-only churn, mechanical cleanup with no future value, or sessions where no repo files changed.
|
|
12
|
+
- Do not run KGraph repeatedly. Run it once at the start with \`kgraph "<topic>"\`. If repo files changed, write any needed inbox note first, then run \`kgraph\` once at the end.
|
|
13
|
+
- Run \`kgraph repair --dry-run\` before cleanup when stale/noisy cognition needs fixing. Run \`kgraph repair\` only when the user asks to apply that cleanup.
|
|
14
|
+
- Run \`kgraph visualize\` to open the interactive dependency graph at http://localhost:4242 with PNG export.
|
|
15
|
+
- Run \`kgraph history\` to review the timeline of past cognition sessions with git author attribution.
|
|
16
|
+
`,
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const windsurfAdapter = {
|
|
2
|
+
name: 'windsurf',
|
|
3
|
+
label: 'Windsurf',
|
|
4
|
+
targetPath: '.windsurf/rules/kgraph.md',
|
|
5
|
+
instructions: `# KGraph Workflow
|
|
6
|
+
|
|
7
|
+
- **Before exploring the repository**, run \`kgraph "<topic>"\` to refresh maps, process pending inbox notes, and load focused repo intelligence. Use the returned files, symbols, relationships, and cognition before any broad exploration.
|
|
8
|
+
- Run \`kgraph doctor\` when setup, maps, inbox processing, or integrations look wrong. Run \`kgraph doctor --quality\` when context shows stale/noisy cognition references.
|
|
9
|
+
- At the end of any session that changed repository files, check the KGraph capture workflow before finishing.
|
|
10
|
+
- If the file change has future value, write one concise Markdown note to \`.kgraph/inbox/<slug>.md\`; otherwise explicitly skip capture as trivial.
|
|
11
|
+
- Skip capture only for read-only work, trivial formatting, typo-only docs, dependency-only churn, mechanical cleanup with no future value, or sessions where no repo files changed.
|
|
12
|
+
- Do not run KGraph repeatedly. Run it once at the start with \`kgraph "<topic>"\`. If repo files changed, write any needed inbox note first, then run \`kgraph\` once at the end.
|
|
13
|
+
- Run \`kgraph repair --dry-run\` before cleanup when stale/noisy cognition needs fixing. Run \`kgraph repair\` only when the user asks to apply that cleanup.
|
|
14
|
+
- Run \`kgraph visualize\` to open the interactive dependency graph at http://localhost:4242 with PNG export.
|
|
15
|
+
- Run \`kgraph history\` to review the timeline of past cognition sessions with git author attribution.
|
|
16
|
+
`,
|
|
17
|
+
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { claudeCodeAdapter } from "./adapters/claude-code.js";
|
|
2
|
+
import { clineAdapter } from "./adapters/cline.js";
|
|
2
3
|
import { codexAdapter } from "./adapters/codex.js";
|
|
3
4
|
import { copilotAdapter } from "./adapters/copilot.js";
|
|
4
5
|
import { cursorAdapter } from "./adapters/cursor.js";
|
|
6
|
+
import { geminiAdapter } from "./adapters/gemini.js";
|
|
7
|
+
import { windsurfAdapter } from "./adapters/windsurf.js";
|
|
5
8
|
const ADAPTERS = [
|
|
6
9
|
claudeCodeAdapter,
|
|
10
|
+
clineAdapter,
|
|
7
11
|
codexAdapter,
|
|
8
12
|
copilotAdapter,
|
|
9
|
-
cursorAdapter
|
|
13
|
+
cursorAdapter,
|
|
14
|
+
geminiAdapter,
|
|
15
|
+
windsurfAdapter
|
|
10
16
|
].sort((left, right) => left.name.localeCompare(right.name));
|
|
11
17
|
export function listIntegrationAdapters() {
|
|
12
18
|
return ADAPTERS;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface DomainHint {
|
|
|
12
12
|
paths?: string[];
|
|
13
13
|
tags?: string[];
|
|
14
14
|
}
|
|
15
|
-
export type IntegrationName = "claude-code" | "codex" | "copilot" | "cursor";
|
|
15
|
+
export type IntegrationName = "claude-code" | "cline" | "codex" | "copilot" | "cursor" | "gemini" | "windsurf";
|
|
16
16
|
export interface IntegrationConfig {
|
|
17
17
|
name: IntegrationName;
|
|
18
18
|
enabled: boolean;
|