Skip to content

docs: document enrich(), plan(), MCP server, and Provider Batch mode - #185

Merged
ptimizeroracle merged 1 commit into
mainfrom
docs/v1.11-features
Jul 30, 2026
Merged

ptimizeroracle merged 1 commit into
mainfrom
docs/v1.11-features

Conversation

@ptimizeroracle

@ptimizeroracle ptimizeroracle commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds documentation for the four v1.11.0 features that landed on main undocumented:

  • docs/guides/enrich.md — the ondine.enrich() one-call front door: signature, input-type preservation (pandas/polars/path), schema= structured output + auto JSON parser injection, and the explicit kwargs allowlist (TypeError on typos).
  • docs/guides/intent-planning.md — the ondine.plan() intent layer: the Plan object (.specifications, .goal, .rationale, .estimated_cost, .preview_yaml(), .build()), and the safety model — one structured LLM call to draft a spec, inspectable/approvable before anything executes, explicitly not an agent loop.
  • docs/guides/mcp-server.md — the ondine-mcp server: install via pip install ondine[mcp], a copy-pasteable MCP client config snippet, the four tools (ondine_estimate/ondine_run/ondine_status/ondine_collect), the non-blocking ondine_run contract, and the mandatory-positive-budget guard for agent-initiated runs.
  • docs/guides/provider-batch.md — Provider Batch API execution mode: OpenAI/Anthropic-only guard (raised at .build() time), the submit/poll/collect job lifecycle, crash-safety via the RunRegistry, and the RunRegistry itself (SQLite-backed, lives in the checkpoint dir).

Naming collision resolved: docs/guides/execution-modes.md already existed for Ondine's own Standard/Async/Streaming engines (a different sense of "execution mode" than with_execution_mode("provider_batch")). Left that page untouched and named the new page provider-batch.md ("Provider Batch API Mode"), with a cross-reference note added to the top of each page pointing at the other so readers aren't confused by the two meanings.

Also:

  • docs/SUMMARY.md — registered all four new pages (Pipeline Guides section for enrich/plan/Provider Batch, Reference section for MCP Server).
  • docs/getting-started/quickstart.md — enrich() is now the opening "Simplest" example; QuickPipeline and the builder chain are retained afterward as progressively more explicit/powerful options.
  • docs/README.md — Quick Start example switched to enrich(); Key Features list now mentions enrich(), plan(), the MCP server, and Provider Batch mode.

No numbers were invented: the ~50% Batch API discount is attributed as a provider claim ("OpenAI and Anthropic advertise ~50%"), not presented as measured. benchmarks/RESULTS.md doesn't contain batch-mode-specific figures, so none are cited.

