@kentwynn/kgraph 0.1.6 → 0.1.7

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
@@ -84,12 +84,12 @@ kgraph context "auth token refresh" --json
84
84
 
85
85
  KGraph writes local instruction files and command/prompt packs so AI tools can use the repository knowledge layer during normal coding chats.
86
86
 
87
- | Integration | Always-on guidance | KGraph command assets |
88
- | --- | --- | --- |
89
- | Codex | `AGENTS.md` | `.agents/skills/kgraph/SKILL.md` |
87
+ | Integration | Always-on guidance | KGraph command assets |
88
+ | -------------- | --------------------------------- | ---------------------------------- |
89
+ | Codex | `AGENTS.md` | `.agents/skills/kgraph/SKILL.md` |
90
90
  | GitHub Copilot | `.github/copilot-instructions.md` | `.github/prompts/kgraph.prompt.md` |
91
- | Cursor | `.cursor/rules/kgraph.mdc` | Built into the KGraph Cursor rule |
92
- | Claude Code | `CLAUDE.md` | `.claude/commands/kgraph.md` |
91
+ | Cursor | `.cursor/rules/kgraph.mdc` | Built into the KGraph Cursor rule |
92
+ | Claude Code | `CLAUDE.md` | `.claude/commands/kgraph.md` |
93
93
 
94
94
  Example:
95
95
 
@@ -150,7 +150,21 @@ KGraph stores project intelligence in local files inside `.kgraph/`. The MVP doe
150
150
  npm install
151
151
  npm run build
152
152
  npm test
153
+ ```
154
+
155
+ Test a command without installing:
156
+
157
+ ```bash
153
158
  npm run kgraph -- init --integrations codex,cursor
159
+ npm run kgraph -- context "auth token refresh"
160
+ ```
161
+
162
+ Install the local build globally to test the `kgraph` binary end-to-end:
163
+
164
+ ```bash
165
+ npm install -g .
166
+ kgraph --version
167
+ kgraph init --integrations codex,copilot
154
168
  ```
155
169
 
156
170
  ## Release
package/dist/cli/index.js CHANGED
File without changes
@@ -4,11 +4,7 @@ export const claudeCodeAdapter = {
4
4
  targetPath: 'CLAUDE.md',
5
5
  instructions: `## KGraph Workflow
6
6
 
7
- - Start repository work by checking \`kgraph context "<topic>"\` when the user asks about a domain, bug, workflow, or feature.
8
- - Convert stable discoveries from chat into Markdown notes under \`.kgraph/inbox/\`.
9
- - Run \`kgraph update\` to preserve those notes as durable cognition.
10
- - Run \`kgraph scan\` after structural code changes.
11
- - Run \`kgraph visualize\` when visualization support is available and the user wants to inspect the current knowledge map.
7
+ Before exploring the repository, run \`kgraph context "<topic>"\` to load existing repo intelligence. Use /kgraph for the full automated workflow. Run \`kgraph scan\` and \`kgraph update\` manually when needed.
12
8
  `,
