diff --git a/.claude/session-state.json b/.claude/session-state.json
index ae67f5de..f2f08092 100644
--- a/.claude/session-state.json
+++ b/.claude/session-state.json
@@ -43,13 +43,13 @@
"last_deliberation": null
},
"FileEditHook": {
- "timestamp": "2025-10-24T19:39:39.739Z",
- "file": "/home/theflow/projects/tractatus/src/controllers/blog.controller.js",
+ "timestamp": "2025-10-24T22:39:10.772Z",
+ "file": "/home/theflow/projects/tractatus/public/js/admin/audit-analytics.js",
"result": "passed"
},
"FileWriteHook": {
- "timestamp": "2025-10-24T19:35:33.697Z",
- "file": "/tmp/test-framework-check-api.js",
+ "timestamp": "2025-10-24T22:27:56.671Z",
+ "file": "/home/theflow/projects/tractatus/AUDIT_ANALYTICS_IMPROVEMENTS.md",
"result": "passed"
}
},
@@ -58,25 +58,25 @@
"tokens": 30000
},
"alerts": [],
- "last_updated": "2025-10-24T19:39:39.739Z",
+ "last_updated": "2025-10-24T22:39:10.772Z",
"initialized": true,
"framework_components": {
"CrossReferenceValidator": {
"message": 0,
"tokens": 0,
- "timestamp": "2025-10-24T19:48:09.947Z",
- "last_validation": "2025-10-24T19:48:09.946Z",
- "validations_performed": 1430
+ "timestamp": "2025-10-24T22:47:10.778Z",
+ "last_validation": "2025-10-24T22:47:10.778Z",
+ "validations_performed": 1559
},
"BashCommandValidator": {
"message": 0,
"tokens": 0,
"timestamp": null,
- "last_validation": "2025-10-24T19:48:09.947Z",
- "validations_performed": 957,
- "blocks_issued": 108
+ "last_validation": "2025-10-24T22:47:10.779Z",
+ "validations_performed": 1047,
+ "blocks_issued": 116
}
},
- "action_count": 957,
+ "action_count": 1047,
"auto_compact_events": []
}
\ No newline at end of file
diff --git a/.claude/token-checkpoints.json b/.claude/token-checkpoints.json
index 9f567e33..f969048f 100644
--- a/.claude/token-checkpoints.json
+++ b/.claude/token-checkpoints.json
@@ -23,5 +23,5 @@
],
"next_checkpoint": 50000,
"overdue": false,
- "last_check": "2025-10-24T11:45:42.685Z"
+ "last_check": "2025-10-24T22:36:38.149Z"
}
\ No newline at end of file
diff --git a/AUDIT_ANALYTICS_IMPROVEMENTS.md b/AUDIT_ANALYTICS_IMPROVEMENTS.md
new file mode 100644
index 00000000..2b1abb40
--- /dev/null
+++ b/AUDIT_ANALYTICS_IMPROVEMENTS.md
@@ -0,0 +1,145 @@
+# Audit Analytics Dashboard Improvements
+
+## Issues Identified
+1. "Decisions over time" chart broken - groups by hour-of-day (0:00-23:00) across all 30 days
+2. Too granular - hourly data not useful for 30-day period
+3. Missing service health dashboard
+4. Missing long-term violations view
+5. Too much focus on recent decisions list
+
+## Proposed Changes
+
+### 1. Add Service Health (24h) Section
+**Location:** Between service chart and timeline chart
+**Purpose:** Show which services are healthy (allowed, no violations) in last 24 hours
+
+**HTML to add:**
+```html
+
+
+
Service Health (Last 24 Hours)
+
+
+
+
+```
+
+**JavaScript function needed:**
+- `renderServiceHealth24h()` - filter last 24h, group by service, show allowed counts + violations
+- Green background if no blocks/violations, red if issues
+- Show: Service name, ✓ or ⚠ icon, Allowed count, Blocked count (if > 0), Violations count (if > 0)
+
+### 2. Add Violations & Blocks (7 days) Section
+**Location:** After service health, before timeline
+**Purpose:** Long-term view of violations and blocks
+
+**HTML to add:**
+```html
+
+
+
Violations & Blocks (Last 7 Days)
+
+
+
+
+```
+
+**JavaScript function needed:**
+- `renderViolations7days()` - filter last 7 days, group by day, show blocks + violations per day
+- Red background for days with violations
+- Green message if zero violations: "✓ No violations or blocks in the last 7 days"
+- Show: Day label, event count, blocks count, violations count, services involved
+
+### 3. Fix Timeline Chart with Tabs
+**Location:** Existing timeline chart
+**Purpose:** Replace broken hourly view with useful time bucketing
+
+**HTML to modify:**
+```html
+
+
+
+
Decisions Over Time
+
+
+
+
+
+
+
+
+
+
+```
+
+**JavaScript changes:**
+- Add `let timelineMode = 'daily';` at top
+- Replace `renderTimelineChart()` to support 3 modes:
+ - **6-hourly (24h):** 4 buckets (0-6h, 6-12h, 12-18h, 18-24h ago)
+ - **Daily (7d):** 7 buckets (last 7 days, labeled "Jan 1", "Jan 2", etc.)
+ - **Weekly (4w):** 4 buckets (Week 1, Week 2, Week 3, Week 4)
+- Add `switchTimelineMode(mode)` function to toggle between modes
+- Fix bar chart to show actual dates/time ranges, not hours-of-day
+
+### 4. Remove or Simplify Recent Decisions Table
+**Current:** Shows 50 recent decisions with full details
+**Proposed:** Either remove entirely or reduce to 10 rows (less focus on individual decisions, more on patterns)
+
+## Implementation Priority
+1. Fix timeline chart (critical - currently broken)
+2. Add service health 24h (high value)
+3. Add violations 7 days (high value)
+4. Simplify/remove recent decisions table (cleanup)
+
+## Key Design Goals
+- **Service Health:** Quick status check - which services are working correctly?
+- **Violations:** Long-term tracking - any patterns in violations/blocks?
+- **Timeline:** Useful time bucketing - how is usage changing over time?
+- **Less detail noise:** Remove granular recent decisions list, focus on aggregate patterns
+
+## Example Data Flow
+
+**Service Health (24h):**
+```
+ContextPressureMonitor: ✓ Allowed: 45
+BoundaryEnforcer: ✓ Allowed: 32
+CrossReferenceValidator: ⚠ Allowed: 12, Violations: 3
+```
+
+**Violations (7 days):**
+```
+Fri, Oct 25: 2 blocks, 5 violations (BoundaryEnforcer, CrossReferenceValidator)
+Thu, Oct 24: 0 blocks, 1 violation (MetacognitiveVerifier)
+[other days with no violations not shown]
+```
+
+**Timeline (Daily 7d):**
+```
+Bar chart showing:
+Oct 19: 45 decisions
+Oct 20: 52 decisions
+Oct 21: 38 decisions
+...
+Oct 25: 67 decisions
+```
+
+## CSP Compliance
+- All styles via Tailwind classes (no inline styles)
+- onclick handlers for timeline mode buttons only (simple, CSP-safe)
+- All rendering via innerHTML (no eval/Function)
+
+## Next Steps
+1. Update audit-analytics.html with new HTML sections
+2. Add new JavaScript functions
+3. Update renderDashboard() to call new functions
+4. Test with real audit data
+5. Deploy to production
diff --git a/public/about.html b/public/about.html
index e8a694ad..a9138f12 100644
--- a/public/about.html
+++ b/public/about.html
@@ -5,9 +5,9 @@
About | Tractatus AI Safety Framework
-
-
-
+
+
+