STEP: 1553 / Date: 2026-08-29 / Type: 4-arc close point (schema+verifier+generator+catalog+difficulty の external agent access surface)
❶ 3 MCP tool 新規 wire — puzzle_verify / puzzle_generate / puzzle_schema_list。 STEP 1525/1526 wire pattern 継承、 rei-mcp-server 78→81 tool。
❂ External MCP client (Claude Desktop / chat-Claude) 直接 call 可能 — 518 puzzle catalog + 19 tool schema registry + uniqueness verifier + difficulty scoring が 外部 agent の 呼出 API に。
❸ arc close point — STEP 1536→1539→1546→1549→1553 で schema→verifier→generator→catalog→UI→difficulty→**external access** の 6 layer 積み上げ完成。
| STEP | Layer | 実装 |
|---|---|---|
| 1536 | schema + verifier | tool-schema-registry.ts (19 tool) + puzzle-verifier.ts (uniqueness gate) |
| 1539 | generator + catalog + UI | puzzle-generator.ts + build-puzzle-catalog.ts + step-1539 viewer |
| 1546 | dispatch 拡張 | 5→19 tool dispatch + 8 tool 実 API 一致 hotfix + adapter pattern |
| 1549 | multi-hide + difficulty | hideCount=[1,2] + rarity-weighted difficulty + 4 bin + UI filter/sort |
| 1553 | MCP wire (arc close) | 3 tool 追加登録、 external agent 呼出 surface |
puzzle_verifyPuzzle uniqueness verifier。 tool name + partialInput + hiddenFields + expectedVerdict を受けて enumDomain Cartesian enumeration で uniqueness check。
Input:
- toolName: string (19 dispatchable、 puzzle_schema_list で確認)
- partialInput: object (non-hidden field values)
- hiddenFields: array<string> (enumerate 対象)
- expectedVerdict: string ('TRUE' / 'NEITHER' / 'SELF' etc)
- solutionCap?: number (default 100)
- cartesianCap?: number (default 10000、 「何か出す 禁止」 discipline)
Output: UniquenessVerdict 5 case
- UNSOLVABLE (0 solutions)
- UNIQUE (1 solution = well-posed) ★
- MULTIPLE (2+ = 曖昧)
- DOMAIN_TOO_LARGE
- INVALID_SPEC
puzzle_generateRandom UNIQUE puzzle generator。 LCG deterministic PRNG (same seed → same catalog) + verifyPuzzle uniqueness gate 通過のみ採用。 STEP 1549 difficulty scoring (attachDifficulty default true) 付与。
Input:
- seed?: number (LCG default 42、 same → same catalog)
- targetSize?: number (default 20)
- maxAttempts?: number (default 500)
- hideCount?: number (1 or 2、 default 1)
- domainFilter?: array<domain> (8 domain enum)
- toolFilter?: array<string> (tool name subset)
- attachDifficulty?: boolean (default true)
Output:
- puzzles: UniquePuzzle[] with { spec, solution, difficulty, difficultyBin, ... }
- stats: GenerationStats (attempts + reject 内訳)
puzzle_schema_listTool schema registry inspection。 19 dispatchable tool の schema (inputs / outputPossibleVerdicts / puzzleEnumerable / etc) を dump。
Input:
- domain?: string (8 domain enum、 filter)
- toolName?: string (single-tool lookup)
Output:
- filter: { domain, toolName }
- matchCount: number
- tools: ToolSchema[] (name / step / domain / inputs [FieldSpec] / etc)
- summary: RegistrySummary (19 tools / 7 SELF-verdict / 18 puzzle-ready / verdict coverage)
chat-Claude が Claude Desktop 経由で これらの tool を 直接 call できる:
// Get schema for a domain
Tool: puzzle_schema_list
Input: { domain: "language" }
→ 2 tools returned (wa_ga_verdict + syntax_verdict)
// Generate 5 medium-difficulty puzzles in economics domain
Tool: puzzle_generate
Input: { targetSize: 5, hideCount: 1, domainFilter: ["economics"] }
→ 5 UNIQUE puzzles with difficulty scores
// Verify a specific puzzle
Tool: puzzle_verify
Input: {
toolName: "wa_ga_verdict",
partialInput: { contextNew: true, hasContrast: false, hasExclusive: false },
hiddenFields: ["contextGiven"],
expectedVerdict: "BOTH"
}
→ UNIQUE (contextGiven = true 一意解)
chat-Claude 提案 「Ghost in the SQL Data」 pattern が chat-Claude 側 で 自律再現可能に = 対話中 「この課題を puzzle 化して」 が Rei stack infrastructure 経由 で 実現。
tools/list 呼出: 総 tool 数 78→81 (+3 = puzzle_verify / puzzle_generate / puzzle_schema_list 全 認識)verifyPuzzle smoke: wa_ga_verdict 4-field hide → NEITHER expected → UNIQUE (1 solution = all-false = STEP 1013 核 結論)generatePuzzleCatalog smoke (seed=42, targetSize=3): 52 attempts → 3 UNIQUE (halting/wa_ga/combinatorial、 全 difficulty easy bin)registrySummary smoke: 19 tools / 7 SELF-verdict / 18 puzzle-ready