replen 1.2.0 → 1.2.1

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/init.js CHANGED
@@ -166,13 +166,20 @@ export async function runInit() {
166
166
  const { runFirstIngest } = await import("./first-ingest.js");
167
167
  await runFirstIngest({ token: exchange.token, base: exchange.base, savedAt: "" });
168
168
  console.log("");
169
- console.log(" All set. Restart Claude Code and try:");
170
- console.log(" /replen → triage today's candidates against this repo,");
171
- console.log(" in-session, using your subscription tokens");
172
- console.log(" (no LLM API keys needed — the agent does the reasoning)");
169
+ console.log(" All set. Restart Claude Code, then do these two — IN THIS ORDER:");
173
170
  console.log("");
174
- console.log(" Other MCP hosts (Codex / Cursor / Aider):");
175
- console.log(" \"use replen_match\" same tool, no slash command");
171
+ console.log(" 1. /replen-onboard ONE-TIME, FIRST. Reads your repos and builds a");
172
+ console.log(" tailored profile so matches are relevant, not");
173
+ console.log(" generic. Runs in the background — kick it off,");
174
+ console.log(" then just keep working.");
175
+ console.log("");
176
+ console.log(" 2. /replen ANYTIME after that. Triages the candidates for");
177
+ console.log(" the current repo, in-session, on your own");
178
+ console.log(" subscription tokens — no LLM API key needed.");
179
+ console.log("");
180
+ console.log(" (Onboarding is once per project. After that, it's just /replen.)");
181
+ console.log("");
182
+ console.log(" Other MCP hosts (Codex / Cursor / Aider): \"use replen_match\" — same tool.");
176
183
  console.log("");
177
184
  console.log(` Dashboard: ${exchange.base}`);
178
185
  console.log("");
@@ -33,12 +33,25 @@
33
33
  import { readFileSync, writeFileSync, existsSync } from "node:fs";
34
34
  import { join, basename } from "node:path";
35
35
  import { createInterface } from "node:readline";
36
- export const INTEGRATION_VERSION = "9";
36
+ export const INTEGRATION_VERSION = "10";
37
37
  const SECTION_HEADER = "## Replen integration";
38
38
  const MARKER_RE = /<!--\s*replen-integration:\s*v(\d+)\s*-->/;
39
39
  const SECTION_BODY = `<!-- replen-integration: v${INTEGRATION_VERSION} -->
40
40
 
41
- On your **very first response** of each session:
41
+ **FIRST, on your first response in a repo: check onboarding.** Call
42
+ \`replen_onboard_state\` once. If it reports this repo (or the user's
43
+ portfolio) is NOT yet onboarded/grounded, do NOT run the footnote flow
44
+ this turn. Answer the user's message normally, then offer this VERBATIM
45
+ as a new paragraph at the end:
46
+
47
+ > Replen isn't set up for your repos yet — want me to do that now? Replen builds a profile so matches are relevant. Onboarding runs in the background, ~a few minutes.
48
+
49
+ If they accept, invoke the \`replen-onboard\` skill. If they decline, carry
50
+ on and do NOT re-offer for the rest of this session. Once \`replen_onboard_state\`
51
+ shows the repo is onboarded, SKIP this check entirely and use the footnote
52
+ flow below.
53
+
54
+ Once onboarded, on your **very first response** of each session:
42
55
 
43
56
  1. **Skip the whole flow ONLY if** the user's first message is a
44
57
  pure trivial greeting with no content ("hi", "hey", "yo",
@@ -40,7 +40,10 @@ Parse the JSON response. Note:
40
40
 
41
41
  - `filterMode` — `tags`, `zero-knowledge`, or `fingerprint`
42
42
  - `scopedTo` — confirms the project context the user has open
43
- - `candidates[]` — the actual list to triage
43
+ - `candidates[]` — the actual list to triage. Each carries `solid: true|false` —
44
+ the ones Replen counts as genuinely worth your time (clear domain-fit + posture +
45
+ not-already-covered, or a dependency-maintenance match). The footnote's count is
46
+ the number of `solid` ones; the rest are "worth a glance" laterals.
44
47
 
45
48
  If `candidates.length === 0`, tell the user "No new candidates today for
46
49
  `<owner/name>`. Calm-cadence working as designed — 1-3 actionable
@@ -50,8 +53,11 @@ If 1+ candidates, continue.
50
53
 
51
54
  ### Step 3 — Per-candidate analysis
52
55
 
53
- **Cap at 5 candidates.** If the inventory returned more, take the top 5
54
- by `whyShortlisted` strength + stars + recency, defer the rest.
56
+ **Triage the `solid` candidates first** (cap at 5). If there are more than 5
57
+ solid, take the top 5 by `whyShortlisted` strength + stars + recency. The
58
+ non-`solid` "worth a glance" entries are optional — skim them only if the solid
59
+ set is thin or the user asks. A low-domain-fit lateral there can still be a real
60
+ port/cherry-pick, so don't dismiss them blindly, but they're not the headline.
55
61
 
56
62
  For each candidate, do this loop:
57
63
 
@@ -210,9 +216,15 @@ For tech-news-site:
210
216
 
211
217
  (Triaged 9 candidates; surfacing the 2 worth acting on + 1 idea worth keeping.)
212
218
 
213
- What would you like to do with each? (star / hide / handoff)
219
+ What would you like to do with each? star (save it for later; won't
220
+ re-surface), hide (dismiss; never show again), or handoff (open a pull
221
+ request against your repo for it). Or skip and decide later.
214
222
  ```
215
223
 
224
+ Always present the options WITH that one-line gloss the first time in a
225
+ session — never the bare "(star / hide / handoff)". A new user doesn't know
226
+ what they mean, and the calm-cadence promise dies if the user has to ask.
227
+
216
228
  The one-line "(Triaged N…)" footer is the *only* acknowledgement that skips
217
229
  happened — honest, but it doesn't parade them.
218
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replen",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Make your AI coding tools smarter. One command, no API keys, free. Replen watches what your projects actually do and surfaces a few things worth bringing in each month. Use one as is, port a piece of another, cherry pick an idea, or build it clean room. The match happens inside your AI tool's session. A few actionable matches a month, by design.",
5
5
  "type": "module",
6
6
  "bin": {