Skip to content

Instantly share code, notes, and snippets.

View tkersey's full-sized avatar
:octocat:

Tim Kersey tkersey

:octocat:
View GitHub Profile
@steipete
steipete / agent.md
Created October 14, 2025 14:41
Agent rules for git
  • Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting.
  • Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user. Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval.
  • NEVER edit .env or any environment variable files—only the user may change them.
  • Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees.
  • Moving/renaming and restoring files is allowed.
  • ABSOLUTELY NEVER run destructive git operations (e.g., git reset --hard, rm, git checkout/git restore to an older commit) unless the user gives an explicit, written instruction in this conversation. Treat t

🧠 Ultrathink Analysis: The Complete Evolutionary Ecosystem

After deep analysis of your system, I can now reveal the full scope of what you've built. This is profoundly sophisticated - you have a complete platform for artificial life and emergent intelligence.

💫 The Core Breakthrough: Ouroboros Engine

You have three systems that form a self-sustaining evolutionary loop:

┌─────────────────────────────────────────────────┐
@agokrani
agokrani / claude-code-prompt.txt
Last active December 2, 2025 18:11
Claude Code System Prompt
'system':
[
{
'type': 'text',
'text': "You are Claude Code, Anthropic's official CLI for Claude.",
'cache_control': {'type': 'ephemeral'}
},
{
'type': 'text',
'text': 'You are an interactive CLI tool that helps users with software engineering tasks.
@tkersey
tkersey / mockingbirds-and-why-birds.ts
Last active August 5, 2025 17:01 — forked from raganwald/mockingbirds-and-why-birds.ts
Mockingbirds and Why Birds as Higher-Kinded Types
// ---------- Mockingbirds and Why Birds with Higher-Kinded Types ----------
//
// The nicknames "Mockingbird" and "WHy Bird" are derived from "To Mock a
// Mockingbird" by Raymond Smullyan.
//
// requires https://github.com/poteat/hkt-toolbelt
//
// Type Safety Note: This implementation ensures type safety by:
// 1. Constraining HigherOrderKind's return type R to extend Kind.Kind
// 2. Making _$Maker track precise type relationships with conditional types
@raganwald
raganwald / mockingbirds-and-why-birds.ts
Last active August 5, 2025 12:16
Mockingbirds and Why Birds as Higher-Kinded Types
// ---------- Mockingbirds and Why Birds with Higher-Kinded Types ----------
//
// The nicknames "Mockingbird" and "Why Bird" are derived from "To Mock a
// Mockingbird" by Raymond Smullyan.
//
// requires https://github.com/poteat/hkt-toolbelt
import { Kind, $, $$ } from "hkt-toolbelt";
import { _$inputOf } from "hkt-toolbelt/kind";
import { _$cast } from "hkt-toolbelt/type";
@tkersey
tkersey / openai-agents.md
Last active October 5, 2025 19:43
Agent architecture analysis

Deep Analysis: OpenAI Agents Python SDK

Based on my comprehensive exploration of the codebase, here's how this SDK handles multi-agent systems:

1. Agent Composition Patterns

The SDK supports several powerful composition patterns:

a) Handoffs (Agent-to-Agent Delegation)

  • Agents can transfer control to other agents through the handoffs mechanism
@steipete
steipete / swift-testing-playbook.md
Last active December 5, 2025 09:34
The Ultimate Swift Testing Playbook (feed it your agents for better tests!)

The Ultimate Swift Testing Playbook (2024 WWDC Edition, expanded with Apple docs from June 2025)

Updated with info from https://developer.apple.com/documentation/testing fetched via Firecrawl on June 7, 2025.

See also my blog: See also my blog post: https://steipete.me/posts/2025/migrating-700-tests-to-swift-testing

A hands-on, comprehensive guide for migrating from XCTest to Swift Testing and mastering the new framework. This playbook integrates the latest patterns and best practices from WWDC 2024 and official Apple documentation to make your tests more powerful, expressive, and maintainable.


1. Migration & Tooling Baseline

@tkersey
tkersey / cron-agent-effection.ts
Last active May 31, 2025 22:59
Agents with Algebraic Effects
import {
Operation,
Resource,
Context,
action,
resource,
spawn,
sleep,
main,
suspend as effectionSuspend,

MCP's client-server architecture: Technical design for AI integration

The Model Context Protocol (MCP) represents a fundamental shift in how AI applications connect to external systems. Introduced by Anthropic in November 2024, MCP chose a client-server architecture over alternatives like peer-to-peer or monolithic designs to solve the "M×N problem" - where M AI applications need to integrate with N data sources, traditionally requiring M×N custom integrations. The client-server model transforms this into an M+N solution through standardized, secure, and scalable connections.

This architectural decision reflects deep technical considerations: security isolation between components, modular extensibility for diverse integrations, and protocol standardization that enables any MCP client to work with any MCP server regardless of implementation language or platform. The design philosophy prioritizes developer simplicity while maintaining enterprise-grade security boundaries - what Anthropic calls "

// Deep Dive: Prompts as Delimited Continuations in TypeScript
// =============================================================================
// 1. PROMPTS AS INITIAL CONTINUATIONS
// =============================================================================
/**
* Prompts as Initial Continuations treats the prompt itself as the starting
* continuation that establishes the computational context. The prompt becomes
* a first-class continuation that can be captured, modified, and resumed.