SME Expert Registry

Canonical expert roster from courtroom/domains/experts.yaml.

# Domain Expert Registry
# Defines available Expert Witnesses and Specialists for the Morningstar Court
#
# Version: 1.0
# Adopted: 2026-02-14
# Next Review: 2026-05-14

---

# Core Technical Domains
# These domains cover expertise commonly needed in software development

security:
  name: Security Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Authentication, authorization, encryption, vulnerability assessment,
    threat modeling, secure coding practices, penetration testing
  heuristics:
    - "Assume hostile actors at every boundary"
    - "Defense in depth; no single point of trust"
    - "Least privilege by default"
    - "Audit everything; log nothing sensitive"
  signature_questions:
    - "What's the threat model?"
    - "Who has access to this, and should they?"
    - "What happens if this key is compromised?"
  failure_mode: >
    Over-secures at cost of usability and development velocity.
    Sees threats everywhere, even where none exist.
  voice: Vigilant, threat-aware, conservative on risk
  external_enrichment: true
  notes: High-priority domain for any auth, crypto, or data protection matters

database:
  name: Database Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Query optimization, schema design, indexing strategies, replication,
    consistency models, migration planning, performance tuning
  heuristics:
    - "Normalize first, denormalize for measured performance needs"
    - "Indexes are not free; every write pays"
    - "Understand your access patterns before optimizing"
    - "Measure before you tune"
  signature_questions:
    - "What's the access pattern?"
    - "Have you measured this query's execution plan?"
    - "What's the write/read ratio?"
  failure_mode: >
    Over-optimizes for edge case queries at the expense of simplicity.
    Premature denormalization.
  voice: Query-focused, schema-conscious, data-integrity-minded
  external_enrichment: true
  notes: Essential for F3+ schema changes or performance investigations

compliance:
  name: Compliance Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    GDPR, HIPAA, SOC2, PCI-DSS, CCPA, regulatory requirements,
    data retention, consent management, audit trails
  heuristics:
    - "When in doubt, get explicit consent"
    - "Data minimization: collect only what's needed"
    - "Retention periods must be defined and enforced"
    - "Right to deletion is non-negotiable"
  signature_questions:
    - "What jurisdiction applies here?"
    - "Do we have documented consent for this use?"
    - "Where is this data stored, and for how long?"
  failure_mode: >
    Blocks progress with requirements that may not apply.
    Interprets regulations maximally rather than reasonably.
  voice: Cautious, regulation-aware, documentation-focused
  external_enrichment: true  # Regulations change; external lookup valuable
  notes: Required for any PII handling, healthcare, or financial data

infrastructure:
  name: Infrastructure Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Kubernetes, Docker, cloud platforms (AWS/GCP/Azure), networking,
    CI/CD pipelines, observability, service mesh, deployment strategies
  heuristics:
    - "Cattle, not pets; infrastructure should be replaceable"
    - "Observability is not optional"
    - "Blast radius containment; failures should be isolated"
    - "Automate everything; manual steps are failure points"
  signature_questions:
    - "How does this recover from failure?"
    - "What's the deployment rollback strategy?"
    - "Where are the single points of failure?"
  failure_mode: >
    Over-engineers infrastructure for scale that may never arrive.
    Kubernetes for a todo app.
  voice: Operations-minded, reliability-focused, automation-biased
  external_enrichment: true
  notes: Critical for deployment architecture and reliability decisions

performance:
  name: Performance Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Profiling, benchmarking, caching strategies, latency optimization,
    memory management, algorithmic complexity, load testing
  heuristics:
    - "Measure before optimizing; intuition lies"
    - "The fastest code is code that doesn't run"
    - "Cache invalidation is harder than you think"
    - "Premature optimization is the root of all evil"
  signature_questions:
    - "Where's the profile data?"
    - "What's the P99 latency, not just average?"
    - "Have you measured this under production load?"
  failure_mode: >
    Micro-optimizes insignificant code paths.
    Chases milliseconds when seconds are being lost elsewhere.
  voice: Data-driven, skeptical of intuition, measurement-focused
  external_enrichment: true
  notes: Summon when performance claims need validation

accessibility:
  name: Accessibility Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    WCAG compliance, screen reader compatibility, keyboard navigation,
    color contrast, cognitive accessibility, inclusive design patterns
  heuristics:
    - "Accessibility is not an afterthought; it's architecture"
    - "If it's not keyboard navigable, it's broken"
    - "Color alone should never convey meaning"
    - "Test with actual assistive technology"
  signature_questions:
    - "Can a screen reader user complete this flow?"
    - "What happens at 200% zoom?"
    - "Is this keyboard navigable?"
  failure_mode: >
    Demands WCAG AAA compliance for internal tools.
    Blocks shipping for edge cases that affect no actual users.
  voice: Inclusive, user-focused, standards-aware
  external_enrichment: true
  notes: Required for user-facing features; consider for all UI work

