Strategic plans are the lifeblood of any ambitious company. They translate a grand vision into actionable steps. But for too long, these plans have been trapped in static documents—spreadsheets, slide decks, and wikis that are quickly outdated and disconnected from the real work being done. What if we could treat our business strategy with the same rigor, dynamism, and automation we apply to our code?
Welcome to Business Planning as Code.
At Plans.do, we believe your company's most important goals deserve to be more than just a document. They should be living, version-controlled, and integrated directly into your operational workflows. This is accomplished through our powerful, API-first platform.
This post is a developer's deep dive into the anatomy of a Plan object. We'll break down how to programmatically define, track, and execute your company's objectives using the Plans.do API, transforming your strategy from a static document into an executable engine for growth.
Before we dive into the API endpoints, let's clarify the paradigm shift. "Planning as Code" (or "Strategy as Code") applies the proven principles of software development to the art of strategic planning. This means:
Plans.do provides the core infrastructure to make this a reality. Let's look at the fundamental building block: the Plan object.
Everything in Plans.do starts with creating a plan. It’s the top-level container that holds your objectives, key results, and metadata. Creating one is a single, clean API call.
Let's look at the code to define a Q4 expansion plan using our TypeScript SDK:
import { plans } from '@do/sdk';
const newPlan = await plans.create({
name: "Q4 2025 Expansion Plan",
description: "Expand into the European market and increase user base by 20%.",
type: "OKR",
goals: [
{
objective: "Achieve 50,000 new users in EU",
keyResults: [
{ metric: "New User Signups", startValue: 0, targetValue: 50000 },
{ metric: "Website Traffic (EU)", startValue: 0, targetValue: 200000 }
]
},
{
objective: "Establish Local Partnerships",
keyResults: [
{ metric: "Signed Partner Agreements", startValue: 0, targetValue: 5 }
]
}
]
});
console.log(newPlan.id);
// pln_1a2b3c4d5e6f7g8h
Let's dissect this request:
The goals array is where your strategy becomes concrete. Each object in this array contains a qualitative objective and a set of quantitative keyResults.
The objective is a simple string that declares a clear, ambitious, and inspirational goal.
objective: "Achieve 50,000 new users in EU"
This is the destination. It sets the direction and provides a rallying cry for the team. It tells you what you want to accomplish.
If the objective is the destination, Key Results are the signposts on the road that tell you if you're on track. They are the measurable outcomes that prove you've achieved your objective.
Each keyResult object has a clear structure:
This structure removes ambiguity from goal execution. Success isn't a matter of opinion; it's a matter of data. Did we move the New User Signups metric from 0 to 50,000?
Defining a plan as code is just the first step. The real power comes from making it an active part of your ecosystem.
With a plan ID like pln_1a2b3c4d5e6f7g8h, you now have a handle to programmatically interact with your strategy.
Automated Progress Tracking:
Imagine your authentication service fires a webhook for every new user signup in the EU. A simple serverless function can listen for that event and call the Plans.do API to update the progress.
// Conceptual example of updating a key result
await plans.updateProgress('pln_1a2b3c4d5e6f7g8h', {
metric: "New User Signups",
currentValue: 25000
});
Agentic Workflows:
Plans.do is more than a database; it’s an agentic workflow platform. Using webhooks, your plan can become a trigger for other actions.
By connecting your plan to other tools, you create a fully synchronized planning ecosystem where strategy and execution are in perfect lockstep.
By treating business plans as code, we empower developers to build the very systems that drive company growth. The Plans.do API provides the primitives to move your strategy out of static presentations and into the dynamic, automated world of software.
You no longer just execute on a plan; you architect it.
Ready to translate your company's vision into executable code? Explore the Plans.do documentation and start building your first plan today.