Skip to content

Instantly share code, notes, and snippets.

View bunlongheng's full-sized avatar
💭
🍔 Eat. 🛌 Sleep. 💻 Code --> ☕️🧑🏻‍💻

Bunlong Heng bunlongheng

💭
🍔 Eat. 🛌 Sleep. 💻 Code --> ☕️🧑🏻‍💻
View GitHub Profile
@bunlongheng
bunlongheng / page.tsx
Created April 10, 2026 15:48
Nexus Agent Wiki Page (Next.js React component)
"use client";
import { usePageMeta } from "@/lib/usePageMeta";
import { useEffect, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
import type { LucideProps } from "lucide-react";
import {
Flame, Palette, Zap, Leaf, ShieldCheck, Bot,
MousePointer, Database, Lock, FileText, LayoutDashboard,
BarChart3, Copy, Check, Brain, Stars,
@bunlongheng
bunlongheng / nexus-agents.json
Last active April 10, 2026 15:49
Nexus - 12 AI Agent System for Claude Code (config)
{
"name": "Nexus",
"description": "12 specialist AI agents. Each owns one concern. No overlap.",
"version": "1.0",
"author": "Bunlong Heng",
"agents": [
{ "id": 1, "name": "Snow", "role": "Orchestrator", "color": "#ffffff", "scope": "Final approval, full visibility, task assignment", "description": "Supreme commander. Full visibility across all agents, assigns tasks, owns the final approval gate." },
{ "id": 2, "name": "Blaze", "role": "Architecture", "color": "#ff3333", "scope": "System design, module boundaries, PR reviews", "description": "2nd in command. Owns system architecture, module boundaries, and PR reviews." },
{ "id": 3, "name": "Arrow", "role": "UX / QA", "color": "#ff66cc", "scope": "E2E tests, accessibility, responsiveness", "description": "User advocate. Checks every interactive element, flow, and edge case." },
{ "id": 4, "name": "Venus", "role": "UI / Branding", "color": "#ff8800", "scope": "Colors, typography, spacing, brand consistency", "description": "Visual ide
@bunlongheng
bunlongheng / cron_schedule.md
Created April 10, 2026 15:46
24-Hour Cron Schedule - Claude Code automation pipeline

Local Apps - 24-Hour Automation Schedule

Fully autonomous infrastructure that monitors, tests, screenshots, audits, and self-heals 12+ applications around the clock. Claude Code AI agents are deployed automatically to fix crashes and flag security/performance issues.


Always Running

Frequency Job Script What It Does
@bunlongheng
bunlongheng / local_apps_architecture.md
Created April 10, 2026 15:46
Local Apps Architecture - full system doc
name Local Apps Architecture & Agent System
description Complete architecture doc for the local-apps orchestrator — hub/agent model, all bots, monitoring, tests, screenshots, and multi-machine sync
type reference

Local Apps — Architecture & Agent System

A self-healing, multi-machine application orchestrator that monitors, tests, screenshots, and auto-fixes 14+ web applications across distributed development machines — powered by Claude Code AI agents.

@bunlongheng
bunlongheng / gif-bot.js
Created April 10, 2026 15:46
GIF Bot - 30s HD recordings, 5s fast-forward
#!/usr/bin/env node
/**
* GIF Animation Bot v2
* Records HD animated GIFs - captures 30s of real page activity
* then fast-forwards into a crisp 5s looping GIF at 2x retina
*
* Usage:
* node scripts/gif-bot.js 3pi # all pages, auto-detect LAN
* node scripts/gif-bot.js 3pi --url http://10.0.0.138:3333 # explicit URL
* node scripts/gif-bot.js 3pi --pages /,/quality # specific pages
@bunlongheng
bunlongheng / screenshot-bot.js
Created April 10, 2026 15:46
Screenshot Bot - Playwright + MacBook Air frames
#!/usr/bin/env node
/**
* Screenshot Bot
* For each app: landing → login → after-login → nav pages → CRUD per page
*
* Usage:
* node scripts/screenshot-bot.js # all apps
* node scripts/screenshot-bot.js bheng # single app
*
* Credentials: scripts/screenshot-credentials.json
@bunlongheng
bunlongheng / nightly-tests.sh
Created April 10, 2026 15:46
Nightly Tests + Claude Code Auto-Fix (877 tests)
#!/bin/bash
# Nightly test runner — runs `npm test` on all apps
# If any fail, spawns a Claude Code agent per failed repo to auto-fix
# Scheduled via launchctl at 1:00 AM daily
# Only runs on HUB machines — agents skip silently
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROLE_FILE="$SCRIPT_DIR/../machine-role.json"
ROLE="hub"
[ -f "$ROLE_FILE" ] && ROLE=$(python3 -c "import json; print(json.load(open('$ROLE_FILE')).get('role','hub'))" 2>/dev/null || echo "hub")
@bunlongheng
bunlongheng / health-check-fix.sh
Created April 10, 2026 15:46
Health Check + Auto-Fix Agent (Claude Code)
#!/bin/bash
# Health Check & Auto-Fix — ensures all apps are running
# Deploys Claude Code agents to diagnose and fix any down apps
# Can be run manually or via cron
# Only runs on HUB machines — agents skip silently
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROLE_FILE="$SCRIPT_DIR/../machine-role.json"
ROLE="hub"
[ -f "$ROLE_FILE" ] && ROLE=$(python3 -c "import json; print(json.load(open('$ROLE_FILE')).get('role','hub'))" 2>/dev/null || echo "hub")
@bunlongheng
bunlongheng / index.html
Created March 3, 2025 20:08
HTML Preview
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.circle {
height: 50px;
width: 50px;
background-color: #555;
border-radius: 50%;
# --------------------------------------------------------------
# Goal : Remove file base on input match
# Run : curl 45.55.88.57/code/fileModifier.py | python3
import os
import sys
rootdir = os.path.abspath(os.curdir)
print(rootdir)