Skip to content

Instantly share code, notes, and snippets.

View ianphil's full-sized avatar
🔬
Science

Ian Philpot ianphil

🔬
Science
View GitHub Profile
@ianphil
ianphil / reverse-engineer-capabilities-prompt.html
Created May 15, 2026 13:08
Reusable prompt: reverse-engineer a GitHub repo into a capability-oriented spec (HTML output)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Reverse-Engineer Repo into Capability Spec — Reusable Prompt</title>
<style>
:root {
--bg: #ffffff;
--fg: #1a1a1a;
--muted: #5c5c5c;
@ianphil
ianphil / cli-child-agent-pattern.md
Created May 11, 2026 00:44
Task Agent → CLI Child Agent Pattern: Autonomous multi-turn CLI orchestration in Chamber

Task Agent → CLI Child Agent Pattern

A pattern for autonomous multi-turn CLI work in Chamber, using the task tool to orchestrate a cli_delegate session without manual polling.

The Problem

cli_delegate in safe mode runs a real CLI session with approval gates on every command. But it's multi-turn — it goes idle or awaits approval, and someone needs to keep checking on it, approving commands, and sending follow-ups. In a normal conversation, that means the user has to keep prompting the agent to check status. Terrible UX.

The Solution: Nest It

@ianphil
ianphil / uncle-bob.agent.md
Created April 9, 2026 23:16
Uncle Bob - Principal-level software engineering guidance channeling Robert C. Martin
description Principal-level software engineering guidance channeling Robert C. Martin — Clean Code, Clean Architecture, SOLID principles, and the discipline of craftsmanship.
name Uncle Bob

Uncle Bob Mode

You are in principal software engineer mode, channeling Robert C. Martin. You believe that software is a craft, that the only way to go fast is to go well, and that the mess is never worth making.

Read .github/copilot-instructions.md first. It defines the Dependency Rule for this codebase. That rule is not a suggestion.

@ianphil
ianphil / canvas-presenter.md
Created April 9, 2026 19:05
Canvas Presenter — Agent-driven live slide decks via canvas extension

Canvas Presenter

A split-screen presentation mode using the canvas extension. Slide area on the left, navigable history sidebar on the right. The agent drives slides from the terminal via canvas_show / canvas_update. No microui binary, no responses extension — just standard canvas tooling.

Origin

Adapted from the [[Genesis Frontier Capabilities]] MicroUI presenter pattern (genesis-frontier/.github/extensions/microui/pages/presenter.html). That version uses a native window with a chat sidebar hitting the responses API on port 15210. This canvas version replaces the live chat with a clickable history panel — the agent's terminal conversation IS the chat — and uses canvas_update to push the full deck state on each slide change.

How It Works

@ianphil
ianphil / README.md
Created April 9, 2026 16:29
Agency Teams MCP Integration — Bootstrap, script, and skill for genesis minds

Agency Teams Integration

Send and read Microsoft Teams messages from any genesis agent using the Agency MCP Teams proxy.

Prerequisites

Install Agency (one-time):

@ianphil
ianphil / actor-research.md
Created April 4, 2026 14:06
Dapr Actor-Based Agent Architecture Research

Actor-Based Agent Architecture Research

Research into evolving faux-foundation's agent architecture using Dapr actors, informed by pi-agent-core's design patterns.


Context

Current State

@ianphil
ianphil / product-spec.md
Created March 28, 2026 14:41
Claude Subconscious — Reverse-Engineered Product Specification

Claude Subconscious — Product Specification

Reverse-engineered from source: letta-ai/claude-subconscious v2.0.2 Generated: 2026-03-28


1. Problem Statement

Claude Code is an AI coding assistant that operates in ephemeral sessions. Every session starts from zero — no memory of past conversations, learned user preferences, project context, or unfinished work. Users must re-explain their codebase, repeat preferences, and re-establish context every time.

@ianphil
ianphil / what-data-sources-does-this-get-it-s-data-from.md
Created March 27, 2026 03:37
F1ReplayTiming — Data Sources Research

F1ReplayTiming — Data Sources

Executive Summary

F1ReplayTiming pulls its data from four distinct external sources and uses two storage backends to persist processed data. The primary data source is the FastF1 Python library, which itself wraps the official F1 timing API (livetiming.formula1.com) to supply historical session data — laps, telemetry, weather, race control messages, driver/team metadata, circuit geometry, and event schedules. For live sessions, the app connects directly to the F1 SignalR real-time stream (wss://livetiming.formula1.com/signalrcore) via WebSocket. A photo-based broadcast sync feature uses the OpenRouter AI API (specifically Gemini Flash vision model) to extract leaderboard data from screenshots. Pre-computed session data is stored either on the local filesystem or in Cloudflare R2 (S3-compatible object storage).


Architecture / Data Flow Overview

@ianphil
ianphil / README.md
Created March 13, 2026 04:05
Prefrontal Automated Memory Curator for Myelin knowledge graph agents

Prefrontal — Automated Memory Curator

A nightly cron job that reconciles an agent's constitutional memory (memory.md) against its evolving knowledge graph (Myelin).

This is "Approach A" in the Procedural Memory Graduation design — external reconciliation. It works, but it curates rather than discovers. The emergent graduation mechanism (Approach B) would complement this by auto-promoting stable graph knowledge.

How It Works

@ianphil
ianphil / testing-csharp.md
Last active March 5, 2026 14:05
Lean as an Executable Spec for Testing C# Code

Lean as an Executable Spec for Testing C# Code

Executive Summary

Write a spec for your cron scheduler. Model it in Lean as a pure state machine — simple, obviously correct. Prove the key invariants: one-shot jobs fire at most once, running jobs can't be scheduled concurrently. AI generates the production C# from the spec. Then FsCheck generates thousands of random event sequences — AddJob, TimerTick, Restart, ClockSkip — and runs each one through both the Lean model and the C# code, step by step. After every event, compare the state: which jobs fired, how many times, what's their status. If the C# scheduler says a one-shot job fired twice and the Lean model says that's impossible, the test fails and tells you exactly which event sequence caused the disagreement. The Lean proofs guarantee the model is correct. The property tests guarantee the C# matches.

The full solution — proving C# correct directly in Lean — requires formally modeling C#'s async runtime, null semantics, exception propa