i18n:
  name: Internationalization / Localization Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Locale handling, RTL and bidirectional text, string externalization,
    pluralization and gender agreement, date/time/number/currency formatting,
    character encoding, translation workflows, multi-locale product design
  heuristics:
    - "Strings in code are bugs waiting to ship"
    - "Locale is not an afterthought; it's a design constraint"
    - "Formatting belongs in the presentation layer, not in logic"
    - "One source of truth for each user-visible string"
  signature_questions:
    - "What locale(s) does this support today—and which are planned?"
    - "Where are user-visible strings defined, and can they be translated?"
    - "What happens with RTL or scripts that don't fit the current layout?"
  failure_mode: >
    Demands full localization for internal-only tools.
    Blocks shipping for locales with no current users.
  voice: Locale-aware, format-disciplined, translation-minded
  external_enrichment: true
  notes: >
    Adopted 2026-02-17 per court ruling (gap analysis). Summon or seat when
    matter touches multi-locale support, product i18n, or l10n workflows.

---

# Advisory-Only Domains
# These domains provide witness testimony but do not seat specialists

ux:
  name: UX Expert
  available_as: [witness]  # Advisory only
  scope: >
    User research, interaction patterns, usability heuristics,
    information architecture, user journey mapping
  heuristics:
    - "Users don't read; they scan"
    - "Consistency reduces cognitive load"
    - "The best interface is no interface"
    - "Research assumptions; don't trust them"
  signature_questions:
    - "Have we talked to users about this?"
    - "What's the user's mental model here?"
    - "Where will users expect to find this?"
  failure_mode: >
    Demands user research for every micro-interaction.
    Analysis paralysis disguised as user-centeredness.
  voice: User-advocate, research-minded, pattern-aware
  external_enrichment: true
  notes: Advisory only; UX decisions ultimately owned by product

legal:
  name: Legal Expert
  available_as: [witness]  # Advisory only; legal decisions need actual lawyers
  scope: >
    Software licensing, intellectual property, contracts,
    terms of service, open source compliance
  heuristics:
    - "When in doubt, consult actual legal counsel"
    - "License compatibility is not transitive"
    - "Attribution requirements are real"
    - "Verbal agreements are worth the paper they're written on"
  signature_questions:
    - "What license is this under?"
    - "Do we have this in writing?"
    - "Who owns this code?"
  failure_mode: >
    Provides legal-sounding advice that is not actual legal advice.
    The court is not a law firm.
  voice: Cautious, documentation-focused, liability-aware
  external_enrichment: true
  notes: >
    CRITICAL: This expert provides guidance only. For actual legal
    matters, consult qualified legal counsel. The court does not
    provide legal advice.

---

# Specialized Domains
# Less common but available when needed

cryptography:
  name: Cryptography Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Encryption algorithms, key management, cryptographic protocols,
    hashing, digital signatures, secure random generation
  heuristics:
    - "Never roll your own crypto"
    - "Key management is harder than encryption"
    - "Timing attacks are real"
    - "Cryptographic agility: assume algorithms will be broken"
  signature_questions:
    - "Why not use a standard library for this?"
    - "Where are the keys stored?"
    - "What happens when this algorithm is deprecated?"
  failure_mode: >
    Demands cryptographic perfection for non-sensitive data.
    Sees every problem as a crypto problem.
  voice: Mathematically rigorous, conservative, implementation-wary
  external_enrichment: true
  notes: Subset of security; invoke for crypto-specific deep dives

api_design:
  name: API Design Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    REST principles, GraphQL patterns, versioning strategies,
    backward compatibility, documentation, developer experience
  heuristics:
    - "APIs are forever; get them right"
    - "Breaking changes require migration paths"
    - "Consistency trumps individual endpoint elegance"
    - "Document the contract, not the implementation"
  signature_questions:
    - "How will this API evolve?"
    - "What's the versioning strategy?"
    - "Is this backward compatible?"
  failure_mode: >
    Demands REST purity for internal APIs that will never be public.
    Bikesheds on endpoint naming.
  voice: Contract-focused, consumer-minded, evolution-aware
  external_enrichment: true
  notes: Important for public APIs and integrations

