@rayul/kordis 0.11.0 → 0.12.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/README.md CHANGED
@@ -35,24 +35,27 @@ Then re-run the install — no `sudo` needed.
35
35
 
36
36
  ## Commands
37
37
 
38
- | command | purpose |
39
- |---|---|
40
- | `kordis search <query>` | search the registry |
41
- | `kordis info <slug>` | inspect a package |
42
- | `kordis read <slug>` | JIT-fetch body into agent context (skill / project-rules / custom-agent only) |
43
- | `kordis pull <slug>` | install into the current project (mcp-server / hook) |
44
- | `kordis push <file>` | publish a new package or version |
45
- | `kordis login` / `logout` / `whoami` | identity |
46
- | `kordis setup` | inject usage guide into Claude Code / Codex / Gemini CLI globals |
38
+ | command | purpose |
39
+ | ------------------------------------- | ----------------------------------------------------------------------------- |
40
+ | `kordis search <query>` | search the registry |
41
+ | `kordis info <slug>` | inspect a package |
42
+ | `kordis read <slug>` | JIT-fetch body into agent context (skill / project-rules / custom-agent only) |
43
+ | `kordis pull <slug>` | install into the current project (mcp-server / hook) |
44
+ | `kordis push <file>` | publish a new package or version |
45
+ | `kordis pull <slug>@<version>` | pin a specific version / range (transitive deps resolved) |
46
+ | `kordis yank <slug>@<version>` | unpublish a version (panic-mode; `unyank` restores) |
47
+ | `kordis login` / `logout` / `whoami` | identity |
48
+ | `kordis profile` / `follow` / `stars` | social layer |
49
+ | `kordis setup` | inject usage guide into Claude Code / Codex / Gemini CLI globals |
47
50
 
48
51
  Pass `--json` on any command to get machine-readable output.
49
52
 
50
53
  ## Configuration
51
54
 
52
- | env var | purpose | default |
53
- |---|---|---|
54
- | `KORDIS_API_URL` | registry endpoint | `https://api.kordis.dev` |
55
- | `KORDIS_HOME` | config + token fallback dir | `~/.kordis` |
55
+ | env var | purpose | default |
56
+ | ---------------- | --------------------------- | -------------------------- |
57
+ | `KORDIS_API_URL` | registry endpoint | `https://api.kordis.store` |
58
+ | `KORDIS_HOME` | config + token fallback dir | `~/.kordis` |
56
59
 
57
60
  Refresh and access tokens are stored in the OS keychain via `keytar` (with a file-based fallback at `~/.kordis/.tokens.json`, mode `0600`, when keytar is unavailable).
58
61
 
