papiers 0.1.2 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "papiers",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Read-only CLI for your Papiers library.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://papiers.ai",
@@ -22,7 +22,8 @@
22
22
  "main": "dist/index.js",
23
23
  "files": [
24
24
  "bin",
25
- "dist"
25
+ "dist",
26
+ "skills"
26
27
  ],
27
28
  "engines": {
28
29
  "node": ">=22"
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: papiers-research
3
+ version: 1.2.1
4
+ description: |
5
+ Ground proposals, experiment designs, reviews, and writing in the user's
6
+ Papiers library — their highlights, notes, annotations, conversations, and
7
+ curated-but-unread saves — before generating. Use whenever output should
8
+ be shaped by what the user has read and thought, not generic knowledge:
9
+ proposing research ideas, designing experiments, advising on decisions,
10
+ or writing on topics the user studies.
11
+ allowed-tools:
12
+ - Bash
13
+ ---
14
+
15
+ # Thinking with the user's library
16
+
17
+ The `papiers` CLI is the agent-readable memory of what the user has read and
18
+ thought. It holds two kinds of signal, and you must treat them differently:
19
+
20
+ - **Judgement** (read and marked): highlights, notes, annotations, and past
21
+ conversations. These are the user's own words — stances, open questions,
22
+ connections. The strongest signal you have.
23
+ - **Curation** (saved, possibly unread): library membership itself. The user
24
+ saves far more than they read, usually because someone they trust shared
25
+ it. A saved-but-unmarked document is an *endorsement the user has not had
26
+ bandwidth to evaluate* — your job is to complete that evaluation: read it
27
+ if relevant, then decide whether it should shape your output.
28
+
29
+ All data commands emit stable JSON envelopes; pass `--json` so errors are
30
+ JSON too (without it, errors print as plain text). Run `papiers --help --all`
31
+ once for the full contract. `PAPIERS_TOKEN` must be configured.
32
+
33
+ ## The loop — run this BEFORE generating
34
+
35
+ 1. **Recent trajectory.** What is the user into right now?
36
+
37
+ ```bash
38
+ papiers list --kind highlight --since 30d --limit 20 --json
39
+ papiers list --kind note --limit 20 --json
40
+ papiers list --kind document --limit 20 --json # scan recent titles
41
+ ```
42
+
43
+ 2. **Facet sweep.** Decompose the task into 3–6 facets (for "improve MoE
44
+ router load balancing": expert routing, load balancing loss, expert
45
+ collapse, capacity factor…). One default search covers matching titles,
46
+ passages, highlights, equations, notes, and conversations in a single fused
47
+ ranking:
48
+
49
+ ```bash
50
+ papiers search "<facet>" --limit 10 --json
51
+ papiers search "<facet>" --passage-ids | papiers read @- --format plain --json
52
+ ```
53
+
54
+ Keep structured attributes out of the free-text query. Search
55
+ `papiers search "diffusion" --filter venue.contains=neurips --json`, not
56
+ `"neurips diffusion"`; search `papiers search "dropout" --filter author.contains=hinton --json`
57
+ for an author surname or `author.contains=karpathy` for a handle.
58
+
59
+ Document results carry nested `evidence[]` for passage, highlight, and
60
+ equation hits; notes and conversations are standalone results. Use
61
+ `--passage-ids`, `--highlight-ids`, or `--evidence-ids` to project matching
62
+ evidence flat for piping. `--doc-ids` pivots any result page to deduped
63
+ parent documents, including attached notes and skipping conversations.
64
+
65
+ 3. **Delegated reading.** Document hits you cannot tie to any judgement are
66
+ curated-but-unread candidates (`--filter engaged=false` lists the queue).
67
+ Read the most promising under a budget (default 3–8 documents per task).
68
+ Bare `read` returns content; cap it, and use `--format metadata` when you
69
+ only need citation fields:
70
+
71
+ ```bash
72
+ papiers read doc_<id> --max-chars-per-item 4000 --json
73
+ papiers read nte_<id> --max-chars-per-item 4000 --json
74
+ papiers search "<topic>" --doc-ids | papiers read @- --format metadata --json
75
+ papiers search "<subtopic>" --kind passage --document-id doc_<id> --json # search within one document
76
+ ```
77
+
78
+ 4. **Judgement overlay.** For any document central to the task, pull the
79
+ user's marks on it, then read them:
80
+
81
+ ```bash
82
+ papiers list --kind highlight --document-id doc_<id> --json
83
+ papiers read hl_<id> --json # quote + annotationText + quoteContext + dates
84
+ ```
85
+
86
+ Most highlights carry no annotation (quote-only); `annotationText` is
87
+ only present on reads, so read the highlights you intend to lean on.
88
+
89
+ 5. **Write the judgement brief.** Before generating anything, summarize what
90
+ you found: verbatim annotations with dates and IDs, stances, open
91
+ questions, and which curated-but-unread sources you read and why they
92
+ matter. If the sweep found nothing, say so — do not force citations.
93
+
94
+ 6. **Generate with attribution.** Every proposal states what shaped it:
95
+
96
+ > Shaped by your note (2026-04, `hl_d82f…`): "how did they survive until
97
+ > then? how much did they raise?"
98
+
99
+ - Surface the user's open questions as candidate experiments — annotations
100
+ are often questions the user left for later.
101
+ - If your proposal contradicts the user's recorded judgement, say so
102
+ explicitly instead of silently overriding it.
103
+
104
+ ## Rules
105
+
106
+ - **Quote judgement verbatim.** Never paraphrase an annotation; its exact
107
+ wording is the signal.
108
+ - **Dates are data.** Prefer recent judgement for "current interests"; when
109
+ an old note resonates with the task, resurface it with its age ("you noted
110
+ this two years ago"). `createdAt` is on every highlight; `--since` accepts
111
+ ISO timestamps or `30d`-style shorthand.
112
+ - **Honor the quality signal.** `quality.signal: "empty"` or `"low"` means
113
+ the library has nothing — report that rather than citing weak matches.
114
+ - **Cite IDs.** `hl_/cnv_/doc_/pas_/eq_/nte_` IDs are stable; include them so the
115
+ user can jump to sources.
116
+ - **Budgets are policy, not protocol.** Default to ~10–20 queries and 3–8
117
+ document reads per task. The user may override any policy in this skill
118
+ (read more, weight recency differently, skip curation); the loop's shape
119
+ stays the same.