Skip to content

Epic: Runtime Migration — LangChain Removal + SOTA Patterns (8 weeks) #207

@meiiie

Description

@meiiie

Goal

Remove langchain* dependencies entirely from Wiii runtime. Adopt SOTA patterns from Anthropic Claude Code + OpenAI Codex internal architecture + Unsloth lane-first design. Zero new framework deps (no Pydantic AI, no OpenAI Agents SDK, no Strands).

Aligned with Anthropic Engineering: "avoid frameworks that obscure prompts. Start simple. Look to human engineers for inspiration."

Decisions (committed)

  • D1: Xóa triệt để langchain — including langchain-core (39 messages + 30 tools + 12 model wrappers imports = ~150 LOC custom replacement)
  • D2: Stack final = pure raw SDK (anthropic, openai, google-generativeai, mcp) + DIY messages/tools/registry + existing UnifiedLLMClient
  • D3: Execution model = Hybrid (architect Claude Code session + parallel worker sessions per phase + user as approval gate)
  • D4: 8 weeks, 7 phases, eval harness included (Phase 6 — THE moat per Anthropic)

Phase checklist

Tracking issues

Source documents (local, gitignored — paste content into worker session prompts)

  • Master plan: .Codex/reports/RUNTIME-MIGRATION-EPIC-2026-05-02.md
  • Per-phase briefs: .Codex/reports/runtime-migration-briefs/phase-{0..7}-*.md
  • Phase 1 kickoff prompt (paste into worker session): .Codex/reports/runtime-migration-briefs/phase-1-kickoff-prompt.md

Verification gates per phase (testing strategy update 2026-05-02)

  • Targeted per commit: pytest tests/unit/{relevant_module}/ tests/unit/test_feature_tiers.py tests/unit/test_*config*.py -q (under 30s)
  • Collection smoke before push: pytest tests/unit/ --collect-only -q (catches import errors)
  • CI = full unit gate (10-15 min, server-side)

Owner / Coordination

  • Architect = primary Claude Code session
  • Workers = parallel Claude Code sessions, one per phase. Sonnet 4.6 for mechanical phases (0/1/2/3/7); Opus 4.7 for architectural phases (4/5/6).
  • Reviewer/Merger = repo maintainer

When a worker session ships a PR, tag the architect session for review.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions