Build the React SPA so that AI coding agents can change implementation code often without changing product rules by accident.
Separate stable product rules from replaceable implementation code.
Treat changes to the stable part as exceptional.
Here is a shorter version that assumes the reader knows basic software engineering, but not DDD, Effect, XState, or TLA+.
This design uses the application’s own rules to constrain both the running software and any AI agent that changes it.
The core idea is:
| ollama rm active-big:latest | |
| ollama create active-big -f <(echo FROM qwen3:30b-a3b) |
| // index.ts | |
| import { $ } from "bun"; | |
| const token = process.env.BEARER_TOKEN; | |
| if (!token) { | |
| throw new Error("Missing BEARER_TOKEN environment variable"); | |
| } |
| git config --global alias.nb '!f() { git fetch origin && git checkout -b "$1" origin/${2:-master} --no-track; }; f' | |
| git config --global --type bool push.autoSetupRemote true |
| #!/bin/bash | |
| # MCPO CLI - Efficient MCP OpenAPI Proxy Client | |
| # Usage: ./mcpo.sh <command> [args...] | |
| set -e | |
| # Configuration | |
| MCPO_HOST="${MCPO_HOST:-http://localhost:8000}" | |
| MCPO_TOKEN="${MCPO_TOKEN:-supersecret}" |
| import os | |
| import re | |
| from typing import Callable, Any | |
| from youtube_transcript_api import YouTubeTranscriptApi | |
| from youtube_transcript_api.formatters import TextFormatter | |
| class EventEmitter: | |
| def __init__(self, event_emitter: Callable[[dict], Any] = None): | |
| self.event_emitter = event_emitter |
| INPUT=$1 | |
| # TY https://github.com/paulpaul999/vr-video-notes/blob/main/vr-to-flat/README.md | |
| ffmpeg -i $INPUT -filter_complex " | |
| [0:v]crop=iw/2:ih:0:0[left]; | |
| [0:v]crop=iw/2:ih:iw/2:0[right]; | |
| [left]v360=input=hequirect:output=flat:d_fov=125:w=1920:h=1080:pitch=0[flattened_left]; | |
| [right]v360=input=hequirect:output=flat:d_fov=125:w=1920:h=1080:pitch=0[flattened_right] | |
| " \ | |
| -map "[flattened_left]" -c:v libx265 -crf 18 -pix_fmt yuv420p flattened_left.mp4 \ |