@rayul/kordis 0.3.0 → 0.4.0

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/assets/KORDIS.md CHANGED
@@ -29,12 +29,13 @@ Verbs: `kordis search`, `info`, `read`, `pull`, `push`, `comment`, `star`,
29
29
  `unstar`, `whoami`/`login`/`logout`. ALWAYS pass `--json` when parsing
30
30
  programmatically.
31
31
 
32
- Detail lives in four on-demand sub-skills installed at `~/.claude/skills/`,
32
+ Detail lives in five on-demand sub-skills installed at `~/.claude/skills/`,
33
33
  `~/.codex/skills/`, and `~/.gemini/skills/`:
34
34
  - `kordis-search` — find and browse packages
35
35
  - `kordis-using` — `read` vs `pull`, behaviour per package type, attribution
36
36
  - `kordis-publishing` — author and push packages
37
37
  - `kordis-social` — identity, session, comments, and stars
38
+ - `kordis-recommend` — personalized menu (`kordis recommend`); use when the user signals discovery intent without a specific slug
38
39
 
39
40
  Tools with a SKILL.md description-matcher (Claude Code, Codex) auto-load
40
41
  these. Tools without one (e.g. Gemini): READ
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: kordis-recommend
3
+ description: Use whenever the user wants ideas — phrases like "any new stuff?", "recommend", "추천", "what should I try", "anything fresh?", "discover", "show me good skills", "what's popular for <stack>". Surfaces a personalized menu of Kordis packages the user may want to install or peek at. Read eagerly when the user signals discovery intent without a specific slug in mind.
4
+ type: skill
5
+ allowed-tools: ["Bash(kordis:*)"]
6
+ ---
7
+
8
+ # Kordis: Personalized Recommendations
9
+
10
+ ## Goal
11
+ Surface a ranked, agent-friendly menu of packages the user may want next.
12
+ Algorithm is hybrid: content-based (your local stack) + item-CF (other
13
+ users with similar installs) + popularity decay (stars + recency).
14
+
15
+ ## When to invoke
16
+
17
+ Trigger any time the user signals discovery intent without naming a slug:
18
+
19
+ - "anything new I should try?"
20
+ - "추천 좀 해봐"
21
+ - "what's a good skill for <topic>?"
22
+ - "I'm setting up a Python project — anything good?"
23
+ - "show me popular tools"
24
+ - "discover something fresh"
25
+
26
+ Do NOT invoke for specific lookups (use `kordis search` for those) or when
27
+ the user names a slug (use `kordis info` / `kordis read`).
28
+
29
+ ## Command
30
+
31
+ ### `kordis recommend [--limit N] [--verbose] [--no-context] [--json]`
32
+
33
+ | flag | meaning |
34
+ | -------------- | ---------------------------------------------------------------- |
35
+ | `--limit <n>` | max items (default 10, max 50) |
36
+ | `--verbose` | include `score_breakdown` per item (content / cf / popularity) |
37
+ | `--no-context` | skip the `X-Kordis-Context` header for this call (one-shot opt-out) |
38
+ | `--json` | global flag — JSON envelope, no human render |
39
+
40
+ Anonymous: works without login. Personalized signal rides on an opt-in
41
+ `X-Kordis-Context` HTTP header (installed agent tools, top 3 CWD file
42
+ extensions, framework hints from package.json/pyproject.toml/Cargo.toml,
43
+ SHA-256-truncated hashes of installed slugs). Server uses it for in-flight
44
+ re-ranking ONLY — never persisted (see CLAUDE.md "Telemetry / privacy").
45
+
46
+ ## Personalization opt-in
47
+
48
+ The user is asked ONCE — at first interactive `kordis setup` OR (if
49
+ postinstall ran in `--silent` mode) at first `kordis recommend`. Answer
50
+ persists in `~/.kordis/config.json` (`personalization: 'on' | 'off'`).
51
+
52
+ Override at runtime:
53
+ - `KORDIS_NO_CONTEXT=1` env — no header for the entire shell session
54
+ - `--no-context` flag — no header for this single call
55
+
56
+ If the response field `personalized` is `false`, the server returned
57
+ popularity-only results — surface this to the user so they know the
58
+ recommendations aren't tailored.
59
+
60
+ ## Menu envelope (one item)
61
+
62
+ ```json
63
+ {
64
+ "full_slug": "rayul/fastapi-router",
65
+ "title": "FastAPI Router",
66
+ "description": "Streaming response middleware for FastAPI apps.",
67
+ "type": "skill",
68
+ "tier": "A",
69
+ "current_version": "0.2.0",
70
+ "stars": 12,
71
+ "downloads": 87,
72
+ "install_command": "kordis pull rayul/fastapi-router",
73
+ "jit_read_command": "kordis read rayul/fastapi-router",
74
+ "why_recommended": "You have FastAPI locally; this package is relevant to that stack.",
75
+ "confidence": "high"
76
+ }
77
+ ```
78
+
79
+ `confidence` interpretation when surfacing to the user:
80
+
81
+ | value | how to surface |
82
+ | -------- | ------------------------------------------------------------------------- |
83
+ | `high` | "You should try X" — both content match and co-install signal align |
84
+ | `medium` | "You might like X" — one signal strong |
85
+ | `low` | "Worth a look — popular right now" — cold-start / no personalization |
86
+
87
+ ## Steps
88
+
89
+ ### 1. Fetch menu
90
+ `kordis recommend --limit 10 --json`. (Add `--no-context` ONLY if the user
91
+ explicitly asked you not to share their stack.)
92
+
93
+ ### 2. Triage
94
+ Filter mentally by `confidence`. If everything is `low` and `personalized`
95
+ is `false`, tell the user personalization is off and they can enable it
96
+ via `kordis setup` (re-asks the prompt on next interactive run).
97
+
98
+ ### 3. Present
99
+ Surface 3-5 picks max. For each, show: full_slug, one-line `why_recommended`,
100
+ confidence wording per the table above, and the next-step
101
+ `install_command` / `jit_read_command`. Do NOT dump the whole menu — agent
102
+ should curate.
103
+
104
+ ### 4. Act
105
+ If the user picks one:
106
+ - "install it" → run `install_command` from the menu (already a complete
107
+ shell line)
108
+ - "peek first" → run `jit_read_command`, summarize, then offer install
109
+ - "tell me more" → `kordis info <full_slug>`
110
+
111
+ ## Examples
112
+
113
+ <example>
114
+ User: "any new tools I should try?"
115
+ 1. kordis recommend --limit 10 --json
116
+ 2. Filter to top 3 with confidence ≥ medium
117
+ 3. Show each with why_recommended + install_command
118
+ 4. Ask which to install or peek
119
+ </example>
120
+
121
+ <example>
122
+ User: "추천 좀 해봐"
123
+ 1. kordis recommend --limit 10 --json
124
+ 2. If personalized is false, tell the user briefly + suggest `kordis setup`
125
+ 3. Surface 3-5 in Korean using the why_recommended verbatim (English is fine
126
+ — re-render the user-facing prose in Korean as needed)
127
+ </example>
128
+
129
+ <example>
130
+ User: "I'm working on a Next.js project, anything useful for that?"
131
+ 1. kordis recommend --limit 10 --json # context header carries 'next' framework hint
132
+ 2. Filter to packages whose why_recommended mentions Next.js
133
+ 3. Offer top 3 picks
134
+ </example>
135
+
136
+ ## Reminder footer
137
+
138
+ Other CLI commands (`kordis pull`, `kordis search`) may print a one-line
139
+ hint like `→ N new recommendations match your stack: kordis recommend`.
140
+ That's a signal that `~/.kordis/recommendations.json` cache has fresh,
141
+ unseen picks. Running `kordis recommend` marks the set as seen and
142
+ suppresses the footer until a new fetch generates fresh content.