Skip to content

Repository Shape

Sasha Lopashev edited this page Jun 27, 2026 · 1 revision

Repository Shape

Suggested initial layout:

migaki/
  packages/
    mir/
      schema/
      validators/
      examples/

    runtime/
      planner/
      passes/
      evidence/
      tracing/

    providers/
      openai/
      anthropic/
      litellm/
      mock/

    adapters/
      fetch/
      vercel-ai-sdk/
      langchain/
      langgraph/

    cli/
      migaki-report
      migaki-replay

  examples/
    rag-dedup-cache/
    code-review-routing/
    structured-output-validation/

  docs/
    vision.md
    mir.md
    passes.md
    evidence-bundles.md
    provider-capabilities.md

Package Responsibilities

packages/mir

Owns the logical representation.

  • TypeScript types.
  • Runtime validators.
  • JSON Schema export if needed.
  • Example plans.
  • Compatibility tests for schema changes.

packages/runtime

Owns transformation and execution planning.

  • Pass interface.
  • Pass runner.
  • Plan diff generation.
  • Constraint checking.
  • Evidence construction.
  • Trace and replay artifact handling.

packages/providers

Owns provider-specific lowering and execution.

  • Capability definitions.
  • Backend interfaces.
  • Provider-specific request construction.
  • Cost and token accounting where available.
  • Mock backend for deterministic tests.

packages/adapters

Owns integration with applications and frameworks.

Start with a fetch-compatible wrapper. Defer framework adapters until the core plan/evidence loop is stable.

packages/cli

Owns developer-facing inspection.

  • Report optimized plan.
  • Compare baseline and optimized plans.
  • Render evidence bundle summaries.
  • Replay mock or captured traces.

Documentation Placement

The wiki should hold living project design and scope. Repository docs should hold versioned technical contracts that ship with code.

Clone this wiki locally