OPENPAUL OVERVIEW

OpenPAUL Overview

Plan-Apply-Unify Loop — Structured AI-assisted development for OpenCode.

What is OpenPAUL?

OpenPAUL gives your AI assistant structured workflow discipline. Instead of ad-hoc coding sessions that lose context and forget decisions, you follow a loop that ensures every unit of work is planned, executed, and closed properly.

The Loop

┌─────────────────────────────────────┐
│  PLAN ──▶ APPLY ──▶ UNIFY          │
│                                     │
│  Define    Execute    Reconcile     │
│  work      tasks      & close       │
└─────────────────────────────────────┘

PLAN

Create an executable plan with:

APPLY

Execute the approved plan:

UNIFY

Close the loop (required!):

Never skip UNIFY. Every plan needs closure.

How It Works

You: I want to add user authentication
   │
   ▼
/openpaul:plan
   │
   ▼
OpenPAUL generates PLAN.json with:
- Objective
- Acceptance Criteria (Given/When/Then)
- Tasks (files, actions, verify, done)
- Boundaries (DO NOT CHANGE sections)
   │
   ▼
You review and approve
   │
   ▼
/openpaul:apply
   │
   ▼
Tasks execute sequentially with verification
   │
   ▼
/openpaul:unify
   │
   ▼
SUMMARY.json created, loop state updated
Decisions logged for future sessions

Core Concepts

State Management

Loop state JSON tracks:

If you maintain a human-readable STATE.md, OpenPAUL updates it when present.

Acceptance-Driven Development

Acceptance criteria are first-class citizens:

  1. AC defined before tasks — Know what "done" means
  2. Tasks reference AC — Every task links to AC-1, AC-2, etc.
  3. Verification required — Every task needs a verify step
  4. BDD format — Given/When/Then for testability

In-Session Context

OpenPAUL minimizes subagents for development work:

When OpenPAUL does use subagents:

For implementation, OpenPAUL keeps everything in-session.

File Structure

.openpaul/
├── state.json           # Project registry (npx openpaul)
├── model-config.json    # Model configuration (/openpaul:init)
├── state-phase-N.json   # Loop state per phase (/openpaul:init)
├── config.md            # Optional integrations
├── SPECIAL-FLOWS.md     # Optional skill requirements
├── HANDOFF.md           # Session handoff (/openpaul:pause)
└── phases/
    ├── 1-01-PLAN.json
    ├── 1-01-PLAN.md
    └── 1-01-SUMMARY.json

Quick Examples

Initialize a Project

npx openpaul

Create a Plan

/openpaul:plan

OpenPAUL prompts you to describe what you want to build, then generates a structured PLAN.json.

Execute the Plan

/openpaul:apply

Tasks execute sequentially with verification at each step.

Close the Loop

/openpaul:unify

Creates SUMMARY.json, updates loop state, records decisions.

Resume After Break

/openpaul:resume

Reads loop state and suggests exactly ONE next action.

With OpenCARL

For the best experience, use OpenPAUL with OpenCARL — a dynamic rule injection system:

# Initialize both
npx openpaul
npx opencarl --local

OpenCARL auto-loads OpenPAUL-specific rules when it detects .openpaul/ directory: