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, and gating rules block the genuinely dangerous.
  • 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. Updating only one leaves the demonstration and the capture script teaching different bootstraps.

State and templates

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.6.tar.gz (169.1 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.6-py3-none-any.whl (170.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmdojo-0.0.6.tar.gz
  • Upload date:
  • Size: 169.1 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.6.tar.gz
Algorithm Hash digest
SHA256 58beb7c7e46fde66b69c1edf88b887bede2fd9608e7fdb86be2dbeda86d89614
MD5 c07ad6ba4d6c75a81af8c73e427b6d0d
BLAKE2b-256 494e8fd8d891c542a7e84780f80c4e44b5e8e2f57455cda7d3e21120948014be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmdojo-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 170.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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 134664ecfb2425f17c715be082ff81fc5a0a538c26696ef4f70b6a2ef438e47c
MD5 9e44a7e171630f856579359942fdf2b9
BLAKE2b-256 dbbcfe400dab69e4c591831aee6cc51d1fd6e8224fc27b102ab5cb4987af30ba

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 files

0.0.5

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