npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-globex

v0.1.3

Published

PRD interviews with a Ralph/Wiggum execution loop

Readme


What It Is

Globex is a CLI + TUI for turning a rough idea into a validated spec and then executing it with an agentic loop.

  • Generates research.md, plan.md, and features.json
  • Requires human approval at each spec phase
  • Runs an implementation loop with independent validation

Why It’s Useful

  • Converts vague ideas into concrete, reviewable artifacts
  • Forces alignment before code changes begin
  • Keeps execution iterative and accountable

Philosophy

"Human leverage is highest at spec level, lowest at implementation."

Front-load human validation into research and planning. Execution runs autonomously.

Named after Hank Scorpio's company. The "Ralph loop" is named after Ralph Wiggum—persistent iteration despite setbacks.

Based on:

Disclaimer

Globex is an independent project and not affiliated with or endorsed by The Simpsons, Fox, or Disney. Names and likenesses are used for humor; all trademarks belong to their respective owners.

Features

  • Standalone CLI — Run globex from any project directory
  • TUI interface — Real-time progress display with OpenTUI
  • @ file references — Autocomplete to attach files to your project description
  • OpenCode SDK integration — Spawns sessions for each agent
  • Phase-based workflow — Research, plan, features, execute
  • Coach/player pattern — Ralph implements, Wiggum validates

Screenshot


Flow

flowchart TD
  Research["Research"] --> ResearchInterview["Interview (approve)"]
  ResearchInterview --> Plan["Plan"]
  Plan --> PlanInterview["Interview (approve)"]
  PlanInterview --> Features["Features"]
  Features --> Confirm["Confirm (approve)"]
  Confirm --> Ralph

  Research -.-> ResearchArtifact["research.md"]
  Plan -.-> PlanArtifact["plan.md"]
  Features -.-> FeaturesArtifact["features.json"]

  subgraph Execute["Execute (Ralph Loop)"]
    Ralph["Ralph (implement)"] --> Wiggum["Wiggum (validate)"] --> Ralph
    Ralph -.-> DoneMarker[".globex-done"]
    Wiggum -.-> ApprovedMarker[".globex-approved"]
    Wiggum -.-> RejectedMarker[".globex-rejected"]
  end

Each phase requires human approval before proceeding.


Installation

Via npm

npm install -g opencode-globex

From source

git clone https://github.com/lleewwiiss/opencode-globex.git
cd globex
bun install
bun run build
bun link

This makes the globex command available globally.


Usage

Initialize a new project

globex init "Add dark mode support"

Default model: openai/gpt-5.2-codex (variant high).

Resume a project

globex                       # Resume active project
globex --project my-project  # Run specific project

Manage projects

globex status
globex switch my-project
globex abandon my-project --force

Worktrees

globex workspace list
globex workspace cleanup

Options

globex --help
globex --model anthropic/claude-sonnet-4

Ralph Loop

Coach/player pattern with two agents per iteration:

  1. Ralph (player) — Implements ONE feature, writes .globex-done in project workdir
  2. Wiggum (coach) — Validates implementation against acceptance criteria
    • Writes .globex-approved on success
    • Writes .globex-rejected with JSON reasons on failure
  3. On rejection, Ralph retries with feedback in next iteration
  4. Fresh context between iterations (stateless execution)

Loop continues until all features complete.

Feature Sizing

Features sized for ~50% of agent context window:

| Constraint | Limit | |:-----------|:------| | Time | 30-60 min | | Files | 10-20 max | | Lines | ~500 max | | Dependencies | 0-2 features |

Feature States

| State | Description | |:------|:------------| | passes: false | Not yet implemented | | passes: true | Implemented and verified | | blocked: true | Cannot progress (skipped by loop) |


Project Structure

globex/
├── cli/
│   ├── bin/
│   │   └── globex.ts          # CLI entry point (yargs)
│   ├── src/
│   │   ├── index.ts           # Main entry, TUI startup
│   │   ├── app.tsx            # TUI application (OpenTUI/Solid)
│   │   ├── loop/
│   │   │   ├── ralph.ts       # Ralph loop executor
│   │   │   └── signals.ts     # File marker detection
│   │   ├── phases/
│   │   │   ├── engine.ts      # Phase execution engine
│   │   │   └── approval.ts    # Approval handling
│   │   ├── agents/
│   │   │   ├── prompts.ts     # Prompt loader
│   │   │   └── prompts/       # Prompt markdown
│   │   ├── opencode/
│   │   │   ├── server.ts      # OpenCode server management
│   │   │   ├── session.ts     # Session handling
│   │   │   └── events.ts      # Event subscription
│   │   ├── state/
│   │   │   ├── types.ts       # TypeScript types
│   │   │   ├── schema.ts      # Effect Schema definitions
│   │   │   └── persistence.ts # State CRUD
│   │   ├── features/
│   │   │   └── manager.ts     # Feature tracking
│   │   ├── artifacts/
│   │   │   ├── save.ts        # Artifact persistence
│   │   │   └── validators.ts  # Citation validation
│   │   ├── components/        # TUI components
│   │   ├── config.ts          # Configuration loading
│   │   └── git.ts             # Git operations
│   └── tests/                 # Test files
├── .globex/                   # Runtime state (gitignored)
├── package.json
└── tsconfig.json

State Files

.globex/
├── config.json             # CLI configuration
└── projects/{projectId}/
    ├── state.json          # Phase, approvals, execution state
    ├── research.md         # Research findings
    ├── plan.md             # Implementation plan
    ├── features.json       # Feature list with pass/fail status
    └── progress.md         # Current progress

Development

bun run check    # lint + build + test
bun run lint     # oxlint cli/src/
bun run build    # tsc
bun test         # all tests

Acknowledgements

OpenCode

Globex uses the OpenCode SDK for agent sessions.

opencode-ralph

Reference implementation for a Ralph-style loop.

Geoffrey Huntley's Ralph Driven Development

Original write-up of the Ralph loop concept.


License

MIT