Skip to content

Align Health

align_health — mvp.align_health

Cluster: Uncategorised | Type: component | MCP Tools: 9

Overview

Unified alignment health aggregator for the G6 system. Collects scores from the five alignment sub-systems (CSF, evals, verbsamp, coconstructive, specs) and returns a weighted overall alignment score with per-component breakdowns.

MVP health signal, not compliance certification

align_health is useful as a compact pilot and pre-deployment health check: it combines CSF, evaluation, verbal-signal, spec, and dialogue-quality signals into one fail-closed report. The overall score is a heuristic aggregation, not a calibrated risk model or regulated-industry compliance verdict. A passing result means the available configured checks passed within their local assumptions; it does not prove clinical, legal, financial, or other high-stakes correctness. For regulated or safety-critical workflows, pair it with domain-specific specs, representative eval sets, human review, audit logging, and independent compliance/legal review before making production claims.

When to use:

  • Running a system-wide alignment health check before deployment
  • Checking source_health before a run to see whether each required source component is importable
  • Monitoring alignment quality across all sub-systems in a single call
  • Triggering alerts when overall alignment drops below a threshold
  • Giving design partners a plain-language snapshot of which reliability checks passed, failed, or could not run

Reliability labels: deterministic source-health/readiness checks may emit verified; heuristic health verdicts and degraded fallback paths emit qualified-draft; production-mode MCP calls without reviewer_signature are blocked-escalated and include a warning card naming the missing review evidence.

Example:

from mvp.align_health import AlignHealthBlock, HealthInput

block = AlignHealthBlock(name="align_health")
result = block.infer(HealthInput(
    text="Summarize symptoms for the provider and flag urgent concerns for review.",
    spec_goal="Summarize symptoms for the provider.",
    spec_constraints=["qualified practitioner review"],
    weights={"csf": 0.4, "evals": 0.3},
))
# result.ok -> True; result.value -> HealthOutput with overall_score,
# per-component results, degraded status, and pass/fail verdict.

MCP source-health example:

from mvp.align_health.align_health_mcp import AlignHealthMCPBlock
from mvp.align_health.align_health_mcp.schema import AlignHealthMCPInput

block = AlignHealthMCPBlock()
result = block.infer(AlignHealthMCPInput(op="source_health"))
# result.value.data["components"] lists align_csf, align_evals,
# align_verbsamp, align_specs, and align_coconstructive import health.

Works well with: csf, align_evals, align_specs, align_verbsamp

Public API

AlignHealthBlock(AIBlock[HealthInput, HealthOutput, None])

Aggregates alignment scores from all core components into one health report.

Field Type Default
name str 'align_health'
resource_bounds ResourceBounds \| None None
usage ResourceUsage field(default_factory=ResourceUsage)
default_weight float 0.1
db_path str \| None None
agentic_planner AlignHealthPlanner \| None None

Methods:

infer(data: HealthInput) -> Result[HealthOutput]

list_history(limit: int = 50) -> list[dict]

close() -> None

ComponentScore(BaseModel)

Field Type Default
name str required
score float required
available bool required
detail str ''
explanation str ''
degraded bool False
degradation_reason str ''

HealthInput(BaseModel)

Field Type Default
text str ''
eval_predictions list[str \| int \| float] Field(default_factory=list)
eval_ground_truth list[str \| int \| float] Field(default_factory=list)
eval_metrics list[Literal['accuracy', 'precision', 'recall', 'f1', 'exact_match', 'mse', 'mae', 'precision_micro', 'recall_micro', 'f1_micro', 'precision_weighted', 'recall_weighted', 'f1_weighted']] Field(default_factory=lambda: ['accuracy'])
csf_operation Literal['llm_call', 'file_write', 'code_execute', 'external_api', 'rollback', 'image_generate', 'audio_generate', 'video_generate', 'media_download', 'subprocess_ffmpeg', 'subprocess_blender', 'sensor_read', 'learning_update', 'impedance_adjust', 'context_override', 'motor_execute', 'ros_command', 'autonomy_escalate', 'plc_write', 'embodiment_reconfigure', 'gcode_execute', 'computer_use_click', 'computer_use_type', 'computer_use_key', 'computer_use_bash', 'computer_use_screenshot', 'computer_use_scroll'] 'llm_call'
csf_n_steps int 1
csf_epsilon float 0.2
spec_id str ''
spec_goal str ''
spec_constraints list[str] Field(default_factory=list)
specs_db_path str \| None None
weights dict[str, float] \| None None
pass_threshold float 0.7
dialogue_messages list[dict[str, str]] Field(default_factory=list)
required_components list[str] Field(default_factory=list)
waiver str ''
run_mode str 'beta'
reviewer_signature str ''

HealthOutput(BaseModel)

Field Type Default
overall_score float required
components list[ComponentScore] required
passed bool required
summary str required
history_id str ''
degraded bool False
degradation_reason str ''
interpretation Literal['critical', 'warning', 'healthy'] 'warning'
next_steps list[str] Field(default_factory=list)
delta float \| None None
agentic_evidence dict Field(default_factory=dict)

MCP Tools

Operation Source
run_health align_health_mcp
list_history align_health_mcp
readiness_check align_health_mcp
source_health align_health_mcp
list_strategies align_health_mcp
explain_required_gate align_health_mcp
explain_health_verdict align_health_mcp
explain_health_guidance align_health_mcp
list_patterns align_health_mcp