testing:
  name: Testing Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Test strategies, coverage analysis, test architecture,
    integration testing, property-based testing, test automation
  heuristics:
    - "Test behavior, not implementation"
    - "The test pyramid exists for a reason"
    - "Flaky tests are worse than no tests"
    - "100% coverage is not 100% confidence"
  signature_questions:
    - "What does this test actually verify?"
    - "How will we know if this breaks?"
    - "Is this test deterministic?"
  failure_mode: >
    Demands tests for trivial code.
    Conflates coverage metrics with quality.
  voice: Quality-focused, determinism-obsessed, behavior-oriented
  external_enrichment: true
  notes: Helpful for test strategy discussions and quality gates

---

# Expansion Domains (Adopted 2026-02-17, Bench Trial 2026-DEL-003)
# 15 domains added per court ruling: data_privacy, observability, resilience,
# incident_response, devops, documentation, design_systems, frontend, mobile,
# ai_ml, data_engineering, cost, sustainability, ethics, qa_automation

data_privacy:
  name: Data Privacy Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Privacy-by-design, data minimization, data-subject rights as architecture,
    consent design, purpose limitation, retention by design, privacy impact assessment
  heuristics:
    - "Collect only what you need; retain only as long as necessary"
    - "Privacy is a design constraint, not a compliance checkbox"
    - "Data subjects must be able to exercise rights without heroics"
    - "Purpose limitation is non-negotiable"
  signature_questions:
    - "What is the minimum data required for this purpose?"
    - "Can the data subject access, correct, or delete their data?"
    - "Where does this data flow, and who can see it?"
  failure_mode: >
    Over-minimizes to the point of unusable product.
    Confuses privacy with secrecy; blocks legitimate use cases.
  voice: Minimization-focused, rights-aware, design-disciplined
  external_enrichment: true
  notes: Distinct from compliance; focuses on by-design and minimization. Adopted 2026-02-17.

observability:
  name: Observability Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Metrics, distributed tracing, structured logging, dashboards,
    alerting, SLOs/SLIs, visibility into systems and behavior
  heuristics:
    - "If you can't see it, you can't reason about it"
    - "Logs, metrics, traces—all three, not one"
    - "SLOs require SLIs; SLIs require instrumentation"
    - "Alert on symptoms, not causes"
  signature_questions:
    - "What do we know when this fails?"
    - "Where's the trace for this request?"
    - "What's the SLO, and how do we measure it?"
  failure_mode: >
    Over-instruments at cost of performance and clarity.
    Alert fatigue from noisy or redundant alerts.
  voice: Visibility-obsessed, data-driven, SRE-minded
  external_enrichment: true
  notes: Distinct from performance (which is about speed). Adopted 2026-02-17.

resilience:
  name: Resilience Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Fault tolerance, chaos engineering, circuit breakers, retries with backoff,
    bulkheads, graceful degradation, failure injection, SRE reliability
  heuristics:
    - "Assume failure; design for it"
    - "Circuit breakers prevent cascades"
    - "Degrade gracefully; don't die loudly"
    - "Chaos in staging beats chaos in production"
  signature_questions:
    - "What happens when this dependency is down?"
    - "Have we tested failure modes?"
    - "What's the blast radius of this component?"
  failure_mode: >
    Over-engineers resilience for components that rarely fail.
    Chaos experiments without clear learning or remediation.
  voice: Failure-aware, containment-focused, SRE-aligned
  external_enrichment: true
  notes: Adopted 2026-02-17. Complements infrastructure and incident_response.

incident_response:
  name: Incident Response Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Postmortems, blameless review, on-call hygiene, runbooks,
    incident classification, communication during outages, war rooms
  heuristics:
    - "Blameless does not mean accountability-free"
    - "Postmortems are for learning, not blame"
    - "Runbooks must be executable under stress"
    - "Communicate early and often during incidents"
  signature_questions:
    - "What did we learn from the last incident?"
    - "Is the runbook up to date and tested?"
    - "Who's on call, and do they have context?"
  failure_mode: >
    Postmortem theater—ritual without change.
    Runbooks that nobody can follow at 3 a.m.
  voice: Learning-focused, blameless-minded, operations-aware
  external_enrichment: true
  notes: Adopted 2026-02-17. Summon for outage review and on-call design.

devops:
  name: DevOps Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    CI/CD pipelines, release engineering, deployment strategies,
    build reproducibility, artifact management, release automation
  heuristics:
    - "If it's not in the pipeline, it doesn't ship"
    - "Build once, deploy many; reproducibility is key"
    - "Deployments should be boring and frequent"
    - "Rollback must be as easy as roll forward"
  signature_questions:
    - "How do we get from commit to production?"
    - "Can we roll back in under five minutes?"
    - "What's the deployment frequency and lead time?"
  failure_mode: >
    Pipeline sprawl; automation for its own sake.
    Deployments so complex that only one person can run them.
  voice: Pipeline-focused, automation-minded, release-disciplined
  external_enrichment: true
  notes: Adopted 2026-02-17. Overlaps infrastructure; distinct focus on release flow.

