ML.ai

Work out the approach before a single file changes

Ask architect to read the code and return a plan with the files involved, the trade-offs and the order of work, before general writes a line.

Who uses ML.ai for planning

Developers about to start a change where the order of work decides how smoothly it lands.

  • Developers planning migrations

    Changes where the order of work decides whether the code keeps running.

  • Teams touching many files

    Changes that cross services and need every dependency found first.

  • Leads weighing trade-offs

    Open questions and trade-offs flagged before anyone writes code.

Read-only design: nothing changes until you say so

architect reads every file it needs but never writes. It returns the files, order, trade-offs and open questions, then stops.

A chat window cannot see how the session is used

A generic chat model plans from the file you pasted in. architect reads the session middleware, the cookie config, every route that touches req.session and the auth flow, then plans across all of them.

The plan is grounded in the code you have today

architect reads the current implementation before planning, so it knows which session fields exist, which routes depend on them and what the migration needs to keep.

Open questions are flagged, not silently guessed at

If the migration has an open choice, such as keeping both stores during rollout or cutting over at once, architect flags it for you to decide.

The plan is a handoff, not a commitment

architect produces the plan. You decide whether to hand it to general for execution, modify it first, or throw it away. Nothing changes until you say so.

Planning a change by hand versus with architect

By hand

You grep for req.session, sketch a plan in a doc, find the auth flow you missed and revise it again.

With architect

Tell architect what you are considering. It reads the code and returns the files, order, trade-offs and open questions.

Which agent actually does this

architect · Read · Plan · Edit

Plans, never edits

Reads the code and returns the critical files, the real trade-offs, and an ordered plan. No edit or write tool available to it at all.

planSubAgent · Read · Plan · Writes plan file

Same plan, saved to a file

Runs the same investigation as architect, but writes the finished plan to a markdown file for review and sign-off instead of returning it inline.

How architect turns a question into a plan

Most changes go wrong because the plan missed something, like a dependency, an ordering or a trade-off nobody raised.

1Describe the change you are consideringOne sentence or a paragraph, as much context as the change needs. Tag @architect to route it to the planning agent.
2architect reads the codeThe agent reads every file the change would touch, follows the dependency chain, and builds a picture of the current state before proposing any work.
3Review the planarchitect returns the critical files, the order of work, the trade-offs and any open questions it found, all before a single file changes.
4Hand it off, revise, or discardIf the plan looks right, hand it to general to execute. If something is wrong, tell architect and it revises. If the whole approach is off, discard it and try a different angle.

Common planning mistakes and fixes

Where plans usually go wrong, and how architect closes each gap.

The missed dependency

You plan the session migration but miss the auth flow that reads the cookie directly. Halfway through implementation, the auth breaks and you have to re-plan.

How ML.ai handles it

architect reads every file that touches sessions, including the auth flow, before producing the plan, so dependencies surface before code changes.

The wrong ordering

You start by swapping the store, but the middleware still reads the old cookie format, and every request fails until you fix the middleware you had planned to do third.

How ML.ai handles it

architect returns the steps in dependency order. The middleware update comes before the store swap, so the codebase stays working at every step.

The silent trade-off

You pick a hard cutover because it is simpler. Two days in, you realize existing sessions will be dropped on deploy, and there is no rollback path.

How ML.ai handles it

architect flags the cutover or dual-write choice as an open question with the trade-offs stated, so you make that decision on purpose.

Where this stops

The real edges of what architect and planSubAgent can do here, stated plainly instead of left for you to discover.

01
01

The plan doesn’t run itself

Neither agent can carry it out. planSubAgent only writes its own plan file; executing it is a separate handoff to general, and each edit still comes to you.

02
02

It plans from the code, not the meeting

If the team already chose dual write, say so in the request. Otherwise architect lists it as an open question.

03
03

Small changes can skip it

For a one-file change you can already describe, go straight to general. Planning pays off on the large or unfamiliar ones.

Apply edits to 3 files?

One diff across the schema, the API route and the task card.

route.tsschema.prismaTaskCard.tsx+2 −1
20export async function POST(req) {
21- const { title } = await req.json()
21+ const { title, dueDate } = await req.json()
22+ return createTask({ title, dueDate })
AllowAlwaysDeny

Build

Give general a feature description and it reads the relevant files, plans the edit across every layer, and writes it as one reviewable diff.

Root cause in session.ts

The store returns null before the session write finishes, so the middleware rejects a valid token.

session.ts+2 −1
40export async function getSession(id) {
41- const s = store.get(id)
41+ const s = await store.get(id)
42+ if (!s) throw new SessionNotFound(id)
AllowAlwaysDeny

Debug

Give ML.ai a failing test or error and it reads the execution path, finds the root cause, and writes a fix you can review.

FAQs

Can architect plan a change that spans multiple services?

Yes, as long as the code is in the repo. architect reads across directories and services, so it can plan a migration that touches the API, the frontend, and the database layer in one pass.

What if I disagree with part of the plan?

Say which part and why, and architect revises it. Because it cannot edit anything, a wrong plan only costs you a re-read, never a change you have to undo.

Does architect write code?

No. It cannot edit or write anything at all. The output is a read-only plan: files, trade-offs, and ordered steps. Executing it is a separate handoff to general.

Can I save the plan to a file?

Yes. planSubAgent runs the same investigation as architect and writes the finished plan to a markdown file you can review and sign off on.

What can architect not account for?

A plan is only as good as what is in the repo. A decision that lives in a team convention nobody wrote down needs to be stated in the request.

Try ML.ai today, or talk to us about what is next

Install the editor agent on your own machine, or book a call to talk through your team’s workloads