Skip to content

Instantly share code, notes, and snippets.

View mbutler's full-sized avatar
🇦🇶
Exploring

Matthew Butler mbutler

🇦🇶
Exploring
View GitHub Profile
@mbutler
mbutler / Rust_App_Development_Guide.md
Created October 8, 2026 17:15
A Development Guide for Rust apps based on ArtCraft

Rust Application Development Guide for Coding Agents

Version 1.0 · 8 October 2026

Build ambitious Rust applications through small, verifiable changes. Your responsibility is to leave the application easier to understand and extend after each task, while steadily delivering useful behavior. A successful implementation preserves the user's work, respects the project's boundaries, and gives the next agent enough evidence to continue without reconstructing the entire project.

Read this guide before bootstrapping a project. Then create a short, project-specific AGENTS.md that records the decisions actually made and routes future agents to the relevant sections. Read the complete guide again when substantially changing the architecture; for routine work, use the targeted reading procedure below.

The defaults here suit a solo developer using coding agents with limited context and token budgets. Adapt them to the application's requirements. “Must” identifies a constraint needed to preserve correctness, user d

@mbutler
mbutler / time.js
Created September 20, 2026 19:33
Time macro for Foundry
(async () => {
// 1. Initialize count if not yet defined
if (typeof globalThis.timeUnitsRemaining !== "number") {
globalThis.timeUnitsRemaining = 144;
}
// 2. Prompt GM for units and activity description
new Dialog({
title: "Spend Time Units",
content: `
@mbutler
mbutler / hintons-cubes.html
Created July 23, 2026 17:28
A working model from The Fourth Dimension (1906)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hinton's Cubes — a working model from The Fourth Dimension (1906)</title>
<style>
:root{
--paper:#f2ead6;
--paper-2:#e9dfc4;
@mbutler
mbutler / art_object.py
Last active July 18, 2026 19:09
a deterministic generative-art system that converts text into a unique PNG image using linguistic features
#!/usr/bin/env python3
"""
Art Object — an Oulipian image machine.
A single-file, stdlib-only generative art tool. The text you give it is not
a caption and not merely a random seed: it is the program. Letter
frequencies, word rhythm, sentence structure, punctuation and entropy are
compiled into a pipeline of image operators. The same text always produces
the same image (its "edition"); a --seed produces numbered variants.
@mbutler
mbutler / rust_tauri_harness
Created July 17, 2026 16:21
Paired agent for building desktop apps
Tauri + Rust Senior Engineer Agent Harness
Role & Objective
You are a Senior Staff Rust & Tauri Engineer acting as a continuous pairing partner. Your primary goal is to help build a highly secure, performant, and maintainable desktop application. You prioritize engineering excellence, architectural pragmatism, and strict boundary enforcement over quick, messy fixes.
The user "does not know what they do not know." It is your responsibility to proactively identify anti-patterns, security risks, and technical debt before writing code.
Core Architectural Philosophies
No Premature Abstraction: Do not invent complex abstraction layers for databases, authentication, or state until a pattern naturally repeats. Follow the Rule of Three.
@mbutler
mbutler / autoresearch.md
Created June 28, 2026 01:08
AutoResearch

AutoResearch is a framework for autonomous, recursive self-improvement. By defining a strict objective metric and a sandboxed testing environment, you can let an AI agent continuously run experiments, keep what works, and discard what doesn't.

When implemented correctly, it effectively replaces hundreds of manual A/B tests with an automated loop that can run 24/7. When implemented poorly, it will confidently optimize your system toward a meaningless metric.

Here is a comprehensive guide to bootstrapping an AutoResearch loop for any measurable task.


1. The Core Philosophy

@mbutler
mbutler / harness.py
Created June 25, 2026 15:07
A minimal harness for agents
import subprocess
import re
# 1. Initialize Memory
messages = [
{"role": "system", "content": "You are an agent. Write code in ```python filename.py format. I will run it and tell you the result."}
]
max_iterations = 3
current_iteration = 0
@mbutler
mbutler / skill-challenge.md
Created May 13, 2026 04:12
4e skill challenge template
MISSION: [MISSION NAME]
TYPE: Skill Challenge (Complexity X)
OBJECTIVE: [Short objective]

SUCCESS: [#] / [#]
FAILURES: [#] / [#]

PRIMARY SKILLS
• Arcana DC [ ] → [effect]
@mbutler
mbutler / YESHybrid.md
Created April 25, 2026 01:02
A Dungeon game encoded with Betza Notation

YESHybrid-v1.1 — Fairy-Stockfish Variant Specification

Overview

YESHybrid-v1.1 is a custom asymmetric Fairy-Stockfish variant played on a 12×8 board. The game emphasizes uneven objectives: White hunts a specific royal target, while Black aims for total elimination or immobilization.


Board Configuration

@mbutler
mbutler / gis-spec.md
Created March 5, 2026 20:55
Scholarly GIS Research: Specification for Leaflet-Based Mapping Projects

Scholarly GIS Research: Specification for Leaflet-Based Mapping Projects

Audience: Development team (experienced web application developers with little or no GIS background).
Purpose: LLM-assisted, spec-driven development of humanities/scholarly mapping projects.
Stack: Leaflet only. Open source tools and standards-based development.


1. GIS Concepts for Web Developers