@justestif/pk 0.3.0 → 0.3.3
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 +14 -30
- package/dist/index.js +16003 -31294
- package/package.json +1 -2
- package/skill/references/knowledge-model.md +1 -1
package/README.md
CHANGED
|
@@ -35,43 +35,24 @@ pk init my-project --harness claude,codex # multiple harnesses
|
|
|
35
35
|
|
|
36
36
|
**Git integration:** `pk init` creates a git repository in `~/.pk/<name>/.git` and tracks all knowledge operations via commits and git notes.
|
|
37
37
|
|
|
38
|
-
Available harnesses: `claude` (Claude Code
|
|
38
|
+
Available harnesses: `claude` (Claude Code), `codex` (Codex), `opencode` (OpenCode).
|
|
39
39
|
|
|
40
40
|
`pk init` does three things:
|
|
41
41
|
|
|
42
42
|
1. Creates `~/.pk/<name>/` as the knowledge home for this project
|
|
43
|
-
2.
|
|
44
|
-
3. Installs
|
|
43
|
+
2. Installs a hook or plugin that calls `pk prime` at session start to inject context into your agent
|
|
44
|
+
3. Installs the pk skill so your agent knows how to use the CLI
|
|
45
45
|
|
|
46
|
-
| Harness | Files written |
|
|
47
|
-
|
|
48
|
-
| `claude` | `.
|
|
49
|
-
| `codex` |
|
|
50
|
-
| `opencode` |
|
|
51
|
-
|
|
52
|
-
## MCP
|
|
53
|
-
|
|
54
|
-
`pk mcp` starts an MCP server on stdio. It runs in-process — tools call the same lib functions as the CLI, no subprocess overhead.
|
|
55
|
-
|
|
56
|
-
For Claude Desktop, add to `claude_desktop_config.json`:
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{
|
|
60
|
-
"mcpServers": {
|
|
61
|
-
"pk": {
|
|
62
|
-
"command": "pk",
|
|
63
|
-
"args": ["mcp"],
|
|
64
|
-
"env": { "PK_KNOWLEDGE_DIR": "/Users/you/.pk/my-project" }
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
46
|
+
| Harness | Files written | Mechanism |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `claude` | `.claude/hooks/pk-eval.ts`, `.claude/settings.json` | Hook spawns `pk prime` on every prompt |
|
|
49
|
+
| `codex` | `AGENTS.md` | Codex reads AGENTS.md natively |
|
|
50
|
+
| `opencode` | `.opencode/plugins/pk-eval.ts` | Plugin spawns `pk prime` at session start |
|
|
69
51
|
|
|
70
52
|
## Commands
|
|
71
53
|
|
|
72
54
|
```bash
|
|
73
|
-
pk init [name] [--harness h1,h2,…] # set up project +
|
|
74
|
-
pk mcp # start MCP server (stdio)
|
|
55
|
+
pk init [name] [--harness h1,h2,…] # set up project + hooks
|
|
75
56
|
|
|
76
57
|
pk new <type> <title> [--tags t1,t2]
|
|
77
58
|
pk edit <path> [--editor <cmd>] # edit existing note
|
|
@@ -83,10 +64,13 @@ pk read <path> [--json]
|
|
|
83
64
|
pk vocab [--json]
|
|
84
65
|
pk rebuild
|
|
85
66
|
pk lint [paths...] [--json]
|
|
67
|
+
pk prime # output priming context for hooks
|
|
86
68
|
pk instructions <command>
|
|
87
69
|
pk config
|
|
88
70
|
```
|
|
89
71
|
|
|
72
|
+
Every command supports `--json` for machine-readable output.
|
|
73
|
+
|
|
90
74
|
### Note types
|
|
91
75
|
|
|
92
76
|
| Type | Purpose |
|
|
@@ -111,7 +95,7 @@ pk synthesize
|
|
|
111
95
|
## Knowledge structure
|
|
112
96
|
|
|
113
97
|
Notes live in `~/.pk/<name>/` as plain markdown files — human-editable and git-diffable.
|
|
114
|
-
Agents access them exclusively through
|
|
98
|
+
Agents access them exclusively through the CLI; humans can read and edit them directly.
|
|
115
99
|
|
|
116
100
|
```
|
|
117
101
|
~/.pk/
|
|
@@ -127,7 +111,7 @@ Agents access them exclusively through MCP tools; humans can read and edit them
|
|
|
127
111
|
Search is powered by SQLite FTS5 with BM25 ranking and porter stemming.
|
|
128
112
|
Partial word matching works — `pk search migr` matches "migration", "migrate", etc.
|
|
129
113
|
|
|
130
|
-
`pk vocab` lists all tags by frequency — useful for orienting
|
|
114
|
+
`pk vocab` lists all tags by frequency — useful for orienting before searching.
|
|
131
115
|
|
|
132
116
|
`pk history` shows all knowledge operations (create, update, delete) as git commits and synthesize operations as git notes. Supports filtering by type, tag, and operation.
|
|
133
117
|
|