@agent-quorum:knowledge:references:consensus-tools:languagesfrom quorum — Cross-Model Audit Gate
Language registry providing pattern definitions for symbol detection, import parsing, and quality rules (perf, security, a11y, compat, observability, doc) across TypeScript, Go, Python, Rust, Java. Use this to understand tool checks or add new languages.
Ships in quorum — Cross-Model Audit Gate. Installing the plugin adds it to Claude Code.
The language registry (languages/registry.mjs) provides language-aware analysis for all domain scan tools. Read this when you need to understand what patterns a tool checks or when adding a new language.
languages/
├── registry.mjs ← Auto-discover + fragment merge engine
├── typescript/
│ ├── spec.mjs ← Core metadata only (id, name, extensions)
│ ├── spec.symbols.mjs ← Symbol detection regexes → spec.symbols
│ ├── spec.imports.mjs ← Import/export parsing → spec.imports
│ ├── spec.perf.mjs ← Performance anti-patterns → spec.qualityRules.perf
│ ├── spec.a11y.mjs ← Accessibility rules → spec.qualityRules.a11y
│ ├── spec.compat.mjs ← API compat rules → spec.qualityRules.compat
│ ├── spec.observability.mjs ← Logging/metrics rules → spec.qualityRules.observability
│ └── spec.doc.mjs ← Doc comment patterns → spec.docPatterns
├── go/ ← Same fragment structure (security instead of a11y)
├── python/
├── rust/
└── java/
Each fragment powers specific analysis tools:
| Fragment | Target Field | Used By Tools |
|---|---|---|
spec.symbols.mjs | spec.symbols | code_map — symbol detection (functions, classes, types) |
spec.imports.mjs | spec.imports | dependency_graph — import/export parsing |
spec.perf.mjs | spec.qualityRules.perf | perf_scan — performance anti-patterns |
spec.a11y.mjs | spec.qualityRules.a11y | a11y_scan — accessibility issues |
spec.compat.mjs | spec.qualityRules.compat | compat_check — API compatibility |
spec.security.mjs | spec.qualityRules.security | audit_scan — security patterns |
spec.observability.mjs | spec.qualityRules.observability | observability_check — logging/metrics |
spec.doc.mjs | spec.docPatterns | doc_coverage — documentation completeness |
spec.mjs is metadata only. The registry enforces CORE_FIELDS whitelist:
| Field | Type | Description |
|---|---|---|
id | string | Language identifier (e.g., "typescript") |
name | string | Display name (e.g., "TypeScript / JavaScript") |
extensions | string[] | File extensions (e.g., [".ts", ".tsx", ".js"]) |
endBlock | string | Block end strategy: "brace" / "indent" / "end-keyword" |
commentPrefixes | string[] | Comment markers for filtering |
jsxExtensions | string[] | JSX-capable extensions (a11y_scan uses this) |
i18nHardcodedRe | RegExp | Hardcoded string detection pattern (i18n_validate uses this) |
Non-core fields in spec.mjs are stripped with a warning. All domain data MUST be in fragments.
| Language | extensions | perf | security | a11y | compat | observability | doc |
|---|---|---|---|---|---|---|---|
| TypeScript | .ts .tsx .js .jsx .mjs .mts | ✓ | — | ✓ | ✓ | ✓ | ✓ |
| Go | .go | ✓ | ✓ | — | ✓ | ✓ | ✓ |
| Python | .py .pyi | ✓ | ✓ | — | ✓ | ✓ | ✓ |
| Rust | .rs | ✓ | ✓ | — | ✓ | ✓ | ✓ |
| Java | .java | ✓ | ✓ | — | ✓ | ✓ | ✓ |
Each quality rule in a fragment is an object:
{
re: /pattern/flags, // Regex to match
label: "pattern-name", // Unique identifier
severity: "high|medium|low",
msg: "Human-readable explanation"
}
Example from TypeScript spec.perf.mjs:
{ re: /\.forEach\s*\([^)]*=>\s*\{[\s\S]{0,200}\.forEach/m,
label: "nested-loop", severity: "high",
msg: "Nested .forEach() — potential O(n²)" }
perf_scan uses hybrid scanning: regex first pass (speed) → AST second pass (precision, TypeScript only). The astRefine callback in runPatternScan enables this.
Other domain scans currently use regex-only scanning. AST refinement may be extended to more tools.
languages/{lang}/spec.mjs with core metadataspec.symbols.mjs, spec.imports.mjs, etc.node --test tests/language-registry.test.mjsscan-ignore PragmaAdd // scan-ignore to any source line to suppress runPatternScan findings on that line. Used for self-referential pattern definitions (e.g., perf_scan's own regex patterns).
What the agent file sets; muted values are Claude Code's defaults
7-day visitors to each agent page
npx claudepluginhub berrzebb/quorum --plugin quorum115 agents in this plugin
Other plugins' agents for the same job