@@ -60,14 +63,15 @@ Refresh and access tokens are stored in the OS keychain via `keytar` (with a fil
60
63
 
61
64
  Kordis collects two opt-in signals, both off by default. Both can be set non-interactively for agents (`kordis setup --personalization on|off` and `kordis setup --error-telemetry on|off`) and both have an env-var escape hatch that overrides config.
62
65
 
63
- | env var | purpose | default |
64
- |---|---|---|
65
- | `KORDIS_NO_CONTEXT=1` | suppress personalization header even if opted in | off |
66
- | `KORDIS_NO_TELEMETRY=1` | suppress error telemetry POST even if opted in | off |
67
- | `KORDIS_NO_KEYCHAIN=1` | force plaintext token storage even when keytar loads (escape hatch for macOS keychain-prompt fatigue) | off |
68
- | `KORDIS_DEBUG=1` | surface auto-finalize stage outcomes to stderr (diagnostic) | off |
66
+ | env var | purpose | default |
67
+ | ----------------------- | ----------------------------------------------------------------------------------------------------- | ------- |
68
+ | `KORDIS_NO_CONTEXT=1` | suppress personalization header even if opted in | off |
69
+ | `KORDIS_NO_TELEMETRY=1` | suppress error telemetry POST even if opted in | off |
70
+ | `KORDIS_NO_KEYCHAIN=1` | force plaintext token storage even when keytar loads (escape hatch for macOS keychain-prompt fatigue) | off |
71
+ | `KORDIS_DEBUG=1` | surface auto-finalize stage outcomes to stderr (diagnostic) | off |
69
72
 
70
73
  **What error telemetry carries** (0.7.0+, when `error_telemetry: 'on'`):
74
+
71
75
  - error `kind` (4 enum values — auto-finalize Stage 1/2 failure, network unreachable, unhandled error)
72
76
  - `cli_version`, `node_version`, `platform`
73
77
  - `message_excerpt` — first 200 chars of `err.message` AFTER client-side sanitization (homedir → `~`; unix paths ≥2 segments → `<path>`; Windows paths → `<path>`; query strings → `?<query>`; JWTs → `<jwt>`; UUIDs → `<uuid>`; hex runs ≥32 → `<hex>`)
package/assets/KORDIS.md CHANGED
@@ -1,19 +1,21 @@
1
1
  ---
2
2
  name: kordis
3
- description: Use Kordis whenever the user mentions finding, installing, sharing, or publishing skills, project-rules, custom-agents, MCP servers, or hooks; names any `<username>/<slug>` identifier; or asks for a standalone artifact that may benefit from reusable domain knowledge, structure, or templates. Pushy on purpose — agents under-trigger. Detailed flows live in five on-demand sub-skills installed alongside this hub.
3
+ description: Use Kordis whenever the user mentions finding, installing, sharing, or publishing skills, project-rules, custom-agents, MCP servers, hooks, or judgment patterns (reusable decision logic / "how should the agent decide…"); names any `<username>/<slug>` identifier; or asks for a standalone artifact that may benefit from reusable domain knowledge, structure, or templates. Pushy on purpose — agents under-trigger. Detailed flows live in five on-demand sub-skills installed alongside this hub.
4
4
  type: skill
5
- version: 0.1.7
5
+ version: 0.1.8
6
6
  ---
7
7
 
8
8
  # Kordis
9
9
 
10
10
  Kordis is the public registry for agentic-coding packages (`skill`,
11
- `project-rules`, `custom-agent`, `mcp-server`, `hook`). ALWAYS use the `kordis`
12
- CLI — NEVER hand-edit `.cursorrules`, `.mcp.json`, `.claude/agents/`,
13
- `.claude/skills/`, or other tool config files for Kordis content. Hand-edits
14
- drift; the CLI keeps state coherent and resolves dependencies.
11
+ `project-rules`, `custom-agent`, `mcp-server`, `hook`, `judgment-pattern`).
12
+ ALWAYS use the `kordis` CLI — NEVER hand-edit `.cursorrules`, `.mcp.json`,
13
+ `.claude/agents/`, `.claude/skills/`, or other tool config files for Kordis
14
+ content. Hand-edits drift; the CLI keeps state coherent and resolves
15
+ dependencies.
15
16
 
16
17
  Trigger Kordis when the user:
18
+
17
19
  - asks to find, install, share, or publish such a package
18
20
  - names a `<username>/<slug>` identifier
19
21
  - asks what is trending or rising
@@ -33,12 +35,21 @@ from reusable domain knowledge, structure, or templates, run
33
35
  `kordis read <full_slug>` before proceeding; otherwise continue ad hoc.
34
36
  NEVER fabricate a slug.
35
37
 
36
- Verbs: `kordis search`, `info`, `read`, `pull`, `push`, `comment`, `star`,
37
- `unstar`, `whoami`/`login`/`logout`. ALWAYS pass `--json` when parsing
38
+ **Judgment patterns** — `judgment-pattern` packages carry agentic _judgment_
39
+ (when to switch modes, what to verify, what NOT to do), not installable files.
40
+ Don't install them: `kordis read` one, or `kordis adapt <slug>` to get a brief
41
+ on fitting it into THIS project's harness — proposed for your approval, never
42
+ auto-applied. Each carries a `trust_tier` — strongest to weakest: `re-verified`,
43
+ `community-adapted`, `author-reported`, `unsubstantiated`. Treat
44
+ `author-reported` as the author's unverified claim, not proven.
45
+
46
+ Verbs: `kordis search`, `info`, `read`, `adapt`, `pull`, `push`, `comment`,
47
+ `star`, `unstar`, `whoami`/`login`/`logout`. ALWAYS pass `--json` when parsing
38
48
  programmatically.
39
49
 
40
50
  Detail lives in five on-demand sub-skills installed at `~/.claude/skills/`,
41
51
  `~/.codex/skills/`, and `~/.gemini/skills/`:
52
+
42
53
  - `kordis-search` — find and browse packages
43
54
  - `kordis-using` — `read` vs `pull`, behaviour per package type, attribution
44
55
  - `kordis-publishing` — author and push packages
@@ -1,16 +1,18 @@
1
1
  ---
2
2
  name: kordis-publishing
3
- description: Use whenever the user wants to publish, share, or push a package to Kordis — phrases like "publish this", "share this skill to Kordis", "push this rule", "release a new version of <slug>", "bump the version", "semver", "버전 올리기". Also covers retracting a bad or compromised release — "yank", "withdraw a version", "unpublish a release", "kill a release", "nuke a version", "take down a version", "recall a release", "we leaked a key in <version>", "compromised", "철회", "내리기". Covers dry-run flow, frontmatter requirements, version bump strategies, semver rules, yank/unyank for retracting bad releases, and the AI review pipeline.
3
+ description: Use whenever the user wants to publish, share, or push a package to Kordis — phrases like "publish this", "share this skill to Kordis", "push this rule", "publish a judgment / decision pattern", "release a new version of <slug>", "bump the version", "semver", "버전 올리기". Also covers retracting a bad or compromised release — "yank", "withdraw a version", "unpublish a release", "kill a release", "nuke a version", "take down a version", "recall a release", "we leaked a key in <version>", "compromised", "철회", "내리기". Covers dry-run flow, frontmatter requirements, authoring a judgment-pattern, recording lineage (--adapted-from/--forked-from/--absorbs/--remixes), version bump strategies, semver rules, yank/unyank, and the AI review pipeline.
4
4
  type: skill
5
- allowed-tools: ["Bash(kordis:*)", "Read", "Edit"]
5
+ allowed-tools: ['Bash(kordis:*)', 'Read', 'Edit']
6
6
  ---
7
7
 
8
8
  # Kordis: Authoring & Publishing
9
9
 
10
10
  ## Goal
11
+
11
12
  Publish a valid, AI-review-passing version. ALWAYS dry-run first.
12
13
 
13
14
  ## Frontmatter requirements
15
+
14
16
  - `name` — must equal slug, lowercase-with-hyphens.
15
17
  - `description` — 1–2 sentences, slightly **pushy** ("Use whenever the
16
18
  user…"). Claude under-triggers without pushiness.
@@ -26,6 +28,7 @@ field manually) only when pushing a different package type from a
26
28
  single `.md` file that doesn't match the SKILL.md filename pattern.
27
29
 
28
30
  **`version` field handling:**
31
+
29
32
  - **First publish** — used as-is (else defaults to `0.1.0`).
30
33
  - **Update** — the registry computes the next version from
31
34
  `current_version + --bump <strategy>` (default `patch`). If the file's
@@ -36,12 +39,56 @@ single `.md` file that doesn't match the SKILL.md filename pattern.
36
39
  use only `--bump patch|minor|major` to control versioning. Having both
37
40
  is the most common push failure.
38
41
 