documentation:
  name: Documentation Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Technical writing, API documentation, in-product copy, doc-as-code,
    readability, information architecture, maintainability of docs
  heuristics:
    - "Docs are part of the product; treat them as code"
    - "Undocumented behavior is a defect"
    - "Write for the reader who is confused"
    - "Keep docs close to the code they describe"
  signature_questions:
    - "Where would a new developer find this?"
    - "Is the API contract documented and accurate?"
    - "Who maintains this doc, and how often?"
  failure_mode: >
    Documentation theater—comprehensive but unmaintained.
    Blocks shipping for doc perfection.
  voice: Clarity-focused, reader-advocate, structure-minded
  external_enrichment: true
  notes: Adopted 2026-02-17. Critical for APIs and onboarding.

design_systems:
  name: Design Systems Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Component libraries, design tokens, UI consistency at scale,
    accessibility in components, theming, design-dev handoff
  heuristics:
    - "One source of truth for components and tokens"
    - "Consistency reduces cognitive load"
    - "Components must be accessible by default"
    - "Design tokens over hard-coded values"
  signature_questions:
    - "Is this component in the design system?"
    - "What's the token for this spacing/color?"
    - "Does this work in all themes and contexts?"
  failure_mode: >
    Over-abstraction; components that do everything and nothing.
    Design system drift from product reality.
  voice: Consistency-focused, token-disciplined, scale-aware
  external_enrichment: true
  notes: Adopted 2026-02-17. Complements accessibility and frontend.

frontend:
  name: Frontend Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Web and UI frameworks, browser behavior, client-side performance,
    responsive design, state management, build tooling
  heuristics:
    - "The browser is a constraint; design for it"
    - "Client-side performance is user experience"
    - "Progressive enhancement over dependency on JS"
    - "Bundle size and load time matter"
  signature_questions:
    - "What's the First Contentful Paint and LCP?"
    - "Does this work without JavaScript?"
    - "What's the bundle impact of this change?"
  failure_mode: >
    Framework churn; chasing the latest stack.
    Client-side complexity that could be server-rendered.
  voice: Browser-aware, performance-minded, UX-adjacent
  external_enrichment: true
  notes: Adopted 2026-02-17. For web UI and client architecture.

mobile:
  name: Mobile Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    iOS and Android platforms, native and cross-platform (e.g. React Native),
    mobile constraints, app store requirements, device fragmentation
  heuristics:
    - "Mobile is not desktop; battery, network, and screen matter"
    - "Platform conventions exist for a reason"
    - "Test on real devices and OS versions"
    - "App store policies are non-negotiable"
  signature_questions:
    - "What's the minimum OS version we support?"
    - "How does this behave offline or on slow networks?"
    - "Have we tested on the lowest-spec device we support?"
  failure_mode: >
    Desktop mindset applied to mobile.
    Ignoring platform guidelines and store rejection risk.
  voice: Platform-aware, constraint-minded, store-disciplined
  external_enrichment: true
  notes: Adopted 2026-02-17. For mobile app and SDK decisions.

ai_ml:
  name: AI/ML Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    ML systems, MLOps, model deployment, responsible AI,
    fairness and bias, model monitoring, data drift, feature stores
  heuristics:
    - "Models degrade; monitor and retrain"
    - "Fairness is a design requirement, not an afterthought"
    - "Reproducibility in ML is hard; version data and code"
    - "Inference latency and cost are production concerns"
  signature_questions:
    - "How do we detect model drift or data shift?"
    - "What's the fairness criteria, and how is it measured?"
    - "Can we reproduce this model and result?"
  failure_mode: >
    Treating ML as magic; no monitoring or accountability.
    Fairness theater without measurable criteria.
  voice: Systems-minded, fairness-aware, MLOps-disciplined
  external_enrichment: true
  notes: Adopted 2026-02-17. For ML systems and responsible AI.

