Skip to main content

llmdojo

LLM coding agents imitate what their context shows far more reliably than what it tells: instructions decay over a session, demonstrations don’t. llmdojo turns that observation into tooling, for kernels served by clikernel:

  • llmdojo.rules: session rules, applied live to every kernel cell through clikernel’s inspector hook. Routing rules teach the designed tool for each job, string-safety rules catch quoting mistakes, gating rules block the genuinely dangerous, and the nodoc rule tracks per-conversation doc-state so tooling docs actually get read before first use.
  • llmdojo.dojo: a short scored practice round (the katas) an agent completes at session start, so its first real tool calls follow a demonstrated clean pass rather than being produced cold. Clean rounds mint a completion id that later sessions can present instead of replaying.
  • llmdojo.claudedojo: capture a clean round from a live Claude Code session, curate it into a deterministic template, and launch new sessions that resume it, so every session opens with the worked round already in context.
  • llmdojo.codexdojo: capture a clean Codex thread into a native Responses-item template, then launch new Codex sessions from the reviewed template.

Usage

Installation

$ pip install llmdojo

Activation is two lines of clikernel user config: register the rules in $XDG_CONFIG_HOME/clikernel/inspectors.py (from llmdojo.rules import make_inspector, RuleBlock; inspectors = [make_inspector()]), and have your startup file print the bootstrap instructions that tell the agent to run the dojo.

Start a session

dojo_start() deals a scored practice round inside a clikernel session. Pass the completion id from a clean round to skip replaying it while that receipt remains valid.

Claude Code and Codex can start with a reviewed round already in their history:

$ claudedojo
$ codexdojo

Arguments after either command pass through to the underlying agent. After compaction, append the worked round to the existing conversation and resume it:

$ claude -r $(claudedojo -r)
$ codex resume $(codexdojo -r)

Template maintainers can capture fresh rounds with claudedojo --capture and codexdojo --capture, import an existing Codex round with codexdojo --capture-current, and compile a reviewed dialog with --build <dialog.ipynb>.

State and templates

Doc-state records which tool documentation the agent has read for a conversation. Closing and resuming restores that record; compaction clears it because the corresponding documentation has left the model’s context. A warm-start template seeds both doc-state and its clean-round completion receipt before the agent resumes.

Completion receipts and templates carry the dojo tooling version. A version change invalidates old receipts and prevents an outdated template from launching. dojo_version() reports the installed version:

from llmdojo.dojo import dojo_version
dojo_version()
'0.0.1:3'

Limitations

A tooling rename does not change the dojo version automatically. Rebuild templates whenever names used by the worked round or its documentation change.

Doc-state host detection has two conservative fallbacks. Two simultaneous Claude conversations in the same project can select the wrong transcript record. Codex’s MCP worker is keyed by parent process id, so compaction clears all numeric records; another live Codex session may receive extra documentation reminders. The reminders are harmless.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llmdojo-0.0.1.tar.gz (103.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llmdojo-0.0.1-py3-none-any.whl (100.8 kB view details)

Uploaded Python 3

File details

Details for the file llmdojo-0.0.1.tar.gz.

File metadata

  • Download URL: llmdojo-0.0.1.tar.gz
  • Upload date:
  • Size: 103.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for llmdojo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aea37e09017cc72446700d1eefbeca181c270498e7192d082f38112b2b208b1f
MD5 c7f0b5c1dd964d564c608e701e228104
BLAKE2b-256 2cec14e6210cf2610672be9c11393d7540a957461e66977922d3362ea91a2bca

See more details on using hashes here.

File details

Details for the file llmdojo-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: llmdojo-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 100.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for llmdojo-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95d2849c505518520a08b19376f8cfa96f69dd8db061b6ef10df43a111f969f6
MD5 b4dfbfec22b8b3da0dbf1a63f85084f0
BLAKE2b-256 c72f91e2c311f36df2e42ca68ef4f198173742afb4d0e89790ef4af5d1f4a2e6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

This release

0.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page