Modernize a legacy service

Ask Autohand Code to inspect legacy endpoints, update patterns, add tests, and keep compatibility where callers depend on it.

Move old patterns into current project conventions

Modernization Build and change Implementation Code

autohand -p "Modernize this service using current repo patterns and preserve public behavior"

A safer modernization patch with compatibility notes and verification commands.

Modernize a legacy service with Autohand Code is a modernization workflow that updates older service code toward current project conventions while preserving public behavior and known consumers. ### At a glance | Question | Answer | | --- | --- | | Best for | old endpoints, stale runtime assumptions, framework upgrades, and services with compatibility promises | | Primary inputs | Legacy endpoint group, service, package, or job; Current conventions to follow; Known consumers, compatibility requirements, and rollout constraints | | Autohand Code returns | A safer modernization patch with compatibility notes and verification commands. | | Avoid when | callers can tolerate a breaking rewrite and the team has already chosen that path | ### How Autohand Code handles this workflow 1. Maps current behavior, callers, data stores, errors, and tests. 2. Separates compatibility work from optional cleanup. 3. Updates one risky boundary at a time. 4. Returns verification commands and rollback notes for production-facing behavior. ### Best inputs - Legacy endpoint group, service, package, or job - Current conventions to follow - Known consumers, compatibility requirements, and rollout constraints ### Strong prompt autohand -p "Modernize this service using current repo patterns and preserve public behavior" ### Autohand Code CLI options - When `slash_goal` is enabled, use `/goal <modernization objective>` for multi-step service work with compatibility requirements. - Run `autohand --auto-mode "Modernize this service in safe slices and preserve public behavior" --checkpoint-interval 2` when each slice needs validation. - Use `--add-dir` for shared clients, schemas, or deployment code that live outside the service repository. ### Review before accepting A trustworthy modernization states what stayed compatible, what changed, which tests protect it, and what should be staged later. ### Source and validation signals Autohand AI maintains this workflow as first-party product guidance for Autohand Code. Use the [Autohand CLI Playbook](https://github.com/autohandai/code-cli/blob/main/docs/AUTOHAND_PLAYBOOK.md), [CLI reference](/docs/working-with-autohand-code/cli-reference.html), and [configuration reference](https://github.com/autohandai/code-cli/blob/main/docs/config-reference.md) when choosing between interactive mode, command mode, auto-mode, feature-enabled /goal, /settings, skills, MCP, and permission settings. The related resources below link to product docs and tutorials for the workflow, and the final answer should name repository-specific files, commands, outputs, or docs that a reviewer can verify. ### Frequently asked questions ### What is Modernize a legacy service with Autohand Code? Modernize a legacy service with Autohand Code is a modernization workflow that updates older service code toward current project conventions while preserving public behavior and known consumers. ### When should a team use Modernize a legacy service? Use it when old code needs current patterns but customers or internal callers still depend on existing behavior. ### What evidence should reviewers check for Modernize a legacy service? A trustworthy modernization states what stayed compatible, what changed, which tests protect it, and what should be staged later.

Guide Legacy Migration Guide Inventory dependencies, choose migration slices, and validate old and new behavior. /docs/guides/legacy-migration.html Guide Modernization Overview Choose the right modernization path before changing code. /docs/guides/modernization-overview.html Guide Code Modernization Guide Keep compatibility, testing, and rollout risks visible during modernization. /docs/guides/code-modernization.html