Skip to content

Instantly share code, notes, and snippets.

View johnlindquist's full-sized avatar
💭
Eating a taco 🌮

John Lindquist johnlindquist

💭
Eating a taco 🌮
View GitHub Profile
@johnlindquist
johnlindquist / cm-tools-reference.md
Last active December 7, 2025 05:39
Code-Mode (cm) Tools Reference - 198 tools across 38 categories

Code-Mode (cm) Tools Reference

Total: 211 tools across 39 categories

Meta-Tools (4 tools)

These are the primary tools for interacting with cm:

Tool Purpose
@johnlindquist
johnlindquist / SessionStart.ts
Created December 7, 2025 00:33
Claude Code Exhaustive Mode - Force thorough exploration by denying early stops
import type { SessionStartHookInput, SyncHookJSONOutput } from "@anthropic-ai/claude-agent-sdk"
import { appendFile, readFile, writeFile } from 'node:fs/promises'
import { initSessionStats, saveSessionStats, getSessionStats } from "./src/stats"
const input = await Bun.stdin.json() as SessionStartHookInput
// Check for exhaustive mode from environment
const exhaustiveMode = process.env.CLAUDE_EXHAUSTIVE === "true" ||
process.env.CLAUDE_EXHAUSTIVE === "1"
@johnlindquist
johnlindquist / task-explore-deep-dive.md
Created December 6, 2025 20:49
Claude Code Task Tool Deep Dive: Subagents, Explore, and Hooks
@johnlindquist
johnlindquist / scriptable-config-wezterm.md
Last active December 5, 2025 16:29
Why WezTerm: The AI-Native Terminal for the Agentic Era

Why WezTerm: The AI-Native Terminal for the Agentic Era

The Thesis

We are entering an era where AI agents can read, write, and modify configuration files on your behalf. In this new paradigm, the best tool is no longer the one with the prettiest GUI or the most menu options—it's the one with the most programmable surface area.

WezTerm is that tool for terminals.

The Terminal Landscape in 2025

@johnlindquist
johnlindquist / wezterm.lua
Created December 5, 2025 15:07
WezTerm configuration with Zellij-style layouts, smart workspace switching, and extensive keybindings
-- ============================================================================
-- WEZTERM CONFIGURATION
-- ============================================================================
-- WezTerm is a GPU-accelerated terminal emulator written in Rust.
-- This config transforms WezTerm into a powerful terminal multiplexer,
-- combining features from tmux, Zellij, and iTerm2 into one cohesive setup.
--
-- Key design goals:
-- 1. MULTIPLEXER BUILT-IN: No need for tmux/Zellij - use native panes/tabs
-- 2. SMART LAYOUTS: Automatic pane arrangement like Zellij's swap layouts
@johnlindquist
johnlindquist / gist:66f8c8251792140e52495eef1c8f4263
Created November 29, 2025 02:58
WezTerm Best Practices Guide
# WezTerm Best Practices Guide
## Installation
```bash
# macOS
brew install --cask wezterm
# Linux (native packages recommended over Flatpak for power users)
# See distro-specific instructions at wezterm.org/install/linux.html
@johnlindquist
johnlindquist / bun-websocket-cpu-spin-investigation.md
Created November 29, 2025 01:18
Bun 1.3.3 WebSocket 100% CPU Investigation - Lootbox Server

Bun WebSocket 100% CPU Spin Investigation

Date: 2025-11-28 Bun Version: 1.3.3 Platform: macOS Darwin 24.6.0 (ARM64)

Problem

Lootbox server running at 100% CPU for 9+ hours. Main server process only - worker processes at 0% CPU.

@johnlindquist
johnlindquist / gist:c43e95a0e980aa68a1b3e1223170229b
Created November 28, 2025 02:28
Lootbox Cached Codemaps Explained - How AI tools get codebase context
# Cached Codemaps in Lootbox
## What is a Codemap?
A **codemap** is a compressed representation of your codebase that AI tools use to understand your project structure without reading every file. It extracts:
- Function and class signatures
- Export statements
- Type/interface definitions
- File organization
@johnlindquist
johnlindquist / codemap-lootbox-bun-09145e5e.json
Created November 28, 2025 02:24
Cached Codemap: lootbox-bun - MCP tool server with AI agents, Chrome DevTools, and multi-model support
{
"version": 1,
"repoPath": "/Users/johnlindquist/dev/lootbox-bun",
"repoName": "lootbox-bun",
"createdAt": "2025-11-27T16:26:55.301Z",
"lastValidatedAt": "2025-11-27T16:26:55.301Z",
"gitCommitHash": "cac0dbbfa099f833bcf620d3e8b00d60e731ab45",
"codemap": "<prompt>\n <files>\n <file path=\"ui/tsconfig.node.json\" type=\"json\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"ui/index.html\" type=\"html\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"ui/tailwind.config.js\" type=\"javascript\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"ui/package.json\" type=\"json\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"ui/components.json\" type=\"json\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"ui/tsconfig.json\" type=\"json\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"ui/vite.config.ts\" type=\"typ
@johnlindquist
johnlindquist / codemap-kit-container-9009a2e3.json
Created November 28, 2025 02:24
Cached Codemap: kit-container - Electron app with IPC, prompts, and script execution
{
"version": 1,
"repoPath": "/Users/johnlindquist/dev/kit-container",
"repoName": "kit-container",
"createdAt": "2025-11-27T20:03:41.135Z",
"lastValidatedAt": "2025-11-27T20:03:41.135Z",
"gitCommitHash": "fdfd83ac13e4e2f4896e18f0aa564eeac968f7ac",
"codemap": "<prompt>\n <files>\n <file path=\".cursorignore\" type=\"text\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"postmoterms/prompt-struggles.md\" type=\"markdown\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"analyze-trace-detailed.js\" type=\"javascript\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"test-action-locally.sh\" type=\"bash\" format=\"codemap\">\n// No signatures extracted\n </file>\n <file path=\"onaction-investigation-bundle.md\" type=\"markdown\" format=\"codemap\">\nfunction updateFields(channel)\nfunction createTraceFunction(eventType: 'B' | 'E' | 'I')\nfunction scorer(string: string, query: string, matches: number[