Use cases

Engineering

Plan and implement code changes

Use Grok Build's plan mode to architect complex changes before touching the code — then implement across files in a single session with subagents handling research, tests, and review in parallel.

Powered by Build and Chat

Describe the change you need

Open Grok Build in your repo and describe what you want to accomplish. For anything non-trivial — a refactor, a new feature, a migration — Grok enters plan mode to explore the codebase first, understand existing patterns, and propose a structured approach before writing any code.

Example prompt

Migrate our auth system from session cookies to stateless JWTs with refresh token rotation. We need to keep backwards compatibility during the rollout.

Explores the existing auth module structure
Identifies all session-dependent code paths
Proposes a phased migration plan

Review and approve the plan

Grok presents a step-by-step implementation plan with file-level specifics. You can ask questions, adjust scope, reorder steps, or reject parts before any code is written. This is where the important architectural decisions happen — in conversation, not in a diff review.

Example prompt

Can we do the middleware changes first so we can run both auth strategies in parallel during the migration? Also skip the PKCE step for now — we only have confidential clients.

Implement with parallel subagents

Once the plan is approved, Grok implements it — spawning subagents to handle independent tasks in parallel. One agent writes the JWT middleware, another updates the refresh token logic, a third runs the test suite. You stay on the main thread making decisions while the work fans out.

Example prompt

Looks good. Implement the plan. Run tests after each step and flag anything that breaks.

Subagents handle implementation, testing, and linting in parallel
Main thread stays focused on the next decision
Changes are verified before moving to the next step

Review the final diff

When implementation is complete, review the full set of changes in your editor. Grok can also spawn a reviewer subagent to audit the diff against the original plan, check for edge cases, and flag anything that drifted from the agreed approach.

Try it yourself

Get started with Grok and explore this workflow firsthand.