solver-search

Guidance for search code that finds solutions, including heuristics, pruning tables, two-phase solving, and pattern databases. These are techniques for reducing the number of cube positions the solver must examine.

In plain words
What is it for?
Use it when changing solution search, IDA*, two-phase solving, heuristics, pruning data, or pattern-database code.
Why use it?
It helps search code build on correct cube moves and remain testable and predictable.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/williamisnotdefined/rubiks-cube-solver/solver-search
Clone the repo
git clone --depth 1 https://github.com/williamisnotdefined/rubiks-cube-solver

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,989 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02989
Opus 5 $0.00000 $0.01494
Sonnet 5 $0.00000 $0.00598
Haiku 4.5 $0.00000 $0.00299

Measured 2d ago against content hash bf2434c70c44, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

solver-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/solver-search.mdc · 292 lines

How it starts

The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generated from ai/registry.json. Do not edit manually.

Canonical skill: ../../ai/skills/solver-search.md.

Referenced context:

  • ../../ai/rules/solver-search-rules.md
  • ../../ai/rules/testing-rules.md
  • ../../ai/architecture/project-architecture.md
  • ../../ai/architecture/solver-search.md
  • ../../ai/architecture/cube-engine.md
  • ../../ai/glossary/cube-terms.md

This file is compiled from canonical AI knowledge files. Edit canonical files under ai, then run npm run ai:sync.

Canonical Skill: ai/skills/solver-search.md

Use this skill when adding or changing IDA*, generated two-phase search, heuristics, pruning, or pattern database code.

Goal

Add search behavior only on top of correct cube state and move semantics.

Read First

  • ai/rules/solver-search-rules.md
  • ai/rules/testing-rules.md
  • ai/architecture/project-architecture.md
  • ai/architecture/solver-search.md
  • ai/architecture/cube-engine.md
  • ai/glossary/cube-terms.md

Workflow

  • Verify cube move behavior before trusting search results.
  • Start with shallow deterministic cases.
  • Keep heuristics separate from traversal logic.
  • Mark whether each heuristic is admissible.
  • Add node/depth metrics for non-trivial algorithms.

Expected Output

  • Search returns explicit move sequences and metrics.
  • Tests cover solved state and shallow known scrambles.
  • No learned or external inference heuristic is introduced without an explicit current product requirement.

Verification

  • Run cargo test -p cube-engine when Rust is installed.
  • Include targeted tests for the changed search module.

Referenced Context

Reference: ai/rules/solver-search-rules.md

Solver Search Rules

Rules for search, heuristics, and pattern database work.

Always

  • Keep search algorithms in crates/cube-engine/src/search unless a later crate boundary is introduced.
  • Keep heuristics explicit about admissibility.
  • Prefer bounded IDA* and generated two-phase paths after move tables are correct.
  • Prune inverse moves and repeated same-axis branches where correctness allows it.
  • Measure node counts and depth limits for non-trivial search changes.

Read the full file on GitHub · 292 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 292 lines · 0 tokens per session scan A bf2434c70c44

Subscribe to this mod's changes

solver-search is a cursor rule published in the GitHub repository williamisnotdefined/rubiks-cube-solver (4 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,989 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.