JJ Juras.

Python

Python is where the rules become code.

The agents I run that touch money are written in Python. So are the tools that plan my week, build my sites, and check my own work. This is the shelf.

move the cursor · press to push harder

Python and Claude

Why both, in six places.

Claude does the judgment. Python holds the rules that are not allowed to bend.

A model can be talked into anything by a good enough story. A line of code cannot. So every control I have written about lives in Python, outside the model's context, where a prompt cannot reach it. These are the six places Python stands between Claude and the world, each with the code.

  • 1

    The fence. Untrusted text reaches the model as data, never as instruction.

  • 2

    The ledger. The model never invents an id or a total it can act on.

  • 3

    The guard. A hook decides before every tool call, with a reason.

  • 4

    The chain. Every action is a hashed record a person can verify.

  • 5

    The null. Unmeasured is None, in the schema and in the build.

  • 6

    The eval. Python measures Claude, with n and an interval.

Projects

Public code: github.com/jjjuras

Python · scikit-learn · DuckDB

hydra-triage

Behavior-only triage of coordinated model extraction: synthetic labeled logs, a label-free prompt fingerprint, identifier and two-axis behavior linking, explainable cases, five attacker levels over five seeds. Code · Write-up

Python · Anthropic SDK

harness-welfare

A 2×2 evaluation of what deployment loops do to an agent's self-reports and behavior, with a fake client for tests and bootstrap intervals. Code

Python 3.13 · FastAPI · Claude

Merchant agent harness

A hardened harness over Anthropic's reference commerce agents, vendored at a pinned commit and never edited. The harness adds caps, an audit chain, approvals, stores, and a hold on travel bookings. A FastAPI service hosts the agents, and adapters connect real stacks: Shopify, Mews, Eventbrite, and a direct storefront. The service runs live on Railway; each adapter has smoke tests.

Claude Agent SDK

Chief-of-staff agent

A single-loop agent with memory, scripts, plan mode, slash commands, subagents, and two hooks: a guard before every tool call and an audit during it. The house rules live in the hook, not the prompt.

Planning

Board and daily plan

A git-backed tracker: project sync, board generation, an overnight digest, and a daily-plan heuristic that reads the board and prod health and picks the day's deliverables.

Publishing

Static site builders

Small generators with no framework: this site, a PDF redline tool for contracts, and the renderers behind social cards and OG images.

By the numbers

Merchant agent harness, October 2026. Own code only, not the vendored reference, counted with git ls-files.

158Python files
35kLines
420Tests
4Adapters

How I write it

Money is an int.

Minor units, always. No float ever touches a price, a fee, or a balance.

Unmeasured is None.

Not zero, not a mean, not a default. If a metric was not observed, the field says so and the caller has to handle it.

Typed, linted, tested, pinned.

Type hints throughout, ruff for lint and format, pytest with the reference's fake client so unit tests need no API key, and every third-party dependency pinned by commit or version.

Extend, never monkey-patch.

Upstream code is vendored read-only. Everything I add is a subclass or an extension, so an upstream update is a diff, not an archaeology dig.

# The shape of every tool in the harness.
def place_order(session: Session, draft_id: str) -> OrderResult:
    draft = session.stores.drafts.get(draft_id)      # server-issued id
    cap.check(session, draft.total_minor)            # cap on resulting state
    approval.require(session, "place_order", draft)  # human on the decision
    with session.serialized():                       # one write at a time
        order = session.stores.orders.commit(draft)
    audit.append(session, "place_order", order.id)   # chained record
    return OrderResult(order_id=order.id, total_minor=order.total_minor)

Notebook

Short entries on what I learned building the above. Newest first.

  • Oct 2026

    Pinned upstream at a commit and vendored it as plain files. Editable installs are convenient until a tool rewrites a file you did not own.

  • Sep 2026

    Moved every safety rule out of prompt strings and into a pre-tool guard hook. The prompt got shorter and the agent got harder to talk out of its rules.

  • Sep 2026

    Replaced every "or 0" on a metric with None and a schema that allows it. Three dashboards stopped lying the same afternoon.