Skip to content

Instantly share code, notes, and snippets.

@roninjin10
roninjin10 / smitherspy.ts
Last active January 21, 2026 14:16
Smithers
#!/usr/bin/env bun
/** @jsxImportSource smithers-orchestrator */
/**
* Build Smithers-Py E2E
*
* This workflow implements the smithers-py Python library based on the spec in issues/smithers-py.md
* Uses a Ralph loop to iteratively build each milestone:
* - M0: Core runtime skeleton (Plan IR, JSX runtime, XML serializer, state stores, tick loop)
* - M1: Runnable nodes + event handlers (Claude executor, PydanticAI integration)
* - M2: MCP server MVP (resources, tools, transports)
@roninjin10
roninjin10 / coverage.ralph.ts
Created January 20, 2026 03:29
coverage ralph
/**
* CoverageLoop - While-based loop for test coverage improvement
*/
import type { ReactNode } from 'react'
import { useRef } from 'react'
import { While, useWhileIteration } from '../../src/components/While.js'
import { useSmithers } from '../../src/components/SmithersProvider.js'
import { Claude } from '../../src/components/Claude.js'
import { useMount } from '../../src/reconciler/hooks.js'
@roninjin10
roninjin10 / sim.design.md
Created January 15, 2026 12:08
Simulation design doc

Fork Mode & Resimulation (Phase 1 - Live)

Status: ✅ Phase 1 Live - Core fork infrastructure and simulation features are implemented and functional. Phase 2+ (persistent sessions, Tevm Black) are planned.

For Phase 2+ specifications, see Fork Mode Engineering Spec.


Overview

@roninjin10
roninjin10 / ralph.sh
Created January 9, 2026 17:15
vibecoded ralph
#!/bin/bash
#
# Ralph Wiggum Autonomous Loop
#
# This script runs Claude Code in an infinite loop, feeding it the ralph wiggum
# prompt each iteration. The agent will autonomously progress through the
# implementation tasks, write reports, and create commits.
#
# Usage:
# ./scripts/ralph.sh
def ResearchAgent(props):
phase, set_phase = use_state("research")
sources, set_sources = use_state([])
analyses, set_analyses = use_state({})
if phase == "research":
def on_done(r):
set_sources(r["sources"])
set_phase("analyze")
@roninjin10
roninjin10 / prommcp.ts
Created December 29, 2025 19:51
vibe coded prom mcp
#!/usr/bin/env bun
/**
* Prometheus MCP Server
*
* Enables AI agents to query Prometheus metrics for debugging and observability.
* Provides tools to:
* - Query instant metrics
* - Query range metrics over time
* - List available metrics
* - Get service health status
@roninjin10
roninjin10 / prompt.example.md
Created December 29, 2025 09:18
Prompt example
@roninjin10
roninjin10 / greatprompt.md
Created December 24, 2025 07:11
Great prompt

Task: Route All Plue Traffic Through Cloudflare Edge

Objective

Refactor Plue's architecture so ALL traffic flows through Cloudflare:

  1. HTTP/API → Cloudflare Edge Worker (already exists, add SIWE auth)
  2. Git SSH → Cloudflare Spectrum (new)
  3. Origin Protection → mTLS with custom certificates (new)

After this change, the origin server will ONLY accept connections from Cloudflare.

@roninjin10
roninjin10 / workflowexample.py
Created December 23, 2025 08:31
workflow example
"""
AI-powered code review workflow with multiple focus areas.
Each focus runs an independent review pass with tool access to explore
the codebase and gather context before making judgments.
"""
from plue import workflow, pull_request
from plue.prompts import CodeReview
from plue.tools import readfile, grep, glob, websearch
@roninjin10
roninjin10 / mcpexample.ts
Created December 23, 2025 04:30
mcp server
#!/usr/bin/env bun
/**
* Prometheus MCP Server
*
* Enables AI agents to query Prometheus metrics for debugging and observability.
* Provides tools to:
* - Query instant metrics
* - Query range metrics over time
* - List available metrics
* - Get service health status