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
Search
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
parse_proposals
repair_yaml
searched_terms
to_glossary_yaml
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
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).