Skip to content

Instantly share code, notes, and snippets.

View jakkaj's full-sized avatar

Jordan Knight jakkaj

View GitHub Profile
---
name: eng-harness-in-a-box
description: |
The engineering-harness loop with zero dependencies — an engineering harness in a box.
Use in any repo, especially one with no harness yet: find or establish a
focal operating surface, name the deterministic proof before working,
capture friction as you go, and offer one encodable improvement at the end.
Advisory always — the user is never blocked, the agent is never silent.
When a repo has an installed harness CLI and wants the full loop, use
eng-harness-flow instead.
@jakkaj
jakkaj / pij-concept-tree.html
Created July 22, 2026 00:21
pij — the deterministic layer (concept tree field guide)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>pij — the deterministic layer</title>
<style>
:root{
--paper:#F3F6F4;
--card:#FFFFFF;
@jakkaj
jakkaj / constitution-code-1.py
Last active November 25, 2025 03:32
[md-export] constitution-code-4
from datetime import datetime
# Test doubles implement the same interfaces as production code
class FakeBookingRepository(BookingRepository):
"""In-memory repository for testing - no HTTP, no database."""
def __init__(self):
self._bookings: dict[str, Booking] = {}
def find_by_id(self, booking_id: BookingId) -> Booking | None:
return self._bookings.get(booking_id.value)
@jakkaj
jakkaj / constitution-code-3.py
Created November 25, 2025 00:30
[md-export] constitution-code-3
# Interface lives in the application/domain module
from abc import ABC, abstractmethod
from typing import Optional
import httpx
class BookingRepository(ABC):
@abstractmethod
async def find_by_id(self, booking_id: BookingId) -> Optional["Booking"]:
pass
@jakkaj
jakkaj / constitution-code-2.py
Created November 25, 2025 00:30
[md-export] constitution-code-2
from dataclasses import dataclass
from datetime import datetime
from abc import ABC, abstractmethod
# Domain command + IDs used at the boundary of the application layer
@dataclass
class BookingId:
value: str
@dataclass
@jakkaj
jakkaj / constitution-code-1.py
Created November 25, 2025 00:30
[md-export] constitution-code-1
from datetime import datetime
# Test doubles implement the same interfaces as production code
class FakeBookingRepository(BookingRepository):
"""In-memory repository for testing - no HTTP, no database."""
def __init__(self):
self._bookings: dict[str, Booking] = {}
def find_by_id(self, booking_id: BookingId) -> Booking | None:
return self._bookings.get(booking_id.value)
@jakkaj
jakkaj / constitution-diagram-2.mmd
Created November 25, 2025 00:29
[md-export] constitution-diagram-2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakkaj
jakkaj / constitution-diagram-1.mmd
Created November 25, 2025 00:29
[md-export] constitution-diagram-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakkaj
jakkaj / constitution-code-4.py
Created November 25, 2025 00:29
[md-export] constitution-code-4
# Interface visible to application services
from abc import ABC, abstractmethod
from dataclasses import dataclass
class PaymentAdapter(ABC):
@abstractmethod
async def charge(self, request: "PaymentRequest") -> "PaymentResult":
pass
# Domain-facing request/result types
@jakkaj
jakkaj / constitution-code-3.py
Created November 25, 2025 00:29
[md-export] constitution-code-3
# Interface lives in the application/domain module
from abc import ABC, abstractmethod
from typing import Optional
import httpx
class BookingRepository(ABC):
@abstractmethod
async def find_by_id(self, booking_id: BookingId) -> Optional["Booking"]:
pass