openalmanac 0.2.37 → 0.2.39

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/setup.js CHANGED
@@ -580,7 +580,7 @@ function installSkill(skillName) {
580
580
  }
581
581
  /* ── Reddit-specific tool groups ───────────────────────────────── */
582
582
  const REDDIT_EXTRA_TOOLS = [
583
- "Bash(node ~/.claude/skills/reddit-wiki/scripts/ingest.js *)",
583
+ "Bash(node */ingest.js *)",
584
584
  ];
585
585
  /* ── Reddit setup banner ───────────────────────────────────────── */
586
586
  function printRedditBanner() {
@@ -622,6 +622,8 @@ function printRedditResult(agent, loginResult, mcpChanged, toolCount) {
622
622
  w(row(` ${BLUE}1.${RST} Type ${WHITE_BOLD}claude${RST} to start Claude Code`));
623
623
  w(row(` ${BLUE}2.${RST} Run ${BLUE}/reddit-wiki r/<subreddit>${RST}`));
624
624
  w(empty);
625
+ w(row(` ${DIM}Ask "how does reddit wiki work?" to learn more${RST}`));
626
+ w(empty);
625
627
  w(` ${BLUE_DIM}\u2570${"─".repeat(innerW)}\u256f${RST}`);
626
628
  w("");
627
629
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openalmanac",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "description": "OpenAlmanac — pull, edit, and push articles to the open knowledge base",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,6 +28,18 @@ Two phases:
28
28
  - **API calls / community slugs**: Bare name — `subreddit=lockpicking`
29
29
  - **Accept both** as input: `r/lockpicking` or `lockpicking`
30
30
 
31
+ ## If no subreddit is given (or user asks "how does this work")
32
+
33
+ If the user runs `/reddit-wiki` without arguments or asks how it works, explain briefly:
34
+
35
+ - **What it does:** Takes any subreddit and builds a wiki on Almanac — real articles with citations, images, and links between them. Two phases: a foundation of 15-20 core articles, then a deep pass through the corpus finding niche topics.
36
+ - **What Almanac is:** An open knowledge base anyone can read and write to. Think Wikipedia's depth meets Reddit's community energy.
37
+ - **How it works:** Downloads the subreddit's history, scores posts by quality, then uses AI agents to research and write articles citing the community's own discussions.
38
+ - **Data storage:** Everything is stored locally at `~/.openalmanac/corpus/<subreddit>/`. The user can delete it anytime after the wiki is published.
39
+ - **Any subreddit:** They can pick any subreddit they're interested in. Some smaller or newer subreddits may not have data available — if that happens, you'll suggest alternatives or nearby subreddits that do have data.
40
+
41
+ Then ask them which subreddit they want to build a wiki for.
42
+
31
43
  ## Step 1: Scout
32
44
 
33
45
  Extract the subreddit name from the argument (strip `r/` prefix if present). Use the bare name for all API calls and file paths. Use `r/<name>` when talking to the user.
@@ -79,30 +91,41 @@ node ${CLAUDE_SKILL_DIR}/scripts/ingest.js <subreddit> download --since <year>
79
91
 
80
92
  This saves raw JSONL to `~/.openalmanac/corpus/<subreddit>/raw/`. The raw data is kept so you can re-filter later with different quality thresholds without re-downloading.
81
93
 
94
+ Tell the user:
95
+
96
+ ```
97
+ Downloading now. Go grab a coffee ☕ — I'll have everything
98
+ ready when you get back.
99
+ ```
100
+
82
101
  While it downloads, share interesting context about the community. Use your knowledge and do a quick `search_web` if helpful. Share REAL information — facts, history, notable members, what makes this community unique. Not questions, not small talk.
83
102
 
103
+ Also tell them where the data is being stored: `~/.openalmanac/corpus/<subreddit>/`
104
+
84
105
  When the download finishes, run the filter step:
85
106
 
86
107
  ```bash
87
108
  node ${CLAUDE_SKILL_DIR}/scripts/ingest.js <subreddit> filter --stats-only
88
109
  ```
89
110
 
90
- This shows the quality distribution how many posts at each quality level, with sample posts. Use this to decide the right quality threshold. Then present it to the user:
111
+ This returns quality scores and sample posts at each level. Present the results as a table:
91
112
 
92
113
  ```
93
114
  Download complete. X posts, Y comments from r/<subreddit>.
94
115
 
95
- Here's what the data looks like:
96
-
97
- high quality (top 10%): ~300 posts best discussions, guides, educational content
98
- medium (top 30%): ~900 posts solid community knowledge
99
- low (top 60%): ~1,800 posts includes questions and casual posts
100
- all: ~3,000 posts
116
+ | Quality | Posts | What's in it | Example |
117
+ |-----------|-------|--------------|---------|
118
+ | **high** | ~300 | Best guides, deep discussions, tutorials | "I designed a mechanism to make locks unpickable" (279 upvotes) |
119
+ | **medium** (recommended) | ~900 | Solid community knowledge, good Q&A | "Does anyone know about this lock?" (19 upvotes, 9 comments) |
120
+ | **low** | ~1,800 | Includes casual posts and quick questions | "Mul-T-Lock Interactive" (31 upvotes) |
121
+ | **all** | ~3,000 | Everything that isn't deleted | — |
101
122
 
102
- I'd recommend medium for the foundation — good balance of quality and coverage.
103
- We can dip into the rest during Phase 2.
123
+ I'd recommend medium — good balance of quality and coverage.
124
+ We can always dip into the rest during Phase 2.
104
125
  ```
105
126
 
127
+ Fill in the actual numbers and sample titles from the `--stats-only` output. The samples make it real — the user can see what kind of posts are at each level.
128
+
106
129
  Wait for the user to pick (or confirm your recommendation), then run:
107
130
 
108
131
  ```bash
@@ -113,7 +136,15 @@ This writes markdown entries to `~/.openalmanac/corpus/<subreddit>/entries/`. Ea
113
136
 
114
137
  Report the results:
115
138
  - How many entries were created
116
- - Where they're stored
139
+ - Where they're stored (`~/.openalmanac/corpus/<subreddit>/entries/`)
140
+
141
+ ### If the subreddit has no data on Arctic Shift
142
+
143
+ If the `count` command returns 0 posts, the subreddit may not be indexed. In this case:
144
+ - Tell the user this subreddit doesn't have historical data available
145
+ - Suggest nearby or related subreddits by searching Arctic Shift for similar names
146
+ - Ask if they'd like to try one of those instead
147
+ - Do NOT just fail silently — help them find something that works
117
148
 
118
149
  ## Step 3: Phase 1 — Foundation
119
150