Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ed53858
docs: Transform 51 README files to gold standard natural language API
nathanclevenger Jan 8, 2026
80b8dd8
feat: add Claude Code plugin configuration to all submodules
nathanclevenger Jan 8, 2026
2cf14d8
refactor: move 70 non-submodule rewrites to opensaas repo
nathanclevenger Jan 8, 2026
c252c2d
feat: add SessionStart hook for Claude Code web beads support
nathanclevenger Jan 8, 2026
ca0deeb
chore: sync beads issues
nathanclevenger Jan 8, 2026
8e3cf50
feat: update packages with enhanced functionality
nathanclevenger Jan 8, 2026
5ea20ee
chore: update submodules with latest changes
nathanclevenger Jan 8, 2026
5c40e17
chore: filter beads to workers- prefix only
nathanclevenger Jan 8, 2026
70d5850
feat(glyphs): complete GREEN phase - package setup and exports
nathanclevenger Jan 8, 2026
b04c33e
test(react-compat): add failing tests for lazy() and Suspense support…
nathanclevenger Jan 8, 2026
7d0d0e1
feat: add new files and update packages
nathanclevenger Jan 8, 2026
71c4c33
feat: update packages and add new files
nathanclevenger Jan 8, 2026
0028bf7
chore: sync beads issues
nathanclevenger Jan 8, 2026
f9c3b12
chore: update auth test and mongo submodule
nathanclevenger Jan 8, 2026
5705f38
chore: close workers-6j63 MDX-as-Worker build pipeline
nathanclevenger Jan 8, 2026
db5e4b5
chore: add remaining files and updates
nathanclevenger Jan 8, 2026
31d1292
chore: final cleanup - update objects/do, sdks, rewrites/mongo
nathanclevenger Jan 8, 2026
605b9c8
chore: sync beads issues - close workers-4jys
nathanclevenger Jan 8, 2026
409fd79
chore: sync remaining changes
nathanclevenger Jan 8, 2026
6894afa
chore: sync more changes
nathanclevenger Jan 8, 2026
2798e69
chore: commit latest generated files
nathanclevenger Jan 8, 2026
6bf41f5
chore: sync beads issues - close workers-fn3pn
nathanclevenger Jan 8, 2026
fd48eee
chore: close workers-olcr - no CDC patching scripts to delete
nathanclevenger Jan 8, 2026
cbc5d9e
chore: sync beads issues
nathanclevenger Jan 8, 2026
b4b32d5
docs: add business narrative to database.do README
nathanclevenger Jan 8, 2026
c41d3ed
chore: close workers-nd1sj - verify RED tests for explicit type defin…
nathanclevenger Jan 8, 2026
06c064a
feat(embeddings.do): add caching for duplicate embeddings
nathanclevenger Jan 8, 2026
3100aa5
docs: document primitives submodule structure in ARCHITECTURE.md
nathanclevenger Jan 8, 2026
1923c51
test(workers/ai): add failing RED tests for is/summarize/diagram
nathanclevenger Jan 8, 2026
e013d3f
chore: sync beads issues
nathanclevenger Jan 8, 2026
b2f110d
feat(workers/ai): add RED tests for list() and lists() methods
nathanclevenger Jan 8, 2026
7bf3893
test(fsx): add RED phase tests for MCP connector
nathanclevenger Jan 8, 2026
d536010
chore: update mongo submodule with Iceberg optimization
nathanclevenger Jan 8, 2026
cc66699
feat(do-core): implement cascade relationship system (->, ~>, <~, <-)
nathanclevenger Jan 8, 2026
7600d07
fix(glyphs): content negotiation for HTML Accept headers
nathanclevenger Jan 8, 2026
b5b36d2
feat(workers/ai): complete TDD RED phase test suite (300 tests)
nathanclevenger Jan 8, 2026
bee6274
fix(workers/functions): reject null function type as corrupted data
nathanclevenger Jan 8, 2026
7aa7a85
Add bashx.do submodule - AI-enhanced bash execution
nathanclevenger Jan 8, 2026
34bd35e
Update bashx submodule: single-tool AST architecture
nathanclevenger Jan 8, 2026
cd5e492
docs(payments): add comprehensive documentation inspired by Polar pat…
nathanclevenger Jan 8, 2026
36e3266
feat(workers.do): implement worker registry service using dotdo
nathanclevenger Jan 14, 2026
41b86a4
feat(workers.do): Migrate full Workers for Platforms service
nathanclevenger Jan 14, 2026
f22898f
feat(workers.do): Add TDD issues for Workers for Platforms service
nathanclevenger Jan 14, 2026
5a902fa
test(workers.do): add analytics middleware tests
nathanclevenger Jan 14, 2026
f15dec0
test(workers.do): add failing tests for DO-based deployments store
nathanclevenger Jan 14, 2026
1cddc24
test(workers.do): add failing tests for O(1) dispatch routing (RED ph…
nathanclevenger Jan 14, 2026
eb0bf76
test(workers.do): add failing tests for real WfP deployment (RED phase)
nathanclevenger Jan 14, 2026
a67c498
test(workers.do): add TDD RED phase type tests for strict TypeScript
nathanclevenger Jan 14, 2026
389cf5c
test(workers.do): add failing security tests (TDD RED phase)
nathanclevenger Jan 14, 2026
f323095
feat(workers.do): WorkersRegistryDO tests pass (GREEN phase)
nathanclevenger Jan 14, 2026
925dc0a
feat(workers.do): implement O(1) dispatch routing (GREEN phase)
nathanclevenger Jan 14, 2026
5ce7eb0
feat(workers.do): wire up WfP bindings in wrangler.jsonc (GREEN phase)
nathanclevenger Jan 14, 2026
d5edb01
feat(workers.do): implement security improvements (GREEN phase)
nathanclevenger Jan 14, 2026
6e5b2a4
feat(workers.do): implement real WfP deployment (GREEN phase)
nathanclevenger Jan 14, 2026
fe6eabc
feat(workers.do): implement DO-based deployments store (GREEN phase)
nathanclevenger Jan 14, 2026
6a60510
refactor(workers.do): optimize storage patterns
nathanclevenger Jan 14, 2026
0a28337
refactor(workers.do): clean up dispatch routing code
nathanclevenger Jan 14, 2026
90bc18e
refactor(workers.do): extract security middleware
nathanclevenger Jan 14, 2026
0db34c1
refactor(workers.do): clean up deployment code
nathanclevenger Jan 14, 2026
6dbf6dc
refactor(workers.do): consolidate WorkersRegistryDO services
nathanclevenger Jan 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .beads/daemon-error
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Error: Multiple database files found in /Users/nathanclevenger/projects/workers/.beads:
- beads.db
- issues.db

Beads requires a single canonical database: beads.db
Run 'bd init' to migrate legacy databases or manually remove old databases
Or run 'bd doctor' for more diagnostics
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local error log file accidentally committed to repository

Low Severity

The .beads/daemon-error file appears to be a local runtime error log that was accidentally committed. It contains a developer's local machine path (/Users/nathanclevenger/projects/workers/.beads) and debugging output about database configuration issues. This file is unrelated to the PR's stated purpose of transforming README files and exposes local development environment details that shouldn't be in source control.

Fix in Cursor Fix in Web

2,887 changes: 1,469 additions & 1,418 deletions .beads/issues.jsonl

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .beads/last-touched
Original file line number Diff line number Diff line change
@@ -1 +1 @@
research-zknk
workers-1aybd
32 changes: 32 additions & 0 deletions .claude/hooks/session-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# Session start hook for Claude Code web
# Installs beads (bd) issue tracker in fresh VM environments

# Check if bd is already available
if command -v bd &> /dev/null; then
echo "bd is already installed"
bd version
else
echo "Installing bd (beads issue tracker)..."
npm install -g @beads/bd 2>/dev/null

# Fallback to Go if npm fails
if ! command -v bd &> /dev/null; then
if command -v go &> /dev/null; then
echo "npm install failed, trying Go..."
go install github.com/steveyegge/beads/cmd/bd@latest
export PATH="$PATH:$HOME/go/bin"
fi
fi
fi

# Initialize beads if not already initialized
if [ -d .beads ]; then
echo "Beads database found"
bd prime 2>/dev/null || true
else
echo "No .beads directory found - run 'bd init' to initialize"
fi

echo "bd is ready! Use 'bd ready' to see available work."
exit 0
13 changes: 13 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,18 @@
"superpowers@superpowers-marketplace": true,
"typescript-lsp@claude-plugins-official": true,
"agent-sdk-dev@claude-code-plugins": true
},
"hooks": {
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "./.claude/hooks/session-start.sh"
}
]
}
]
}
}
2 changes: 1 addition & 1 deletion .claude/skills/workers-do.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ When using `dotdo/rpc`, use these conventional binding names:
- `this.env.ESBUILD` - Build/transform
- `this.env.MDX` - MDX compilation
- `this.env.STRIPE` - Stripe operations
- `this.env.WORKOS` - WorkOS/OAuth
- `this.env.ORG` - Auth for AI and Humans (id.org.ai / WorkOS)
- `this.env.CLOUDFLARE` - Cloudflare API

