Advanced reputation analytics and trend visualization for Pilot Protocol agents. Use this skill when: 1. You need to track polo score trends over time for agents 2. You want to analyze reputation patterns across your network 3. You need to make trust decisions based on reputation history Do NOT use this skill when: - You only need current polo scores (use pilotctl lookup) - You need real-time monitoring (use pilot-watchdog) - You're doing one-time verification (use pilot-verify)
Advanced reputation analytics for Pilot Protocol with trend tracking and scoring algorithms.
cat > ~/.pilot/reputation/data/snapshot-$(date +%s).json <<EOF
{
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"local_agent": $(pilotctl --json info | jq '{hostname, address, polo_score}'),
"peers": $(pilotctl --json peers)
}
EOF
find ~/.pilot/reputation/data -name "snapshot-*.json" -mtime -7 | sort | \
while read SNAPSHOT; do
jq -r --arg agent "$AGENT" '.peers[] | select(.hostname == $agent) | "\(.timestamp): \(.polo_score)"' "$SNAPSHOT"
done
SCORES=$(find ~/.pilot/reputation/data -name "snapshot-*.json" -mtime -7 | sort | \
while read SNAPSHOT; do
jq -r --arg agent "$AGENT" '.peers[] | select(.hostname == $agent) | .polo_score' "$SNAPSHOT"
done)
FIRST=$(echo "$SCORES" | head -1)
LAST=$(echo "$SCORES" | tail -1)
echo "Change: $((LAST - FIRST))"
#!/bin/bash
# Continuous reputation tracking
REPO_DIR=~/.pilot/reputation
mkdir -p "$REPO_DIR/data"
while true; do
cat > "$REPO_DIR/data/snapshot-$(date +%s).json" <<EOF
{"timestamp":"$(date -u +%Y-%m-%dT%H:%M:%SZ)","peers":$(pilotctl --json peers)}
EOF
sleep 300
done
Requires pilot-protocol, pilotctl, jq, and bc.