Sarvam Motif

Sarvam Code

Better code in the long run

Sarvam Code works across the codebase and saves checkpoints as it goes. The plan stays visible, so you can change direction while the run is live.

Sarvam Code

~/acme/payments-service

Migrate the payments data layer

Move the payments service off the legacy ORM without downtime. Keep the public API stable. Stop the run if a contract test fails.
  1. Planning 6s
  2. Read billing/repository.py, billing/models.py, tests/contract/
  3. Found 214 uses of 'session.execute'
  4. I will add a compatibility layer, migrate one module at a time, and run the contract suite after each change. Billing comes first.

  5. billing/repository.py +shim +41 -0
  6. billing/models.py +data layer +96 -12
  7. Contract tests pass. 3 of 5 steps are complete. I am moving to the ledger module.

Add an instruction
Try Sarvam Code

A visible plan for work across the codebase.

Sarvam Code breaks the job into steps, writes and tests each change, and saves checkpoints as it goes. The plan stays visible throughout the run.

Work across the codebase

Give Sarvam Code a refactor, migration, or performance problem that crosses services. It works through one part at a time while the original goal stays on the plan.

Sarvam Code

~/acme/payments-service

Migrate 214 database calls

Replace the legacy ORM one module at a time.
  1. Planning 4s
  2. Read 214 call sites across 18 modules
  3. billing/repository.py +41 -0
  4. ledger/queries.py +63 -8
Add an instruction

Steer the run

The whole plan stays on screen. Change the goal, move a step, or stop the current approach. Sarvam Code picks up from the work already done.

Sarvam Code

~/acme/payments-service

Reorder the migration plan

Skip the webhook rewrite for now. Finish the ledger module first.
  1. Updated 2s
  2. Dropped branch 'reconnect-webhooks'
  3. Plan updated. The ledger module is step 3. The webhook rewrite is last.

Add an instruction

Pick up from a checkpoint

When a test fails or a path reaches a dead end, Sarvam Code returns to a checkpoint and tries again. Completed steps stay in place.

Sarvam Code

~/acme/payments-service

Recover from a failed test

The ledger contract tests failed. Resume from the last checkpoint.
  1. Checking 7s
  2. Read tests/contract/test_ledger.py
  3. ledger/queries.py fix decimal rounding +6 -4
  4. The contract suite passes. I resumed from the last checkpoint and kept the completed work.

Add an instruction

Use expensive models only for the tasks that need them.

Pick a model for each task

A refactor and a rollback review call for different models. Sarvam Code routes them separately during the same run.

Sarvam Code

~/acme/payments-service

Route each task

Write the data-layer boilerplate. Then review the rollback path.
  1. Classified 2 task types in this run
  2. Scaffolding routed to a fast, lower-cost model
  3. Rollback review routed to a reasoning model
  4. Scaffolding and rollback review went to different models. Sarvam Code routed each task separately.

Add an instruction

Train a model for a specialised task.

Sarvam Code can train a task-specific model during the run using your data and requirements, then apply it to the job. For underwriting, that can mean training on your risk parameters.

Sarvam Code

~/acme/underwriting

Train an underwriting model

Train a task-specific model on our portfolio and risk parameters. Use it for this pricing task.
  1. Planning 9s
  2. Read risk/params.yaml, historical policies
  3. Prepared evaluation holdout
  4. Training finished during this run. The model is ready for review on this risk band.

  5. risk/underwriting.model ready for review
Add an instruction

Frequently Asked Questions

Put Sarvam Code to work on a real codebase.