Skip to content

Instantly share code, notes, and snippets.

View iansmith's full-sized avatar

Ian Smith iansmith

View GitHub Profile
@iansmith
iansmith / slopstop-design.md
Last active October 1, 2026 18:40
slopstop-q: a lean ticket loop for AI-assisted development

slopstop-design: Stage 1 of the slopstop process — grill to shared understanding, write the PRD and charter

/slopstop:design

Stage 1 of the slopstop process. Runs on the huge tier. Output: a run dir under scratch/runs/ holding run.jsonl, the PRD, and the charter, presented to the human at gate G-design. Never cuts tickets (that is Stage 2, /slopstop:tickets) and never implements anything.

#!/usr/bin/env python3
"""PreToolUse hook: graph for discovery, grep for content — enforced, not requested.
Registered on Bash, Grep and Glob. Blocks a search over the tree unless the call
carries a content marker, and logs every decision so the discovery/content split
is measured by the harness rather than self-reported.
Blocked:
- Grep / Glob tool calls (always; the marker cannot be attached to them).
- Bash where grep, rg, ug, ag or find STARTS a pipeline segment — i.e. it is
import json, os, re, subprocess, sys, urllib.request
def _key():
if os.environ.get("TYPESAFE_API_KEY"): return os.environ["TYPESAFE_API_KEY"]
try:
for line in open(os.path.expanduser("~/sophie/enable-sophie")):
m = re.match(r'\s*export\s+TYPESAFE_API_KEY=["\']?([^"\'\s]+)', line)
if m: return m.group(1)
except FileNotFoundError:
pass # a cloud container has no enable-sophie; the env var is the only source
raise SystemExit("no TYPESAFE_API_KEY")
@iansmith
iansmith / importantcheckbox.ts
Last active March 24, 2021 17:13
from evalvite article, definition of component
// file: example1/importantcheckbox.ts
// imports omitted
export default class ImportantCheckBox extends React.Component<
localProps,
localState
> {
msg = "this is my message, there are many like it but this one is mine";
constructor(props: localProps) {
super(props);
ev.bindModelToComponent<ImportantCheckBoxModel>(this.props.model, this);
@iansmith
iansmith / models.ts
Last active March 24, 2021 17:08
from article on evalvite, example 3 models from dist
// file: example3/models.ts
// model for one input box
export interface NumberModelItem {
[key: string]: any;
value: Attribute<number>;
}
// … other models omitted
export default class NumberModel {
[key: string]: any;
// array content has to be an object, can't be just ArrayAttribute<number>; see NaiveArrayAttribute if you want to do an array of number
@iansmith
iansmith / importantcheckbox.ts
Created March 24, 2021 16:39
from evalvite article, type decls for important checkbox
// file: example1/importantcheckbox.ts
// imports omitted
type localProps = {
model: ImportantCheckBoxModel,
}
type localState = {
important: boolean; // needs to match the <boolean> of the attribute in model
}
@iansmith
iansmith / models.ts
Last active March 24, 2021 16:27
from bury redux article: models.ts
// imports omitted
export type ImportantCheckBoxModel = {
important: Attribute<boolean>;
}
type Spider struct {}
func (s Spider) NumberOfLegs() int {
return 8
}
func (s Spider) Genus() {
return “Latrodectus” //strictly speaking, the genus of Black Widow spider
}
type Dog struct {}
package main
import "somedwarf"
import "fmt"
type Sleepy struct {}
type IsHappy interface {
Happy() bool
}
package somedwarf
type Grumpy struct {}
func (g Grumpy) Happy() bool {
return false
}