Skip to main content
Authoring tools: they WRITE the config files a deployment injects; the runtime never imports them.

authoring.build

Build a proposed glossary: texts -> candidate terms -> agent -> repaired, validated, confidence-capped proposals -> glossary.proposed.yaml.

BuildReport

build_glossary

authoring.candidates

Candidate terms: what the builder is asked to decide. Found by patterns over the passage texts, counted, and capped.

Candidate

find_candidates

authoring.cli

python -m ladygraph.authoring <build | doctor | approve> … (see docs/glossary_builder.example.yaml)

main

authoring.config

The glossary_builder: section of ladygraph.yaml: how the term-list builder runs (docs/glossary_builder.example.yaml).

Candidates

Gateway

The model endpoint the agent talks to: an Anthropic-compatible gateway you run yourself (LiteLLM is one).

GlossaryBuilderConfig

Limits

Web search for PUBLIC terms.

load_builder_config

authoring.proposals

What the agent wrote, made safe: repaired YAML, validated entries, confidence capped by evidence, glossary-format output.

Proposal

cap_confidence

high stays only with a logged search that names the term or an expansion in the documents; else it becomes medium.

explicit_expansion

True when some text spells the term out: the words just before “(TERM)” start with its letters.

parse_proposals

{term: Proposal} for the terms that were asked about, plus counts of what was repaired or dropped.

repair_yaml

Quote every field value that is not already a plain scalar (harmless).

searched_terms

The queries the guarded search tool ran (one JSON line each).

to_glossary_yaml

Text in the llm/glossary.yaml format (every entry status: proposed), and the terms left unresolved (no English).

authoring.runner

The agent runner: Claude Code (headless, --bare) whose ENGINE is a model served by a gateway (LiteLLM or any Anthropic-compatible endpoint). The harness is the sandbox: --bare skips user settings and hooks, --tools Read,Edit leaves it no shell, no write-anywhere and no web, and the only extra tool is the guarded search_term (authoring/search_guard.py). It reads a work folder and appends en

ClaudeCodeRunner

Construct with ClaudeCodeRunner(cfg: GlossaryBuilderConfig, domain: str = 'documents', on_event: Optional[Callable[[dict], NoneType]] = None).

RunnerError

RunResult

gateway_key

The key sent to the gateway: the environment variable the config names, else the local default (a localhost gateway).

authoring.search_guard

A minimal MCP server (stdlib JSON-RPC over stdio) with ONE tool, search_term. The privacy rule is enforced here, in code: the query must be a term (few words, one line), so no sentence of the documents can leave. Every query is logged. Usage (written into the harness’s mcp config by the runner): python -m ladygraph.authoring.search_guard —env TAVILY_SEARCH_API —log queries.jsonl The key is rea

refusal

search

serve

authoring.trace

Live view of what the agent does while build runs: its tool calls, its words and (with --trace) its thinking and tool results.

Tracer

on_event for ClaudeCodeRunner. Construct with Tracer(level: str = 'actions', stream: typing.TextIO \| None = None, workdir: pathlib.Path \| None = None).

lines_for

The lines to show for one stream-json event (pure: no printing, no clock).

parse_line

One line of the harness log as an event, or None for a line that is not JSON.

work_folder_intro

What the lines below refer to: the agent runs INSIDE this folder, and these are the files it reads and writes.