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 | 223c58f8857eb60c4d020e6d6feacdbfb482d71d |
| Branch | main |
| Path or archive member | seferim/autonomous-builder.sh |
| Original SHA-256 | bea9a81067fda0993feccefbf988fd8d55b01b928d682d9eee760dbbab8879ea |
| Git blob SHA | fdea0c5079ae57dc6e6c45aba9018715c1723439 |
| Reading-copy SHA-256 | bea9a81067fda0993feccefbf988fd8d55b01b928d682d9eee760dbbab8879ea |
Recovered source transcript
Download complete source text ↓59 lines · 2.0 KB
#!/bin/bash
# AUTONOMOUS BUILDER - MB2 (No jq)
LEARNED_FILE=~/.thataiguy/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\" ~/.thataiguy/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\" ~/.thataiguy/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