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: the Codex mirror - the same canonical template compiled to native Responses items, launching and re-warming Codex threads through app-server.

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. Each launcher prepares a warm-start conversation and runs its tool on it: standing arguments such as system-prompt files come from the claude_args/codex_args list in $XDG_CONFIG_HOME/claudedojo/config.toml or $XDG_CONFIG_HOME/codexdojo/config.toml, unrecognized flags are forwarded (values in --flag=value form), and --sid prints the prepared id instead of launching:

$ claudedojo
$ codexdojo

After compaction, -r appends the worked round to the existing conversation instead of preparing a fresh one, and -c compacts the conversation offline first:

$ claudedojo -r
$ codexdojo -r

Update the templates

The templates ship inside the package - the canonical dialog plus the compiled per-host stores - so using fresh templates takes no action beyond updating llmdojo. Maintaining them is one command: when tooling docs or skills change, the baked round’s outputs go stale, and dojobuild regenerates them with no model spend - it replays the round’s cells through a fresh kernel, splices the current outputs into the canonical template dialog, and recompiles both stores, all in your checkout for review:

$ dojobuild

Only a change to the round itself - its cells, not their outputs - needs a fresh capture: claudedojo --capture plays a scripted round headlessly, codexdojo --capture does the same in a Codex child, and --current on either stores a clean round an existing session already played. After reviewing a captured dialog, dojobuild --claude and dojobuild --codex compile it into each store without re-replaying.

The bootstrap doc() reads (the cells before dojo_start()) live in two artifacts: dojo_data/capture_prompt.md, the script future captures replay, and the baked round in the canonical dialog itself. To change the set, update both, keeping each new doc(x) as its own cell placed after the doc(clik, pysk, edsk) one, then run dojobuild, which replays the new cell for a true output and recomputes the stored doced list. Updating only one leaves the demonstration and the capture script teaching different bootstraps.

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: run dojobuild whenever documentation or receipts the round shows have changed, and bump the round revision in dojo.py when the round itself must be replayed by every session.

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.5.tar.gz (176.8 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.5-py3-none-any.whl (175.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmdojo-0.0.5.tar.gz
  • Upload date:
  • Size: 176.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for llmdojo-0.0.5.tar.gz
Algorithm Hash digest
SHA256 75e38e407a295ef68a2bdbecf6fa06b41b6d63fd72d696e7d07c42f81afb8df4
MD5 3dd29322677950bc68524462c459e175
BLAKE2b-256 9686087e77960702485436af736c08e31ad1dd75668f6d6556ee0cb32fe7042e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmdojo-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 175.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for llmdojo-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bd9211f9c33de7de1ce8aba27b9b60d213220a4307a5fc18c7039768042c8a87
MD5 57c6678fef4a310a10e3d60c16406c0e
BLAKE2b-256 2c3bb2a7132c980d6be49d0ae4b5485dd3f100ea4b20d68098407e2e523ca056

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.6

2 files

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

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