Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/complete-agi-core / seferim/autonomous-builder.sh |
| Date | Not specified in source |
| Repository | Janady13/complete-agi-core |
| Revision | 33aa84f2aa61cedbe010240ada7f4efbdfe795a7 |
| Branch | claude/improve-math-logic-ehIW1 |
| Path or archive member | seferim/autonomous-builder.sh |
| Original SHA-256 | fb7ce39b3b085ffceab966b7950aed9dbf426594d9aa577c90c92a2a837320ed |
| Git blob SHA | 0b15f274c350904cb074c99d3494c1bc7054b9ee |
| Reading-copy SHA-256 | fb7ce39b3b085ffceab966b7950aed9dbf426594d9aa577c90c92a2a837320ed |
Recovered source transcript
Download complete source text ↓59 lines · 2.0 KB
#!/bin/bash
# AUTONOMOUS BUILDER - MB2 (No jq)
LEARNED_FILE=~/.agi_core/learned_items.json
OUTPUT_DIR=~/Library/Mobile\ Documents/com~apple~CloudDocs/AGI_Data/generated
LOG_FILE=~/.seferim/logs/builder.log
mkdir -p "$OUTPUT_DIR/scripts" "$OUTPUT_DIR/insights" "$OUTPUT_DIR/tools" ~/.seferim/logs
log() { echo "[$(date '+%H:%M:%S')] $1" >> "$LOG_FILE"; echo "[BUILDER-MB2] $1"; }
get_topics() {
grep -o '"content": "[^"]*"' "$LEARNED_FILE" | tail -100 | sed 's/"content": "//; s/"$//' | \
grep -oE '\b[A-Za-z][A-Za-z]{5,}\b' | tr '[:upper:]' '[:lower:]' | \
sort | uniq -c | sort -rn | head -15 | awk '$1 > 2 {print $2}'
}
log "=== MB2 Builder Starting ==="
cycle=0
while true; do
cycle=$((cycle + 1))
topics=$(get_topics)
topic=$(echo "$topics" | head -1)
if [ -n "$topic" ]; then
log "Cycle $cycle: Building for $topic"
strategy=$((cycle % 3))
case $strategy in
0) # Script
f="$OUTPUT_DIR/scripts/${topic}_util_mb2.sh"
echo "#!/bin/bash" > "$f"
echo "# $topic utility (MB2)" >> "$f"
echo "grep -i \"$topic\" ~/.agi_core/learned_items.json | head -5" >> "$f"
chmod +x "$f"
log "Created script: $topic"
;;
1) # Insight
f="$OUTPUT_DIR/insights/${topic}_mb2.md"
echo "# $topic Insight (MB2)" > "$f"
echo "Generated: $(date)" >> "$f"
grep -i "$topic" "$LEARNED_FILE" | head -3 | sed 's/.*"content": "//; s/",.*//' >> "$f"
log "Created insight: $topic"
;;
2) # Monitor
f="$OUTPUT_DIR/tools/${topic}_mon_mb2.sh"
echo "#!/bin/bash" > "$f"
echo "while true; do grep -i \"$topic\" ~/.agi_core/learned_items.json | tail -1; sleep 30; done" >> "$f"
chmod +x "$f"
log "Created monitor: $topic"
;;
esac
else
log "Cycle $cycle: No topics"
fi
sleep 300
done