## Folder Structure
Expand Down
47 changes: 47 additions & 0 deletions .dev.vars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# .dev.vars.example - Local Development Secrets Template
# Copy this file to .dev.vars and fill in your values
# DO NOT COMMIT .dev.vars TO GIT

# =============================================================================
# CLOUDFLARE
# =============================================================================
# Get from: https://dash.cloudflare.com/profile/api-tokens
CLOUDFLARE_API_TOKEN=
CLOUDFLARE_ACCOUNT_ID=

# =============================================================================
# STRIPE (payments.do)
# =============================================================================
# Get from: https://dashboard.stripe.com/apikeys
STRIPE_SECRET_KEY=sk_test_
STRIPE_PUBLISHABLE_KEY=pk_test_
# Get from: https://dashboard.stripe.com/webhooks (create endpoint first)
STRIPE_WEBHOOK_SECRET=whsec_

# =============================================================================
# WORKOS (org.ai)
# =============================================================================
# Get from: https://dashboard.workos.com/api-keys
WORKOS_API_KEY=sk_test_
WORKOS_CLIENT_ID=client_

# =============================================================================
# LLM PROVIDERS (llm.do)
# =============================================================================
# Get from: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-

# Get from: https://console.anthropic.com/settings/keys
ANTHROPIC_API_KEY=sk-ant-

