Puzzle arc MCP wire — external access surface (arc close point)

STEP: 1553 / Date: 2026-08-29 / Type: 4-arc close point (schema+verifier+generator+catalog+difficulty の external agent access surface)

3 MCP tool 新規 wirepuzzle_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 積み上げ完成。

4 arc の 積み上げ

STEPLayer実装
1536schema + verifiertool-schema-registry.ts (19 tool) + puzzle-verifier.ts (uniqueness gate)
1539generator + catalog + UIpuzzle-generator.ts + build-puzzle-catalog.ts + step-1539 viewer
1546dispatch 拡張5→19 tool dispatch + 8 tool 実 API 一致 hotfix + adapter pattern
1549multi-hide + difficultyhideCount=[1,2] + rarity-weighted difficulty + 4 bin + UI filter/sort
1553MCP wire (arc close)3 tool 追加登録、 external agent 呼出 surface

3 MCP tool 仕様

1. puzzle_verify

Puzzle 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

2. puzzle_generate

Random 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 内訳)

3. puzzle_schema_list

Tool 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)

External agent 呼出 example (chat-Claude 想定)

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 経由 で 実現。

Smoke test 結果

Regression 全 suite (STEP 1553 変更後)

Honest scope