llm-operations

79 beliefs (59 IN, 20 OUT)

This topic covers how the reasons system integrates with external LLM services and manages multi-agent belief import, addressing two fundamental challenges: how to safely incorporate LLM-generated content into a truth maintenance network, and how to import and isolate beliefs from external agent sources without corrupting local reasoning. These concerns matter because LLMs produce unbounded, potentially malformed output, and multi-agent scenarios introduce namespace collisions, lifecycle coordination, and cross-contamination risks.

The agent import subsystem is built around a two-node relay mechanism: each imported agent gets an active premise and a derived inactive node that function as a kill switch (active-inactive-relay-pair). The inactive node is placed in every imported belief's outlist rather than as an antecedent (kill-switch-uses-outlist-not-antecedent), a deliberate design choice that preserves per-belief retraction semantics — if the active node were an antecedent, it would create an alternative justification path that defeats individual retraction (active-not-in-antecedents). Namespace isolation uses a colon-separated prefix convention where every imported node gets an agent-name prefix (import-agent-namespace-prefix, namespace-prefix-is-colon-separated), and cascades from retracting one agent's active premise do not propagate to other agents (agent-cascades-are-isolated-by-namespace). The kill switch is fully reversible: re-asserting the active premise restores all agent beliefs via BFS propagation (kill-switch-cascade-is-reversible). Import handles mixed truth states carefully — beliefs marked OUT in the source receive empty justification lists to prevent resurrection by recompute (import-agent-out-beliefs-not-resurrected), and nodes are added before explicit retractions are applied to ensure the dependency graph is fully wired first (deferred-retraction-ordering).

LLM integration enforces safety at multiple boundaries. All LLM calls execute through subprocess isolation with CLAUDECODE environment stripping to prevent recursive invocation (all-external-execution-is-subprocess-isolated, invoke-model-strips-claudecode-env), and prompts are passed via stdin rather than command-line arguments to avoid shell injection (llm-prompt-always-via-stdin). The derive pipeline validates proposals with fail-soft filtering and Jaccard retraction guards at the LLM boundary, while the API layer enforces atomic persistence at the storage boundary (llm-driven-mutations-are-safely-bounded). The list-negative classification pipeline uses two-stage filtering — keyword pre-filtering followed by batched LLM classification (list-negative-uses-two-stage-classification) — with a resilient parser that extracts JSON from prose-laden responses and falls back to zero results on complete failure (list-negative-parser-is-fully-resilient). The review pipeline operates entirely on in-memory snapshots (review-has-no-storage-dependency), evaluates only derived beliefs with premises excluded (review-skips-premises), and defaults missing LLM response fields to passing to avoid false alarms (review-parse-defaults-safe). Auto-retraction from review is gated behind a dry-run flag (auto-retract-respects-dry-run).

A significant number of beliefs in this topic are OUT, predominantly higher-level synthesis nodes that attempted to compose multiple safety properties into unified claims. These include broad assertions about production hardening (llm-integration-is-production-hardened), defense-in-depth across layers (llm-integration-is-defense-in-depth-across-layers), and complete lifecycle coverage (review-completes-llm-quality-lifecycle). Their retraction suggests that while the individual safety mechanisms are well-established and verified, the composite claims that bundled them together were found to overreach or became stale as the underlying beliefs they depended on were revised. The granular, mechanistic beliefs about specific behaviors — how parsing works, what gets stripped, which batching size is used — remain solidly IN, reflecting that the system's safety story is better understood as a collection of specific, verified properties than as a single sweeping guarantee.