openpaul
    Preparing search index...

    openpaul

    OpenPAUL

    Plan-Apply-Unify Loop โ€” Structured AI-assisted development for OpenCode.

    npm version License GitHub stars Documentation


    npx openpaul
    

    Works on Mac, Windows, and Linux.


    "Quality over speed-for-speed's-sake. In-session context over subagent sprawl."


    ๐Ÿ“– Documentation ยท Why OpenPAUL ยท Getting Started ยท The Loop ยท Commands


    OpenPAUL is an OpenCode adaptation of the Plan-Apply-Unify Loop project, originally created by Chris Kahler for Claude Code.

    I build with Claude Code every day. It's incredibly powerful โ€” when you give it the right context.

    The problem? Context rot. As your session fills up, quality degrades. Subagents spawn with fresh context but return ~70% quality work that needs cleanup. Plans get created but never closed. State drifts. You end up debugging AI output instead of shipping features.

    OpenPAUL fixes this with three principles:

    1. Loop integrity โ€” Every plan closes with UNIFY. No orphan plans. UNIFY reconciles what was planned vs what happened, updates state, logs decisions. This is the heartbeat.

    2. In-session context โ€” Subagents are expensive and produce lower quality for implementation work. OpenPAUL keeps development in-session with properly managed context. Subagents are reserved for discovery and research โ€” their job IS to gather context.

    3. Acceptance-driven development โ€” Acceptance criteria are first-class citizens, not afterthoughts. Define done before starting. Every task references its AC. BDD format: Given [precondition] / When [action] / Then [outcome].

    The complexity is in the system, not your workflow. Behind the scenes: structured state management, XML task formatting, loop enforcement. What you see: a few commands that keep you on track.


    AI-assisted developers who want structure without bureaucracy.

    You describe what you want, OpenCode builds it, and OpenPAUL ensures:

    • Plans have clear acceptance criteria
    • Execution stays bounded
    • Every unit of work gets closed properly
    • State persists across sessions
    • Decisions are logged for future reference

    No sprint ceremonies. No story points. No enterprise theater. Just a system that keeps AI-assisted development reliable.


    This makes openpaul available in every OpenCode session on your machine.

    1. Run OpenCode once so it creates its config directory.
    2. Open or create the global config file: ~/.config/opencode/opencode.json.
    3. Add openpaul under the npm plugins section:
    {
    "plugins": {
    "npm": [
    "openpaul"
    ]
    }
    }
    1. Restart OpenCode. On startup it will install npm plugins with Bun into ~/.cache/opencode/node_modules/ and load them.

    This limits openpaul to a specific project.

    1. In your project root, create or edit opencode.json:
    {
    "plugins": {
    "npm": [
    "openpaul"
    ]
    }
    }
    1. Start OpenCode from that project directory (or point it at the project root) so it picks up ./opencode.json.
    2. Restart OpenCode; it will read global config first, then project config, then plugin directories, and load all plugins it finds.

    Run /openpaul:help inside OpenCode to verify installation.


    For the best experience, use OpenPAUL with OpenCARL (github.com/KrisGray/opencarl) โ€” a dynamic rule injection system that enforces OpenPAUL workflow discipline automatically.

    // ~/.config/opencode/opencode.json
    {
    "plugins": {
    "npm": [
    "openpaul",
    "@krisgray/opencarl"
    ]
    }
    }
    YOU: I want to add a dark mode toggle to my React app

    # OpenCARL auto-loads OpenPAUL rules when it detects .openpaul/

    YOU: /openpaul:init
    OpenPAUL: โœ“ Created .openpaul/ with PROJECT.md, ROADMAP.md, STATE.md

    YOU: /openpaul:plan
    OpenPAUL: Describe what you're building...

    YOU: Dark mode toggle that:
    - Remembers preference in localStorage
    - Defaults to system preference
    - Toggles without page reload

    OpenPAUL: Created PLAN.md with:
    โœ“ Objective: Add persistent dark mode toggle
    โœ“ AC-1: Given user visits, When no preference, Then use system
    โœ“ AC-2: Given user clicks toggle, When in light, Then switch to dark
    โœ“ Task 1: Create ThemeContext
    โœ“ Task 2: Add CSS variables
    โœ“ Task 3: Create ThemeToggle component
    โœ“ Boundary: DO NOT change auth components

    YOU: Looks good. /openpaul:apply

    OpenPAUL:
    โœ“ Task 1: Created ThemeContext (verified: imports work)
    โœ“ Task 2: Added CSS variables (verified: themes render)
    โœ“ Task 3: Created ThemeToggle (verified: toggle works)

    YOU: /openpaul:unify

    OpenPAUL:
    โœ“ Created SUMMARY.md
    โœ“ Updated STATE.md
    โœ“ Recorded 3 decisions

    Done! Loop complete. State preserved for next session.
    Without OpenCARL With OpenCARL
    Manual workflow discipline Auto-enforced loop rules
    Easy to skip UNIFY Blocked from skipping
    Context bloat Rules load on-demand
    Inconsistent quality Consistent enforcement

    Here's a complete workflow example showing OpenPAUL in action:

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ YOU: I need to add user authentication to my app โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚
    โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ STEP 1: Initialize OpenPAUL โ”‚
    โ”‚ โ”‚
    โ”‚ /openpaul:init โ”‚
    โ”‚ โ”‚
    โ”‚ Creates: .openpaul/ directory with PROJECT.md, ROADMAP.md, โ”‚
    โ”‚ STATE.md, and phases/ folder โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚
    โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ STEP 2: Plan Your Work โ”‚
    โ”‚ โ”‚
    โ”‚ /openpaul:plan โ”‚
    โ”‚ โ”‚
    โ”‚ OpenPAUL prompts you to describe what you want to build, โ”‚
    โ”‚ then generates a structured PLAN.md with: โ”‚
    โ”‚ - Objective (what & why) โ”‚
    โ”‚ - Acceptance Criteria (Given/When/Then) โ”‚
    โ”‚ - Tasks with files, actions, verification steps โ”‚
    โ”‚ - Boundaries (what NOT to change) โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚
    โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ STEP 3: Review & Approve โ”‚
    โ”‚ โ”‚
    โ”‚ YOU: The plan looks good, let's do it โ”‚
    โ”‚ โ”‚
    โ”‚ (Or: "Actually, I also need password reset" โ†’ plan updated) โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚
    โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ STEP 4: Execute the Plan โ”‚
    โ”‚ โ”‚
    โ”‚ /openpaul:apply โ”‚
    โ”‚ โ”‚
    โ”‚ Tasks execute sequentially: โ”‚
    โ”‚ โœ“ Task 1: Create User model (verified: tests pass) โ”‚
    โ”‚ โœ“ Task 2: Add login endpoint (verified: curl returns 200) โ”‚
    โ”‚ โœ“ Task 3: Create login UI (verified: renders correctly) โ”‚
    โ”‚ โธ Task 4: Checkpoint โ€” Verify login flow manually? โ”‚
    โ”‚ โ”‚
    โ”‚ YOU: approved โ”‚
    โ”‚ โ”‚
    โ”‚ โœ“ Task 5: Add session management โ”‚
    โ”‚ โœ“ All tasks complete โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚
    โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ STEP 5: Close the Loop (REQUIRED!) โ”‚
    โ”‚ โ”‚
    โ”‚ /openpaul:unify โ”‚
    โ”‚ โ”‚
    โ”‚ Creates SUMMARY.md: โ”‚
    โ”‚ - What was built โ”‚
    โ”‚ - Plan vs actual comparison โ”‚
    โ”‚ - Decisions made โ”‚
    โ”‚ - Issues deferred โ”‚
    โ”‚ โ”‚
    โ”‚ Updates STATE.md with: โ”‚
    โ”‚ - Current position โ”‚
    โ”‚ - Accumulated decisions โ”‚
    โ”‚ - Next phase/plan โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚
    โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ STEP 6: Continue Development โ”‚
    โ”‚ โ”‚
    โ”‚ /openpaul:progress โ”‚
    โ”‚ โ”‚
    โ”‚ Shows: "Phase 1 complete. Next: Phase 2 - User Profile" โ”‚
    โ”‚ Suggests: ONE next action โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    YOU: /openpaul:plan

    OpenPAUL: What would you like to build?

    YOU: I need to add a dark mode toggle to my React app. It should:
    - Remember the user's preference in localStorage
    - Default to system preference on first visit
    - Toggle without page reload

    OpenPAUL: [Creates PLAN.md]

    ## Plan: Dark Mode Toggle

    ### Objective
    Add a persistent dark mode toggle with system preference detection

    ### Acceptance Criteria
    - **AC-1**: Given user visits app, When no preference stored, Then use system preference
    - **AC-2**: Given user clicks toggle, When in light mode, Then switch to dark and save
    - **AC-3**: Given user returns, When preference stored, Then apply saved preference

    ### Tasks
    1. Create ThemeContext with useLocalStorage hook
    2. Add CSS variables for dark/light themes
    3. Create ThemeToggle component
    4. Integrate into App.tsx

    ### Boundaries
    - DO NOT change: auth-related components, API routes

    YOU: Looks good. /openpaul:apply

    OpenPAUL: [Executes tasks one by one with verification...]

    YOU: /openpaul:unify

    OpenPAUL: [Creates SUMMARY.md, updates STATE.md]

    Done. Loop complete.

    Resume work after a break:

    [New session]

    YOU: /openpaul:resume

    OpenPAUL:
    ## Session Restored

    **Last Session:** 2024-01-15
    **Stopped at:** Phase 2, Plan 3 - User Profile
    **Status:** 2/4 tasks complete

    **What was built:**
    - Profile display component
    - Edit profile form

    **What's next:**
    Task 3: Add avatar upload
    File: src/components/AvatarUpload.tsx
    Action: Create component with drag-drop and crop preview

    **Suggested command:** /openpaul:apply .openpaul/phases/02-profile/02-03-PLAN.md

    OpenCARL (github.com/KrisGray/opencarl) is a dynamic rule injection system that loads rules based on context. Together, they create a powerful AI-assisted development experience.

    OpenPAUL OpenCARL
    Structured workflow (PLAN โ†’ APPLY โ†’ UNIFY) Dynamic rule injection
    Guides planning & execution Loads rules based on context
    Ensures loop closure Keeps context lean
    State persistence Preferences persistence

    The synergy: OpenCARL loads OpenPAUL-specific rules when you're working in an OpenPAUL project, enforcing workflow discipline without bloating every session.

    Add both to your opencode.json:

    // ~/.config/opencode/opencode.json (global)
    {
    "plugins": {
    "npm": [
    "openpaul",
    "@krisgray/opencarl"
    ]
    }
    }

    Or project-local:

    // ./opencode.json (project root)
    {
    "plugins": {
    "npm": [
    "openpaul",
    "@krisgray/opencarl"
    ]
    }
    }
    # 1. Initialize both systems
    /openpaul:init
    /opencarl setup

    # 2. OpenCARL detects .openpaul/ directory
    # โ†’ Automatically loads OpenPAUL-specific rules:
    # - "Loop enforcement (PLAN โ†’ APPLY โ†’ UNIFY)"
    # - "Boundary protection for DO NOT CHANGE sections"
    # - "Verification required for every task"

    # 3. Plan your work
    /openpaul:plan

    # OpenCARL injects planning rules:
    # - "Define acceptance criteria before tasks"
    # - "Every task needs files, action, verify, done"
    # - "Set boundaries โ€” what NOT to change"

    # 4. Execute the plan
    /openpaul:apply

    # OpenCARL injects execution rules:
    # - "Run tests after implementation changes"
    # - "Verify each task before moving on"
    # - "Log deviations from plan"

    # 5. Close the loop (required!)
    /openpaul:unify

    # OpenCARL injects closure rules:
    # - "Create SUMMARY.md documenting what was built"
    # - "Compare plan vs actual"
    # - "Record decisions for future sessions"
    YOU: /openpaul:plan

    OpenPAUL: Creates plan structure...
    OpenCARL: [Injects OpenPAUL + Development rules]
    โœ“ DEVELOPMENT_RULE_0: Code over explanation - show, don't tell
    โœ“ DEVELOPMENT_RULE_1: Prefer editing existing files over creating new
    โœ“ OPENPAUL_RULE_0: Loop enforcement - no skipping UNIFY
    โœ“ OPENPAUL_RULE_1: Every task needs verification

    YOU: [Describe the feature you want]

    OpenPAUL: Generates PLAN.md with:
    - Objective
    - Acceptance Criteria (Given/When/Then)
    - Tasks with verification steps
    - Boundaries

    YOU: /openpaul:apply

    OpenPAUL: Executes tasks sequentially...
    OpenCARL: [Injects execution rules + context tracking]
    โœ“ Running tests after changes
    โœ“ Verifying each task
    โœ“ Logging deviations

    [... work happens ...]

    OpenPAUL: Task complete. Checkpoint: Run tests?
    YOU: yes

    OpenPAUL: Tests pass. Next task...
    OpenCARL: [Context depleting โ†’ Injects fresh session rules]

    [... more work ...]

    YOU: /openpaul:unify

    OpenPAUL: Creates SUMMARY.md, updates STATE.md
    OpenCARL: [Injects closure rules]
    โœ“ Document what was built
    โœ“ Compare plan vs actual
    โœ“ Record decisions

    Done. Loop complete. State preserved for next session.

    When OpenCARL detects you're working in an OpenPAUL project:

    1. Loop Enforcement โ€” No skipping UNIFY. Every plan needs closure.
    2. Boundary Protection โ€” DO NOT CHANGE sections in plans are sacred.
    3. AC-First Development โ€” Acceptance criteria defined before tasks.
    4. Verification Requirements โ€” Every task needs a verify step.
    5. State Consistency โ€” STATE.md must reflect reality after each phase.

    These rules load automatically when you're in .openpaul/ context and disappear when you're not.


    If you have an existing project using .paul/ directory:

    1. Rename .paul/ to .openpaul/
    2. Update any hardcoded paths in your workflow

    OpenPAUL will automatically detect and use .openpaul/ for new files while still reading from .paul/ for backward compatibility.


    Every unit of work follows this cycle:

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ PLAN โ”€โ”€โ–ถ APPLY โ”€โ”€โ–ถ UNIFY โ”‚
    โ”‚ โ”‚
    โ”‚ Define Execute Reconcile โ”‚
    โ”‚ work tasks & close โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    Create an executable plan with:

    • Objective โ€” What you're building and why
    • Acceptance Criteria โ€” Given/When/Then definitions of done
    • Tasks โ€” Specific actions with files, verification, done criteria
    • Boundaries โ€” What NOT to change

    Execute the approved plan:

    • Tasks run sequentially
    • Each task has verification
    • Checkpoints pause for human input when needed
    • Deviations are logged

    Close the loop (required!):

    • Create SUMMARY.md documenting what was built
    • Compare plan vs actual
    • Record decisions and deferred issues
    • Update STATE.md

    Never skip UNIFY. Every plan needs closure. This is what separates structured development from chaos.


    OpenPAUL provides 26 commands organized by purpose. Run /openpaul:help for the complete reference.

    Command What it does
    /openpaul:init Initialize OpenPAUL in a project
    /openpaul:plan [phase] Create an executable plan
    /openpaul:apply [path] Execute an approved plan
    /openpaul:unify [path] Reconcile and close the loop
    /openpaul:help Show command reference
    /openpaul:status Show loop position (deprecated โ€” use progress)
    Command What it does
    /openpaul:pause [reason] Create handoff for session break
    /openpaul:resume [path] Restore context and continue
    /openpaul:progress [context] Smart status + ONE next action
    /openpaul:handoff [context] Generate comprehensive handoff
    Command What it does
    /openpaul:add-phase <desc> Append phase to roadmap
    /openpaul:remove-phase <N> Remove future phase
    Command What it does
    /openpaul:milestone <name> Create new milestone
    /openpaul:complete-milestone Archive and tag milestone
    /openpaul:discuss-milestone Articulate vision before starting
    Command What it does
    /openpaul:discuss <phase> Capture decisions before planning
    /openpaul:assumptions <phase> See Claude's intended approach
    /openpaul:discover <topic> Explore options before planning
    /openpaul:consider-issues Triage deferred issues
    Command What it does
    /openpaul:research <topic> Deploy research agents
    /openpaul:research-phase <N> Research unknowns for a phase
    Command What it does
    /openpaul:flows Configure skill requirements
    /openpaul:config View/modify OpenPAUL settings
    /openpaul:map-codebase Generate codebase overview
    Command What it does
    /openpaul:verify Guide manual acceptance testing
    /openpaul:plan-fix Plan fixes for UAT issues

    .openpaul/
    โ”œโ”€โ”€ PROJECT.md # Project context and requirements
    โ”œโ”€โ”€ ROADMAP.md # Phase breakdown and milestones
    โ”œโ”€โ”€ STATE.md # Loop position and session state
    โ”œโ”€โ”€ config.md # Optional integrations
    โ”œโ”€โ”€ SPECIAL-FLOWS.md # Optional skill requirements
    โ””โ”€โ”€ phases/
    โ”œโ”€โ”€ 01-foundation/
    โ”‚ โ”œโ”€โ”€ 01-01-PLAN.md
    โ”‚ โ””โ”€โ”€ 01-01-SUMMARY.md
    โ””โ”€โ”€ 02-features/
    โ”œโ”€โ”€ 02-01-PLAN.md
    โ””โ”€โ”€ 02-01-SUMMARY.md

    STATE.md tracks:

    • Current phase and plan
    • Loop position (PLAN/APPLY/UNIFY markers)
    • Session continuity (where you stopped, what's next)
    • Accumulated decisions
    • Blockers and deferred issues

    When you resume work, /openpaul:resume reads STATE.md and suggests exactly ONE next action. No decision fatigue.

    ---
    phase: 01-foundation
    plan: 01
    type: execute
    autonomous: true
    ---
    
    
    Goal, Purpose, Output
    
    
    
    @-references to relevant files
    
    
    
    
    ## AC-1: Feature Works
    
    Given [precondition]
    When [action]
    Then [outcome]
    
    
    
    
      Create login endpoint
      src/api/auth/login.ts
      Implementation details...
      curl command returns 200
      AC-1 satisfied
    
    
    
    
    ## DO NOT CHANGE
    - database/migrations/*
    - src/lib/auth.ts
    
    

    Every task has: files, action, verify, done. If you can't specify all four, the task is too vague.

    OpenPAUL has a companion: OpenCARL (Context Augmentation & Reinforcement Layer).

    OpenCARL is a dynamic rule injection system. Instead of bloating your context with static prompts, OpenCARL loads rules just-in-time based on what you're doing:

    Trigger Rules Loaded
    Working in .openpaul/ directory OpenPAUL domain activates
    Writing code DEVELOPMENT rules load
    Managing projects PROJECTS rules load

    OpenPAUL-specific rules OpenCARL enforces:

    • Loop enforcement (PLAN โ†’ APPLY โ†’ UNIFY โ€” no shortcuts)
    • Boundary protection (DO NOT CHANGE sections are real)
    • State consistency checks at phase transitions
    • Verification requirements for every task
    • Skill blocking (required skills must load before APPLY)

    The OpenPAUL domain contains 14 rules that govern structured AI development. They load when you're in an OpenPAUL project, disappear when you're not. Your context stays lean.

    Without OpenCARL: You'd need massive static prompts in every session. With OpenCARL: Rules activate when relevant, disappear when not.


    Acceptance criteria aren't afterthoughts โ€” they're the foundation:

    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

    Why OpenPAUL minimizes subagents for development work:

    Issue Impact
    Launch cost 2,000-3,000 tokens to spawn
    Context gathering Starts fresh, researches from scratch
    Resynthesis Results must be integrated back
    Quality gap ~70% compared to in-session work
    Rework Subagent output often needs cleanup

    When OpenPAUL does use subagents:

    • Discovery/exploration โ€” Codebase mapping, parallel exploration
    • Research โ€” Web searches, documentation gathering

    For implementation, OpenPAUL keeps everything in-session with proper context management.

    The loop isn't optional:

    PLAN โ”€โ”€โ–ถ APPLY โ”€โ”€โ–ถ UNIFY
    โœ“ โœ“ โœ“ [Loop complete]
    • No orphan plans โ€” Every PLAN gets a SUMMARY
    • State reconciliation โ€” UNIFY catches drift
    • Decision logging โ€” Choices are recorded for future sessions

    OpenPAUL supports modular integrations configured in .openpaul/config.md:

    Integration Purpose
    SonarQube Code quality metrics and issues
    Future Linting, CI/CD, test runners

    For projects with specialized requirements, .openpaul/SPECIAL-FLOWS.md defines skills that must be loaded before execution:

    ## Required Skills
    
    | Skill            | Work Type     | Priority |
    | ---------------- | ------------- | -------- |
    | /frontend-design | UI components | required |
    | /revops-expert   | Landing pages | required |
    

    APPLY blocks until required skills are confirmed loaded.


    Commands not found after install?

    • Restart OpenCode to reload plugins
    • Verify openpaul is listed in your opencode.json plugins section

    Commands not working as expected?

    • Run /openpaul:help to verify installation
    • Check the plugin is installed in ~/.cache/opencode/node_modules/openpaul/

    Loop position seems wrong?

    • Check .openpaul/STATE.md for current state
    • Run /openpaul:progress for guided next action

    Resuming after a break?

    • Run /openpaul:resume โ€” it reads state and handoffs automatically

    Ad-hoc OpenPAUL
    No structure Explicit planning gates
    State drifts STATE.md tracks everything
    No closure Mandatory UNIFY
    Decisions lost Decisions logged

    OpenPAUL takes a different approach from GSD:

    Aspect GSD OpenPAUL
    Execution Parallel subagents In-session context
    Loop Optional closure Mandatory UNIFY
    Criteria Embedded in tasks First-class AC section
    Rules Static prompts CARL dynamic loading

    Same comprehensive coverage, different philosophy. OpenPAUL prioritizes quality over speed-for-speed's-sake. See OPENPAUL-VS-GSD.md for full comparison.

    Traditional OpenPAUL
    Documentation-first Execution-first
    Human-readable specs AI-executable prompts
    Separate from code Colocated in .openpaul/

    Plan-Apply-Unify Loop was originally created by Chris Kahler for Claude Code.

    OpenPAUL is an OpenCode adaptation, maintained by Kristian Gray.

    The original project can be found on Chris Kahler's GitHub profile.

    MIT License. See LICENSE for details.


    Kristian Gray โ€” OpenPAUL Maintainer

    Original Author โ€” Chris Kahler (Plan-Apply-Unify Loop creator)


    OpenCode is powerful. OpenPAUL makes it reliable.