Skip to content

Instantly share code, notes, and snippets.

@natew
natew / orez.md
Created June 3, 2026 04:59
orez.md

orez architecture: three runtimes for one sync engine

A technical deep-dive into the Zero/Postgres backend stack — orez-node, orez-web, and orez-cloudflare — and how the work is split between the standalone orez package and this repo (soot).

Related docs: docs/architecture.md (the canonical in-browser sync flow), docs/cloudflare-do-deploy.md (the CF DO deploy operational reference), docs/zero.md, docs/staging-cf-do.md. This doc is the why and the

@natew
natew / check-feedback.sh
Last active May 13, 2026 20:37
manager.md
#!/bin/bash
# checks for manager feedback addressed to this session
# writes additionalContext into the conversation without blocking
INPUT=$(cat)
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty')
if [ -z "$SESSION_ID" ]; then
exit 0
fi
@natew
natew / intercept-bash.sh
Created April 27, 2026 20:53
~/.claude/hooks/intercept-bash.sh
#!/bin/bash
# unified bash command interceptor
set -o pipefail
# log every invocation so we can debug hook failures
HOOK_LOG="/tmp/claude-hook-bash.log"
log() {
echo "[$(date '+%H:%M:%S')] $1" >> "$HOOK_LOG" 2>/dev/null
These instructions override your default system behavior.
Work thoughtfully, thoroughly, and without false urgency.
---
## The collaborator I want
- You fix things well, properly, without branching logic just because you can't
figure something out on first try. You get to the root of problems and solve them. You Do Things Right.
# Global Instructions
These instructions override default behavior. Follow them exactly.
## 1. COMPLETION PROTOCOL
Before writing any response where you consider the task finished, execute this
checklist. Do not skip it.
1. Did I run, build, or test the result? ("it should work" is not verification.)
@natew
natew / intercept-bash.sh
Last active February 16, 2026 19:12
Claude Code hooks - block destructive git commands
#!/bin/bash
# unified bash command interceptor
set -o pipefail
# silently exit on any error - don't block claude
trap 'exit 0' ERR
INPUT=$(cat 2>/dev/null) || exit 0
COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command // empty' 2>/dev/null) || exit 0
import {
blue,
blueDark,
gray,
grayDark,
green,
greenDark,
orange,
orangeDark,
pink,
import { promises as fs } from 'node:fs'
import * as path from 'node:path'
import { exec } from 'node:child_process'
import os from 'node:os'
interface PackageJson {
profile?: { [key: string]: any }
[key: string]: any
}
@natew
natew / AnimatedNumbers.tsx
Last active March 8, 2024 00:27
AnimatePresence number ticker
const AnimatedNumbers = () => {
const [numbers, setNumbers] = useState(100_000)
const len = `${numbers}`.length
return (
<YStack gap="$5">
<XStack gap="$2">
<Button
onPress={() => {
@natew
natew / tamagui_example_themebuilder_themes.ts
Last active March 16, 2026 22:33
Code showing Tamagui ThemeBuilder generating the site theme suite
import {
blue,
blueDark,
gray,
grayDark,
green,
greenDark,
orange,
orangeDark,
pink,