Test plan

  • uv run ruff check docs/ — no findings (ruff doesn't lint Markdown; the 14 pre-existing findings under benchmarks/ are untouched by this change).
  • Verified every documented signature against the installed package: inspect.signature(ondine.enrich), inspect.signature(plan), Pipeline.submit/Pipeline.attach, MCPService.ondine_* methods, SUPPORTED_BATCH_PROVIDERS.
  • Ran the enrich(), plan(), and Provider Batch guard code samples against the real package (LLM calls mocked at the Pipeline.execute / structured_invoke boundary) — outputs match what's documented verbatim, including exact TypeError/ValueError messages quoted in the docs.
  • uv run pytest tests/unit/test_enrich.py tests/unit/test_planner.py -q — 30 passed.
  • Full pre-commit suite (detect-secrets, trailing-whitespace, full unit test suite) passed on commit.
  • Confirmed all four new pages are reachable from docs/SUMMARY.md.

ai assistance: i directed this work with help from claude code.

Summary by CodeRabbit

  • Documentation
    • Added guidance for the one-call enrich() workflow, including inputs, outputs, structured responses, and supported options.
    • Added documentation for intent planning with plan(), including validation, cost estimates, and pipeline building.
    • Documented Provider Batch API Mode, including submission, polling, collection, supported providers, and recovery.
    • Added an MCP server guide covering installation, tools, background runs, status checks, and result collection.
    • Updated Quickstart examples, navigation, execution-mode guidance, and related feature overviews.

… mode

Documents the four v1.11.0 features that landed undocumented: the
enrich() front door, the plan() intent layer, the ondine-mcp server,
and Provider Batch API execution mode (plus the RunRegistry backing
it). Makes enrich() the quickstart's opening example, with the
builder chain retained as the power-user path, and cross-references
the new provider-batch guide against the pre-existing execution-modes
guide (Standard/Async/Streaming) to avoid confusing the two senses of
"execution mode".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Documentation updates reposition enrich() as the simplest entry point, add guides for plan(), MCP execution, and provider batch mode, and update quickstart navigation and execution-mode cross-references.

Changes

Documentation guides

Layer / File(s) Summary
Enrich onboarding and reference
docs/README.md, docs/getting-started/quickstart.md, docs/guides/enrich.md
Quickstart and reference content now introduce enrich() and document its parameters, return types, structured output, and option validation.
Intent planning workflow
docs/guides/intent-planning.md
Documents one-call pipeline drafting, the Plan API, budget approval, responsibility boundaries, and validation rules.
MCP and provider batch execution
docs/guides/execution-modes.md, docs/guides/provider-batch.md, docs/guides/mcp-server.md
Describes live-mode boundaries, provider batch lifecycle and persistence, and MCP tools for estimation, execution, status, and collection.
Guide navigation
docs/SUMMARY.md
Adds table-of-contents links for enrichment, planning, provider batch mode, and the MCP server.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main documentation additions: enrich(), plan(), MCP server, and Provider Batch mode.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/v1.11-features

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/getting-started/quickstart.md`:
- Around line 60-65: Label the output fenced block in
docs/getting-started/quickstart.md lines 60-65 with the text language
identifier, and label the ValueError fenced block in docs/guides/mcp-server.md
lines 52-55 with text as well.

In `@docs/guides/enrich.md`:
- Line 28: Update the Builder API link in the enrich guide to use the current
Quickstart anchor `#5-builder-api-full-control` instead of the stale
`#4-builder-api-more-control` anchor.

In `@docs/README.md`:
- Line 33: Update the `enrich()` description in the README to qualify its
type-preservation behavior: state that pandas and Polars DataFrame inputs retain
their respective types, while file-path inputs return a pandas DataFrame.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ba19f85f-e2aa-4f0d-85d5-3ad2088d81c2

📥 Commits

Reviewing files that changed from the base of the PR and between 26d284e and d8b33e4.

📒 Files selected for processing (8)
  • docs/README.md
  • docs/SUMMARY.md
  • docs/getting-started/quickstart.md
  • docs/guides/enrich.md
  • docs/guides/execution-modes.md
  • docs/guides/intent-planning.md
  • docs/guides/mcp-server.md
  • docs/guides/provider-batch.md

Comment on lines +60 to +65
```
product brand
0 iPhone 15 Pro Max 256GB Apple
1 Samsung Galaxy S24 Ultra Samsung
2 Google Pixel 8 Pro Google
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add language identifiers to the fenced blocks.

Markdownlint reports MD040 for both fences. Use ```text for these output/error examples.

  • docs/getting-started/quickstart.md#L60-L65: label the output fence as text.
  • docs/guides/mcp-server.md#L52-L55: label the ValueError fence as text.
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 60-60: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

📍 Affects 2 files
  • docs/getting-started/quickstart.md#L60-L65 (this comment)
  • docs/guides/mcp-server.md#L52-L55
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/getting-started/quickstart.md` around lines 60 - 65, Label the output
fenced block in docs/getting-started/quickstart.md lines 60-65 with the text
language identifier, and label the ValueError fenced block in
docs/guides/mcp-server.md lines 52-55 with text as well.

Source: Linters/SAST tools

Comment thread docs/guides/enrich.md
| Structured output | `schema=` kwarg | `.with_structured_output()` |
| Best for | Notebooks, scripts, first pass | Production configs, fine-grained control |

Reach for the [Builder API](../getting-started/quickstart.md#4-builder-api-more-control) when you need to name output columns per-column, tune retry policy, or wire checkpointing/observability explicitly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix the stale Quickstart anchor.

The Quickstart now uses ### 5. Builder API (Full Control), so #4-builder-api-more-control no longer resolves. Update the link to #5-builder-api-full-control.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/enrich.md` at line 28, Update the Builder API link in the enrich
guide to use the current Quickstart anchor `#5-builder-api-full-control` instead
of the stale `#4-builder-api-more-control` anchor.

Comment thread docs/README.md
## Key Features

- **Quick API** -- 3-line hello world with smart defaults
- **`enrich()`** -- one-call front door; input type in, same type out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Qualify the type-preservation claim.

enrich() preserves pandas/Polars DataFrame types, but a file path returns a pandas DataFrame. Replace “same type out” with wording that reflects this distinction.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/README.md` at line 33, Update the `enrich()` description in the README
to qualify its type-preservation behavior: state that pandas and Polars
DataFrame inputs retain their respective types, while file-path inputs return a
pandas DataFrame.

@ptimizeroracle
ptimizeroracle merged commit c5c011e into main Jul 30, 2026
37 checks passed
@ptimizeroracle
ptimizeroracle deleted the docs/v1.11-features branch July 30, 2026 23:10
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