@justestif/pk 0.1.9 → 0.1.11
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/dist/index.js +6 -3
- package/package.json +1 -1
- package/skill/SKILL.md +11 -32
package/dist/index.js
CHANGED
|
@@ -17713,7 +17713,7 @@ var {
|
|
|
17713
17713
|
var package_default = {
|
|
17714
17714
|
name: "@justestif/pk",
|
|
17715
17715
|
type: "module",
|
|
17716
|
-
version: "0.1.
|
|
17716
|
+
version: "0.1.11",
|
|
17717
17717
|
description: "Project knowledge \u2014 structured intake, search, and recall",
|
|
17718
17718
|
bin: {
|
|
17719
17719
|
pk: "dist/index.js"
|
|
@@ -34162,10 +34162,13 @@ function parseHarnesses(raw) {
|
|
|
34162
34162
|
}
|
|
34163
34163
|
return [...new Set(parts)];
|
|
34164
34164
|
}
|
|
34165
|
+
function resolvePkCommand() {
|
|
34166
|
+
return Bun.which("pk") ?? "pk";
|
|
34167
|
+
}
|
|
34165
34168
|
function pkMcpEntry(knowledgeDir) {
|
|
34166
34169
|
return {
|
|
34167
34170
|
args: ["mcp"],
|
|
34168
|
-
command:
|
|
34171
|
+
command: resolvePkCommand(),
|
|
34169
34172
|
env: { PK_KNOWLEDGE_DIR: knowledgeDir }
|
|
34170
34173
|
};
|
|
34171
34174
|
}
|
|
@@ -34228,7 +34231,7 @@ function writeCodexConfig(projectRoot, _name, knowledgeDir) {
|
|
|
34228
34231
|
const cfgPath = path7.join(projectRoot, ".codex", "config.toml");
|
|
34229
34232
|
const toml = [
|
|
34230
34233
|
"[mcp_servers.pk]",
|
|
34231
|
-
|
|
34234
|
+
`command = "${resolvePkCommand()}"`,
|
|
34232
34235
|
'args = ["mcp"]',
|
|
34233
34236
|
"",
|
|
34234
34237
|
"[mcp_servers.pk.env]",
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -7,54 +7,33 @@ description: "Load when maintaining project knowledge, capturing decisions or qu
|
|
|
7
7
|
|
|
8
8
|
Structured project knowledge — intake, search, recall, and audit over `knowledge/`.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Tools
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## First use in a project
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
pk init
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Creates `knowledge/`, installs Claude Code hook at `.claude/hooks/pk-user-prompt-submit.ts`.
|
|
25
|
-
The hook injects open questions, recent decisions, and active notes into every prompt automatically.
|
|
26
|
-
|
|
27
|
-
## Commands
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
pk new <type> <title> [--tags tag1,tag2] # type: note|decision|question|source
|
|
31
|
-
pk search <query> [--context] [--limit 5]
|
|
32
|
-
pk synthesize [query] [--all] [--session-start]
|
|
33
|
-
pk index # rebuild FTS5 + markdown indexes
|
|
34
|
-
pk lint # validate structure — exit 1 on errors
|
|
35
|
-
pk instructions <command> # full behavioral guide per command
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Run all commands from the project root (where `knowledge/` lives).
|
|
12
|
+
| Task | Tool |
|
|
13
|
+
|---|---|
|
|
14
|
+
| Search notes | `pk_search` |
|
|
15
|
+
| Context dump / session start | `pk_synthesize` |
|
|
16
|
+
| Create a note | `pk_new` |
|
|
17
|
+
| Validate structure | `pk_lint` |
|
|
39
18
|
|
|
40
19
|
## Intake
|
|
41
20
|
|
|
42
|
-
**Search before creating** — always
|
|
21
|
+
**Search before creating** — always call `pk_search` first.
|
|
43
22
|
|
|
44
23
|
- Substantial messy input → `source`. Extract `note`, `decision`, `question` only when durable beyond this session.
|
|
45
24
|
- Update existing when the match is obvious; otherwise create and link in body.
|
|
46
|
-
-
|
|
25
|
+
- Call `pk_lint` before committing. Auto-commit coherent operations only when lint passes and no unrelated files are staged.
|
|
47
26
|
|
|
48
27
|
## Asking
|
|
49
28
|
|
|
50
|
-
1. `
|
|
29
|
+
1. `pk_search` with the relevant query
|
|
51
30
|
2. Read top results directly
|
|
52
31
|
3. Answer with citations to note paths/IDs
|
|
53
32
|
4. If silent or ambiguous, offer to create a `question` note
|
|
54
33
|
|
|
55
34
|
## NEVER
|
|
56
35
|
|
|
57
|
-
- **Skip `
|
|
36
|
+
- **Skip `pk_search` before creating** — duplicates erode trust in the knowledge base
|
|
58
37
|
- **Dump raw input into durable notes** — preserve in `source`, extract selectively
|
|
59
38
|
- **Silently merge related-but-different claims** — create and link instead
|
|
60
39
|
- **Auto-commit when lint fails or unrelated files are staged**
|