Hybrid Runtime
Use rules for known packets, use synthesis only when ambiguity is real.
Install
One-line install
npx attrition-sh pack install hybrid-runtime
AGENTS.md snippet (Claude Code / Cursor)
# Hybrid Runtime # See: /packs/hybrid-runtime
Raw Markdown
Machine-readable body for agent ingestion or copy/paste.
Telemetry
Not yet measuredSummary
A disciplined runtime pattern that reserves deterministic rendering for tightly scoped known cases and uses an LLM only for bounded synthesis, not as the default execution path for every question.
Fit and expected payoff
When this pack earns its extra structure, when to skip it, and what it should improve.
Use when
Situations where this pack earns its extra structure.
- Many requests map to known issue packets or stable policies.
- The team wants lower cost and more predictable answers for common cases.
- The same answer shape needs to hold across both deterministic and synthesized runs.
Avoid when
Keeps the pack from becoming a default hammer.
- The domain is highly unstructured and almost every request is novel.
- The deterministic path is weak enough that it adds noise instead of reliability.
What it improves
Expected outcomes if implemented well.
- Routine questions become cheaper and more stable.
- The model is reserved for where synthesis adds value.
- The runtime has a cleaner boundary between retrieval, rendering, and reasoning.
Minimal instructions
Smallest useful starting point.
Route the request first. If the request matches a known packet with explicit policy or action steps: - answer deterministically If the request spans multiple packets or requires ambiguity handling: - run the bounded synthesis path Do not default to a full agent run for every request.
Full instructions
Complete natural-language instruction set.
Build a hybrid runtime. Path A: deterministic - use canonical issue or entity packets - render from rules and trusted fields - cite exact identifiers and thresholds Path B: bounded LLM synthesis - only after routing decides deterministic coverage is insufficient - limit the model to the validated evidence set - preserve the same answer packet and quality gate shape The value is not fewer models. The value is a cleaner decision boundary.
Evaluation checklist
These checks should pass before you consider the pattern production-ready.
- Do known packets render without unnecessary model usage?
- Does the LLM path only activate when the request exceeds deterministic coverage?
- Do both paths emit the same answer packet shape and review metadata?
Common failure modes
Every check below traces back to a specific production failure. Read as: "I would think about X because in production Y can happen."
- Mid
Everything routes to the model because deterministic coverage is not well defined.
- Trigger
- (legacy — trigger not separated)
- Prevention
- (legacy — no explicit prevention)
- Mid
Deterministic answers are too brittle because packets are incomplete.
- Trigger
- (legacy — trigger not separated)
- Prevention
- (legacy — no explicit prevention)
- Mid
The two paths produce different output contracts and confuse the UI.
- Trigger
- (legacy — trigger not separated)
- Prevention
- (legacy — no explicit prevention)
Official docs and implementation references
Anthropic: Building effective agents
Use workflows where they are sufficient; escalate to agents only when needed.
https://www.anthropic.com/research/building-effective-agentsFloorAI repo
Reference implementation of deterministic and synthesized answer paths in one runtime.
https://github.com/HomenShum/floorai