Skip to content

Commit 3024163

Browse files
committed
update docs
1 parent c4877e1 commit 3024163

11 files changed

Lines changed: 169 additions & 649 deletions

File tree

.claude/CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ These repo-local skills live under `.claude/skills/*/SKILL.md`.
3838
- [final-review](skills/final-review/SKILL.md) -- Interactive maintainer review for PRs in "Final review" column. Merges main, walks through agentic review bullets with human, then merge or hold.
3939
- [dev-setup](skills/dev-setup/SKILL.md) -- Interactive wizard to install and configure all development tools for new maintainers.
4040
- [verify-reduction](skills/verify-reduction/SKILL.md) -- Standalone mathematical verification of a reduction rule: Typst proof, constructor Python (≥5000 checks), adversary Python (≥5000 independent checks). Reports verdict, no artifacts saved. Also called as a subroutine by `/add-rule` (default behavior).
41-
- [tutorial](skills/tutorial/SKILL.md) -- Interactive tutorial — walk through the pred CLI to explore, reduce, and solve NP-hard problems. No Rust internals.
4241
- [update-papers](skills/update-papers/SKILL.md) -- Update research paper collection: download new papers from references.bib, retry failed downloads, sync to Google Drive, regenerate index.md.
4342
- [find-solver](skills/find-solver/SKILL.md) -- Interactive guide: match a real-world problem to a library model, explore reduction paths, recommend solvers (built-in + external), and generate a solution doc.
4443
- [find-problem](skills/find-problem/SKILL.md) -- Reverse of find-solver: given a solver for a model, discover what other problems it can handle via incoming reductions, ranked by effective complexity.

.claude/skills/tutorial/SKILL.md

