Skip to content

Add evidence-backed LangChain migration skill#34

Draft
adtyavrdhn wants to merge 1 commit into
mainfrom
codex/langchain-to-pydantic-ai
Draft

Add evidence-backed LangChain migration skill#34
adtyavrdhn wants to merge 1 commit into
mainfrom
codex/langchain-to-pydantic-ai

Conversation

@adtyavrdhn

Copy link
Copy Markdown
Member

Summary

  • add a repository-owned migrating-langchain-to-pydantic-ai skill to the ai plugin and standalone skills catalog
  • require every non-1:1 mapping to name a concrete Pydantic AI workaround, residual limitation, disposable parity probe, and evidence status
  • include a deterministic LangChain/LangGraph inventory scanner, project-scale Open Deep Research guidance, and trusted semantic oracles
  • bump the ai plugin to 0.2.0 and enforce byte-identical plugin/standalone copies

Relationship to #32

This is complementary to #32 rather than a second Deep Agents skill:

  • this skill owns ordinary LangChain/LangGraph migrations: create_agent, StateGraph, LCEL, LangSmith, and Open Deep Research
  • Add independent Deep Agents migration skill #32 owns create_deep_agent, Harness profiles, repository skills, planning/compaction, sandboxes, Open SWE, and Deep Agents deployments

The frontmatter explicitly excludes Deep Agents. The scanner detects Deep Agents usage and routes it to migrate-deep-agents-to-pydantic-ai; negative trigger cases and a cold forward test verify that split.

Evidence-backed workarounds

The bundled evaluator runs checked-in behavioral oracles against real LangChain/LangGraph and Pydantic AI APIs with deterministic models. It verifies:

  • dynamic-prompt replacement versus instruction composition, including continued history
  • same-handler retry through Hooks.on.tool_execute, preserving LangChain's two-model/two-tool-call trajectory
  • interrupt re-entry versus authenticated deferred approval, including unknown, foreign, and consumed-ID rejection
  • run_stream() early finalization versus complete run_stream_events() execution after retry

Other recipes cover explicit structured-output transport, return_direct, durable runtimes, fan-out/reducers, event contracts, and concurrency-safe persisted budgets. Unexecuted target-specific behavior remains integration-required rather than being called native.

Validation

  • plugin/standalone byte-sync check
  • shell syntax and JSON validation
  • Ruff check and format validation using the Pydantic AI configuration
  • 6 inventory scanner tests
  • skill-creator quick_validate.py
  • official skills-ref validate
  • trusted semantic oracle execution against LangChain 1.3.14, LangGraph 1.2.9, and Pydantic AI 2.10 development sources
  • low-effort forward tests for generic LangGraph ownership and Deep Agents routing
  • repeated adversarial review with no remaining P1/P2 findings

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