.do
Core Concepts

verbs

Actions performed by or to nouns

verbs

Action and relationship definitions (verbs) that describe operations and connections between entities in the semantic $.Subject.predicate.Object pattern.

Overview

The verbs primitive defines predicates (relationships and actions) that connect subjects to objects, forming the middle part of semantic triples like $.Business.owns.Brand or $.User.creates.Order.

Quick Example

import { verbs } from 'sdk.do'

// Define a verb (relationship/action)
const owns = await verbs.define({
  name: 'owns',
  description: 'Ownership relationship',
  type: 'relationship',
  subjects: ['Business', 'User'],
  objects: ['Brand', 'Product', 'Asset'],
  cardinality: 'one-to-many',
  validation: {
    requiresOwnership: true,
    transferrable: true,
  },
})

// Define an action verb
const creates = await verbs.define({
  name: 'creates',
  description: 'Creation action',
  type: 'action',
  subjects: ['User', 'Agent'],
  objects: ['Order', 'Document', 'Task'],
  sideEffects: async ({ subject, object }) => {
    await auditLog.record({
      actor: subject,
      action: 'create',
      resource: object,
    })
  },
})

// Use verbs in semantic patterns
await $.Business.owns.Brand(business, brand)
await $.User.creates.Order(user, order)

Core Capabilities

  • Relationship Types - Define how entities relate to each other
  • Action Definitions - Model operations between entities
  • Cardinality - one-to-one, one-to-many, many-to-many
  • Validation - Rules for valid subject-object pairs
  • Side Effects - Trigger additional logic when verbs execute

Access Methods

SDK

TypeScript/JavaScript library for verb definitions

await verbs.define({ name: 'owns', type: 'relationship', subjects: ['Business'], objects: ['Brand'] })

SDK Documentation

CLI

Command-line tool for verb management

do verb define owns --type relationship --subjects Business --objects Brand

CLI Documentation

API

REST/RPC endpoints for verb definitions

curl -X POST https://api.do/v1/verbs -d '{"name":"owns","type":"relationship"}'

API Documentation

MCP

Model Context Protocol for AI-driven verb definition

Define a relationship verb "owns" where Business subjects can own Brand objects

MCP Documentation