Experimental, early beta. Data model and interfaces are unstable; expect breaking changes between releases.

Query Catalog

91 named Datalog queries shipped with Noumenon, grouped by purpose. Run with noum query <name> [args...] or invoke via MCP noumenon_query.

Hotspots and Risk (6)

NameDescriptionInputs
bug-hotspotsFiles ranked by number of fix commits
churn-by-dirDirectories ranked by total lines added and deleted
complex-hotspotsFiles that are both high-churn and high-complexity
hotspotsFiles ranked by number of commits (churn)
smells-by-typeCode smell types ranked by occurrence count
tech-debt-by-dirDirectories ranked by count of code smells across segments

Files (12)

NameDescriptionInputs
file-authorsAuthors of a specific file with commit countsfile-path
file-historyCommits that touched a given file, with author and datefile-path
file-importersFiles that directly import a given file (reverse lookup)file-path
file-importsDirect imports for a given filefile-path
file-segment-callsCall graph within a file — segment to called names [requires inputs: file-path]file-path
file-segment-issuesCode smells for segments in a file [requires inputs: file-path]file-path
file-segment-safetySafety concerns for segments in a file [requires inputs: file-path]file-path
file-segmentsAll code segments in a file with full detail [requires inputs: file-path]file-path
files-by-churnFiles ranked by total lines added and deleted
files-by-complexityList analyzed files grouped by complexity rating
files-by-layerList analyzed files grouped by architectural layer
orphan-filesSource code files that neither import nor are imported by any other file — excludes config, data, CI, and doc files

Code Segments (8)

NameDescriptionInputs
ai-authored-segmentsCode segments rated as likely or possibly AI-generated
deprecated-but-activeDeprecated segments in files that still receive commits
deprecated-segmentsCode segments marked as deprecated
pure-segmentsPure (side-effect-free) code segments
segment-callersSegments that call a given segment — reverse call graph [requires inputs: file-path, segment-name]file-path, segment-name
segments-by-complexityCode segments grouped by complexity rating
segments-with-safety-concernsCode segments flagged with security or safety concerns
uncalled-segmentsSource code segments whose name does not appear in any other segment's call-names — excludes tests, data files, and import statements

Components and Architecture (10)

NameDescriptionInputs
component-authorsAuthors who contributed to a component, ranked by commits [requires params: component-name]component-name
component-bus-factorComponents ranked by distinct author count — low count means high bus-factor risk
component-churnComponents ranked by total churn (commits touching their files)
component-dep-driftCompare LLM-declared vs import-derived component dependencies — shows undeclared imports and ungrounded declarations
component-dependenciesDirect dependencies of a component [requires params: component-name]component-name
component-dependentsComponents that depend on a given component (reverse deps) [requires params: component-name]component-name
component-filesFiles in a given component with layer and complexity [requires params: component-name]component-name
componentsList all components with summary, layer, category, complexity, and file count
cross-component-importsImport edges that cross component boundaries — coupling between components
subsystemsDistinct subsystem groupings with component count and file count

Imports and Dependencies (9)

NameDescriptionInputs
all-import-edgesAll file-to-file import edges
boundary-crossingsImport edges that cross architectural layer boundaries
circular-importsFile pairs that directly import each other (import cycles)
cross-dir-importsImport edges between files in different top-level directories
dependency-driftFiles ranked by number of resolved imports (coupling hotspots)
dependency-hotspotsFiles ranked by number of dependencies (imports)
shared-dependenciesDependencies shared across the most files
test-impactTest files to run after changing a given file (transitive import analysis)file-path
transitive-impactAll files transitively imported by a given filefile-path

Authors and Contributors (6)

NameDescriptionInputs
author-spreadAuthors ranked by number of distinct files and directories touched
authors-by-fileFiles with their authors and commit counts
bus-factorFiles with count of distinct authors (low count = high bus-factor risk)
bus-factor-by-dirDirectories ranked by number of distinct commit authors
fix-authorsPeople ranked by number of fix commits authored
top-contributorsContributors ranked by number of commits authored

Git History (5)

NameDescriptionInputs
commit-kindsDistribution of commit types (fix, feat, refactor, etc.)
commit-spreadCommits ranked by number of distinct directories touched (shotgun surgery)
commits-by-issueCommits that reference a given issue (by key or URL substring)ref
issue-refsAll unique issue references with commit count
recent-commitsAll commits with author, kind, and diff stats

Ask Sessions (18)

NameDescriptionInputs
ask-agent-reflectionsFull agent reflection data from recent sessions — missing attributes, quality issues, notes
ask-by-callerQuestion count grouped by caller type (human vs ai-agent)
ask-by-channelQuestion count and average duration grouped by channel (cli, ui, mcp)
ask-by-repoQuestion count and average iterations per repository
ask-empty-resultsQuery steps that returned zero results — indicates gaps in the data model
ask-error-stepsSteps where the agent hit parse errors — indicates query patterns that confuse the LLM
ask-feedbackSessions with user feedback — positive and negative ratings with optional comments
ask-high-iterationSessions that used many iterations — complex or poorly-served questions
ask-missing-attributesAttributes or relationships that ask agents needed but couldn't find — data model gaps
ask-negative-feedbackSessions rated negatively by users — highest priority for improvement
ask-popular-queriesMost frequently written Datalog queries across all sessions — identifies common patterns
ask-quality-issuesData quality problems observed by ask agents — wrong, stale, or incomplete values
ask-schema-gapsAttributes queried by the agent that returned no results — likely missing data or wrong attributes
ask-sessionsAll ask sessions with question, status, channel, caller, duration, and iteration count
ask-slowestSlowest ask sessions by wall-clock time — identifies expensive questions
ask-suggested-queriesNamed queries that ask agents wished existed — candidates for new pre-built queries
ask-token-costTotal token usage and session count — track LLM cost of the ask feature
ask-unansweredQuestions that exhausted the iteration budget without a final answer

Benchmarks (3)

NameDescriptionInputs
benchmark-resultsPer-question results for a benchmark runrun-id
benchmark-runsList benchmark runs with aggregate scores, newest first
benchmark-score-trendBenchmark score trend over time for canonical runs

Introspect (6)

NameDescriptionInputs
introspect-by-targetIntrospect iteration outcomes grouped by target type
introspect-failed-approachesReverted and failed introspect iterations — approaches that didn't work
introspect-improvementsIterations that improved the score, with target and delta
introspect-runsList introspect runs with scores and improvement counts, newest first
introspect-score-trendIntrospect score progression over time
introspect-skippedSkipped introspect iterations — parse failures, validation errors, disallowed targets

LLM Cost (3)

NameDescriptionInputs
llm-cost-by-fileLLM cost per analyzed file, most expensive first
llm-cost-by-modelLLM token usage and cost grouped by model
llm-cost-totalTotal LLM token usage and estimated cost

Catalog and Rules (2)

NameDescriptionInputs
index
rules

Other (3)

NameDescriptionInputs
co-changed-filesFile pairs that were changed in the same commits, with count
files-depending-onFiles that depend on a given namespace or moduledependency
import-hotspotsMost-imported files — high fan-in indicates high blast radius

Source-of-truth lives at resources/queries/ in the Noumenon repo. Submit a PR to add a query, then it shows up here on the next site rebuild.