@rayul/kordis 0.11.1 → 0.12.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.
@@ -1,28 +1,30 @@
1
1
  ---
2
2
  name: kordis-using
3
- description: Use whenever the user wants to consult or install a Kordis package — including any `<username>/<slug>` reference, "install this skill", "use the X skill", "fetch the Y rule", "set this repo up with…", "pin to version", "specific version", "버전 고정", "전이 의존성", "transitive dependency", "yanked", "version withdrawn", "철회", "unrecommended version". Covers JIT read vs pull, the five Kordis package types, dependencies, version pinning, range syntax, yank semantics, and attribution. Load eagerly when in doubt.
3
+ description: Use whenever the user wants to consult or install a Kordis package — including any `<username>/<slug>` reference, "install this skill", "use the X skill", "fetch the Y rule", "adapt this judgment", "apply a decision pattern", "set this repo up with…", "pin to version", "specific version", "버전 고정", "전이 의존성", "transitive dependency", "yanked", "version withdrawn", "철회", "unrecommended version". Covers JIT read vs pull, `kordis adapt`, the six Kordis package types (incl. judgment-pattern), trust tier, dependencies, version pinning, range syntax, yank semantics, and attribution. Load eagerly when in doubt.
4
4
  type: skill
5
- allowed-tools: ["Bash(kordis:*)"]
5
+ allowed-tools: ['Bash(kordis:*)']
6
6
  ---
7
7
 
8
8
  # Kordis: Reading & Installing
9
9
 
10
10
  ## Goal
11
+
11
12
  Pick the right mode (`read` vs `pull`), respect type-specific restrictions,
12
13
  surface dependencies, and credit the author.
13
14
 
14
15
  ## read vs pull
15
16
 
16
- | Mode | Use when | Effect |
17
- | ----- | ------------------------------------------ | ---------------------------------------- |
18
- | read | One-shot consultation, you'll use it once. | Body returned to context. No disk write. |
19
- | pull | Long-term: user said "install" / "set up". | Files written into the current project. |
17
+ | Mode | Use when | Effect |
18
+ | ---- | ------------------------------------------ | ---------------------------------------- |
19
+ | read | One-shot consultation, you'll use it once. | Body returned to context. No disk write. |
20
+ | pull | Long-term: user said "install" / "set up". | Files written into the current project. |
20
21
 
21
22
  DEFAULT to `read` when you spontaneously want to consult a skill. DEFAULT to
22
23
  `pull` when the user explicitly asks to adopt a package.
23
24
 
24
25
  `read` restrictions:
25
- - Eligible: `skill`, `project-rules`, `custom-agent`.
26
+
27
+ - Eligible: `skill`, `project-rules`, `custom-agent`, `judgment-pattern`.
26
28
  - INELIGIBLE: `mcp-server`, `hook` → must `pull`. CLI exits 33 (`jit_blocked`).
27
29
  - Trust gate: only `review_status=passed` returned by default. To get a
28
30
  `pending_review` body, pass `--allow-pending` AFTER warning the user the
@@ -38,19 +40,37 @@ immediately (e.g. to verify a package you just pushed), use `pull` with
38
40
 
39
41
  ## Commands
40
42
 
41
- ### `kordis read <full_slug>[@<version>] [--allow-pending] [--pin <semver>] [--json]`
43
+ ### `kordis read <full_slug>[@<version>] [--allow-pending] [--pin <semver>] [--outline | --section <name>] [--json]`
44
+
42
45
  Returns the full body (Markdown) of a text-bearing package, plus an
43
46
  `attribution` string. `--pin <semver>` overrides any `@suffix` on the slug.
