lci-side-effects

Maps lci purity, side-effect, and semantic annotation analysis code paths and compares them against other analyzers.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/standardbeagle/lci-cpp --skill lci-side-effects-standardbeagle
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lci-side-effects
Source: https://github.com/standardbeagle/lci-cpp/tree/main/.agents/skills/lci-side-effects
Command: npx skills add https://github.com/standardbeagle/lci-cpp --skill lci-side-effects-standardbeagle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on lci's function purity and side-effect analysis requires navigating a large C++ codebase spanning AST extraction, call-graph propagation, MCP handlers, and annotation parsing, with many invariants and known traps that are easy to violate. ## Core Features & Use Cases - Code Map: Pinpoints every surface and file:line entry for the side_effects and semantic_annotations MCP tools, the purity block in get_context, and the analyzer pipeline from tree-sitter extraction to transitive fixpoint propagation. - Invariants and Traps: Documents conservative-classification rules, determinism requirements, sink wiring order, known gaps (Go closures, stale incremental records, dead category flags), and doc drift issues. - Probe Recipes and Tests: Provides ready JSON-RPC probe commands, targeted gtest filters, and a before/after corpus-diff recipe for classifier changes. - Use Case: When changing the callee-category keyword tables, use this Skill to find classify_callee_category, run the word-boundary tests, and diff classification output against a real corpus in both directions. ## Quick Start Ask the AI to locate the purity and side_effects code paths in the lci repo and explain how transitive impurity propagation works before modifying the classifier.

Frequently Asked Questions about lci-side-effects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does lci detect function side effects and purity?▼

lci combines AST facts recorded during tree-sitter extraction (writes to params, globals, closures, throws) with a conservative callee-name keyword heuristic for io, network, db, and throw categories. Impurity then propagates upstream through the call graph via a fixpoint with confidence decay.

How do I query the side_effects MCP tool in lci?▼

Call the side_effects tool over MCP with a mode argument: symbol, file, pure, impure, category, or summary (the default). Send JSON-RPC tools/call requests to `lci mcp -r <repo>` after indexing, optionally with include_reasons and include_transitive flags.

How do @lci: annotations work in lci?▼

Author-written `@lci:labels[...]` comment labels or JSON manifests under `.lci/annotations/` are parsed by the SemanticAnnotator and propagated across the call graph by the GraphPropagator with strength decay. Query them with the semantic_annotations MCP tool using label or category.

lci vs Infer or CodeQL for purity analysis?▼

lci is syntactic-heuristic: tree-sitter AST facts plus name-based keyword tables with no dataflow, computed once at warmup for fast MCP queries. Infer and Frama-C use abstract interpretation and CodeQL uses typed dataflow, offering deeper analysis at much higher latency.

What are the known limitations of lci purity analysis?▼

Known gaps include closures folding into the enclosing function, stale records after incremental reindex, unwired column keys causing same-line collisions, no producers for kFieldWrite/kAsync/kReflection flags, and no labelled ground-truth corpus so precision and recall are unmeasured.

Why does lci side_effects return analysis_unavailable?▼

An empty analyzer returns error analysis_unavailable rather than reporting 100% pure, by design. This happens when no indexed functions were analyzed, for example on directories containing only unsupported languages.