Documentation

AI Development Workflow

How to build on Motoko Base with AI agents — from idea to review using OpenSpec and Cursor.

Open inChatGPT (opens in a new tab)Claude (opens in a new tab)Cursor (opens in a new tab)How to build on Motoko Base with AI agents — from idea to review using OpenSpec and Cursor.

Motoko Base ships with a spec-driven AI workflow. Instead of asking an agent to rewrite the app in one shot, you plan in OpenSpec artifacts, review the plan, then implement task-by-task. Changes stay scoped, reviewable, and aligned with starter architecture.

This is one of the starter's selling points: you get production patterns and the tooling to extend them safely with AI.

The workflow

Idea
 ↓
OpenSpec (optional explore)
 ↓
Proposal
 ↓
Design
 ↓
Tasks
 ↓
Cursor / AI Agent (apply)
 ↓
Implementation
 ↓
Review → archive
PhaseWhat you doOutput
IdeaDescribe the feature or fix in chatRough goal
Explore (optional)/opsx-explore — trade-offs, codebase mappingClarified scope, no code
Proposal/opsx-propose — what & why, non-goalsproposal.md
DesignCreated with propose — how it fits the starterdesign.md
TasksCheckbox steps for the agenttasks.md
Apply/opsx-apply — implement tasks one by oneCode changes
ReviewRead the diff, run checks, test manuallyApproved or revise
Archive/opsx-archive — sync specs, move change to archiveUpdated openspec/specs/

Planning and implementation are separate steps. Propose does not write product code. Apply waits until you explicitly start it.

When to use the full workflow

SituationUse OpenSpec?
New feature or demoYes
Multi-file refactorYes
Cross-cutting change (auth, billing, schema)Yes
Typo, copy tweak, one-line bugNo — normal chat edit

Example session

/opsx-explore Should team invites be a demo or core feature?

/opsx-propose Add team invites demo with ownership checks

# Review proposal.md, design.md, tasks.md — edit or /opsx-update if needed

/opsx-apply

pnpm lint && pnpm typecheck && pnpm test && pnpm build

/opsx-archive

Prerequisites

  1. OpenSpec CLI installed globally (npm install -g @fission-ai/openspec@latest)
  2. Cursor (or another agent that loads .agents/skills/)
  3. Read AGENTS.md in the repo root — architecture rules agents follow

The repo is already initialized — no openspec init needed.

After implementation

Run the starter checks before merging:

pnpm lint
pnpm typecheck
pnpm test
pnpm build

Point the agent at an existing feature (e.g. src/features/links/) as a template for new work.


OpenSpec — Artifacts, commands, apply, and archive in detail.

Cursor / AI Agents — AGENTS.md, skills, and how to prompt within Motoko architecture.