47
+ **Context economy**: `--outline` returns just the section map (heading names);
48
+ then `--section <name>` returns one section's body. Read the outline first
49
+ when a body is large and you only need part of it.
50
+
51
+ ### `kordis adapt <full_slug>[@<version>] [--json]`
52
+
53
+ For `judgment-pattern` packages. **Run it from the user's PROJECT ROOT** — it
54
+ reads the harness in the CURRENT working directory, so `cd` there first (don't
55
+ run it from an unrelated repo, or you'll adapt against the wrong harness).
56
+ Reads the judgment AND this project's local harness (root `CLAUDE.md` /
57
+ `AGENTS.md` / `GEMINI.md` / `.cursorrules`, `~/.claude/CLAUDE.md`,
58
+ `.claude/CLAUDE.md` — read LOCALLY, never uploaded) and
59
+ prints a transplant brief: which parts apply verbatim, which need refitting to
60
+ your context, conflicts to reconcile, and a plain-language rationale. The brief
61
+ is a PROPOSAL — present the changes to the user and apply only what they
62
+ approve. NEVER auto-inject. Credit the source (`following <slug>@<version>`).
44
63
 
45
64
  ### `kordis pull <full_slug>[@<version|range>] [options]`
65
+
46
66
  Writes files into the current project.
47
67
 
48
- | flag | meaning |
49
- | -------------------------- | ------------------------------------------------------------- |
50
- | `--tool <name>` | force a target tool format (default: auto-detect) |
51
- | `--target <path>` | install into a sub-directory (default: cwd) |
52
- | `--with-recommends` | also install depth-0 recommended dependencies (0.9.0+) |
53
- | `--no-with-required` | skip transitive required deps (advanced; default installs) |
68
+ | flag | meaning |
69
+ | -------------------- | ---------------------------------------------------------- |
70
+ | `--tool <name>` | force a target tool format (default: auto-detect) |
71
+ | `--target <path>` | install into a sub-directory (default: cwd) |
72
+ | `--with-recommends` | also install depth-0 recommended dependencies (0.9.0+) |
73
+ | `--no-with-required` | skip transitive required deps (advanced; default installs) |
54
74
 
55
75
  IMPORTANT: `pull` **fails fast** when the target tool can't be inferred from
