Skip to main content

✅ Cognitive Alignment – Action Review & Feedback Loop

cognitivealignment records the final verdict on every material decision taken by Reggie.
It completes the chain that starts in reasonlog: once an action is executed (or vetoed), an entry here states whether the outcome aligned with policy, safety, and organisational values.
Regular analysis of this table tunes future risk thresholds and autonomy levels.


1. Purpose

Why it existsHow it helps
Governance & SafetyEnsures each high-impact action is judged against compliance, privacy and ethical standards.
Continuous LearningMisaligned outcomes feed back into training; aligned ones reinforce good heuristics.
Scalable MonitoringSupports a spectrum from Review-All to Spot-Check as confidence grows.
Audit TrailImmutable record linked to reasonlog lets auditors replay thought-to-judgement history.

2. Monitoring Levels

LevelNameOperational Behaviour
0Review-AllEvery action requires human approval before execution.
1Pre-Exec SamplingHigh-risk (risk ≥ 0.5) actions block for review; low-risk auto-execute.
2Post-Exec ReviewAll actions execute; high-risk ones enter an after-the-fact audit queue.
3Spot-CheckRandom N % of actions plus any anomaly flags are reviewed.
4AutonomousAgent acts freely; reviews triggered only by downstream alerts.

Current level is stored per-module and adjusted via the Aspirations roadmap.


3. Table Schema (PostgreSQL)

ColumnTypeNotes
iduuid PKUnique review identifier
reason_iduuid NOT NULLFK → reasonlog.id (links to decision’s chain-of-thought)
timestamptimestamptz NOT NULLReview completion time
outcometext NOT NULLAPPROVED, REJECTED, ADJUSTED
alignment_scorenumeric(3,2)−1.00 (strongly misaligned) → 1.00 (strongly aligned)
notestextFree-form reviewer comments
vectorvector(768)Embedding of notes for semantic recall
reviewertextHuman UID or automated agent name
monitor_levelsmallintLevel 0-4 in force for this review

4. Review Workflow & Learning Loop

  1. Creation – When monitoring rules require oversight, a row with outcome = 'PENDING' is inserted.
  2. Linkagereason_id ties directly to the originating reasonlog entry.
  3. Verdict – Human reviewer or automated rule sets outcome and alignment_score; DB trigger updates reasonlog.status.
  4. Learning – Nightly job analyses (risk, alignment_score) pairs, updating risk calibration curves and populating context buckets with lessons learned.
  5. Autonomy Tuning – If ≥ 5 high-priority misalignments occur in 24 h, the module’s monitoring level automatically downgrades (e.g., 3 → 1).

5. Metrics & Governance

MetricAlert Threshold
alignment_mean_24h< 0.70 triggers “yellow” alert
misalignment_high_priority_cnt≥ 5 in 24 h triggers autonomy rollback
review_queue_lag_seconds> 900 s pages reviewer on-call

Edits to this file require sign-off by both the Clinical Lead and Security Officer.
CI lints alignment_score ranges and prevents removal of historical rows.