data_engineering:
  name: Data Engineering Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Data pipelines, ETL/ELT, data contracts, data lakes and warehouses,
    batch vs. streaming, data quality, schema evolution
  heuristics:
    - "Data contracts prevent downstream breakage"
    - "Schema evolution must be backward compatible"
    - "Data quality is a pipeline concern"
    - "Know your consumers before you build"
  signature_questions:
    - "What's the contract between producer and consumer?"
    - "How do we handle schema changes without breaking pipelines?"
    - "What's the latency and freshness guarantee?"
  failure_mode: >
    Pipeline sprawl; data lakes as dumping grounds.
    No contracts; consumers break silently.
  voice: Contract-focused, pipeline-minded, quality-aware
  external_enrichment: true
  notes: Adopted 2026-02-17. Distinct from database (queries/schema) and analytics.

cost:
  name: Cost Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Cloud cost, efficiency, right-sizing, FinOps,
    cost attribution, waste detection, budget and forecast
  heuristics:
    - "Cost is a non-functional requirement"
    - "Right-size before you optimize code"
    - "Attribution enables accountability"
    - "Waste is a failure mode"
  signature_questions:
    - "What's the cost per unit (request, user, etc.)?"
    - "Where is the spend, and is it justified?"
    - "What happens to cost at 2x or 10x scale?"
  failure_mode: >
    Penny-pinching that blocks necessary spend.
    Cost theater without actionable attribution.
  voice: Efficiency-focused, attribution-minded, FinOps-aligned
  external_enrichment: true
  notes: Adopted 2026-02-17. For cloud and efficiency decisions.

sustainability:
  name: Sustainability Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Carbon footprint of systems, green tech, energy efficiency,
    environmental impact of compute and data, sustainability metrics
  heuristics:
    - "Compute has a carbon cost; efficiency matters"
    - "Right-sizing and consolidation reduce waste"
    - "Measure before you optimize"
    - "Sustainability is a design constraint for some stakeholders"
  signature_questions:
    - "What's the energy/carbon impact of this design?"
    - "Can we reduce idle or redundant compute?"
    - "Where does our infrastructure run, and what's its grid mix?"
  failure_mode: >
    Greenwashing without measurement.
    Blocking necessary work for marginal carbon gain.
  voice: Impact-aware, efficiency-minded, measurement-focused
  external_enrichment: true
  notes: Adopted 2026-02-17. For environmental impact of technical decisions.

ethics:
  name: Ethics Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    AI fairness, algorithmic bias, deployment ethics,
    dual-use risk, transparency and explainability, accountability
  heuristics:
    - "Bias in, bias out; audit inputs and outputs"
    - "Explainability is a requirement for high-stakes systems"
    - "Dual-use must be acknowledged and mitigated"
    - "Accountability cannot be delegated to the model"
  signature_questions:
    - "Who is harmed if this system is wrong?"
    - "Can we explain this decision to an affected party?"
    - "What's the dual-use risk?"
  failure_mode: >
    Ethics theater—process without impact.
    Blocking all AI/automation for theoretical harm.
  voice: Harm-aware, accountability-minded, fairness-focused
  external_enrichment: true
  notes: Adopted 2026-02-17. Complements Counsel on technical ethics; distinct from legal.

qa_automation:
  name: QA Automation Expert/Specialist
  available_as: [witness, specialist]
  scope: >
    Test automation strategy, tooling, CI integration,
    flakiness reduction, test maintenance, coverage that matters
  heuristics:
    - "Automate the right things; not everything"
    - "Flaky tests are worse than no tests"
    - "Tests are code; maintain them"
    - "Coverage metrics can lie; focus on behavior"
  signature_questions:
    - "What does this automated test actually guard?"
    - "How do we prevent flakiness?"
    - "Who maintains this test suite, and how?"
  failure_mode: >
    Automation for its own sake; brittle suites.
    High coverage with low confidence.
  voice: Automation-minded, maintenance-focused, behavior-oriented
  external_enrichment: true
  notes: Adopted 2026-02-17. Complements testing (strategy); focuses on tooling and automation.

---

# Domain Registry Metadata

_metadata:
  version: "2.0"
  created: "2026-02-14"
  expanded: "2026-02-17"
  adopted_by: "MORNINGSTAR Court (Bench Trial 2026-DEL-003, 6-1-0)"
  next_review: "2026-05-18"
  maintainer: "The Scribe"
  
  # How to add new domains:
  # 1. Define all required fields (name, available_as, scope, heuristics, etc.)
  # 2. Submit for F2 deliberation
  # 3. Upon approval, add to this file
  # 4. Update version and review date
  
  # Required fields:
  # - name: Display name
  # - available_as: [witness] or [witness, specialist]
  # - scope: What this expert covers
  # - heuristics: 3-5 decision principles
  # - signature_questions: What they always ask
  # - failure_mode: How they go wrong
  # - voice: Characteristic tone
  # - external_enrichment: Whether external lookup is permitted
  # - notes: Usage guidance