56
76
  the cwd (no `.claude/`, `.codex/`, `.cursor/`, `AGENTS.md`, `CLAUDE.md`,
@@ -62,6 +82,7 @@ Valid `--tool` values: `claude-code`, `codex`, `cursor`, `continue`,
62
82
  `windsurf`, `antigravity`, `copilot`.
63
83
 
64
84
  ### `kordis info <full_slug> --json`
85
+
65
86
  Inspect metadata (description, tier, deps, license, review status, …) before
66
87
  reading or pulling. ALWAYS run this for `mcp-server` / `hook` types, where the
67
88
  user is about to execute foreign code or runtime config.
@@ -69,31 +90,59 @@ user is about to execute foreign code or runtime config.
69
90
  ## Behaviour per package type
70
91
 
71
92
  ### `skill`
93
+
72
94
  LLM-facing recipe (Markdown body following the open Agent Skills spec).
95
+
73
96
  - DEFAULT: `read`.
74
97
  - `pull` writes to the auto-detected tool's skill path
75
98
  (e.g. `~/.claude/skills/<slug>/SKILL.md` for Claude Code).
76
99
 
77
100
  ### `project-rules`
101
+
78
102
  Repo-scoped agent instructions (Cursor `.cursorrules`, Claude Code project
79
103
  `CLAUDE.md` snippets, etc.). Only meaningful inside a project.
104
+
80
105
  - DEFAULT: `pull`. `read` allowed for inspection.
81
106
  - Pull writes inside the **current repo**, never `$HOME`.
82
107
 
83
108
  ### `custom-agent`
109
+
84
110
  Sub-agent definitions (e.g. Claude Code `.claude/agents/`).
111
+
85
112
  - `read` allowed (preview the agent's system prompt).
86
113
  - `pull` to make the agent invokable; tell the user how to call it after.
87
114
 
115
+ ### `judgment-pattern`
116
+
117
+ A unit of agentic _judgment_ — decision logic, when-to-apply / when-NOT-to-apply,
118
+ failure modes — meant to be READ and adapted, never installed as a file.
119
+
120
+ - DEFAULT: `kordis adapt` (fits it to THIS harness) or `read` (raw). `pull`
121
+ writes a Markdown copy, but the value is in reading + adapting, not the file.
122
+ - A judgment's substance is in structured fields, which ARE its sections. To
123
+ pull just one (instead of the whole body), name the field:
124
+ `kordis read <slug> --section when_not_to_apply` (or `decision_logic`,
125
+ `failure_modes`, …). `kordis read <slug> --outline` lists the field names.
126
+ - `trust_tier` (in `read --json` / `info --json`), strongest to weakest:
127
+ `re-verified` (Kordis-vetted), then `community-adapted` (distinct other
128
+ authors adapted it), then `author-reported` (the author's own `evidence`
129
+ claim — UNVERIFIED), then `unsubstantiated`. Weight the judgment accordingly;
130
+ for any load-bearing decision, tell the user the tier and never present
131
+ `author-reported` as proven.
132
+
88
133
  ### `mcp-server`
134
+
89
135
  Model Context Protocol server packages.
136
+
90
137
  - `read` is INELIGIBLE → CLI returns `jit_blocked`. ALWAYS `pull`.
91
138
  - After pull, instruct the user to restart the agent and supply any required
92
139
  env vars.
93
140
 
94
141
  ### `hook`
142
+
95
143
  Event-driven scripts (pre-commit, pre-tool-call, etc.) that run on the user's
96
144
  machine.
145
+
97
146
  - `read` is INELIGIBLE → ALWAYS `pull`.
98
147
  - IMPORTANT: hooks execute arbitrary code. EXPLAIN in plain words what the
99
148
  hook does, and confirm with the user BEFORE pulling.
@@ -104,15 +153,15 @@ Append `@<version|range>` to a slug on `kordis pull`, `kordis read`,
104
153
  `kordis info` (and check what's available with `kordis versions`).
105
154
  Supported forms:
106
155
 
107
- | input | meaning |
108
- | ---------------------------------- | ---------------------------------------------------------------- |
109
- | `user/foo` (no @) | latest `current_version` (server's bumped default) |
110
- | `user/foo@1.2.3` | exact version |
111
- | `user/foo@1.0.0-beta.1` | exact prerelease (only matches if the literal exists) |
112
- | `user/foo@^1.2` | caret — highest 1.x.y (x≥2). For 0.x.y, caret pins the minor |
113
- | `user/foo@~1.2` | tilde — highest 1.2.y |
114
- | `user/foo@0.1.x` | x-range — alias for `~0.1` (0.9.3+; semver-native) |
115
- | `user/foo@*` | alias for `current_version` |
156
+ | input | meaning |
157
+ | ----------------------- | ------------------------------------------------------------ |
158
+ | `user/foo` (no @) | latest `current_version` (server's bumped default) |
159
+ | `user/foo@1.2.3` | exact version |
160
+ | `user/foo@1.0.0-beta.1` | exact prerelease (only matches if the literal exists) |
161
+ | `user/foo@^1.2` | caret — highest 1.x.y (x≥2). For 0.x.y, caret pins the minor |
162
+ | `user/foo@~1.2` | tilde — highest 1.2.y |
163
+ | `user/foo@0.1.x` | x-range — alias for `~0.1` (0.9.3+; semver-native) |
164
+ | `user/foo@*` | alias for `current_version` |
116
165
 
117
166
  Comparator strings (`>=1 <2`, `||`) are NOT supported in 0.9.x —
118
167
  server returns `usage_error` with the accepted-forms list. Deferred to
@@ -149,10 +198,10 @@ installs.
149
198
 
150
199
  Three install behaviours:
151
200
 
152
- | Input | Behaviour |
153
- | ---------------------------------- | ---------------------------------------------------------------- |
154
- | `kordis pull <slug>` | Always picks the highest **non-yanked** version. Yanked versions are silently skipped — user sees the next-best release. |
155
- | `kordis pull <slug>@^X.Y` | Range resolution skips yanked. If every match is yanked, server returns `not_found` with hint "every version satisfying X has been yanked". |
201
+ | Input | Behaviour |
202
+ | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
203
+ | `kordis pull <slug>` | Always picks the highest **non-yanked** version. Yanked versions are silently skipped — user sees the next-best release. |
204
+ | `kordis pull <slug>@^X.Y` | Range resolution skips yanked. If every match is yanked, server returns `not_found` with hint "every version satisfying X has been yanked". |
156
205
  | `kordis pull <slug>@<exact>` (pinned to a yanked version) | Succeeds (exit 0) with a stderr warning: `⚠ pulled yanked version X of slug (reason: …) — author marked this as unrecommended on YYYY-MM-DD`. Stays installable so old lockfiles keep working. |
157
206
 
158
207
  `kordis info <slug>` shows a red `⚠ Yanked YYYY-MM-DD` banner with the
@@ -165,17 +214,20 @@ parent. Surface that chain to the user — fixing usually means pinning
165
214
  A's requirement to a non-yanked range, or contacting B's author.
166
215
 
167
216
  ## Dependencies
217
+
168
218
  `kordis pull` reports `depends` and `recommends` from the package metadata.
169
219
  Surface the dependency tree to the user FIRST. If they accept,
170
220
  `--with-recommends` also pulls the recommended set in one go. Never
171
221
  auto-resolve silently.
172
222
 
173
223
  ## Attribution
224
+
174
225
  `kordis read` returns an `attribution` string (e.g.
175
226
  `"following <full_slug>@<version>"`). RECOMMENDED: end your reply with that
176
227
  exact line. Skip only when it would clutter a casual non-technical reply.
177
228
 
178
229
  ## Bundled assets
230
+
179
231
  Skills published as a `.skill` bundle or directory include `assets/`,
180
232
  `references/`, `scripts/`, and `agents/` subdirectories alongside
181
233
  `SKILL.md`. After `kordis pull`, these files land next to `SKILL.md` in
@@ -215,6 +267,14 @@ User: "use the v0.2.0 of <full_slug> specifically"
215
267
  (or: kordis read <full_slug>@0.2.0 --json)
216
268
  </example>
217
269
 
270
+ <example>
271
+ User: "how should the agent decide when to ask before acting? pull that judgment from Kordis"
272
+ - (delegate search to kordis-search → picks a judgment-pattern <full_slug>)
273
+ - kordis adapt <full_slug> --json # judgment + THIS repo's harness → transplant brief
274
+ - note the trust_tier; present the proposed fit, apply only what the user approves
275
+ - end reply with "following <full_slug>@<version>"
276
+ </example>
277
+
218
278
  <example>
219
279
  User: "add a pre-commit hook that blocks committing API keys"
220
280
  - kordis info <full_slug> --json
@@ -245,13 +305,13 @@ kordis setup --personalization off
245
305
 
246
306
  **What error telemetry carries** (sent to `POST /api/telemetry/error`):
247
307
 
248
- | field | value |
249
- |---|---|
250
- | `kind` | one of `auto_finalize_stage1_fail`, `auto_finalize_stage2_fail`, `network_unreachable`, `unhandled_error` |
251
- | `cli_version`, `node_version`, `platform` | version + OS strings |
252
- | `message_excerpt` | first 200 chars of `err.message` after sanitization (homedir → `~`; paths / JWTs / UUIDs / long hex runs stripped) |
253
- | `error_code`, `elapsed_ms` | optional |
254
- | `timestamp` | ISO 8601 |
308
+ | field | value |
309
+ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
310
+ | `kind` | one of `auto_finalize_stage1_fail`, `auto_finalize_stage2_fail`, `network_unreachable`, `unhandled_error` |
311
+ | `cli_version`, `node_version`, `platform` | version + OS strings |
312
+ | `message_excerpt` | first 200 chars of `err.message` after sanitization (homedir → `~`; paths / JWTs / UUIDs / long hex runs stripped) |
313
+ | `error_code`, `elapsed_ms` | optional |
314
+ | `timestamp` | ISO 8601 |
255
315
 
256
316
  **Never carries**: `argv`, env-var values, file paths (after sanitization), identity (`user_id` / `username` / `session_id` / refresh tokens), `X-Kordis-Context` content, full stack traces. The server's POST route ignores `Authorization` headers entirely.
257
317