.do
Monitoring

goals

Track business goals, OKRs, and KPIs with AI-powered analytics and real-time monitoring

goals

Track and Achieve Business Goals Automatically

Overview

The goals primitive provides AI-powered goal tracking and monitoring for OKRs, KPIs, and business objectives. It automatically collects metrics from multiple data sources, predicts outcomes, identifies blockers, and aligns teams on priorities with intelligent progress tracking.

SDK Usage

import { $, goals } from 'sdk.do'

// Define goals with automatic data collection
await goals.define({
  name: 'Q4 Revenue Target',
  target: { revenue: 10_000_000, by: '2024-12-31' },
  keyResults: [
    { metric: 'MRR', target: 850_000, current: 'auto' },
    { metric: 'ChurnRate', target: 0.02, direction: 'decrease' }
  ],
  dataSources: ['$.Stripe', '$.Database']
})

Semantic Pattern

// Goals Pattern: $.Goals.verb.Object
await $.Goals.define.Objective({ name: 'Q4 Revenue', target: 10_000_000 })
await $.Goals.track.Progress({ goalId: 'goal-123' })
await $.Goals.predict.Completion({ goalId: 'goal-123' })
await $.Goals.identify.Blockers({ goalId: 'goal-123' })

// With AI-powered insights
on($.Metric.updated, async (metric) => {
  const progress = await $.AI.predict.GoalCompletion({ goalId: metric.goalId })
  if (progress.likelihood < 0.7) {
    await $.Alert.send.Owner({ goal: metric.goal, blockers: progress.blockers })
  }
})

Quick Example

import { goals, on, $ } from 'sdk.do'

// Track OKRs with automatic data collection
const q4Goal = await goals.define({
  name: 'Q4 Revenue Target',
  target: { revenue: 10_000_000, by: '2024-12-31' },
  keyResults: [
    { metric: 'MRR', target: 850_000, current: 'auto' },
    { metric: 'ChurnRate', target: 0.02, direction: 'decrease' }
  ],
  dataSources: ['$.Stripe', '$.Database']
})

// AI predicts completion and identifies blockers
on($.Metric.updated, async (metric) => {
  const progress = await $.AI.predict.GoalCompletion({ goalId: metric.goalId })
  if (progress.likelihood < 0.7) {
    await $.Alert.send.Owner({
      goal: metric.goal,
      blockers: progress.blockers
    })
  }
})

Core Capabilities

  • Automatic Data Collection - Connects to 100+ data sources (Stripe, Salesforce, databases, APIs) for real-time metric updates
  • AI-Powered Predictions - Forecast goal completion with 85%+ accuracy using historical trends and current velocity
  • Blocker Detection - Identify obstacles and bottlenecks preventing goal achievement
  • Team Alignment - Cascade company OKRs to departments, teams, and individuals with automatic progress rollups
  • Custom Metrics - Define complex calculations using TypeScript functions with multi-source data
  • Anomaly Detection - Identify unexpected changes in metrics and alert stakeholders
  • Natural Language Insights - Human-readable explanations of goal status and recommendations

Access Methods

SDK

TypeScript/JavaScript library for programmatic goal management

import { goals } from 'sdk.do'
await goals.define({ name: 'Q4 Revenue', target: 10_000_000 })
await goals.track({ goalId: 'goal-123' })

SDK Documentation

CLI

Command-line tool for goal operations

do goals define "Q4 Revenue" --target 10000000
do goals track goal-123
do goals predict goal-123

CLI Documentation

API

REST/RPC endpoints for goal integration

curl -X POST https://api.do/v1/goals -d '{"name":"Q4 Revenue","target":10000000}'
curl https://api.do/v1/goals/goal-123/progress

API Documentation

MCP

Model Context Protocol for AI assistant integration

Track progress for goal "Q4 Revenue Target" and identify blockers

MCP Documentation

  • okrs - Objectives and Key Results framework
  • kpis - Key Performance Indicator tracking
  • analytics - Data analysis and insights
  • dashboard - Visual goal tracking
  • ai - AI-powered predictions and insights