# Kalika Migration Guides

These guides help users move existing notebooks, scripts, and research workflows
from Mathematica, SymPy, SageMath, and FeynCalc to Kalika. They are written as
translation references, not as one-to-one compatibility promises: Kalika favors
explicit TypeScript/Python APIs, structured result metadata, local WASM
execution, and derivation/proof provenance.

Use these guides with:

- [API reference](../api-reference/README.md) for exact Kalika signatures.
- [Domain guide](../domain-guide/README.md) for package selection by topic.
- [Tutorial notebooks](../tutorial-notebooks/README.md) for runnable examples.

Validate the guide inventory and symbol mappings with:

```bash
pnpm kalika:migration-guides:check
```

## Guides

| Source System                  | Guide                                           | Best Starting Point                                                                                 |
| ------------------------------ | ----------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Mathematica / Wolfram Language | [Mathematica migration guide](./mathematica.md) | Translate symbolic calls to `@kalika/sdk`, then move exact algebra and proofs into domain packages. |
| SymPy                          | [SymPy migration guide](./sympy.md)             | Use `kalika_sdk` for Python-facing code and `@kalika/sdk` for TypeScript services.                  |
| SageMath                       | [SageMath migration guide](./sagemath.md)       | Replace Sage parent/ring workflows with explicit Kalika package boundaries.                         |
| FeynCalc                       | [FeynCalc migration guide](./feyncalc.md)       | Translate QFT algebra into `@kalika/quantum-field-theory` plus renderer and phenomenology packages. |

## Migration Strategy

1. Port the computational kernel first: move `simplify`, `diff`/`D`,
   `integrate`, `solve`, `series`, `limit`, matrix operations, and tensor
   operations to the SDK.
2. Move specialized mathematics into domain packages rather than keeping a
   single monolithic CAS namespace.
3. Preserve assumptions and verification intent explicitly. Kalika result
   objects include verification metadata, and formal checks should use
   `@kalika/formal-verification`.
4. Replace notebook-global mutable state with explicit notebook cells, SDK
   clients, or package-level data structures.
5. Use `migration-map.json` as the machine-readable checklist when auditing a
   port.

## Machine-Readable Map

[`migration-map.json`](./migration-map.json) lists source symbols, target Kalika
APIs, scope notes, and guide ownership. The checker confirms that referenced
TypeScript package symbols and Python SDK facade symbols exist locally.
