Skip to content

Instantly share code, notes, and snippets.

View brennancheung's full-sized avatar

Brennan Cheung brennancheung

View GitHub Profile
@brennancheung
brennancheung / reference-guide.yaml
Created March 20, 2026 01:09
Reference image guide — product-editable descriptions
# Reference Image Guide — Edit descriptions here
# Product can modify labels and reasons freely.
# After editing, run: pnpm cli images sync-guide
images:
good:
top-left:
file: do-clear-face.webp
label: Clear face
reason: >

UX Optimization Charter: AI OFM — Create Workflow

Version: 1.0
Date: 2026-03-17
Scope: Consolidating 6 pages (Create, Recipes, Carousel, Generations, Vault, Collections) into a coherent creation + library experience.


1. Product Core

@brennancheung
brennancheung / synthesis.md
Created March 16, 2026 19:42
Formal Methods for Agentic AI Orchestration: Graph Theory, Category Theory, FSMs, and Compiler Theory

Synthesis: Formal Methods for Agentic AI Orchestration

A unified framework drawing from graph theory, category theory, finite state machines, and compiler theory — applied to the design of agent harnesses, orchestrators, and quality systems.


1. The Problem with Current Agent Orchestration

Today's agent orchestration is predominantly ad hoc: markdown skills, prompt chains, and custom harness code. This creates several failure modes:

Unified Create Hub — Design Options

Context

The app currently has 3 separate creation pages (Create, Recipes, Carousel) and 3 overlapping content pages (Generations, Vault, Collections). The goal is to consolidate creation into a single /app/create page where recipes and carousels are more prominent than manual create.

Current Layout Reference

  • Recipes page: Left config panel (reference image, recipe details, batch/create button) + main area is a 4-column recipe card grid + filmstrip of session outputs at bottom. Full viewport height.
  • Create page: Output grid fills the main area + compose bar at bottom (prompt, reference images, model/aspect/size/batch controls, generate button). Full viewport height.

Polymarket Integration: Investigation & Status Report

Context

When clicking Polymarket odds in the Value Dashboard to place an order, the request fails with a 403 Forbidden from Cloudflare. This prompted a full investigation of the click-to-trade flow, existing Polymarket infrastructure, and backend architecture.


1. Click-to-Trade Flow (Full Trace)

const chokidar = require('chokidar')
const fs = require('fs')
const winPicsPath = '/c/Users/brenn/Pictures/exports'
const picsPath = '/mnt/c/Users/brenn/Pictures/exports'
const watchPaths = {
exports: `${picsPath}`,
}
const MB = 1024 * 1024
private void TP(BasePlayer player, MapNote note)
{
player.flyhackPauseTime = 10f;
var health = player.health;
var health2 = 100 - health;
player._health = 100000;
var pos = note.worldPosition + new Vector3(0,120,0);;
player.Teleport(pos);
Message(player, "Teleported", pos);
timer.Once(6f, () => { if (player == null) return; Message(player, "Cooldown", (100 - health2)); player.SetMaxHealth(100); player.Hurt(health2); });
{
"workbench.sideBar.location": "left",
"editor.fontFamily": "'DejaVu Sans Mono for Powerline'",
"editor.fontSize": 14,
"editor.tabSize": 4,
"workbench.colorTheme": "Darktooth",
"editor.minimap.enabled": false,
"window.zoomLevel": 2,
"window.openFilesInNewWindow": "off",
"workbench.statusBar.visible": true,
$ cargo run
Compiling k8s-controller v0.1.0 (/Users/brennan/code/rust/k8s-controller)
warning: unused import: `tokio::prelude::*`
--> src/main.rs:3:5
|
3 | use tokio::prelude::*;
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
const extractIds = pluck('id')