# =============================================================================
# AUTHENTICATION
# =============================================================================
# Generate with: openssl rand -hex 32
JWT_SECRET=
AUTH_SECRET=

# =============================================================================
# ENVIRONMENT
# =============================================================================
ENVIRONMENT=development
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@
[submodule "rewrites/fsx"]
path = rewrites/fsx
url = https://github.com/dot-do/fsx.git
[submodule "rewrites/bashx"]
path = rewrites/bashx
url = https://github.com/dot-do/bashx.git
187 changes: 176 additions & 11 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ this.env.JOSE // JWT operations
this.env.ESBUILD // Build/transform
this.env.MDX // MDX compilation
this.env.STRIPE // Stripe operations
this.env.WORKOS // WorkOS/OAuth
this.env.ORG // Auth for AI and Humans (id.org.ai)
this.env.CLOUDFLARE // Cloudflare API
```

Expand Down Expand Up @@ -371,20 +371,185 @@ The CLI deploys to Workers for Platforms for multi-tenant hosting:

## primitives/ Submodule

Git submodule from `github.com/dot-org-ai/primitives.org.ai`:
Git submodule from `github.com/dot-org-ai/primitives.org.ai`. This is a **separate monorepo** containing AI primitives that are shared across projects.

### Structure

```
primitives/
├── packages/ # 19 npm packages (AI primitives)
│ ├── ai-functions/ # Core AI function primitives (AI(), ai(), ai.do(), etc.)
│ ├── ai-database/ # AI-powered database interface (DB(), db.list(), etc.)
│ ├── ai-workflows/ # Event-driven workflows (Workflow(), on(), every())
│ ├── ai-providers/ # LLM provider interfaces
│ ├── ai-experiments/ # A/B testing & experiments
│ ├── ai-evaluate/ # Eval framework
│ ├── ai-tests/ # Test utilities
│ ├── ai-props/ # AI component props
│ ├── ai4/ # AI SDK v4 compatibility
│ ├── autonomous-agents/ # Agent(), Role(), Team()
│ ├── business-as-code/ # Business(), Vision(), Goals()
│ ├── digital-workers/ # Role(), Team(), Goals()
│ ├── digital-products/ # Product(), App(), API(), Site()
│ ├── digital-tools/ # Tool interface & registry
│ ├── digital-tasks/ # Task = Function + metadata, queues
│ ├── human-in-the-loop/ # Human(), approve(), ask()
│ ├── language-models/ # Model selection & routing
│ ├── services-as-software/ # Service(), deliver(), subscribe()
│ └── config/ # Shared ESLint/TypeScript config
├── types/ # primitives.org.ai - comprehensive type definitions
│ ├── core/ # Thing, Noun, Verb, Event, Action, Domain
│ ├── org/ # Database, Function, Goal, Plan, Workflow
│ ├── app/ # App, API, CLI, Dashboard, SDK
│ ├── business/ # Business, Agent, Human
│ ├── product/ # Product, Feature, Epic, Story, Bug
│ ├── service/ # Service, SaaS
│ ├── finance/ # Account, Transaction, Invoice
│ ├── hr/ # Employee, Department, Performance
│ ├── sales/ # Lead, Opportunity, Pipeline
│ ├── ops/ # Inventory, Warehouse, Fulfillment
│ ├── legal/ # Contract, Compliance, Audit
│ ├── marketing/ # Campaign, Audience, Content
│ ├── support/ # Ticket, SLA, KnowledgeBase
│ ├── auth/ # User, Session, Role, Permission
│ ├── collab/ # Message, Channel, Meeting
│ ├── analytics/ # Metric, Dashboard, Report
│ ├── equity/ # Investor, Share, CapTable
│ ├── engineering/ # Sprint, Release, Deployment
│ └── governance/ # Board, Advisor, Founder
├── content/ # MDX documentation content (26 items)
│ ├── function/ # Function documentation
│ ├── database/ # Database documentation
│ ├── workflow/ # Workflow documentation
│ └── ... # Domain-specific content
├── examples/ # Real-world business examples (12 examples)
│ ├── saas/ # B2B SaaS analytics (CloudMetrics)
│ ├── api-business/ # Developer API platform (APIHub)
│ ├── directory/ # Software tools directory (TechDirectory)
│ ├── marketplace/ # Freelance marketplace (TalentHub)
│ ├── startup-studio/ # Venture builder (VentureForge)
│ └── vc-firm/ # Enterprise VC (Catalyst Ventures)
├── site/ # Fumadocs documentation site (Next.js)
│ ├── app/ # Next.js app router
│ ├── content/ # Site-specific content
│ └── lib/ # Site utilities
├── tools/ # Git submodule (tools.org.ai)
├── pnpm-workspace.yaml # Workspace: packages/*, examples, site
├── turbo.json # Turborepo build config
└── package.json # Root package (private: true)
```
primitives/packages/
├── ai-database/ # Database interfaces
├── ai-functions/ # Function interfaces
├── ai-workflows/ # Workflow interfaces
├── ai-providers/ # Provider interfaces
├── digital-workers/ # Worker interfaces
├── autonomous-agents/ # Agent interfaces
└── ... # 19 total interface packages

### Relationship with workers.do

The primitives submodule integrates with workers.do in three ways:

#### 1. Workspace Integration

The root `pnpm-workspace.yaml` includes primitives packages:

```yaml
packages:
- 'primitives/packages/*' # All 19 primitive packages
```

This means all primitives packages are part of the workers.do workspace and can be referenced with `workspace:*`:

```json
// primitives/packages/ai-database/package.json
{
"dependencies": {
"ai-functions": "workspace:*",
"rpc.do": "workspace:*"
}
}
```

#### 2. Type Re-exports

The `packages/types/` directory in workers.do re-exports types from primitives:

```typescript
// packages/types/ai.ts
export type {
AIFunctionDefinition,
AIGenerateOptions,
AIClient,
// ... 30+ types
} from 'ai-functions'

