Context. The entire intent-classification procedure (schema + 6 rules + hard constraints — intent_v1.txt is 66 lines) is hard-wired as module-level constants _PROMPT_PATH/_PROMPT_VERSION in OpenAIProvider, inherited verbatim by LocalInferenceProvider. A fine-tuned checkpoint that has internalized the procedure still gets the whole procedure re-injected every request — defeating the per-token win. Most surgical, best-grounded rec; prerequisite for any compiled-checkpoint payoff. Relates to #82 (prompt_version in LLMProvenance).
Proposal. Promote the prompt path/version to constructor args; add a minimal compiled prompt variant.
OpenAIProvider(prompt_path=..., prompt_version=...) — defaults unchanged (intent_v1.txt/'v1'), preserving the determinism harness + byte-compat.
- Add
analysis/llm/prompts/intent_compiled_v1.txt — only the schema echo + $intent/$context_json slots.
- Add
LocalInferenceProviderSpec.prompt: Literal['full','compiled'] = 'full'; Broker._build_llm_provider passes the selected template.
prompt_version keeps flowing into LLMProvenance + the audit entry so the version hook + audit stream stay intact.
Where.
nautilus/analysis/llm/openai_provider.py:48-49 (_PROMPT_PATH/_PROMPT_VERSION) + :82-83 (template read); local_provider.py:38-54 (ctor); config/models.py:257-264 (LocalInferenceProviderSpec); core/broker.py:663-671 (local-provider build); LLMProvenance (base.py:96 / fallback.py:123); audit (broker.py:421).
Acceptance criteria.
Caveat. A minimal prompt against a model that did NOT internalize the procedure silently degrades classification — gate behind explicit opt-in; document that 'compiled' requires a compiled checkpoint. Keep the compiled prompt in sync with the IntentAnalysis schema.
Source: arXiv:2605.22502v1 — "Compiling Agentic Workflows into LLM Weights" (subterranean agents). Distilled from arXiv-research/2605.22502v1/analysis.md; file refs verified against current main by the analysis pass.
Context. The entire intent-classification procedure (schema + 6 rules + hard constraints —
intent_v1.txtis 66 lines) is hard-wired as module-level constants_PROMPT_PATH/_PROMPT_VERSIONinOpenAIProvider, inherited verbatim byLocalInferenceProvider. A fine-tuned checkpoint that has internalized the procedure still gets the whole procedure re-injected every request — defeating the per-token win. Most surgical, best-grounded rec; prerequisite for any compiled-checkpoint payoff. Relates to #82 (prompt_versioninLLMProvenance).Proposal. Promote the prompt path/version to constructor args; add a minimal compiled prompt variant.
OpenAIProvider(prompt_path=..., prompt_version=...)— defaults unchanged (intent_v1.txt/'v1'), preserving the determinism harness + byte-compat.analysis/llm/prompts/intent_compiled_v1.txt— only the schema echo +$intent/$context_jsonslots.LocalInferenceProviderSpec.prompt: Literal['full','compiled'] = 'full';Broker._build_llm_providerpasses the selected template.prompt_versionkeeps flowing intoLLMProvenance+ the audit entry so the version hook + audit stream stay intact.Where.
nautilus/analysis/llm/openai_provider.py:48-49(_PROMPT_PATH/_PROMPT_VERSION) + :82-83 (template read);local_provider.py:38-54(ctor);config/models.py:257-264(LocalInferenceProviderSpec);core/broker.py:663-671(local-provider build);LLMProvenance(base.py:96/fallback.py:123); audit (broker.py:421).Acceptance criteria.
prompt='compiled'selects the minimal template;prompt_versiondistinguishes full vs compiled in provenance/audit.Caveat. A minimal prompt against a model that did NOT internalize the procedure silently degrades classification — gate behind explicit opt-in; document that
'compiled'requires a compiled checkpoint. Keep the compiled prompt in sync with theIntentAnalysisschema.Source: arXiv:2605.22502v1 — "Compiling Agentic Workflows into LLM Weights" (subterranean agents). Distilled from
arXiv-research/2605.22502v1/analysis.md; file refs verified against currentmainby the analysis pass.