In the previous chapter, Skill Catalog & Bundles, we organized our library of tools. We learned how to group skills into Bundles (like "Web Wizard" or "Security Engineer") so we have the right toolbox for the job.
But owning a toolbox doesn't make you a Master Builder.
If you have a hammer, a saw, and a drill, but no blueprints, you can't build a house. You need a plan. You need to know what to do, in what order, and which tool to use for each step.
Imagine asking your AI: "Build me a SaaS MVP."
Without a workflow, the AI might:
This happens because the AI is "reacting" to your prompt rather than following a plan. It has the skills, but it lacks the Strategy.
An Antigravity Workflow is a strategic blueprint. It is a structured file (JSON) that breaks a massive goal into small, logical steps.
While a Skill tells the AI how to do a task (e.g., "How to write a React component"), a Workflow tells the AI when to do it (e.g., "First plan, then database, then frontend").
SKILL.md): The Hammer.workflows.json): The Construction Blueprint.
Workflows are defined in a file called data/workflows.json. This makes them readable by both humans and machines.
Let's look at a simplified example of what a Workflow looks like inside the system.
{
"id": "ship-saas-mvp",
"name": "Ship a SaaS MVP",
"steps": [
{
"title": "Plan the scope",
"goal": "Define the problem and user persona.",
"recommendedSkills": ["brainstorming", "writing-plans"]
},
{
"title": "Build backend",
"goal": "Implement API and Database.",
"recommendedSkills": ["api-patterns", "database-design"]
}
]
}
id: A unique computer-friendly name.steps: An ordered list of tasks.goal: The "Definition of Done" for that specific step.recommendedSkills: The specific tools the AI should pick up for this phase.Let's walk through a real scenario included in the Antigravity project: Shipping a SaaS MVP.
Instead of flailing around, the Workflow forces the AI to follow a professional development lifecycle.
The workflow explicitly stops the AI from coding immediately.
@brainstorming, @concise-planning.Once the plan is approved, the workflow moves to the foundation.
@backend-dev-guidelines, @auth-implementation-patterns.Before finishing, the workflow mandates a quality check.
@go-playwright, @browser-automation.Note: Notice how specific the skills are? In Step 3, it suggests
@go-playwright. The AI wouldn't know to use that specific tool without the workflow suggesting it.
You might be wondering: Who reads this JSON file?
There is a special "Master Skill" called the App Builder (skills/app-builder/SKILL.md). Think of this skill as the Project Manager.
When you say "Help me build an app," the App Builder:
workflows.json.
How does the code actually process these steps? Let's look at a simplified version of the logic used in the App Builder to process a workflow.
The system treats the workflow as a simple "To-Do List" array.
First, the system needs to find the specific workflow by its ID.
// Simplified logic to find a workflow
const workflows = require('./data/workflows.json');
function getWorkflow(workflowId) {
// Find the specific plan in the list
const plan = workflows.find(w => w.id === workflowId);
return plan;
}
Explanation: We load the JSON file and look for a match, like ship-saas-mvp.
Once we have the plan, the Agent needs to know what tools to recommend to the user.
function getCurrentStepAdvice(step) {
// Create a prompt for the AI
return `
Current Phase: ${step.title}
Goal: ${step.goal}
Tools to use: ${step.recommendedSkills.join(", ")}
`;
}
Explanation: The system injects this text into the AI's context. Now, even if the AI "forgot" what it was doing, this prompt reminds it: "You are currently in the Planning Phase. Use the Brainstorming tool."
If you are new to AI coding, Context Window is your enemy.
If you try to do everything at once, the AI "forgets" earlier instructions. By using Workflows:
@go-playwright only during testing).In this chapter, we learned:
@brainstorming, @react-patterns, @go-playwright).Currently, you (the human) still have to act as the "Next Button," approving each step. But what if the AI could run through this checklist on its own?
In the next chapter, we will introduce Loki Mode, where the AI takes the workflow and executes it autonomously.
๐ Next: Autonomous Orchestration (Loki Mode)
Generated by Code IQ