@aiready/ai-signal-clarity
v0.1.11
Published
Detects code patterns that cause AI models to hallucinate incorrect implementations
Readme
@aiready/ai-signal-clarity
AIReady Spoke: Identifies code patterns, naming ambiguities, and logic traps that frequently cause AI model hallucinations.
Overview
AI models often generate incorrect code when they encounter ambiguous signals in the codebase. The AI Signal Clarity analyzer (formerly hallucination-risk) scans for high-entropy patterns that undermine AI reasoning.
🏛️ Architecture
🎯 USER
│
▼
🎛️ @aiready/cli (orchestrator)
│ │ │ │ │ │ │ │ │
▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼
[PAT] [CTX] [CON] [AMP] [DEP] [DOC] [SIG] [AGT] [TST]
│ │ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
│
▼
🏢 @aiready/core
Legend:
PAT = pattern-detect CTX = context-analyzer
CON = consistency AMP = change-amplification
DEP = deps-health DOC = doc-drift
SIG = ai-signal-clarity ★ AGT = agent-grounding
TST = testability ★ = YOU ARE HEREFeatures
- Boolean Trap Detection: Flags multi-boolean parameter patterns where AI often flips intent.
- Magic Literal Detection: Identifies unnamed constants that AI struggles to interpret.
- Naming Entropy: Detects variable names with multiple semantic interpretations in the same context.
- Ambiguous API: Surfaces untyped exports that prevent AI from inferring interface contracts.
Installation
pnpm add @aiready/ai-signal-clarityUsage
This tool is designed to be run through the unified AIReady CLI.
# Scan for AI signal clarity issues
aiready scan . --tools ai-signal-clarity
# Alias for backwards compatibility
aiready scan . --tools hallucination-riskLicense
MIT