// packages/types/database.ts
export type {
ThingFlat, ThingExpanded,
DBClient, DBClientExtended,
// ... 50+ types
} from 'ai-database'
```

This provides:
- Centralized type management in `@dotdo/types`
- RPC-enhanced versions (e.g., `RpcAIClient` with pipelining)
- Platform-specific extensions

#### 3. Package Naming

| primitives package | npm name | Purpose |
|--------------------|----------|---------|
| `ai-functions` | `ai-functions` | Core AI primitives |
| `ai-database` | `ai-database` | Database interfaces |
| `ai-workflows` | `ai-workflows` | Workflow definitions |
| `types/` | `primitives.org.ai` | Comprehensive business types |

### Using Primitives

**In workers.do packages:**
```typescript
// Direct import from primitives package
import { AI, ai } from 'ai-functions'
import { DB, db } from 'ai-database'
import { Workflow, on } from 'ai-workflows'

// Or via @dotdo/types for platform integration
import type { RpcAIClient, RpcPromise } from '@dotdo/types'
```

**In external projects (via npm):**
```typescript
// Install published packages
import { AI } from 'ai-functions'
import { DB } from 'ai-database'
import type { Thing, Action } from 'primitives.org.ai'
import type { Employee } from 'primitives.org.ai/hr'
```

### Why a Submodule?

1. **Shared Core** - Primitives define platform-agnostic AI interfaces usable across projects
2. **Independent Versioning** - primitives.org.ai has its own release cycle and changelogs
3. **Documentation Site** - The `site/` folder powers https://primitives.org.ai
4. **Business-as-Code** - The `types/` package provides comprehensive business domain modeling
5. **Examples** - Real-world business templates demonstrate patterns

### Key Dependencies

Primitives packages reference workers.do packages via workspace:

```
ai-functions ──► rpc.do (workspace:*)
──► language-models (workspace:^)
──► ai-providers (workspace:^)

