papiers 0.1.1 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "papiers",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
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,116 @@
1
+ ---
2
+ name: papiers-research
3
+ version: 1.2.0
4
+ description: |
5
+ Ground proposals, experiment designs, reviews, and writing in the user's
6
+ Papiers library — their highlights, 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, 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 document --limit 20 --json # scan recent titles
40
+ ```
41
+
42
+ 2. **Facet sweep.** Decompose the task into 3–6 facets (for "improve MoE
43
+ router load balancing": expert routing, load balancing loss, expert
44
+ collapse, capacity factor…). One default search covers matching titles,
45
+ passages, highlights, equations, and conversations in a single fused
46
+ ranking:
47
+
48
+ ```bash
49
+ papiers search "<facet>" --limit 10 --json
50
+ papiers search "<facet>" --passage-ids | papiers read @- --format plain --json
51
+ ```
52
+
53
+ Keep structured attributes out of the free-text query. Search
54
+ `papiers search "diffusion" --filter venue.contains=neurips --json`, not
55
+ `"neurips diffusion"`; search `papiers search "dropout" --filter author.contains=hinton --json`
56
+ for an author surname or `author.contains=karpathy` for a handle.
57
+
58
+ Document results carry nested `evidence[]` for passage, highlight, and
59
+ equation hits. Use `--passage-ids`, `--highlight-ids`, or `--evidence-ids`
60
+ to project matching evidence flat for piping. `--doc-ids` pivots any
61
+ result page to deduped parent documents, skipping conversation hits.
62
+
63
+ 3. **Delegated reading.** Document hits you cannot tie to any judgement are
64
+ curated-but-unread candidates (`--filter engaged=false` lists the queue).
65
+ Read the most promising under a budget (default 3–8 documents per task).
66
+ Bare `read` returns content; cap it, and use `--format metadata` when you
67
+ only need citation fields:
68
+
69
+ ```bash
70
+ papiers read doc_<id> --max-chars-per-item 4000 --json
71
+ papiers search "<topic>" --doc-ids | papiers read @- --format metadata --json
72
+ papiers search "<subtopic>" --kind passage --document-id doc_<id> --json # search within one document
73
+ ```
74
+
75
+ 4. **Judgement overlay.** For any document central to the task, pull the
76
+ user's marks on it, then read them:
77
+
78
+ ```bash
79
+ papiers list --kind highlight --document-id doc_<id> --json
80
+ papiers read hl_<id> --json # quote + annotationText + quoteContext + dates
81
+ ```
82
+
83
+ Most highlights carry no annotation (quote-only); `annotationText` is
84
+ only present on reads, so read the highlights you intend to lean on.
85
+
86
+ 5. **Write the judgement brief.** Before generating anything, summarize what
87
+ you found: verbatim annotations with dates and IDs, stances, open
88
+ questions, and which curated-but-unread sources you read and why they
89
+ matter. If the sweep found nothing, say so — do not force citations.
90
+
91
+ 6. **Generate with attribution.** Every proposal states what shaped it:
92
+
93
+ > Shaped by your note (2026-04, `hl_d82f…`): "how did they survive until
94
+ > then? how much did they raise?"
95
+
96
+ - Surface the user's open questions as candidate experiments — annotations
97
+ are often questions the user left for later.
98
+ - If your proposal contradicts the user's recorded judgement, say so
99
+ explicitly instead of silently overriding it.
100
+
101
+ ## Rules
102
+
103
+ - **Quote judgement verbatim.** Never paraphrase an annotation; its exact
104
+ wording is the signal.
105
+ - **Dates are data.** Prefer recent judgement for "current interests"; when
106
+ an old note resonates with the task, resurface it with its age ("you noted
107
+ this two years ago"). `createdAt` is on every highlight; `--since` accepts
108
+ ISO timestamps or `30d`-style shorthand.
109
+ - **Honor the quality signal.** `quality.signal: "empty"` or `"low"` means
110
+ the library has nothing — report that rather than citing weak matches.
111
+ - **Cite IDs.** `hl_/cnv_/doc_/pas_` IDs are stable; include them so the
112
+ user can jump to sources.
113
+ - **Budgets are policy, not protocol.** Default to ~10–20 queries and 3–8
114
+ document reads per task. The user may override any policy in this skill
115
+ (read more, weight recency differently, skip curation); the loop's shape
116
+ stays the same.