Skip to content

Instantly share code, notes, and snippets.

View pauleveritt's full-sized avatar

Paul Everitt pauleveritt

  • JetBrains
  • Fredericksburg, VA
View GitHub Profile
@pauleveritt
pauleveritt / TDOM.md
Created June 30, 2026 16:17
tdom handling in Pyrefly

Pyrefly Fork Changes (tainie-fork)

Branch: tainie-fork

Implementation-level notes for the four fork areas: tdom t-string checking, overlay-check, Glean xrefs, and the assert_never exhaustiveness gate. The narrative why / how / what (and the asks to the Pyrefly and Mellum teams) lives in tainie's docs/pyrefly.md; this file is the file-level manifest.


@pauleveritt
pauleveritt / pyrefly.md
Created June 30, 2026 11:50
Pyrefly fork for agents

Pyrefly: the deterministic side of tainie

Audience: the Pyrefly team, and anyone trying to understand why tainie forks Pyrefly. For the model side — evidence and asks for the Mellum team — see mellum.md.


Why — move reasoning out of the model, into the engine

@pauleveritt
pauleveritt / kickoff.md
Created June 17, 2026 17:02
Tainie Kickoff Document

tainie — Kickoff Brief

This document is the complete starting point for tainie. If you are reading it cold, you have everything you need. There is no other document to consult, no prior codebase to port, and no hidden context. The design below was discovered through experiment; this brief presents it as the design to build, with the reasoning that makes each decision obviously correct rather than incidental.

Read it once top to bottom before writing any code. The "why" sections matter more than the "what" — they exist so that you do not accidentally design around

T-String Prompt DSL Research

Date: 2026-05-03

Abstract

This paper proposes a two-layer prompt architecture inspired by DSPy's "programming, not prompting" framing, but designed for Tainie's existing stack rather than as a DSPy dependency. The first layer is a general-purpose prompt() template function for Pydantic AI users. It treats Python 3.14

t-strings (PEP 750) for prompt templating — research findings

(From web research subagent, 2026-05-03 night spike. Triggered by observation that tainie has two prompt-templating brittleness problems: server-side jinja in Qwen3.6 GGUF, and client-side "\n".join([...]) in prompts.py.)

What PEP 750 actually changes

t"..." returns a Template object (iterable of alternating str segments and Interpolation slots), **not a str **. Each Interpolation carries value, expr (source text like "name"), conv, format_spec. Nothing renders until a template function walks the parts and decides how to combine them.

@pauleveritt
pauleveritt / scratch_2.py
Created September 8, 2024 17:13
Nested template
# We've generally thought of nesting being an interpolation
# that called the html "tag function" (now template function)
def Sidebar(heading: str, items: list[Any]) -> HTMLTemplate:
return t"""
<aside>
<h1>{heading}</h1>
<ul>
{html(t"<li>{item}</li>" for item in items}")}
</ul>
@pauleveritt
pauleveritt / test_svcs.py
Created August 31, 2024 13:28
Simulating Hopscotch in svcs
from dataclasses import dataclass
from pathlib import PurePath
from typing import Protocol, Callable, Any
import pytest
from svcs import Container, Registry
@dataclass
class Registration:
@pauleveritt
pauleveritt / template.tsx
Created June 19, 2024 20:29
11ty TSX subcomponents and shortcakes
/*
Summary: TSX subcomponents don't have access to shortcodes. The
this.context.shortcodes.css() function runs, but doesn't put
its content into the bundle.
*/
export type Context = {
// The "this" value has a "context" managed by Preact.
@pauleveritt
pauleveritt / site.test.js
Created April 17, 2024 17:40
11ty constructor, options, dirs
test("should load an Eleventy site", async () => {
const elev = new Eleventy("./", "./_site", {
dir: {
includes: "my_includes",
layouts: "my_layouts",
},
});
await elev.init();
const d = elev.config.dir;
expect(elev.config.dir.includes).toEqual("my_includes");
@pauleveritt
pauleveritt / memoize2.py
Created November 12, 2023 20:25
Series of examples gradually building up a memoize example.
from __future__ import annotations
from typing import Any
from tagstr import Thunk
from tagstr.memoize import TagStringArgs, TagStringCallable
def immutable_bits(*args: str | Thunk) -> tuple[str | tuple[Any], ...]:
bits = []
for arg in args: