sonder-server-decomposition-campaign

Executes incremental strangler-migration slices decomposing server.py into the sonder_runtime package.

6|3|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Krilliac/Sonder-runtime --skill sonder-server-decomposition-campaign-krilliac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sonder-server-decomposition-campaign
Source: https://github.com/Krilliac/Sonder-runtime/tree/main/.claude/skills/sonder-server-decomposition-campaign
Command: npx skills add https://github.com/Krilliac/Sonder-runtime --skill sonder-server-decomposition-campaign-krilliac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The Sonder Runtime repository has a 25,000-line monolithic server.py that must be decomposed into a layered sonder_runtime package under strict architecture rules, and each migration step must be small, behavior-preserving, and provable. This Skill provides the executable runbook for planning, executing, verifying, and landing one WP1 migration slice at a time without breaking ratchets, aliases, or gates. ## Core Features & Use Cases - Slice selection and layering: Identifies candidate functions in server.py, applies the layer decision table (domain, application, adapters, platform, interfaces, bootstrap), and reserves the next WP1 slice ordinal. - Move recipe with identity preservation: Guides the move-rewire-delete-ratchet-package-test pattern, including sys.modules identity aliases, underscore alias imports, and monkeypatch surface preservation. - Proof gates and landing: Runs check_architecture.py, compileall, focused and full pytest suites, and other evidence gates in order, then writes the slice doc, README notes, and commit in verified conventions. - Use Case: When asked to "do a WP1 slice" or "migrate a slice of server.py", the Skill walks through eligibility checks, picks a pure helper, moves it into sonder_runtime/domain, preserves the root compatibility alias, runs all gates, and lands the documented slice commit. ## Quick Start Ask the AI to run the next WP1 slice by migrating one pure helper from server.py into the sonder_runtime package while preserving the root compatibility alias and passing all architecture gates.

Frequently Asked Questions about sonder-server-decomposition-campaign

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a function from server.py into the sonder_runtime package?

Pick a bounded, pure helper with few callers, create a packaged module in the correct layer plus a boundary test, rewire server.py with an underscore alias import, then run the architecture checker, compileall, and pytest gates before documenting and committing the slice.

What is a WP1 slice in a strangler migration?

A WP1 slice is one small, behavior-preserving increment of the strangler migration that moves a cohesive responsibility from a root module into the sonder_runtime package. Each slice is proven by gates, documented in a WP1-<ORDINAL>-SLICE.md file, and landed as a single commit.

How do I choose the right layer for migrated code?

Choose by what the code does: pure policy goes to domain, use-case wiring to application, sqlite/subprocess/network I/O to adapters, environment and config to platform, and protocol translation to interfaces. The check_architecture.py script enforces these edges with specific violation messages.

Why does check_architecture.py fail after deleting a root module?

The checker builds its inventory from git ls-files and fails closed with a RuntimeError if a tracked file is deleted without staging. Stage the deletion with git rm or git add on the exact path, never git add -A, then rerun the checker.

When should I not use this migration runbook?

Do not use it for questions about why the architecture rules exist or which document is authoritative (use sonder-architecture-contract), for general commit and CI gate mechanics (use sonder-change-control), or for debugging runtime failures (use sonder-debugging-playbook).

Can a slice change behavior while moving code?

No. Slices are behavior-preserving by definition: no new environment reads, no import-time side effects, no output changes. If you find a bug during the move, record it in the slice doc and fix it in a separate commit after the slice lands.