@rayul/kordis 0.3.1 → 0.5.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 +2 -1
- package/assets/kordis-recommend/SKILL.md +148 -0
- package/dist/index.js +719 -150
- package/package.json +1 -1
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
|
|
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,148 @@
|
|
|
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
|
+
If the response carries `capped_by_author > 0`, ALSO surface a one-line
|
|
99
|
+
note to the user — e.g. "N more candidates from the same publisher were
|
|
100
|
+
skipped by the diversity cap" — so they understand why the list is
|
|
101
|
+
shorter than the requested `--limit`. Without this hint users frequently
|
|
102
|
+
mistake a short menu for a sparse or broken registry.
|
|
103
|
+
|
|
104
|
+
### 3. Present
|
|
105
|
+
Surface 3-5 picks max. For each, show: full_slug, one-line `why_recommended`,
|
|
106
|
+
confidence wording per the table above, and the next-step
|
|
107
|
+
`install_command` / `jit_read_command`. Do NOT dump the whole menu — agent
|
|
108
|
+
should curate.
|
|
109
|
+
|
|
110
|
+
### 4. Act
|
|
111
|
+
If the user picks one:
|
|
112
|
+
- "install it" → run `install_command` from the menu (already a complete
|
|
113
|
+
shell line)
|
|
114
|
+
- "peek first" → run `jit_read_command`, summarize, then offer install
|
|
115
|
+
- "tell me more" → `kordis info <full_slug>`
|
|
116
|
+
|
|
117
|
+
## Examples
|
|
118
|
+
|
|
119
|
+
<example>
|
|
120
|
+
User: "any new tools I should try?"
|
|
121
|
+
1. kordis recommend --limit 10 --json
|
|
122
|
+
2. Filter to top 3 with confidence ≥ medium
|
|
123
|
+
3. Show each with why_recommended + install_command
|
|
124
|
+
4. Ask which to install or peek
|
|
125
|
+
</example>
|
|
126
|
+
|
|
127
|
+
<example>
|
|
128
|
+
User: "추천 좀 해봐"
|
|
129
|
+
1. kordis recommend --limit 10 --json
|
|
130
|
+
2. If personalized is false, tell the user briefly + suggest `kordis setup`
|
|
131
|
+
3. Surface 3-5 in Korean using the why_recommended verbatim (English is fine
|
|
132
|
+
— re-render the user-facing prose in Korean as needed)
|
|
133
|
+
</example>
|
|
134
|
+
|
|
135
|
+
<example>
|
|
136
|
+
User: "I'm working on a Next.js project, anything useful for that?"
|
|
137
|
+
1. kordis recommend --limit 10 --json # context header carries 'next' framework hint
|
|
138
|
+
2. Filter to packages whose why_recommended mentions Next.js
|
|
139
|
+
3. Offer top 3 picks
|
|
140
|
+
</example>
|
|
141
|
+
|
|
142
|
+
## Reminder footer
|
|
143
|
+
|
|
144
|
+
Other CLI commands (`kordis pull`, `kordis search`) may print a one-line
|
|
145
|
+
hint like `→ N new recommendations match your stack: kordis recommend`.
|
|
146
|
+
That's a signal that `~/.kordis/recommendations.json` cache has fresh,
|
|
147
|
+
unseen picks. Running `kordis recommend` marks the set as seen and
|
|
148
|
+
suppresses the footer until a new fetch generates fresh content.
|