42
+ ## Publishing a `judgment-pattern`
43
+
44
+ A judgment-pattern's substance lives in **structured frontmatter fields**, not
45
+ the body (the body is a short intro). Set `type: judgment-pattern` explicitly
46
+ (no SKILL.md filename inference) and fill:
47
+
48
+ - `problem` (≤4000) — the failure/situation this judgment addresses.
49
+ - `decision_logic` (≤20000, Markdown) — how to decide; the core.
50
+ - `when_to_apply` (1–12 items) — situations that trigger it.
51
+ - `when_not_to_apply` (optional) — where it must NOT be used.
52
+ - `failure_modes` (optional) — `[{symptom, correction}]`: how it goes wrong and
53
+ the self-correcting fix.
54
+ - `adapt_hints` (optional) — `{universal: [...], context_specific: [...]}`: what
55
+ transfers verbatim vs what each adopter must refit. Steers `kordis adapt`.
56
+ - `evidence` (optional but strongly recommended) — what makes this more than a
57
+ plausible claim (e.g. before/after failure rates). Drives `trust_tier`: WITH
58
+ `evidence` a judgment reads as `author-reported`; WITHOUT it,
59
+ `unsubstantiated`. Never overstate — the registry tiers self-reported claims
60
+ BELOW community-corroborated ones, and `re-verified` is Kordis-only.
61
+ - `origin` (optional) — where the judgment came from.
62
+
63
+ AI review is stricter for judgments: `decision_logic` that merely restates the
64
+ `description`, empty `when_to_apply`, or `adapt_hints` contradicting the body
65
+ get rejected. Dry-run first like any push.
66
+
67
+ ## Recording lineage (0.12.0+)
68
+
69
+ When a package descends from another (especially a judgment you adapted), record
70
+ the provenance on `push` so it shows up in the "Derived from / Adapted by" graph,
71
+ feeds the `community-adapted` trust tier, and gives a small trending boost:
72
+
73
+ | flag | edge kind | meaning |
74
+ | ----------------------- | ------------ | ----------------------------------------------- |
75
+ | `--adapted-from <slug>` | `adaptation` | fitted a source into a new context (repeatable) |
76
+ | `--forked-from <slug>` | `fork` | near-copy taken in a new direction |
77
+ | `--absorbs <slug>` | `absorption` | folds the source in as one part |
78
+ | `--remixes <slug>` | `remix` | recombines multiple sources |
79
+
80
+ Unresolved sources (typo'd / unpublished slug) are **skipped fail-open** — the
81
+ publish still succeeds and the response's `lineage.skipped` lists them so you
82
+ can fix the slug or publish the source first. Declare lineage honestly; it is
83
+ the registry's trust signal, not decoration.
84
+
39
85
  ## Yanking a bad version (0.10.0+)
40
86
 
41
87
  When a single release goes wrong — leaked secret, broken on platform X,
42
88
  superseded by an urgent fix — use **yank**, not delete.
43
89
 
44
90
  ### `kordis yank <full_slug>[@<version>] [--reason <text>] [--force]`
91
+
45
92
  Soft-marks the specific version as "unrecommended". Author-only.
46
93
 
47
94
  **0.10.1+ — omit `@<version>` to yank the package's current version.**
@@ -52,8 +99,8 @@ displays `(current)` next to the resolved version in the confirmation
52
99
  banner so you know what got picked. Explicit pins (`@1.2.3`) still
53
100
  override.
54
101
 
55
-
56
102
  Versions yanked this way:
103
+
57
104
  - Disappear from `kordis pull <slug>` (bare slug) and from `@^X.Y` /
58
105
  `@X.x` / `@*` range resolution
59
106
  - **Still install** when explicitly pinned to that exact version
@@ -68,10 +115,12 @@ well: `"leaked AWS key"`, `"broken on Node 18"`, `"superseded by
68
115
  0.5.0 — security fix"`.
69
116
 
70
117
  ### `kordis unyank <full_slug>@<version>`
118
+
71
119
  Reverses a yank. Idempotent. After unyank, the version re-enters
72
120
  range resolution and `current_version` recomputes if appropriate.
73
121
 
74
122
  ### Yank vs delete — pick the right one
123
+
75
124
  - **`kordis yank <slug>@<version>`** — one bad release. Reversible.
76
125
  Per-version. Preserves pinned-install reproducibility.
77
126
  - **`kordis delete <slug>`** — the whole package should disappear.
@@ -103,20 +152,22 @@ operator restores it.
103
152
 
104
153
  ### `kordis push <file> [options]`
105
154
 
106
- | flag | meaning |
107
- | --------------------- | -------------------------------------------------------- |
108
- | `--dry-run` | validate only; do not publish |
109
- | `--bump <strategy>` | `patch` (default) / `minor` / `major` — only on update |
110
- | `--slug <slug>` | override slug on first publish |
111
- | `--type <type>` | override type inference |
112
- | `--changelog <text>` | optional changelog entry attached to this version |
113
- | `--no-wait` | return immediately without waiting for AI review |
155
+ | flag | meaning |
156
+ | --------------------------------------------------------------------- | ------------------------------------------------------ |
157
+ | `--dry-run` | validate only; do not publish |
158
+ | `--bump <strategy>` | `patch` (default) / `minor` / `major` — only on update |
159
+ | `--slug <slug>` | override slug on first publish |
160
+ | `--type <type>` | override type inference |
161
+ | `--changelog <text>` | optional changelog entry attached to this version |
162
+ | `--no-wait` | return immediately without waiting for AI review |
163
+ | `--adapted-from <slug>` / `--forked-from` / `--absorbs` / `--remixes` | record lineage (see "Recording lineage") |
114
164
 
115
165
  `--json` is the global output flag.
116
166
 
117
167
  ## Steps
118
168
 
119
169
  ### 1. Dry-run
170
+
120
171
  `kordis push <file> --dry-run --json`. Returns the same validation, conflict,
121
172
  and version-resolution verdicts a real push would produce.
122
173
 
@@ -131,7 +182,9 @@ hasn't decided within the wait window.
131
182
  with no error flags.
132
183
 
133
184
  ### 2. Resolve flags
185
+
134
186
  Possible verdicts:
187
+
135
188
  - `validation_failed` (exit 30) — fix every listed flag, re-dry-run.
136
189
  - `conflict` (exit 40) — slug taken; suggest a different slug (or pass
137
190
  `--slug` if first publish).
@@ -144,6 +197,7 @@ Possible verdicts:
144
197
  **Success criteria**: dry-run is clean.
145
198
 
146
199
  ### 3. Real push
200
+
147
201
  `kordis push <file> --json`. Add `--bump minor` (or `major`) when shipping a
148
202
  non-patch update.
149
203
 
@@ -181,6 +235,19 @@ silently retry — explain why.
181
235
 
182
236
  ## Examples
183
237
 
238
+ <example>
239
+ User (push-back after adapting a judgment): "that decision rule we adapted from
240
+ <upstream/slug> worked well — share our version back"
241
+ 1. author the refitted judgment as a judgment-pattern file (structured
242
+ frontmatter; see "Publishing a judgment-pattern")
243
+ 2. kordis push ./judgment.md --type judgment-pattern --adapted-from <upstream/slug> --dry-run --json
244
+ 3. clean → drop --dry-run for the real push
245
+ 4. the response's `lineage.recorded` confirms the edge; if `lineage.skipped`
246
+ lists the source, the upstream slug was wrong or unpublished — fix it, or
247
+ publish the source first, then re-push. The edge gives the upstream
248
+ `community-adapted` credit and shows in its "Adapted by" graph.
249
+ </example>
250
+
184
251
  <example>
185
252
  User: "publish my new skill"
186
253
  1. kordis push ./SKILL.md --dry-run --json
@@ -220,18 +287,22 @@ When the user asks to fork / adapt / republish someone else's package
220
287
  under their own slug, do the following:
221
288
 
222
289
  1. **License first.** Read the upstream `license` field (`kordis info
223
- <upstream> --json`). MIT / Apache-2.0 / BSD all permit derivatives;
290
+ <upstream> --json`). MIT / Apache-2.0 / BSD all permit derivatives;
224
291
  CC-BY-SA forces ShareAlike (your fork must use the same license).
225
292
  GPL-flavoured / proprietary → STOP and tell the user.
226
293
  2. **Carry the legal minimum.** Preserve the upstream copyright and
227
294
  permission notices verbatim inside the body. Do NOT strip them.
228
295
  3. **Credit upstream.** In the new package's body, add a `Derived from
229
- <upstream-full-slug>` line near the top, and point `homepage` at the
296
+ <upstream-full-slug>` line near the top, and point `homepage` at the
230
297
  upstream source (the original repo, not the Kordis page — `homepage`
231
298
  is for the canonical authoring source).
232
- 4. **Pick a fresh slug.** A fork is a *new* package; do not reuse the
299
+ 4. **Pick a fresh slug.** A fork is a _new_ package; do not reuse the
233
300
  upstream slug. Start at `0.1.0` (or whatever the file's `version` says
234
301
  on first publish).
235
302
  5. **Tag derivation in `description`.** A short " — fork of
236
303
  <upstream-full-slug>" suffix is enough; users searching the fork need
237
304
  to know.
305
+ 6. **Record the lineage edge.** Push with `--forked-from <upstream-full-slug>`
306
+ (or `--adapted-from` for a judgment you refitted) so the provenance shows in
307
+ the graph and the upstream gets `community-adapted` credit. See "Recording
308
+ lineage".
@@ -2,40 +2,45 @@
2
2
  name: kordis-search
3
3
  description: Use whenever the user wants to find, browse, or discover Kordis packages, OR whenever YOU are about to handle an unfamiliar file format, niche domain, uncertain technique, seemingly-hard task, or standalone artifact that may benefit from reusable domain knowledge, structure, or templates. Search Kordis FIRST before falling back to ad-hoc work. Pushy on purpose — agents tend to skip Kordis search when it would help.
4
4
  type: skill
5
- allowed-tools: ["Bash(kordis:*)"]
5
+ allowed-tools: ['Bash(kordis:*)']
6
6
  ---
7
7
 
8
8
  # Kordis: Search & Discovery
9
9
 
10
10
  ## Goal
11
+
11
12
  Help the user find a Kordis package that fits their need. ALWAYS rely on real
12
13
  search results — NEVER fabricate slugs.
13
14
 
14
15
  ## Commands
15
16
 
16
17
  ### `kordis search [query...] [options]`
18
+
17
19
  Keyword search; `--json` for parsing.
18
20
 
19
- | flag | meaning |
20
- | ---------------- | ------------------------------------------------------------------------ |
21
- | `--type <t>` | `skill`, `mcp-server`, `project-rules`, `custom-agent`, `hook` |
22
- | `--tool <s>` | filter by compatible tool (`claude-code`, `codex`, `cursor`, …) |
23
- | `--tier <t>` | filter by portability tier `A`/`B`/`C`/`D` |
24
- | `--author <u>` | restrict to a single author. **When set, response includes exact `total`** (other filters return `total: null`). 0.6.4+. |
25
- | `--sort <m>` | `relevance` (default), `stars`, `downloads`, `recent`, `updated` |
26
- | `--trending` | list packages trending in `--window` (overrides `--sort`) |
27
- | `--rising` | list rising packages by 7d acceleration (overrides `--sort`) |
28
- | `--window <w>` | `24h` (default), `7d`, or `30d` — only honoured with `--trending` |
29
- | `--limit <n>` | max results per page (default 20, max 100) |
30
- | `--cursor <t>` | pagination — pass `next_cursor` from a prior response to fetch page 2+. 0.6.7+. |
21
+ | flag | meaning |
22
+ | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
+ | `--type <t>` | `skill`, `mcp-server`, `project-rules`, `custom-agent`, `hook`, `judgment-pattern` (a unit of agentic _judgment_ — read & `kordis adapt`, see kordis-using) |
24
+ | `--tool <s>` | filter by compatible tool (`claude-code`, `codex`, `cursor`, …) |
25
+ | `--tier <t>` | filter by portability tier `A`/`B`/`C`/`D` |
26
+ | `--tag <s>` | filter by tag (`aws`, `fastapi`, `llm`, …). Tags now also boost free-text ranking, so a bare keyword surfaces tag matches too. |
27
+ | `--author <u>` | restrict to a single author. **When set, response includes exact `total`** (other filters return `total: null`). 0.6.4+. |
28
+ | `--sort <m>` | `relevance` (default), `stars`, `downloads`, `recent`, `updated` |
29
+ | `--trending` | list packages trending in `--window` (overrides `--sort`) |
30
+ | `--rising` | list rising packages by 7d acceleration (overrides `--sort`) |
31
+ | `--window <w>` | `24h` (default), `7d`, or `30d` — only honoured with `--trending` |
32
+ | `--limit <n>` | max results per page (default 20, max 100) |
33
+ | `--cursor <t>` | pagination — pass `next_cursor` from a prior response to fetch page 2+. 0.6.7+. |
31
34
 
32
35
  ### `kordis info <full_slug> --json`
36
+
33
37
  Inspect metadata (title, description, type, tier, version, author, stars,
34
38
  review status, dependencies) before reading or pulling.
35
39
 
36
40
  ## Steps
37
41
 
38
42
  ### 0. Self-check before ad-hoc work
43
+
39
44
  Before doing anything ad-hoc on an unfamiliar format, niche domain, uncertain
40
45
  technique, seemingly-hard task, or standalone artifact that may benefit from
41
46
  reusable domain knowledge, structure, or templates, treat that as a Kordis
@@ -47,18 +52,23 @@ fabricate a slug.
47
52
  **Success criteria**: a search ran before any ad-hoc work began.
48
53
 
49
54
  ### 1. Form the query
55
+
50
56
  Pick a keyword that matches the user's task; restrict by `--type` if the user
51
- named a package type, and by `--tool` if the user named their tool. For
52
- "what's trending / rising" intents skip the keyword — pass `--trending` or
57
+ named a package type, `--tool` if the user named their tool, and `--tag` for a
58
+ topic (e.g. `aws`, `fastapi`). Tags and common synonyms (node→javascript,
59
+ k8s→kubernetes) now feed ranking, so a plain keyword already finds tag matches.
60
+ For "what's trending / rising" intents skip the keyword — pass `--trending` or
53
61
  `--rising` instead.
54
62
  **Success criteria**: a non-empty query OR a discovery flag, plus (when known)
55
63
  the right filters.
56
64
 
57
65
  ### 2. Run the search
66
+
58
67
  ALWAYS with `--json`. **Success criteria**: CLI exits 0 and returns a results
59
68
  array.
60
69
 
61
70
  ### 3. Triage the results
71
+
62
72
  - Prefer `review_status: passed`, higher `stars`, then `tier: A`.
63
73
  - For trending results, the `trending_score` field is populated — surface it
64
74
  when comparing.
@@ -78,6 +88,19 @@ array.
78
88
 
79
89
  ## Examples
80
90
 
91
+ <example>
92
+ User (decision-intent — search Kordis FIRST, even with no slug): "my agent keeps
93
+ deleting files without checking with me — is there a rule for when it should ask
94
+ first?" / "테스트가 계속 실패하는데 더 똑똑한 접근법 패턴 없나?"
95
+ - this is a JUDGMENT need (when/whether to act), not a component → search anyway
96
+ - kordis search "ask before risky changes" --type judgment-pattern --json
97
+ (synonyms map guardrails/risky/destructive/rollback/approval/diagnose to the
98
+ judgment vocabulary, so natural phrasing surfaces judgment-patterns)
99
+ - if 0 results, broaden: drop --type, or try the core word (`approval`,
100
+ `rollback`, `diagnose`); 0 is a clean signal — NEVER fabricate a slug
101
+ - found one → `kordis adapt <slug>` (see kordis-using) to fit it to THIS project
102
+ </example>
103
+
81
104
  <example>
82
105
  User: "find me a Python skill"
83
106
  - kordis search python --type skill --json
@@ -2,39 +2,45 @@
2
2
  name: kordis-social
3
3
  description: Use whenever the user wants to log into Kordis, log out, check identity, post a typed comment on a Kordis package, star/unstar a package, view a user's public profile, list their packages or stars, or follow/unfollow another user. Triggers include "log into Kordis", "kordis login", "who am I logged in as on Kordis", "log me out of Kordis", "leave a tip on <slug>", "report a bug on <slug>", "comment on <slug>", "star <slug>", "unstar <slug>", "favourite <slug>", "follow <username>", "unfollow <username>", "팔로우", "팔로워", "show me <username>'s profile", "프로필", "what has <username> starred", "who follows <username>", "who does <username> follow".
4
4
  type: skill
5
- allowed-tools: ["Bash(kordis:*)"]
5
+ allowed-tools: ['Bash(kordis:*)']
6
6
  ---
7
7
 
8
8
  # Kordis: Identity, Comments, Stars, & Social
9
9
 
10
10
  ## Goal
11
+
11
12
  Drive the user's login state and the social actions Kordis exposes — typed
12
13
  comments, stars, public profiles, and follow/unfollow (0.8.0+).
13
14
 
14
15
  ## Identity commands
15
16
 
16
17
  ### `kordis whoami [--json]`
18
+
17
19
  Show the currently authenticated user (or anonymous state).
18
20
 
19
21
  ### `kordis login [--provider <name>]`
22
+
20
23
  Opens browser device-flow pairing. `--provider` defaults to `discord`.
21
24
  Required before `push`, `comment`, `star`, or `unstar`.
22
25
 
23
26
  ### `kordis logout`
27
+
24
28
  Clears local tokens.
25
29
 
26
30
  ## Comment command
27
31
 
28
32
  ### `kordis comment <full_slug> --body <text> [--kind <kind>] [--title <text>] [--json]`
33
+
29
34
  Post a top-level comment on a package. Auth required.
30
35
 
31
- | flag | meaning |
32
- | -------------- | ---------------------------------------------------------------- |
33
- | `--body <t>` | required, 1–10000 chars |
34
- | `--kind <k>` | `comment` (default), `tip`, `report`, `praise`, `question` |
35
- | `--title <t>` | 1–140 chars; honoured for top-level posts only |
36
+ | flag | meaning |
37
+ | ------------- | ---------------------------------------------------------- |
38
+ | `--body <t>` | required, 1–10000 chars |
39
+ | `--kind <k>` | `comment` (default), `tip`, `report`, `praise`, `question` |
40
+ | `--title <t>` | 1–140 chars; honoured for top-level posts only |
36
41
 
37
42
  **Pick the right `--kind`:**
43
+
38
44
  - `comment` — generic remark, default when nothing more specific fits.
39
45
  - `tip` — actionable advice for OTHER users ("works great if you also
40
46
  pull <other-slug>"). Subject of the post is reader, not author.
@@ -47,12 +53,13 @@ Post a top-level comment on a package. Auth required.
47
53
 
48
54
  Replies, edits, status flips (open/resolved on a `report`), listing
49
55
  existing comments, and reading back your own comments are NOT yet exposed
50
- in the CLI. Direct the user to `https://kordis.store/p/<full_slug>` for
56
+ in the CLI. Direct the user to `https://kordis.store/<full_slug>` for
51
57
  those interactions until verbs land.
52
58
 
53
59
  ## Star commands
54
60
 
55
61
  ### `kordis star <full_slug> [--json]`
62
+
56
63
  Mark a package as a favourite. Idempotent — re-running on an already-starred
57
64
  package returns the current count without a duplicate. Auth required. The
58
65
  response shape is the same whether the call newly starred or no-op'd; if the
@@ -60,6 +67,7 @@ user wants to verify a NEW star landed, compare `stars` from `kordis info
60
67
  <full_slug> --json` before and after.
61
68
 
62
69
  ### `kordis unstar <full_slug> [--json]`
70
+
63
71
  Remove your star. Idempotent — silent no-op when not previously starred.
64
72
  Auth required.
65
73
 
@@ -69,10 +77,12 @@ Stars feed `--sort stars` ordering on `kordis search` and contribute to the
69
77
  ## Steps
70
78
 
71
79
  ### 1. Inspect identity (when in doubt)
80
+
72
81
  `kordis whoami --json`. **Success criteria**: returns either a username +
73
82
  profile, or the anonymous-state error indicating not logged in.
74
83
 
75
84
  ### 2. Match command to user intent
85
+
76
86
  - "log me into Kordis" → `kordis login`. Tell the user a browser device-flow
77
87
  page will open; they must approve on their auth provider.
78
88
  - "log me out" → `kordis logout`.
@@ -83,6 +93,7 @@ profile, or the anonymous-state error indicating not logged in.
83
93
  - "unstar / unfavourite <slug>" → `kordis unstar <full_slug>`.
84
94
 
85
95
  ### 3. Authenticate before posting
96
+
86
97
  If a command returns `not_authenticated` (exit 10), run `kordis login` and
87
98
  retry. **Success criteria**: command exits 0; surface returned IDs / counts.
88
99
 
@@ -130,23 +141,28 @@ User: "unstar foo/bar"
130
141
  ## Profile & follow commands (0.8.0+)
131
142
 
132
143
  ### `kordis profile <username>`
144
+
133
145
  Anonymous-OK. Shows display name, bio, follower count, package count,
134
146
  total stars, total downloads, first/last published timestamps.
135
147
 
136
148
  ### `kordis list <username>` (extended)
149
+
137
150
  With no argument → your own packages (auth required, offset pagination).
138
151
  With a username → public packages of that user (anonymous-OK, cursor
139
152
  pagination via `--cursor`).
140
153
 
141
154
  ### `kordis stars <username>`
155
+
142
156
  Anonymous-OK. Lists packages this user has starred. Cursor-paginated.
143
157
 
144
158
  ### `kordis follow <username>` / `kordis unfollow <username>`
159
+
145
160
  Auth required. Idempotent (re-following is a no-op, no double-count).
146
161
  Self-follow is rejected with `usage_error`. Response carries the
147
162
  post-mutation `follower_count` so you don't need a separate GET.
148
163
 
149
164
  ### `kordis followers <username>` / `kordis following <username>`
165
+
150
166
  Anonymous-OK, cursor-paginated. Returns `PublicUser` rows.
151
167
 
152
168
  <example>