ai-database ──► ai-functions (workspace:*)
──► rpc.do (workspace:*)
```

These TypeScript interfaces define contracts that `dotdo` and workers implement.
This creates a bidirectional relationship where:
- Primitives provide **interfaces and implementations**
- workers.do provides **RPC transport** (`rpc.do`) and **platform bindings**

## Build System

Expand Down
17 changes: 17 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,22 @@ export const myworkflow = Workflow({
- `wrangler` - Cloudflare CLI
- `typescript` - Type checking

## Secrets Management

For local development, copy `.dev.vars.example` to `.dev.vars` and fill in your values:

```bash
cp .dev.vars.example .dev.vars
```

For production, use `wrangler secret put`:

```bash
wrangler secret put STRIPE_SECRET_KEY --env production
```

CI/CD uses GitHub Secrets with the `cloudflare/wrangler-action`. See `docs/SECRETS-MANAGEMENT.md` for full documentation.

## Beads Issue Tracking

This project uses Beads for issue tracking:
Expand All @@ -380,6 +396,7 @@ bd sync --from-main # Sync with main branch
- `teams/README.md` - Teams documentation
- `workflows/README.md` - Workflows documentation
- `ARCHITECTURE.md` - Technical deep-dive
- `docs/SECRETS-MANAGEMENT.md` - Secrets and environment variables

## The Hero

Expand Down
Loading