13
9
  commandFiles: [
14
10
  {
@@ -18,8 +14,8 @@ export const claudeCodeAdapter = {
18
14
  1. Infer the topic from the user's request.
19
15
  2. Run \`kgraph context "<topic>"\`.
20
16
  3. Use the returned files, symbols, relationships, and cognition before broad exploration.
21
- 4. Save durable discoveries to \`.kgraph/inbox/\` and run \`kgraph update\` when appropriate.
22
- 5. Run \`kgraph scan\` after structural changes and report the scan summary.
17
+ 4. Save durable discoveries to \`.kgraph/inbox/\` and immediately run \`kgraph update\`.
18
+ 5. If you created, moved, deleted, or renamed files or symbols during this session, run \`kgraph scan\` and report the summary. Skip it otherwise.
23
19
  `,
24
20
  },
25
21
  {
@@ -1,2 +1,2 @@
1
- import type { IntegrationAdapter } from "../integration-registry.js";
1
+ import type { IntegrationAdapter } from '../integration-registry.js';
2
2
  export declare const codexAdapter: IntegrationAdapter;
@@ -1,35 +1,33 @@
1
1
  export const codexAdapter = {
2
- name: "codex",
3
- label: "Codex",
4
- targetPath: "AGENTS.md",
2
+ name: 'codex',
3
+ label: 'Codex',
4
+ targetPath: 'AGENTS.md',
5
5
  instructions: `## KGraph Workflow
6
6
 
7
- - Before broad repository exploration, run \`kgraph context "<topic>"\` to load current repo intelligence.
8
- - After useful debugging, architecture discovery, workflow learning, or implementation work, write a concise Markdown note into \`.kgraph/inbox/\`.
9
- - Run \`kgraph update\` after adding inbox notes so KGraph preserves durable cognition.
10
- - Run \`kgraph scan\` after file moves, function renames, refactors, or other structural changes.
11
- - When visualization support is available and the developer asks to inspect KGraph, run \`kgraph visualize\` and report the generated local artifact.
7
+ Before exploring the repository, run \`kgraph context "<topic>"\` to load existing repo intelligence. The /kgraph skill handles the full automated workflow. Run \`kgraph scan\` and \`kgraph update\` manually when needed.
12
8
  `,
13
9
  commandFiles: [
14
10
  {
15
- path: ".agents/skills/kgraph/SKILL.md",
11
+ path: '.agents/skills/kgraph/SKILL.md',
16
12
  content: `---
17
- name: "kgraph"
18
- description: "Use KGraph persistent repo intelligence for the current coding task."
13
+ name: kgraph
14
+ description: Use KGraph persistent repo intelligence before broad repository exploration. Use when asked about repo structure, debugging context, architecture decisions, or to avoid rediscovering what is already known.
19
15
  ---
20
16
 
21
- Use this skill when the user asks to use KGraph, requests repo context, or asks you to avoid rediscovering repository structure.
17
+ # KGraph Skill
22
18
 
23
19
  Workflow:
24
20
 
25
21
  1. Infer the current topic from the user request.
26
22
  2. Run \`kgraph context "<topic>"\` before broad repo exploration.
27
- 3. Use KGraph's files, symbols, relationships, and cognition as navigation hints.
28
- 4. After durable discoveries, write a concise Markdown note to \`.kgraph/inbox/\`.
29
- 5. Run \`kgraph update\` if you created an inbox note.
30
- 6. Run \`kgraph scan\` after structural changes.
31
- `
32
- }
23
+ 3. Use KGraph's returned files, symbols, relationships, and cognition as navigation hints.
24
+ 4. After durable discoveries, write a concise Markdown note to \`.kgraph/inbox/\` and immediately run \`kgraph update\`.
25
+ 5. If you created, moved, deleted, or renamed files or symbols during this session, run \`kgraph scan\`. Skip it otherwise.
26
+ `,
27
+ },
28
+ ],
29
+ obsoleteCommandFiles: [
30
+ '.agents/skills/kgraph-update',
31
+ '.agents/skills/kgraph-scan',
33
32
  ],
34
- obsoleteCommandFiles: [".agents/skills/kgraph-update", ".agents/skills/kgraph-scan"]
35
33
  };
@@ -4,29 +4,9 @@ export const copilotAdapter = {
4
4
  targetPath: '.github/copilot-instructions.md',
5
5
  instructions: `## KGraph Workflow
6
6
 
7
- - Use \`kgraph context "<topic>"\` before scanning many files manually.
8
- - Preserve stable findings by creating Markdown notes in \`.kgraph/inbox/\`.
9
- - Use \`kgraph update\` to process chat summaries and debugging conclusions into durable cognition.
10
- - Use \`kgraph scan\` when code structure changes.
11
- - Use \`kgraph visualize\` when visualization support is available and the developer asks to inspect the repository knowledge map.
7
+ Before exploring the repository, run \`kgraph context "<topic>"\` to load existing repo intelligence. Use /kgraph-scan and /kgraph-update for manual maintenance.
12
8
  `,
13
9
  commandFiles: [
14
- {
15
- path: '.github/prompts/kgraph.prompt.md',
16
- content: `---
17
- mode: agent
18
- description: Use KGraph persistent repo intelligence for this request
19
- ---
20
-
21
- Use KGraph for the current task.
22
-
23
- 1. If the user provided a topic, run \`kgraph context "<topic>"\` first. If not, infer a concise topic from the request.
24
- 2. Use the returned files, symbols, relationships, and cognition before broad repository exploration.
25
- 3. If you discover durable architecture, debugging, workflow, or gotcha knowledge, create a Markdown note in \`.kgraph/inbox/\`.
26
- 4. If you add an inbox note, run \`kgraph update\`.
27
- 5. If code structure changed, run \`kgraph scan\`.
28
- `,
29
- },
30
10
  {
31
11
  path: '.github/prompts/kgraph-scan.prompt.md',
32
12
  content: `---
@@ -48,5 +28,5 @@ Run \`kgraph update\` to process any pending Markdown notes in \`.kgraph/inbox/\
48
28
  `,
49
29
  },
50
30
  ],
51
- obsoleteCommandFiles: [],
31
+ obsoleteCommandFiles: ['.github/prompts/kgraph.prompt.md'],
52
32
  };
@@ -1,2 +1,2 @@
1
- import type { IntegrationAdapter } from "../integration-registry.js";
1
+ import type { IntegrationAdapter } from '../integration-registry.js';
2
2
  export declare const cursorAdapter: IntegrationAdapter;
@@ -1,7 +1,7 @@
1
1
  export const cursorAdapter = {
2
- name: "cursor",
3
- label: "Cursor",
4
- targetPath: ".cursor/rules/kgraph.mdc",
2
+ name: 'cursor',
3
+ label: 'Cursor',
4
+ targetPath: '.cursor/rules/kgraph.mdc',
5
5
  instructions: `---
6
6
  description: Use KGraph persistent repo intelligence before broad repository exploration
7
7
  alwaysApply: true
@@ -9,11 +9,7 @@ alwaysApply: true
9
9
 
10
10
  ## KGraph Workflow
11
11
 
12
- - Query \`kgraph context "<topic>"\` before broad file searches when repo cognition may already exist.
13
- - Store durable chat, debugging, architecture, and workflow discoveries as Markdown notes in \`.kgraph/inbox/\`.
14
- - Run \`kgraph update\` after adding useful notes.
15
- - Run \`kgraph scan\` after refactors, moved folders, renamed functions, or other structure changes.
16
- - Run \`kgraph visualize\` when visualization support is available and the developer asks to inspect the KGraph map.
12
+ Before exploring the repository, run \`kgraph context "<topic>"\` to load existing repo intelligence. Run \`kgraph scan\` and \`kgraph update\` manually when needed.
17
13
  `,
18
- obsoleteCommandFiles: [".cursor/rules/kgraph-commands.mdc"]
14
+ obsoleteCommandFiles: ['.cursor/rules/kgraph-commands.mdc'],
19
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kentwynn/kgraph",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Persistent repo intelligence for AI coding assistants.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,6 +14,7 @@
14
14
  "scripts": {
15
15
  "clean": "node scripts/clean-dist.mjs",
16
16
  "build": "npm run clean && tsc -p tsconfig.json",
17
+ "postbuild": "chmod +x dist/cli/index.js",
17
18
  "test": "vitest run",
18
19
  "kgraph": "tsx src/cli/index.ts",
19
20
  "check:artifacts": "node scripts/check-clean-artifacts.mjs",