Skip to content

Instantly share code, notes, and snippets.

View samjhecht's full-sized avatar

Sam Hecht samjhecht

View GitHub Profile
@samjhecht
samjhecht / resize.cast
Created April 17, 2026 01:34
Live capture for PR #2683 (wingman TUI resize clears scrollback)
{"version":2,"width":100,"height":40,"timestamp":1776389652,"title":"wingman chat: resize clears scrollback (PR #2683)","env":{"SHELL":"/bin/zsh","TERM":"xterm-256color"}}
[0.51,"o","\u001b[?2026h"]
[0.51,"o","\r\n \u001b[38;2;196;167;231m██ ██ ██ ███ ██ ██████ ███ ███ █████ ███ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ ██ ██ ████ ██ ██ ████ ████ ██ ██ ████ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ █ ██ ██ ██ ██ ██ ██ ███ ██ ████ ██ ███████ ██ ██ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██\u001b[39m\r\n \u001b[38;2;196;167;231m ███ ███ ██ ██ ████ ██████ ██ ██ ██ ██ ██ ████\u001b[39m\r\n\r\n \u001b[38;2;144;140;170mv0.3.0\u001b[39m\r\n\r\n \u001b[38;2;110;106;134mBring it.\u001b[39m\r\n\r\n \u001b[38;2;144;140;170mType a message to get started, or /help for commands\u001b[39m\r\n\r\n\u001b[?25l \u001b[38;2;156;207;216m"]
[0.51,"o","●\u001b[
@samjhecht
samjhecht / new-command.cast
Created April 17, 2026 01:34
Live capture for PR #2672 (wingman TUI /new clears scrollback)
{"version":2,"width":100,"height":40,"timestamp":1776389647,"title":"wingman chat: /new clears scrollback (PR #2672)","env":{"SHELL":"/bin/zsh","TERM":"xterm-256color"}}
[0.521,"o","\u001b[?2026h"]
[0.522,"o","\r\n \u001b[38;2;196;167;231m██ ██ ██ ███ ██ ██████ ███ ███ █████ ███ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ ██ ██ ████ ██ ██ ████ ████ ██ ██ ████ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ █ ██ ██ ██ ██ ██ ██ ███ ██ ████ ██ ███████ ██ ██ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██\u001b[39m\r\n \u001b[38;2;196;167;231m ███ ███ ██ ██ ████ ██████ ██ ██ ██ ██ ██ ████\u001b[39m\r\n\r\n \u001b[38;2;144;140;170mv0.3.0\u001b[39m\r\n\r\n \u001b[38;2;110;106;134mBring it.\u001b[39m\r\n\r\n \u001b[38;2;144;140;170mType a message to get started, or /help for commands\u001b[39m\r\n\r\n\u001b[?25l \u001b[38;2;156;207;216m"]
[0.522,"o","●\u001b
@samjhecht
samjhecht / markdown-spacing.cast
Created April 17, 2026 01:34
Live capture for PR #2670 (wingman TUI markdown spacing)
{"version":2,"width":100,"height":40,"timestamp":1776389639,"title":"wingman chat: markdown vertical spacing (PR #2670)","env":{"SHELL":"/bin/zsh","TERM":"xterm-256color"}}
[0.537,"o","\u001b[?2026h"]
[0.537,"o","\r\n \u001b[38;2;196;167;231m██ ██ ██ ███ ██ ██████ ███ ███ █████ ███ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ ██ ██ ████ ██ ██ ████ ████ ██ ██ ████ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ █ ██ ██ ██ ██ ██ ██ ███ ██ ████ ██ ███████ ██ ██ ██\u001b[39m\r\n \u001b[38;2;196;167;231m██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██\u001b[39m\r\n \u001b[38;2;196;167;231m ███ ███ ██ ██ ████ ██████ ██ ██ ██ ██ ██ ████\u001b[39m\r\n\r\n \u001b[38;2;144;140;170mv0.3.0\u001b[39m\r\n\r\n \u001b[38;2;110;106;134mBring it.\u001b[39m\r\n\r\n \u001b[38;2;144;140;170mType a message to get started, or /help for commands\u001b[39m\r\n\r\n\u001b[?25l \u001b[38;2;156;207;216m"]
[0.537,"o","●\u0
@samjhecht
samjhecht / plan-replace-meilisearch-pg-fts.md
Created March 17, 2026 19:14
Implementation plan for SPEC-172: Replace Meilisearch with PostgreSQL FTS + PostGIS

Replace Meilisearch with PostgreSQL FTS + PostGIS -- Implementation Plan

Goal: Eliminate Meilisearch as an infrastructure dependency by replacing it with PostgreSQL full-text search, pg_trgm fuzzy matching, and PostGIS geolocation queries, while maintaining identical API contract for web and mobile clients.

Spec: https://github.com/bacchus-labs/kidcue/issues/172

Architecture: Two-phase search (FTS with weighted tsvector, then pg_trgm fuzzy fallback) with PostGIS for geo queries. Generated stored search_vector column with weighted fields (name A, description/activity_types B, location C). Trigger-maintained location_point geometry column. All queries go directly to PostgreSQL -- no intermediate search service.

Tech Stack: PostgreSQL 16 + pg_trgm + PostGIS 3.5, Drizzle ORM (custom types for tsvector/geometry), raw SQL via Drizzle's sql template tag.

@samjhecht
samjhecht / plan-skill-library.md
Created March 17, 2026 04:03
Implementation plan for #1467 - Skill Library

Skill Library Implementation Plan

Goal: Build a TypeScript asset registry module in agent-core that handles skill loading, validation, multi-source resolution, in-memory storage, build-time embedding, and MCP tool delivery -- replacing the file-copy distribution model.

Spec: https://github.com/bacchus-labs/wingman/issues/1467

Architecture: The registry module (agent-core/src/registry/) provides three layers: (1) a loader that parses SKILL.md files using gray-matter + Zod, (2) a resolver that discovers skills from multiple sources with defined precedence and conflict detection, and (3) a library that provides in-memory storage and querying. A codegen script embeds builtins into the MCP bundle at build time, and three MCP tools (skills_list, skills_use, skills_search) expose skills at runtime.

Tech Stack: TypeScript, gray-matter (frontmatter parsing), Zod (schema validation), fzf (fuzzy search), esbuild (bundling)

@samjhecht
samjhecht / plan-skill-library.md
Created March 17, 2026 03:50
Implementation plan for #1467 - Skill Library

Skill Library Implementation Plan

Goal: Build a TypeScript asset registry module in agent-core that handles the full skill lifecycle: parsing, validation, multi-source resolution, in-memory storage, and MCP tool delivery -- replacing the file-copy sync-skills.mjs distribution model.

Spec: https://github.com/bacchus-labs/wingman/issues/1467

Architecture: A new registry module in agent-core/src/registry/ implements layered skill resolution (Builtin < Local < User < Extra), with builtins embedded at build time via a codegen script. The MCP server exposes three tools (skills_list, skills_use, skills_search) for runtime discovery. wingman init distributes skills to projects via symlinks controlled by wingman.json.

Tech Stack: TypeScript (strict mode), gray-matter (frontmatter parsing), Zod (schema validation), vitest (testing), esbuild (bundling)

@samjhecht
samjhecht / gist:9b1b83dc428501e01d60f581e3a87614
Last active November 19, 2024 18:41
Tako Coding Assignment

Tako Coding Challenge - Automated Ingestion of US Debt Statistics

Overview

You will create a Python application to automate the retrieval of the US Treasury's "Debt to the Penny" dataset, which provides daily statistics about total outstanding US public debt. This exercise evaluates your ability to:

  • Work with REST APIs
  • Handle data retrieval and transformation
  • Implement incremental data loading
  • Write maintainable code

Keybase proof

I hereby claim:

  • I am samjhecht on github.
  • I am huckfinn (https://keybase.io/huckfinn) on keybase.
  • I have a public key ASC0n8hc3SM_yHf0Nyy2jgqe5xjJBRcEbg_6PvSusEpMxwo

To claim this, I am signing this object:

@samjhecht
samjhecht / docker-compose.yml
Created December 1, 2016 23:11
Docker Compose File for Confluent Platform and Elasticsearch
---
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181

Some Fuckin' Poems I Wrote


Corners Of My Mind

I got your message
Coming down at the speed of sound. 
To that I send my reply. 
And I'll have to disagree.