Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .claude/skills/command-api-mapping/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,35 @@ For each command in the set you're mapping:
```
Spot-check one command in the rendered table if you can run the site.

## Sweeping empty lists (DOC-7263)

An empty list (`"redis_py": []`) renders "No method signature available for this client."
A missing key renders the same text, so removing a key changes nothing on the page. The tab
only lists the clients in `$clientOrder` in `api-methods-tab.html`: ioredis, RedisVL and
Ruby never render, so filling them has no visible effect.

Classify each empty (command, client) against the **released** client, not the file:

- `real_gap`: a typed method exists but the mapping has no signature. Fill it.
- `generic_only`: reachable only through `execute_command`, `call`, `Do`, `sendCommand`,
`executeRaw`, `redis::cmd` or container magic dispatch with no typed `@method`. Leave empty.
- `unsupported`: no way to call it, the method throws or panics (`Quit`/`Sync` in go-redis,
`memory_doctor` in redis-py), it is `[Obsolete(error: true)]` (SE.Redis `SlaveOf`), or it
is client-side and sends no command (`SELECT` as `GetDatabase`, `CLUSTER KEYSLOT`).
- Bare container rows (`ACL`, `CLIENT`, `CLUSTER`, `CONFIG`, `LATENCY`, `MEMORY`, `MODULE`,
`SLOWLOG`, `FUNCTION`, `SCRIPT`, `PUBSUB`) stay empty: the subcommand rows carry the
signatures. `HOTKEYS` is not one: check whether its subcommand files already exist.

A name match is a hypothesis. Read the method, and check a sample of hits before trusting a
count. Typed methods on a non-obvious receiver (`StatefulCmdable`, `IServer`, a `PubSub`
object, a callback object) still count as `real_gap`: cite the receiver in your report.

To fill many at once, write one fragment per client (`{command: [signatures]}`) outside the
repo, verify every signature by compiling or reflecting against the released artifact, then
apply with a script that replaces only lists that are currently `[]`, refuses any file that
does not round-trip through `json.dumps(indent=2, ensure_ascii=False)`, and keeps each
file's trailing whitespace. Assert the before and after empty counts.

## Guardrails

- **Match the live client IDs exactly**, including `go-redis` (hyphen) and `node_redis`,
Expand Down
26 changes: 26 additions & 0 deletions .claude/skills/command-api-mapping/reference/client-quirks.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,32 @@ Translation rules:
- Return type is generally `RedisResult<T>` (sync) / a future of it (async).
- `///` doc comments → descriptions when present.

## Receivers that aren't the obvious client (DOC-7263)
- **redis_py:** `cluster_*` methods exist only on `RedisCluster`; subscribe methods are on the
`PubSub` object (`r.pubsub()`); FT.HYBRID is `r.ft(...).hybrid_search`. Some methods are
stubs that raise `NotImplementedError`. Read the body, not the name.
- **node_redis:** `select`, `quit`, `reset`, `monitor` and the subscribe family are methods on
`RedisClient`, not command files, and are `undefined` on a cluster client. `LOLWUT` is
registered uppercase only. Commands in `@redis/search` and similar need that package.
- **go-redis:** `CLIENT SETINFO` and `HELLO` are on `StatefulCmdable`/`*Conn`, not `Cmdable`.
`HotKeys*` is on `*Client` only. `Monitor` is on the `cmdable` struct but not the
`Cmdable` interface. Subscribe methods return `*PubSub`; unsubscribe is on `*PubSub`.
- **jedis:** `cluster*` methods are on `Jedis` only (not `UnifiedJedis` or `RedisClient`).
`unsubscribe`/`punsubscribe`/`sunsubscribe` are on the callback objects
(`JedisPubSubBase`, `JedisShardedPubSubBase`), `ssubscribe`/`spublish` on the cluster clients.
- **lettuce:** subscribe methods are on the pub/sub connection interfaces. `RediSearchCommands`
takes only `K` (no `V`).
- **nredisstack:** server commands are on `IServer` (`FooAsync` twins), subscribe on
`ISubscriber`, sharded pub/sub through `RedisChannel.Sharded(...)`. `Save(SaveType)` covers
SAVE, BGSAVE and BGREWRITEAOF.
- **php (predis):** a container subcommand reached only through `__call` (no `@method` in
`src/Command/Container/*.php`) is `generic_only`, not a typed method. Consumer methods
(`pubSubLoop()`) are the typed home for PSUBSCRIBE/PUNSUBSCRIBE.
- **redis_rs:** methods come from `implement_commands!` and are generated for four traits.
`HotkeysCommands`/`AsyncHotkeysCommands` are separate traits. Some methods need a feature
(`acl`, `script` default on; `search_unfinished` is not stable). Async cluster connections
carry SSUBSCRIBE/SUNSUBSCRIBE.

## General
- **Never invent descriptions.** Empty string beats a plausible-but-unverified sentence.
- **Confirm the command exists** in the client before adding it; preview commands may be
Expand Down
Loading
Loading