OpenShip

Self-reviewed, CI-green, policy-checked pull requests on any LLM — automatically inside GitHub Actions, zero external server, humans always hold the merge button

OpenShip turns every GitHub pull request into a self-reviewed, CI-green, policy-checked PR — on any LLM or local Ollama — while you keep the merge button.

Diagram

📥 Pull request

📝 Pillar 1
Inline Self-Review

🛠 Pillar 2
PR Steward

📋 Pillar 3
Declarative Approvals

✅ You merge

Quick Start

  1. Install
    bash
    pip install praisonai-code
  2. Scaffold the workflow and sync your LLM secret
    bash
    praisonai-code ship init --github

    This writes .github/workflows/openship.yml, .praisonai/approvals.yml, and REVIEW.md, then syncs your detected LLM API key and OPENSHIP_MODEL to GitHub.

    !praisonai-code ship init readiness output

  3. Commit and push to main
    bash
    git add .github/workflows/openship.yml .praisonai/approvals.yml
    if [ -f REVIEW.md ]; then git add REVIEW.md; fi   # skipped by init if .praisonai/REVIEW.md exists
    git commit -m "chore: enable OpenShip" && git push

Prefer Python? Ship the current branch as a self-reviewed draft PR in one call:

python
from praisonai_code.ship import ship

result = ship(message="fix: handle an empty input list", review=True, post_review=True)
print(result.pr_url, result.severity, len(result.findings))

Push → Full Merge

Everything below happens automatically the next time you push a feature branch and open a PR.

  1. Push a feature branch — GitHub Actions auto-triggers

    Your Actions tab runs your CI alongside OpenShip (Review, Steward & Policy).

    !GitHub Actions launching CI and OpenShip

  2. Pillar 1 inline review + Pillar 3 live approvals table

    Pillar 1 reads REVIEW.md from origin/main and posts typed findings (important, nit, pre_existing) on the exact diff line. Pillar 3 evaluates .praisonai/approvals.yml and upserts one live status table plus the openship/approvals check.

    !Pillar 1 inline review finding

    !Pillar 3 live approvals table

  3. Pillar 2 PR Steward auto-fixes red CI

    When CI fails, PR Steward reads the failing logs, pushes a fix commit to your branch, and posts a one-line git revert <sha> so you stay in control.

    !PR Steward fixing failing CI with revert command

  4. PR Steward resolves inline review threads

    PR Steward fixes the flagged code and replies directly inside the original inline thread.

    !PR Steward replying inside the inline thread

  5. You mark Ready and click Merge

    OpenShip never merges or approves. Flip the PR from Draft → Open and click Merge pull request.

    !Human clicks Merge pull request

    !PR merged into main

Diagram
PR StewardOpenShip WorkflowGitHubYouPR StewardOpenShip WorkflowGitHubYougit push + open PRpull_request eventInline review findings (Pillar 1)Approvals table + openship/approvals check (Pillar 3)CI failed (workflow_run)Fix commit + git revert hint (Pillar 2)Reply in inline threadDraft → Open, click Merge

Three Pillars at a Glance

Diagram

Pillar 3 · Declarative Approvals

📋 .praisonai/approvals.yml

📊 Live status table

✅ openship/approvals check

Pillar 2 · PR Steward

🔴 Red CI

🛠 Auto-fix commit

💬 Open thread

↩️ GraphQL reply

Pillar 1 · Inline Self-Review

📝 REVIEW.md from origin/main

🔍 Typed findings

💬 Inline diff comments

PillarTriggerOutputCommit check
1 · Inline Self-ReviewPR opened/updated, @praisonai reviewInline diff findings (important / nit / pre_existing)openship/review
2 · PR StewardFailed CI (workflow_run), conflicts, review threads, @praisonai directivesFix commits, thread replies, git revert hint—
3 · Declarative ApprovalsPR opened/updated, reviews submittedLive status table (observe / enforce)openship/approvals

PR Comment Controls

Control OpenShip from any pull request comment, at any time.

Comment on PRWhat OpenShip does
@praisonai reviewRe-runs Pillar 1 inline self-review on the latest diff
@praisonai stewardTriggers a fresh PR Steward pass (checks, conflicts, threads)
@praisonai <instruction>Runs PR Steward to apply your requested change and push a commit
@praisonai stop (or label openship-stop)Pauses automated OpenShip runs on that PR
@praisonai resumeResumes PR Steward and clears circuit-breaker pause

Pick Your Surface

OpenShip ships inside praisonai-code and runs wherever you work.

Diagram
graph TD
    Q{Where do you work?}
    Q -->|On GitHub, team repo| A[GitHub Actions — zero server]
    Q -->|Local terminal / any CI| B[Terminal & Headless CI]
    Q -->|Prefer a visual UI| C[Visual Web UI]
    A --> AC[praisonai-code ship init --github → git push]
    B --> BC[praisonai-code ship check && ship --dry-run]
    C --> CC[pip install 'praisonai-code[ui]' && ship ui]
    classDef q fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef opt fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef cmd fill:#10B981,stroke:#7C90A0,color:#fff
    class Q q
    class A,B,C opt
    class AC,BC,CC cmd
SurfaceSetupFirst command
GitHub Actionspraisonai-code ship init --githubgit commit && git push
Terminal & any CIpip install praisonai-codepraisonai-code ship check && praisonai-code ship --dry-run
Visual Web UIpip install "praisonai-code[ui]"praisonai-code ship ui (opens http://127.0.0.1:8765)

Optional Power-Ups

Auto-re-run CI after Steward pushes a fix

GitHub’s built-in GITHUB_TOKEN cannot trigger another workflow. Add a repository secret named OPENSHIP_GH_TOKEN (a repo Personal Access Token) so your CI re-runs on Steward’s fix commits.

Custom CI workflow names

OpenShip listens for failures from workflows named CI, Tests, or Smoke. Add your own names to on.workflow_run.workflows in .github/workflows/openship.yml.

Skip draft PRs

Set the repository variable OPENSHIP_SKIP_DRAFTS=true to wait until you click Ready for review.

Review effort tiers

quick, standard, and deep map to low, medium, and high. Canonical efforts low, medium, high, xhigh, and max also work. Set the default with the OPENSHIP_EFFORT repository variable (defaults to high) or pass --effort to praisonai-code ship init --github.


Safety Guarantees

Hard before_tool guard

Blocks gh pr merge (including --auto), gh pr review --approve, gh api merge/approve calls, and git push --force* at the tool boundary. OpenShip never merges, approves, or force-pushes.

Draft by default

Every PR opens as a draft on your feature branch. Running ship on main (or a fork) is refused before any commit or push.

Secret-file refusal

Refuses to commit .env files, private keys, or other secret paths.

3-attempt circuit breaker

PR Steward caps retries per failing check, conflict, or review thread so an unfixable issue never loops.

Base-branch policy loading

.praisonai/approvals.yml and REVIEW.md are read from origin/<base>, so a PR cannot weaken its own rules.

Global kill switch

Set PRAISONAI_DISABLE_SHIP=1 (or [ship] enabled = false in config) to disable ship and steward completely.


Related