To migrate an entire Fastify codebase off a deprecated function or module onto its replacement without missing a caller, Atlas provides a systematic workflow that leverages `lsp` for enumeration, `todowrite` for tracking, and `apply_patch` for safe, tested migrations, all integrated with `node:test (fastify.inject)` and `prettier` for Fastify developers.
How Atlas Enumerates Deprecated Fastify API Calls
In 2026, migrating a deprecated API across every callsite in Fastify with Atlas begins by comprehensively enumerating all usages. Atlas uses its `lsp` tool to find references to the deprecated symbol, ensuring 100% coverage of your `fastify.js` or `app.ts` codebase.
Atlas initiates the migration process by identifying every instance of the deprecated API within your Fastify project. It leverages its `lsp` tool, which integrates with the language server, to perform a `findReferences` operation on the deprecated symbol. This method provides a complete set of callers, including those within Fastify plugins registered in your main `fastify.js` or `app.ts` file. To catch dynamic or string-based usages that the language server might miss, Atlas cross-checks these results with its `grep` tool, ensuring no callsite is overlooked. This dual approach guarantees a robust and exhaustive enumeration, which is critical for a migration that punishes half-measures.
Tracking Fastify API Migration Progress with Atlas
Tracking the migration of a deprecated API across a Fastify codebase is crucial for visibility and ensuring no callsite is silently skipped. Atlas creates one `todowrite` entry per callsite, providing a clear, actionable list of 100% of the work to be done.
Once all callsites of the deprecated Fastify API are enumerated, Atlas transforms this list into a trackable workflow. For each identified callsite, Atlas generates a distinct entry using its `todowrite` tool. This approach ensures that partial progress is visible and that every single instance of the deprecated API is accounted for. As you work through the migration, each `todowrite` entry serves as a concrete task, allowing you to monitor the completion status and ensuring that the entire codebase transitions off the old API without any missed spots. This granular tracking is especially valuable in larger Fastify applications with numerous plugins and routes.
Migrating Fastify Callsites Safely with Atlas
Migrating each Fastify callsite requires precision to avoid misapplications, a task Atlas handles with its `apply_patch` tool. This tool seeks the hunk's context and old_lines, ensuring that edits are applied only when the expected code is found, preventing 0 accidental changes.
Atlas performs the actual migration of each deprecated Fastify API callsite using its `apply_patch` tool. This tool is designed for safety and reliability: it seeks the specific hunk's context and `old_lines` within the target file. If the expected lines are not found due to code drift, `apply_patch` throws a 'Failed to find expected lines' error rather than guessing or misapplying the patch. This mechanism is vital for maintaining code integrity in a Fastify project, especially when dealing with plugin encapsulation or complex JSON schemas. Atlas also computes a unified diff for every file edit and surfaces it for approval, allowing you to review and confirm changes before they are written to your `fastify.js` or `app.ts` files.
Testing and Reviewing Fastify API Migrations with Atlas
After each Fastify file modification, Atlas immediately runs affected tests to validate the migration, ensuring 100% functionality. It uses the `bash` tool to execute `node --test` commands, specifically targeting `fastify.inject()` cases, and only marks a `todowrite` entry complete once tests pass.
Atlas integrates testing directly into the migration workflow to ensure immediate validation of changes. After each file is modified by `apply_patch`, Atlas uses its `bash` tool to run the affected tests. For Fastify applications, this means executing `node --test` commands, which typically involve `fastify.inject()` cases designed to test routes and plugins. Atlas will only mark the corresponding `todowrite` entry as completed once these tests pass, providing a robust feedback loop. Furthermore, Atlas's read-only plan agent drafts a plan and asks for approval before switching to a build agent, and every tool call is permission-gated. After successful migration and testing, Atlas can run `prettier` on the touched plugins, ensuring your Fastify codebase maintains its formatting standards.
Ensuring Complete Fastify API Migration with Atlas
To guarantee a 100% complete migration of a deprecated API in Fastify, Atlas performs a final verification step. After all `todowrite` entries are marked complete, Atlas uses `grep` to confirm zero remaining hits of the deprecated symbol across your entire codebase.
The final stage of migrating a deprecated API in Fastify with Atlas is a comprehensive verification. Once all individual callsites have been migrated and their respective `todowrite` entries are marked complete, Atlas performs a final `grep` search for the deprecated symbol across the entire project. This crucial step confirms that absolutely zero instances of the old API remain. Only after this final `grep` yields no hits is the migration considered truly complete. Atlas then facilitates the deletion of the old implementation, ensuring a clean and fully updated Fastify codebase. Atlas also reads git branches, status, and diffs, and can stage and create commits on your behalf, providing a complete and auditable migration history.
Step by step
- 01Use Atlas's `lsp` tool to `findReferences` for the deprecated symbol in your `fastify.js` or `app.ts`.
- 02Cross-check `lsp` results with Atlas's `grep` tool to find any dynamic or string-based usages of the deprecated API.
- 03Create one `todowrite` entry in Atlas for each identified callsite of the deprecated Fastify API.
- 04Migrate each callsite using Atlas's `apply_patch` tool, reviewing the unified diff for approval.
- 05After each file edit, use Atlas's `bash` tool to run `node --test` on affected `fastify.inject()` cases.
- 06Mark the `todowrite` entry complete only after the `node:test (fastify.inject)` tests pass.
- 07Once all `todowrite` entries are complete, run Atlas's `grep` tool for the deprecated symbol to confirm zero remaining hits.
- 08Delete the old API implementation and let Atlas run `prettier` on any touched Fastify plugins.
Frequently asked questions
- How does Atlas ensure it finds every deprecated API call in my Fastify project?
- Atlas combines its `lsp` tool's `findReferences` operation, which uses the language server for precise symbol lookup, with a `grep` cross-check for dynamic or string-based usages. This dual approach guarantees a comprehensive enumeration across your `fastify.js` or `app.ts` codebase, including all plugin contexts.
- Can Atlas handle Fastify plugin encapsulation contexts during migration?
- Yes, Atlas is designed to read your plugin encapsulation contexts. By indexing code with AST declarations using tree-sitter, Atlas understands the structure of your Fastify application, ensuring that migrations respect plugin boundaries and decorators, and correctly identify callsites within them.
- What happens if a file changes while Atlas is trying to apply a patch to my Fastify code?
- Atlas's `apply_patch` tool is robust. It seeks the hunk's context and `old_lines` before applying changes. If the expected lines are not found due to code drift, it will throw a 'Failed to find expected lines' error, preventing the patch from being misapplied and ensuring your Fastify codebase remains consistent.
- How does Atlas integrate with Fastify's testing workflow?
- Atlas integrates directly by using its `bash` tool to run `node --test` commands after each file modification. It specifically targets `fastify.inject()` cases, which are standard for testing Fastify routes and plugins, and only marks a `todowrite` entry complete once these tests pass.
- Does Atlas help maintain code style in my Fastify project after migrations?
- Yes, Atlas supports maintaining your code style. After successfully migrating and testing changes, Atlas can run `prettier` on the touched Fastify plugins or files. This ensures that your codebase remains consistently formatted according to your project's standards.
- How does Atlas ensure I don't miss any deprecated API calls in a large Fastify application?
- Atlas creates a `todowrite` entry for every single identified callsite, making partial progress visible. The workflow concludes with a final `grep` for the deprecated symbol, confirming zero remaining hits before the old implementation is deleted, guaranteeing a complete migration.
- What kind of review process does Atlas offer for Fastify code changes?
- Atlas provides a robust review process. It drafts a plan in a read-only plan agent and asks for approval before switching to a build agent. Every tool call is permission-gated, and Atlas computes a unified diff for every file edit, surfacing it for your approval before writing, and can snapshot changes as git patches.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Migrate a Deprecated API Across Every Callsite with Atlas (2026 Workflow)
How to migrate a deprecated API across every callsite with Atlas in 2026: the lsp tool's findReferences enumerates callers, todowrite tracks them, apply_patch migrates each one.
Atlas for Fastify in 2026
Atlas is a terminal-native AI coding agent for Fastify in 2026. It reads plugin encapsulation and JSON schemas, then runs node --test behind a permission prompt.
Debug a single failing test in Fastify with Atlas in 2026
In 2026, Fastify developers use Atlas to debug single failing `node:test` cases. Learn how Atlas leverages `fastify.inject()` and `npm` to pinpoint and fix code issues efficiently, ensuring your Fastify application
Document a module with a README in Fastify with Atlas in 2026
In 2026, Fastify developers use Atlas to generate accurate READMEs for modules. Atlas reads live code, enumerates APIs, and verifies examples, ensuring documentation reflects current Fastify plugin behavior.
Run Atlas Headless in CI for Fastify Applications in 2026
Automate Fastify application development in CI pipelines with Atlas. Learn to run Atlas headless, integrate with `npm` and `node:test (fastify.inject)`, and get machine-readable output for your Fastify projects.
Automate GitHub Issue and Pull Request Triage in Fastify with Atlas in 2026
Streamline GitHub issue and pull request triage for your Fastify projects using Atlas. Configure safe, trusted workflows that leverage Fastify's plugin architecture and JSON schemas, integrating with `npm` and
Refactor a legacy Fastify module in 2026 with Atlas
Streamline your Fastify application in 2026 by refactoring legacy modules with Atlas. Ensure no breaking changes using `node:test` and `prettier` for a robust update, maintaining Fastify's performance.
Diagnose a Hanging or Long-Running Command in Fastify with Atlas in 2026
Quickly diagnose hanging or slow Fastify commands with Atlas. Learn how Atlas identifies blocked input, uses `npm` and `node:test (fastify.inject)` to get your builds unstuck in 2026.