feat: LLM Runtime Integration modifier (L0-L4)#22
Conversation
Introduces a cross-cutting modifier (L0-L4) that describes how heavily the software integrates LLMs at runtime, separate from the 5 code dimensions. L3+ pushes the effective tier floor: - L3 (Tool Use) → min Tier 3 - L4 (Agentic) → min Tier 4 At L3+, a callout points to specialized frameworks (OWASP LLM Top 10, Palo Alto SHIELD, Aikido VCAL, Google SAIF) since the built-in mitigation catalog covers build-time risks only. Phase 1 (data model + tier logic): - getTierIndex(values, llmRuntimeLevel) with hard floor multiplier - llmRuntimeLevel state in RiskRadar, passed to RadarChart - RadarChart's rAF updater reads level via ref (closure-safe) Phase 2 (minimal UI): - Pill-button row between chart and tier badge - Callout box at L3+ with framework links - DE/EN i18n for labels, level descriptions, callout text Phases 3-5 (presets, extended docs, skills integration) follow. Refs LLM-Coding#20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds three new presets demonstrating the LLM Runtime Modifier: - Support Chatbot / Chatbot → L2 (generative output) - RAG Knowledge Assistant / RAG-Wissensassistent → L3 (tool use) - Coding Agent / Coding-Agent → L4 (agentic) Clicking any preset now sets llmRuntimeLevel explicitly (defaulting to 0 for legacy presets via `?? 0`), so switching between classical and LLM-integrated presets resets the modifier correctly. The active state also compares levels to prevent false-positive highlights. Refs LLM-Coding#20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New docs section explains the cross-cutting modifier: - Build-time vs runtime distinction - L0-L4 escalation ladder with risks per level - Hard tier multiplier (L3 → Tier 3, L4 → Tier 4) - Why the built-in mitigation catalog is insufficient from L3 on, with links to OWASP LLM Top 10, Palo Alto SHIELD, Aikido VCAL, Google SAIF Placed after "mitigations" and before "references" in DE + EN. Refs LLM-Coding#20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extends the /risk-assess and /risk-mitigate skills with LLM Runtime Integration handling: shared/risk-model.md: - New LLM Runtime Integration section with escalation ladder (L0-L4), tier multiplier rules, auto-detection grep patterns for LLM SDKs (anthropic, openai, langchain, @ai-sdk/*, etc.), agentic indicators, and sandbox/code-execution detection - Updated tier calculation to include the cross-cutting floor - CLAUDE.md output format now includes llmRuntimeLevel field risk-assess/SKILL.md: - Step 2f: LLM Runtime detection (SDK imports + agentic patterns) - Step 3d: Interactive confirmation (ALWAYS ask, even for L0) - Step 4a: Tier calculation with modifier, explicit lift note risk-mitigate/SKILL.md: - Step 1: Parse llmRuntimeLevel from CLAUDE.md - Step 3b: Callout for L3+ modules pointing to OWASP LLM Top 10, Palo Alto SHIELD, Aikido VCAL, Google SAIF — the skill does not install runtime mitigations but tracks them as pending in CLAUDE.md since they require architectural decisions Closes LLM-Coding#20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR implements LLM Runtime Integration as a cross-cutting modifier to the Risk Radar system, adding L0–L4 runtime risk detection and assessment independent of code dimensions. It updates tier calculations, skills documentation, UI components, and i18n content to support runtime risk selection and framework-based mitigation references. Changes
Sequence DiagramsequenceDiagram
actor User
participant RiskRadar as RiskRadar.jsx
participant RadarChart as RadarChart.jsx
participant Utils as getTierIndex()
User->>RiskRadar: Click LLM Runtime Level (L0–L4)
RiskRadar->>RiskRadar: Update llmRuntimeLevel state
RiskRadar->>RiskRadar: Trigger tier recalculation
RiskRadar->>Utils: getTierIndex(roundedValues, llmRuntimeLevel)
Utils->>Utils: baseTier = max(code dimensions)
Utils->>Utils: floor = (llmRuntimeLevel >= 3) ? 2 : (llmRuntimeLevel >= 4) ? 3 : 0
Utils->>Utils: finalTier = max(baseTier, floor)
Utils-->>RiskRadar: Return updated tier index
RiskRadar->>RadarChart: Pass llmRuntimeLevel + new tier via props
RadarChart->>RadarChart: Re-render with updated tier styling
RiskRadar->>RiskRadar: Conditionally render callout (if L3+)
RiskRadar-->>User: Display updated tier + framework links
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds a cross-cutting LLM Runtime Integration modifier (L0–L4) that captures how the software uses LLMs at runtime, separate from the 5 code dimensions. This addresses a gap in the framework: the 5 dimensions describe the written code, but agentic systems (Claude Code, RAG assistants, chatbots) have qualitatively different runtime risks — prompt injection, unauthorized tool calls, code execution.
Closes #20. Implementation plan & decisions documented in the issue comments.
What's new
UI (between chart and tier badge)
Tier logic — hard multiplier
New presets
Existing presets reset the modifier to L0 on click.
Documentation sidebar
Skills integration
Commits (5 phases)
Design decisions
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Documentation