Skip to content

Instantly share code, notes, and snippets.

View rmk40's full-sized avatar

Rafi Khardalian rmk40

View GitHub Profile
@rmk40
rmk40 / tooling-setup.md
Last active March 24, 2026 20:57
Developer Tooling Setup — macOS shell environment

Developer Tooling Setup

macOS 26.3.1 (Apple Silicon) workstation configuration. Everything is installed via Homebrew 5.1.0 unless noted otherwise.

Tools at a Glance

The default macOS command-line tools were designed decades ago and show their age. They produce dense, uncolored output, ignore modern conventions like .gitignore, and lack features developers now take for granted (syntax highlighting, git awareness, fuzzy search). This setup replaces them with modern alternatives — mostly written in Rust — that are faster, produce more readable output, and work the way you'd expect in a git-centric workflow. Every replacement is aliased to the original command name so muscle memory carries over.

Tool Replaces Why
@rmk40
rmk40 / opencode-prompt-construction.md
Last active April 24, 2026 15:57
OpenCode prompt construction: system prompt, tools, agents, and assembly pipeline

OpenCode Prompt Construction

This document explains how OpenCode assembles everything the LLM sees: system prompt, tool definitions, agent configuration, and instruction files. It focuses on what's dynamic and why.

All paths are relative to the repo root.


How the System Prompt is Built

--- policy.json 2013-05-22 04:29:47.939198317 +0000
+++ policy.json.dpkg-dist 2013-05-20 05:02:36.000000000 +0000
@@ -1,5 +1,9 @@
{
"admin_required": [["role:admin"], ["is_admin:1"]],
+ "owner" : [["user_id:%(user_id)s"]],
+ "admin_or_owner": [["rule:admin_required"], ["rule:owner"]],
+
+ "default": [["rule:admin_required"]],
@rmk40
rmk40 / snapshot-via-rebase
Last active December 11, 2015 14:58
Proof of concept for blockRebase-based snapshots
#!/usr/bin/python
import libvirt
import os
import sys
import time
import uuid
try:
instance_name = sys.argv[1]