Lines changed: 0 additions & 332 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ docs/test-reports/
9191
docs/superpowers/
9292
*.log
9393
docs/src/reductions/*.json
94+
docs/src/generated/
9495
.claude/projects/
9596
docs/research/
9697
docs/solutions/

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ doc:
8989
cargo run --example export_graph
9090
cargo run --example export_schemas
9191
cargo run --example export_module_graph
92+
bash scripts/generate_doc_snippets.sh target/release/pred
9293
mdbook build docs
9394
RUSTDOCFLAGS="--default-theme=dark" cargo doc --features ilp-highs --no-deps
9495
rm -rf docs/book/api
@@ -113,6 +114,8 @@ mdbook:
113114
@cargo run --example export_schemas 2>&1 | tail -1
114115
@echo "Exporting module graph..."
115116
@cargo run --example export_module_graph 2>&1 | tail -1
117+
@echo "Generating CLI doc snippets..."
118+
@bash scripts/generate_doc_snippets.sh target/release/pred 2>&1 | tail -1
116119
@echo "Building API docs..."
117120
@RUSTDOCFLAGS="--default-theme=dark" cargo doc --features ilp-highs --no-deps 2>&1 | tail -1
118121
@echo "Building mdBook..."

README.md

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,11 @@ This infrastructure aims to solve two problems:
1111
- Given a hard problem $A$, reduce it to the most viable problem $B$, to be solved efficiently with an external solver.
1212
- Given a solver $S$ for problem $B$, explore how efficiently it can be used for solving other problems.
1313

14-
Download [PDF manual](https://codingthrust.github.io/problem-reductions/reductions.pdf) for humans.
14+
Download [PDF manual](https://codingthrust.github.io/problem-reductions/reductions.pdf) for the full theory and proofs.
1515

16-
## Installation
16+
## For Terminal Users
1717

18-
### As a library
19-
20-
Add to your `Cargo.toml`:
21-
22-
```toml
23-
[dependencies]
24-
problemreductions = "0.2"
25-
```
26-
27-
### CLI tool
28-
29-
Install the `pred` command-line tool for exploring the reduction graph from your terminal:
18+
Install the `pred` CLI tool:
3019

3120
```bash
3221
cargo install problemreductions-cli
@@ -40,41 +29,40 @@ cd problem-reductions
4029
make cli # builds target/release/pred
4130
```
4231

43-
See the [Getting Started](https://codingthrust.github.io/problem-reductions/getting-started.html) guide for usage examples, the reduction workflow, and [CLI usage](https://codingthrust.github.io/problem-reductions/cli.html).
44-
45-
**Have a problem and looking for a solver?** Run `/find-solver` — it matches your real-world problem to a library model, explores reduction paths, and recommends solvers.
46-
47-
**Have a solver and wondering what it can solve?** Run `/find-problem` — given a solver for a specific model, it discovers all other problems reachable via incoming reductions, ranked by effective complexity.
48-
49-
Try a model directly from the CLI:
32+
Try it out:
5033

5134
```bash
5235
# Show the Consecutive Block Minimization model (alias: CBM)
5336
pred show CBM
5437

55-
# Create and solve a small CBM instance (currently with brute-force)
38+
# Create and solve a small CBM instance
5639
pred create CBM --matrix '[[true,false,true],[false,true,true]]' --bound 2 \
5740
| pred solve - --solver brute-force
5841
```
5942

60-
## MCP Server (AI Integration)
43+
See the full [CLI guide](https://codingthrust.github.io/problem-reductions/cli.html) for all commands and examples.
6144

62-
The `pred` CLI includes a built-in [MCP](https://modelcontextprotocol.io/) server for AI assistant integration (Claude Code, Cursor, Windsurf, OpenCode, etc.).
45+
## For AI Agent Users
6346

64-
Add to your client's MCP config file:
47+
Paste into Claude Code or Codex:
6548

66-
```json
67-
{"mcpServers": {"problemreductions": {"command": "pred", "args": ["mcp"]}}}
6849
```
50+
Clone https://github.com/CodingThrust/problem-reductions,
51+
build the pred CLI with `make cli`,
52+
then run /find-solver to help me find a solver for my scheduling problem.
53+
```
54+
55+
Other prompts to try:
6956

70-
| Client | Config file |
71-
|--------|------------|
72-
| Claude Code / Desktop | `.mcp.json` or `~/.claude/mcp.json` |
73-
| Cursor | `.cursor/mcp.json` |
74-
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
75-
| OpenCode | `opencode.json` (use `{"mcp": {"problemreductions": {"type": "local", "command": ["pred", "mcp"]}}}`) |
57+
```
58+
What problems can my QUBO solver handle? Use /find-problem to explore.
59+
```
60+
61+
```
62+
I know a reduction from Vertex Cover to Independent Set. Use /propose to file an issue.
63+
```
7664

77-
See the [MCP documentation](https://codingthrust.github.io/problem-reductions/mcp.html) for available tools, prompts, and full configuration details.
65+
See [AI Agent Skills](https://codingthrust.github.io/problem-reductions/skills.html) for more prompts.
7866

7967
## Contributing
8068

@@ -88,7 +76,7 @@ See the [MCP documentation](https://codingthrust.github.io/problem-reductions/mc
8876

8977
**Authorship:** contribute 10 non-trivial reduction rules and you'll be added to the author list of the [paper](https://codingthrust.github.io/problem-reductions/reductions.pdf).
9078

91-
> **Tip:** If you use Claude Code / OpenCode / Codex, run `/propose` to file issues interactively — it guides you one question at a time, suggests the most needed reductions based on graph topology, and runs quality checks before filing:
79+
**Tip:** If you use Claude Code / OpenCode / Codex, run `/propose` to file issues interactively — it guides you one question at a time, suggests the most needed reductions based on graph topology, and runs quality checks before filing:
9280
> ```
9381
> /propose # brainstorm a new model or rule
9482
> /propose model # propose a new problem

docs/src/SUMMARY.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44

55
# User Guide
66

7-
- [Getting Started](./getting-started.md)
87
- [CLI Tool](./cli.md)
9-
- [MCP Server](./mcp.md)
10-
- [Design](./design.md)
8+
- [AI Agent Skills](./skills.md)
119

12-
# Developer Guide
10+
# Rust Library
1311

12+
- [Getting Started](./getting-started.md)
13+
- [Design](./design.md)
1414
- [API Reference](./api.md)
15-
- [Complexity & Overhead Review](./complexity-review.md)
15+
16+
# Reference
17+
18+
- [MCP Server](./mcp.md)

0 commit comments

Comments
 (0)