Initial commit
This commit is contained in:
131
skills/guardian/Templates/session_health.json
Normal file
131
skills/guardian/Templates/session_health.json
Normal file
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"name": "Session Health Monitor",
|
||||
"description": "Tracks session degradation signals and recommends when to start fresh",
|
||||
"version": "1.0.0",
|
||||
"triggers": {
|
||||
"automatic": true,
|
||||
"interval_minutes": 10,
|
||||
"on_error": true,
|
||||
"on_correction": true
|
||||
},
|
||||
"metrics": {
|
||||
"context_usage": {
|
||||
"check": "token_count / max_tokens",
|
||||
"warning_threshold": 0.7,
|
||||
"critical_threshold": 0.85,
|
||||
"weight": 0.25
|
||||
},
|
||||
"error_frequency": {
|
||||
"check": "errors_last_30min",
|
||||
"warning_threshold": 3,
|
||||
"critical_threshold": 5,
|
||||
"weight": 0.2
|
||||
},
|
||||
"correction_rate": {
|
||||
"check": "corrections_last_30min",
|
||||
"warning_threshold": 3,
|
||||
"critical_threshold": 5,
|
||||
"weight": 0.2
|
||||
},
|
||||
"file_churn": {
|
||||
"check": "same_file_edits_in_10min",
|
||||
"warning_threshold": 5,
|
||||
"critical_threshold": 8,
|
||||
"weight": 0.15
|
||||
},
|
||||
"repeated_errors": {
|
||||
"check": "same_error_count",
|
||||
"warning_threshold": 2,
|
||||
"critical_threshold": 3,
|
||||
"weight": 0.2
|
||||
}
|
||||
},
|
||||
"health_score_calculation": "weighted_average_of_metrics",
|
||||
"recommendations": {
|
||||
"90-100": {
|
||||
"status": "✅ Excellent",
|
||||
"color": "green",
|
||||
"message": "Session is healthy. Continue working.",
|
||||
"action": "none"
|
||||
},
|
||||
"70-89": {
|
||||
"status": "✓ Good",
|
||||
"color": "blue",
|
||||
"message": "Session is performing well.",
|
||||
"action": "none"
|
||||
},
|
||||
"50-69": {
|
||||
"status": "⚠️ Fair",
|
||||
"color": "yellow",
|
||||
"message": "Session showing minor degradation. Consider taking a break or refocusing.",
|
||||
"action": "suggest_break"
|
||||
},
|
||||
"30-49": {
|
||||
"status": "⚠️ Warning",
|
||||
"color": "orange",
|
||||
"message": "Session degrading. Recommend starting fresh session soon.",
|
||||
"action": "suggest_handoff"
|
||||
},
|
||||
"0-29": {
|
||||
"status": "❌ Critical",
|
||||
"color": "red",
|
||||
"message": "Session severely degraded. Strongly recommend session handoff NOW.",
|
||||
"action": "recommend_handoff_now"
|
||||
}
|
||||
},
|
||||
"handoff_triggers": {
|
||||
"health_below": 40,
|
||||
"context_above": 0.85,
|
||||
"repeated_errors_above": 3,
|
||||
"corrections_above": 5,
|
||||
"session_duration_minutes": 180
|
||||
},
|
||||
"dashboard_display": {
|
||||
"show_in_status": true,
|
||||
"format": "Session Health: {score}/100 {status_icon}",
|
||||
"details_on_request": true,
|
||||
"details_format": {
|
||||
"title": "Session Health Dashboard",
|
||||
"sections": [
|
||||
{
|
||||
"name": "Overall Health",
|
||||
"display": "{score}/100 - {status}"
|
||||
},
|
||||
{
|
||||
"name": "Metrics",
|
||||
"display": [
|
||||
"Context Usage: {context_usage}% ({status_icon})",
|
||||
"Error Rate: {errors_last_30min} in 30min ({status_icon})",
|
||||
"Correction Rate: {corrections_last_30min} in 30min ({status_icon})",
|
||||
"File Churn: {max_file_edit_count} edits to same file ({status_icon})",
|
||||
"Repeated Errors: {repeated_error_count} ({status_icon})"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Recommendation",
|
||||
"display": "{recommendation_message}"
|
||||
},
|
||||
{
|
||||
"name": "Session Stats",
|
||||
"display": [
|
||||
"Duration: {duration_minutes} minutes",
|
||||
"Files Modified: {files_modified_count}",
|
||||
"Commands Run: {commands_run_count}",
|
||||
"Tokens Used: {tokens_used}/{max_tokens}"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"oracle_integration": {
|
||||
"record_health_scores": true,
|
||||
"record_handoff_events": true,
|
||||
"track_degradation_patterns": true,
|
||||
"learn_from_successful_sessions": true
|
||||
},
|
||||
"evaluator_integration": {
|
||||
"track_health_metrics": true,
|
||||
"track_handoff_frequency": true,
|
||||
"track_post_handoff_success": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user