Skip to content

Knowledge: the opening explorer, knowledge/explorer (draft-1) - #32

Draft
cjus wants to merge 3 commits into
mainfrom
claude/knowledge-explorer
Draft

cjus wants to merge 3 commits into
mainfrom
claude/knowledge-explorer

Conversation

@cjus

@cjus cjus commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

What

A proposed addition to the draft knowledge domain, for the opening explorer of Solrac's online data service (cjus/chessdb#48): knowledge/explorer, behind a new capability switch, explorer.

A client asks with a position; the node answers with what its sources' games played there:

  • position, as knowledge/analyses identifies one;
  • eco and opening, the position's name, when a named line (Lichess's chess-openings) ends there: optional, together or not at all (added 2026-11-17, cjus/chessdb#73);
  • games, whiteWins, draws, blackWins: the games that reached it, each counted once;
  • moves: every move played from it, most played first, each with its games, results and elo (the mean rating of the games that played it);
  • top: the strongest games that reached it, with their id, players, ratings, result, date and the move each played there;
  • sources, as every read has.

A position the node doesn't hold is out of book, not an error: no games, no moves.

Why this shape

It is the shape of the item explorer-index builds (cjus/chessdb, tools/explorer-index; until 2026-11-15 it was solrac-explorer-index in cjus/chessgui), so the service answers a position with one read and no reshaping. Carlos agreed the item's limits on 2026-11-14 (40 half-moves, 2 games, 8 strongest games).

Changed together (rule 1)

  • spec/knowledge.md: the capability, the request, and "Not in draft 1" and "Changes".
  • cnp::knowledge: Capabilities::explorer, ExplorerParams, ExplorerMove, ExplorerGame, ExplorerResult, FindExplorer.
  • Tests: the spec's examples as typed messages, the capability, the params, the answer as written.
  • conformance/knowledge/explorer.jsonl, for nodes that offer knowledge.explorer.

All optional: a node that doesn't offer explorer is unchanged. Adding a field to Capabilities means a program that builds one by naming every field adds explorer when it next moves its pin.

Not in it

How a node comes to hold an explorer's positions. Today a node's knowledge comes from files a client hands it and it answers from complete imports only; an explorer's positions would come from a cache of the online service's answers, which cjus/chessdb#48 has not designed yet. No node implements this request. So this stays a draft until that is decided: it is here to fix the answer's shape, which the index builder already writes.

Checks

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test, RUSTDOCFLAGS=-D\ warnings cargo doc --workspace --no-deps and cargo deny check pass locally on this commit.

🤖 Generated with Claude Code

cjus and others added 3 commits November 14, 2026 19:47
…essgui#656)

A node that offers `explorer` answers what the sources' games played from a
position: each move with its games, results and mean rating, and the strongest
games that reached it. A position it doesn't hold is out of book, not an error.

The spec, the types (ExplorerParams, ExplorerMove, ExplorerGame,
ExplorerResult, FindExplorer, Capabilities::explorer), their tests and a
conformance session. How a node comes to hold the positions is not in the
draft yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…orer

# Conflicts:
#	conformance/README.md
#	crates/cnp/src/knowledge.rs
#	spec/knowledge.md
…(draft-1, cjus/chessdb#73)

knowledge/explorer's answer gains two optional fields, together or not at all:
the position's ECO code and the opening's name, when a named line (Lichess's
chess-openings) ends at the position, by whatever move order. Most positions have
none; a client names those after the last named position along the moves it knows.
An older node's answer, without them, still reads.

Also merges main (space, the puzzleFacets clarification) into the branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cjus

cjus commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Added eco and opening to knowledge/explorer's answer (spec, ExplorerResult, tests, the conformance note), for cjus/chessdb#73, and merged main (space) into the branch. Both are optional: an older node's answer still reads. The five checks pass locally on c130cf0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant