Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
efabf7a
fix(goldset): inject grounding facts + loosen Q9/Q25 validators
fahmiwol Apr 30, 2026
e7bbf03
doc: LIVING_LOG update VPS deploy OTAK+ live 2026-04-30
fahmiwol Apr 30, 2026
5137fbf
UX: make Holistic (Jurus Seribu Bayangan) the default send mode + hig…
fahmiwol Apr 30, 2026
4df8257
LOG: UI/UX Jurus Seribu Bayangan default mode deploy
fahmiwol Apr 30, 2026
35fa30e
fix(ux): extract doHolistic() + direct routing from handleSend — no m…
fahmiwol Apr 30, 2026
acfe183
fix(deploy): copy Holistic default + doHolistic refactor + auto-mode …
fahmiwol Apr 30, 2026
9b0a527
feat: Mojeek search + Lite Browser (Playwright+trafilatura) integration
fahmiwol Apr 30, 2026
d802032
fix: gemini-2.0-flash → gemini-1.5-flash (deprecated model)
fahmiwol Apr 30, 2026
2f74823
fix: Mojeek scraper + OMNYXDirector compat + chat_holistic endpoint
fahmiwol Apr 30, 2026
21fea1f
fix: chat_holistic Internal Server Error + Mojeek 403 fallback
fahmiwol Apr 30, 2026
835bac6
log: handoff to Claude Code — validasi live + sprint auto-harvest
fahmiwol Apr 30, 2026
4c39f94
doc: Claude Code handoff — validasi live + sprint auto-harvest spec
fahmiwol Apr 30, 2026
cd72999
fix(frontend): doHolistic fallback to non-streaming when chat_holisti…
fahmiwol Apr 30, 2026
1831826
feat(api): add askHolistic + askHolisticStream + ChatHolisticResponse
fahmiwol Apr 30, 2026
157d08c
fix(omnyx_direction): add missing source= arg to SourceResult init at…
fahmiwol Apr 30, 2026
1461c1a
fix(mojeek_search): add Wikipedia fallback when Mojeek+DDG both block…
fahmiwol Apr 30, 2026
1cde12a
doc(living_log): bagian 16 — SourceResult fix + Wikipedia fallback + …
fahmiwol Apr 30, 2026
586fdeb
feat(auto_harvest): Sprint Auto-Harvest cron pipeline
fahmiwol Apr 30, 2026
dd3bb09
fix(auto_harvest): add proper User-Agent for Wikipedia API (blocks de…
fahmiwol Apr 30, 2026
b0f4c9b
fix(auto_harvest): correct knowledge path via workspace_root() + admi…
fahmiwol Apr 30, 2026
36a6a4d
doc(living_log): bagian 17 — Sprint Auto-Harvest IMPL + acceptance cr…
fahmiwol Apr 30, 2026
950df47
doc(living_log): bagian 18 — Playwright lite_browser fix confirmed wo…
fahmiwol Apr 30, 2026
807afda
fix(mojeek_search): add User-Agent to Wikipedia fallback (403 from de…
fahmiwol May 1, 2026
c084362
log: Claude Code sprint report — live validation + auto-harvest DONE
fahmiwol May 1, 2026
97a97fd
feat: Sprint 1 Speed Demon — intent-based complexity routing
fahmiwol May 1, 2026
ec68923
feat: Sprint 2 See & Hear — multimodal input infrastructure
fahmiwol May 1, 2026
899e259
log: Sprint 1 + Sprint 2 implementation report
fahmiwol May 1, 2026
9ee9c46
doc: Deep architecture audit + roadmap remapping + sprint plan A+B
fahmiwol May 1, 2026
5af3439
feat: Sprint A+B — Sanad Orchestra + Hafidz Injection
fahmiwol May 1, 2026
cdc6384
log: Sprint A+B implementation report
fahmiwol May 1, 2026
ca43f7f
doc: Update STATUS_TODAY — Sprint A+B DONE
fahmiwol May 1, 2026
5994d29
feat: Sprint C — Pattern Extractor Integration
fahmiwol May 1, 2026
09a881a
log: Sprint C implementation report
fahmiwol May 1, 2026
a8ed48a
doc: Update STATUS_TODAY — Sprint C DONE
fahmiwol May 1, 2026
97802bc
feat: Sprint D — Aspiration Detector + Tool Synthesizer Integration
fahmiwol May 1, 2026
51fb3bd
log: Sprint D implementation report + STATUS update
fahmiwol May 1, 2026
0d8d9d5
feat: Sprint E — Pencipta Mode (Creative Engine)
fahmiwol May 1, 2026
1e443e8
log: Sprint E implementation report + STATUS update
fahmiwol May 1, 2026
bfb4358
doc: Sprint A-E comprehensive summary + roadmap + deploy instructions…
fahmiwol May 1, 2026
aa4606b
log: Sprint A-E summary + roadmap + deploy instructions
fahmiwol May 1, 2026
848d004
feat(ux): mode buttons toggle state + jargon hide + persona rename + …
fahmiwol May 1, 2026
7b83d1a
doc(deploy): AGENT_DEPLOY_GUIDANCE.md untuk Kimi/agent lain (anti-bin…
fahmiwol May 1, 2026
3012f9b
perf(omnyx): greeting fast-path + fix display bug 0 sumber
fahmiwol May 1, 2026
3a59038
doc(log): catat optimasi greeting fast-path + display bug fix
fahmiwol May 1, 2026
51ffc20
fix(ui): hide header buttons properly + greeting chip grid hide
fahmiwol May 1, 2026
8c4a295
doc(log): catat UI fix header hide + greeting chip grid hide
fahmiwol May 1, 2026
2aef146
feat(sprint-f): Self-Test Loop — cold start maturity
fahmiwol May 1, 2026
f39efb7
fix(selftest): truncate generated questions to exact n count
fahmiwol May 1, 2026
4055dfc
fix(omnyx): remove local asyncio imports causing UnboundLocalError
fahmiwol May 1, 2026
3a018db
doc(log): catat Sprint F Self-Test Loop + bug fixes
fahmiwol May 1, 2026
e01cf28
doc(handoff): HANDOFF_KIMI_2026-05-01 + update STATUS_TODAY
fahmiwol May 1, 2026
716e771
doc(handoff): force-add HANDOFF_KIMI_2026-05-01.md (gitignore override)
fahmiwol May 1, 2026
cdde25d
feat(sprint-g): Maqashid Auto-Tune + wired to OMNYX
fahmiwol May 1, 2026
304bd38
doc(log): catat Sprint G Maqashid Auto-Tune
fahmiwol May 1, 2026
0bc595d
feat(sprint-h): Creative Output Polish — iteration loop
fahmiwol May 1, 2026
817a2f3
Sprint I: DoRA Persona Adapter Foundation
fahmiwol May 1, 2026
45f67e0
docs: Sprint A–I audit + Sprint K research & plan
fahmiwol May 1, 2026
bc15c74
docs: Sprint K research synthesis — multi-agent best practices 2025–2026
fahmiwol May 1, 2026
1a4e129
Sprint K: Multi-Agent Spawning — Bio-Cognitive Fase V
fahmiwol May 1, 2026
2e0f802
docs: MEGA Handoff Sprint A–K + context preservation
fahmiwol May 1, 2026
8df85f8
feat(sprint-j): conversation memory — multi-turn context for chat_hol…
fahmiwol May 1, 2026
4d299e4
fix(sprint-j): omnyx classify uses actual question, not injected context
fahmiwol May 1, 2026
d3d101e
doc: Sprint J LIVING_LOG — conversation memory impl + deploy notes
fahmiwol May 1, 2026
20a04e4
feat(landing): add PayPal donate button + Ko-fi link
fahmiwol May 1, 2026
e565b46
doc(log): catat landing page donate button 2026-05-02
fahmiwol May 1, 2026
cb490fb
doc(log): deploy landing page donate button ke VPS — verified live
fahmiwol May 1, 2026
4f78925
fix(audit): cleanup 7 audit issues — orphan delete, tools_used, async…
fahmiwol May 1, 2026
ad0c93a
doc(log): catat cleanup 7 audit issues + deploy VPS 2026-05-02
fahmiwol May 1, 2026
be61e97
doc(log): catat merge main attempt + conflict resolution defer 2026-0…
fahmiwol May 2, 2026
269115f
fix(omnyx): extend factual patterns — wakilnya/kalo/gimana route to s…
fahmiwol May 2, 2026
c393af6
doc: handoff 2026-05-02 + research note 100 autonomous AI agent
fahmiwol May 2, 2026
edbfa93
chore: commit praxis lessons + brain patterns + pencipta + persona co…
fahmiwol May 2, 2026
6839ed1
chore(gitignore): ignore VPS scripts, local artifacts, screenshots
fahmiwol May 2, 2026
129c83a
feat(sprint-l): self-modifying + foresight radar
fahmiwol May 2, 2026
107f972
doc(log): catat Sprint L implementation — error_registry + foresight_…
fahmiwol May 2, 2026
9ca61b2
doc(handoff): update P2+P3 status SELESAI — Sprint L done, cleanup done
fahmiwol May 2, 2026
3c1cc3c
merge(main): selective merge origin/main → work/gallant-ellis-7cd14d
fahmiwol May 2, 2026
2a38517
doc(log+handoff): catat P1 merge main selesai
fahmiwol May 2, 2026
d3ae7f2
doc(log): catat P4 VPS audit — Sprint J/L belum deploy, issues identi…
fahmiwol May 2, 2026
030ed50
fix(sprint-l): sanad_score threshold 4.0 -> 0.4 (scale is 0-1 not 0-10)
fahmiwol May 2, 2026
26bbf4e
fix(omnyx): strip web article title prefix from Speed Demon direct pa…
fahmiwol May 2, 2026
c06cc4a
fix(omnyx): improve live memory and web direct answers
fahmiwol May 2, 2026
140ca08
doc(log): record P4 live deploy verification
fahmiwol May 2, 2026
e86297c
chore(security): redact tracked deployment credentials
fahmiwol May 2, 2026
237dae9
fix(memory): make personal recall safer across chats
fahmiwol May 2, 2026
1f0fdfa
doc(log): record P4 memory QA deploy
fahmiwol May 2, 2026
36f003d
doc(canon): record bio-cognitive SIDIX northstar
fahmiwol May 2, 2026
26bfa0c
fix(chat): prevent follow-up context leakage
fahmiwol May 2, 2026
562337a
fix(omnyx): ground current indonesia officials
fahmiwol May 2, 2026
f3b7601
fix(omnyx): answer current date from runtime clock
fahmiwol May 2, 2026
bd90d0f
doc(log): record P4 live grounding deploy
fahmiwol May 2, 2026
4e16454
fix(ui): preserve memory in holistic streaming
fahmiwol May 2, 2026
a094343
fix(stream): expose holistic SSE through OMNYX
fahmiwol May 2, 2026
891ee3b
fix(stream): emit done metadata safely
fahmiwol May 2, 2026
b8b660a
doc(log): record holistic stream live QA
fahmiwol May 2, 2026
20c044a
feat(ado-foundation): adopsi migancore ke SIDIX — SOUL, State, Memory…
fahmiwol May 7, 2026
b174174
feat(product-layer): SIDIX as ChatGPT/Kimi-class consumer AI — Mode S…
fahmiwol May 7, 2026
cefa145
feat(mode-system): implement SidixMode router (instant/thinking/agent…
fahmiwol May 7, 2026
b3ffb9f
feat(mode-system): full frontend migration + backend wiring end-to-end
fahmiwol May 7, 2026
b2350fe
feat(mcp+deep-research): 4 missing tools + transport + recursive engine
fahmiwol May 7, 2026
7453f8b
doc(log): record MCP + Deep Research + A2A research + deploy script
fahmiwol May 7, 2026
c0e8abf
feat(a2a): AgentCard endpoint at /.well-known/agent-card.json
fahmiwol May 7, 2026
5bca23d
doc(log): record A2A AgentCard + deploy script location
fahmiwol May 7, 2026
8e7f754
fix(mcp): parse JSON body manually to avoid FastAPI validation error
fahmiwol May 7, 2026
f918aeb
doc(log): record deploy success — all features live on VPS
fahmiwol May 7, 2026
ca5ce93
feat(a2a+canvas+mcp-stdio): Phase 2 A2AServer + Code Canvas MVP + MCP…
fahmiwol May 7, 2026
f9c52a6
doc(backlog): mark Mode System + Code Canvas + MCP stdio + A2A Phase …
fahmiwol May 7, 2026
54d514c
feat(standing-alone): Apps Framework + A2AClient + Studio + Notebook …
fahmiwol May 7, 2026
223bf46
fix(artifact): move /app/artifact/list before /{artifact_id} to avoid…
fahmiwol May 7, 2026
7183e75
fix(maqashid): add missing top-level imports for evaluate_output, aut…
fahmiwol May 7, 2026
c1df636
doc(log): record standing alone sprint deploy + bug fixes
fahmiwol May 7, 2026
7b18f8a
feat(agency+debate+train): Agency Kit 1-Click + Debate Ring REAL + Se…
fahmiwol May 7, 2026
727c446
doc(backlog): mark 11 sprints as DONE — standing alone complete
fahmiwol May 7, 2026
e1026fa
fix(qa): nginx AgentCard proxy + Agency Kit async endpoint + QA smoke…
fahmiwol May 7, 2026
658376c
fix(agency): import asyncio for to_thread() in agency_kit endpoint
fahmiwol May 7, 2026
2d62b6f
fix(agency): deadlock in _prune_jobs — use RLock instead of Lock
fahmiwol May 7, 2026
97682fe
doc(qa): QA phase complete — 15/15 PASS, 3 bug fixes documented
fahmiwol May 7, 2026
aaf0ddf
feat(dora+voyager): Persona DoRA Adapter + Voyager Protocol Phase 1
fahmiwol May 7, 2026
b77fd63
doc(backlog): mark 13 sprints DONE + DoRA + Voyager deployed
fahmiwol May 7, 2026
3f92459
feat(voyager-p2,maqashid-p2,raudah-v2): trend-driven batch implementa…
fahmiwol May 7, 2026
2f17d0d
docs(visi-matrix,living-log): handoff session end 2026-05-07
fahmiwol May 7, 2026
f83e8f0
doc(research,backlog,visi-matrix,living-log): screening menyeluruh + …
fahmiwol May 7, 2026
8bd45dc
feat(input-expansion): document parser + audio transcribe/tts endpoin…
fahmiwol May 7, 2026
9cd7532
doc(living-log): record Input Expansion Phase 1 sprint completion
fahmiwol May 7, 2026
1563eea
feat(multimodal+coding+brand+webfetch): 4 new modules + 8 endpoints +…
fahmiwol May 7, 2026
58ec62d
doc(living-log): record multimodal+coding+brand+webfetch sprint
fahmiwol May 7, 2026
daf9b03
feat(runpod+dataset): GPU inference connector + local dataset collector
fahmiwol May 7, 2026
d2b5331
doc(living-log): record RunPod + dataset sprint completion
fahmiwol May 7, 2026
fc45fd0
feat(web-dataset): legal image dataset sources + DNA analysis
fahmiwol May 7, 2026
e25b745
feat(drive-dataset): Google Drive image dataset collector
fahmiwol May 7, 2026
7d63329
feat(drive-multi): multi-account Google Drive explorer + batch collect
fahmiwol May 7, 2026
903b0ee
feat(elevenlabs): Guru Trainer Voice integration (TTS + voice clone +…
fahmiwol May 7, 2026
e4b5013
chore(env): add RunPod section to .env.sample
fahmiwol May 7, 2026
737e0b8
feat(spark): SIDIX Spark Ethical Dataset Curator (Adobe Firefly-inspi…
fahmiwol May 7, 2026
19b9248
feat(drive): OAuth2 token exchange helper + env docs
fahmiwol May 7, 2026
4c50617
feat(drive): Google Drive Admin Panel + Token Manager
fahmiwol May 7, 2026
b87d16f
fix(beta): import paths + output modality wire + QA audit
fahmiwol May 7, 2026
a4554ee
feat(beta-sprint1): Input Expansion — multimodal input wired
fahmiwol May 8, 2026
3e81d9c
docs: update BACKLOG Sprint 1 DONE, LIVING_LOG final entry
fahmiwol May 8, 2026
d481513
docs: update STATUS_TODAY.md with Sprint Batch 2026-05-08 completion
fahmiwol May 8, 2026
e1d7c3b
docs: wrap session LIVING_LOG — Sprint Batch 2026-05-08 complete
fahmiwol May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gitdir: C:/SIDIX-AI/.git/worktrees/gallant-ellis-7cd14d
50 changes: 50 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ SIDIX_VPS_PASS=
DOMAIN=sidixlab.com
VITE_BRAIN_QA_URL=https://sidixlab.com/api

# ------------------------------------------------------------
# RunPod GPU Workers (Image Gen, 3D, TTS, Design)
# Daftar: https://www.runpod.io/console/settings/api-keys
# ------------------------------------------------------------
RUNPOD_API_KEY=
RUNPOD_MEDIA_ENDPOINT_ID=
RUNPOD_3D_ENDPOINT_ID=

# ------------------------------------------------------------
# SIDIX Inference Engine
# ------------------------------------------------------------
Expand Down Expand Up @@ -78,6 +86,48 @@ GEMINI_API_KEY=
# Anthropic — opsional (Haiku default, Sonnet untuk sponsored)
# ANTHROPIC_API_KEY sudah di-load dari env VPS

# ------------------------------------------------------------
# Google Drive Dataset Collection (Multi-Account)
# Setup: https://console.cloud.google.com/ → APIs & Services → Credentials
# Atau pakai OAuth Playground (lebih cepat):
# 1. Buka https://developers.google.com/oauthplayground
# 2. Step 1: Scope = https://www.googleapis.com/auth/drive.readonly
# 3. Klik Authorize APIs → login Google → consent
# 4. Step 2: Exchange code → copy refresh_token (tidak expired)
# 5. Step 3: Test API (optional)
# Helper script: python scripts/exchange_drive_tokens.py --help
# ------------------------------------------------------------
GOOGLE_DRIVE_CLIENT_ID=
GOOGLE_DRIVE_CLIENT_SECRET=

# Default account
GOOGLE_DRIVE_ACCESS_TOKEN=
GOOGLE_DRIVE_REFRESH_TOKEN=

# Per-account tokens (fahmiwol, tiranyx, operationalnyx, nirmananyx)
# Isi REFRESH_TOKEN (tidak expired). ACCESS_TOKEN di-refresh otomatis.
GOOGLE_DRIVE_ACCESS_TOKEN_FAHMIWOL=
GOOGLE_DRIVE_REFRESH_TOKEN_FAHMIWOL=
GOOGLE_DRIVE_ACCESS_TOKEN_TIRANYX=
GOOGLE_DRIVE_REFRESH_TOKEN_TIRANYX=
GOOGLE_DRIVE_ACCESS_TOKEN_OPERATIONALNYX=
GOOGLE_DRIVE_REFRESH_TOKEN_OPERATIONALNYX=
GOOGLE_DRIVE_ACCESS_TOKEN_NIRMANANYX=
GOOGLE_DRIVE_REFRESH_TOKEN_NIRMANANYX=

# ------------------------------------------------------------
# ElevenLabs Guru Trainer Voice
# Daftar: https://elevenlabs.io/app/settings/api-keys
# ------------------------------------------------------------
ELEVENLABS_API_KEY=

# ------------------------------------------------------------
# Unsplash / Pexels (Legal Image Dataset)
# Daftar: https://unsplash.com/developers, https://www.pexels.com/api/
# ------------------------------------------------------------
UNSPLASH_ACCESS_KEY=
PEXELS_API_KEY=

# ------------------------------------------------------------
# CI/Testing
# ------------------------------------------------------------
Expand Down
22 changes: 20 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,23 @@ docs/SIDIX_CHECKPOINT_*.md
scripts/vps_*.py
scripts/vps_check.py

# ── Dataset auto-generated by daily collector (regen tiap hari di VPS) ───────
dataset/id_sea/
# ── Local VPS operational scripts (root dir, internal only) ──────────────────
_check_*.py
_deploy_vps.py
_test_chat_vps.py

# ── Local artifacts / screenshots / temp extracts ────────────────────────────
*.b64
holistic_test_*.png
sidix_*.png
sidix_*.yml
sidix_homepage_*.png
Bio_Cognitive_extracted.txt
SIDIX_Architecture_extracted.txt
check_halo.sh
gemini_tool_combination.yml
patch_multi_source.py
patch_websearch.py
test_websearch.py
.playwright-mcp/
apps/brain_qa/brain/
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

| Urutan | File | Fungsi |
|--------|------|--------|
| 0 | **`docs/AGENT_ONBOARDING.md`** | **WAJIB PERTAMA** — Session Start Protocol anti-menguap. Baca sebelum eksekusi apapun. |
| 1 | [`docs/00_START_HERE.md`](docs/00_START_HERE.md) | Pintu masuk manusia + agen; status & rencana eksekusi. |
| 2 | **`AGENTS.md` (file ini)** | Preferensi belajar, fakta workspace, Projek Badar, **wajib** `LIVING_LOG` untuk pekerjaan berarti. |
| 3 | [`docs/LIVING_LOG.md`](docs/LIVING_LOG.md) | Riwayat keputusan/uji/impl terbaru (append-only; baca bagian bawah). |
| 4 | [`docs/AGENTS_MANDATORY_SOP.md`](docs/AGENTS_MANDATORY_SOP.md) | **Wajib:** terminologi SIDIX-native, lima persona, workflow pasca-task, bilingual changelog/landing, guardrail privasi. |
| 5 | [`CLAUDE.md`](CLAUDE.md) | SSOT tambahan untuk Claude: **MASTER_ROADMAP**, DEVELOPMENT_RULES, North Star, keamanan, UI lock. |
| 6 | [`docs/NORTH_STAR.md`](docs/NORTH_STAR.md) · [`docs/MASTER_ROADMAP_2026-2027.md`](docs/MASTER_ROADMAP_2026-2027.md) · [`docs/SIDIX_CAPABILITY_MAP.md`](docs/SIDIX_CAPABILITY_MAP.md) | Arah produk, sprint canonical, kemampuan teknis. |
| 7 | [`docs/SIDIX_BACKLOG.md`](docs/SIDIX_BACKLOG.md) · [`docs/FOUNDER_JOURNAL.md`](docs/FOUNDER_JOURNAL.md) · [`docs/FOUNDER_IDEA_LOG.md`](docs/FOUNDER_IDEA_LOG.md) | Sprint state SSoT + decision lock founder + verbatim ide bos. |

> ⚠️ **WORKTREE WARNING:** Repo ini punya worktree aktif (`gallant-ellis-7cd14d/`, `epic-cray-3e451f/`, `pedantic-banach-c8232d/`, `serene-murdock-dbcb1f/`). Kode dan dokumen terbaru sering berada di worktree sebelum di-merge ke `main`. **Selalu cek `git worktree list` atau folder worktree sebelum eksekusi.** Jangan baca hanya root `main` — itu bisa stale.

Transcript Cursor untuk kutipan user: folder `agent-transcripts` di profil Cursor (lihat root [`CLAUDE.md`](CLAUDE.md) / README proyek). **Jangan** commit secret; ikuti bagian keamanan di `CLAUDE.md` bila relevan.

Expand Down
36 changes: 36 additions & 0 deletions DEPLOY_TONIGHT.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
# DEPLOY_TONIGHT.sh — Deploy semua perubahan 2026-04-30 ke VPS
# Bos tinggal: ssh root@72.62.125.6, paste ini, enter

set -e

echo "=== SIDIX Deploy 2026-04-30 ==="
cd /opt/sidix

echo "[1/6] Git pull..."
git fetch origin
git checkout work/gallant-ellis-7cd14d
git reset --hard origin/work/gallant-ellis-7cd14d

echo "[2/6] Install deps (kalau ada baru)..."
pip install -q -r apps/brain_qa/requirements.txt || true

echo "[3/6] Syntax check..."
python3 -m py_compile apps/brain_qa/brain_qa/sanad_orchestrator.py
python3 -m py_compile apps/brain_qa/brain_qa/daily_self_critique.py

echo "[4/6] Re-index BM25 (kalau corpus baru)..."
cd apps/brain_qa
python3 -m brain_qa index || true
cd /opt/sidix

echo "[5/6] Restart brain..."
pm2 restart sidix-brain --update-env
sleep 3
pm2 status sidix-brain

echo "[6/6] Health check..."
curl -s http://localhost:8765/health | python3 -m json.tool || echo "Health check manual needed"

echo "=== DEPLOY SELESAI ==="
echo "Next: setup cron (lihat SETUP_CRON.sh)"
61 changes: 61 additions & 0 deletions SETUP_CRON.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
# SETUP_CRON.sh — Setup cron OTAK+ self-critique + daily growth
# Bos tinggal: ssh root@72.62.125.6, paste ini, enter

echo "=== Setup SIDIX Background Cron ==="

# Backup cron existing
crontab -l > /tmp/cron_backup_$(date +%Y%m%d_%H%M%S).txt 2>/dev/null || true

# Write new cron
cat << 'EOF' | crontab -
# SIDIX Background Growth Loop
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# 02:00 — Learn Agent (fetch external knowledge)
0 2 * * * cd /opt/sidix/apps/brain_qa && python3 -u brain_qa/learn_agent.py >> /var/log/sidix_learn.log 2>&1

# 03:00 — OTAK+ Self-Critique (evaluate yesterday's outputs)
0 3 * * * cd /opt/sidix/apps/brain_qa && python3 -u brain_qa/daily_self_critique.py >> /var/log/sidix_critique.log 2>&1

# 04:00 — Daily Growth (7-phase compound learning)
0 4 * * * cd /opt/sidix/apps/brain_qa && python3 -u brain_qa/daily_growth.py >> /var/log/sidix_growth.log 2>&1

# 04:30 — Process Queue (index new corpus)
30 4 * * * cd /opt/sidix/apps/brain_qa && python3 -u -m brain_qa process_queue >> /var/log/sidix_queue.log 2>&1

# 14:00 — Learn Agent afternoon run
0 14 * * * cd /opt/sidix/apps/brain_qa && python3 -u brain_qa/learn_agent.py >> /var/log/sidix_learn.log 2>&1

# 22:00 — Daily Synthesis (synthesize today into 1 paragraph state)
0 22 * * * cd /opt/sidix && bash scripts/daily_synthesis.sh >> /var/log/sidix_synthesis.log 2>&1
EOF

echo "Cron installed. Current crontab:"
crontab -l

echo ""
echo "=== Setup logrotate untuk log SIDIX ==="
cat << 'EOF' > /etc/logrotate.d/sidix
/var/log/sidix_*.log {
daily
rotate 14
compress
delaycompress
missingok
notifempty
create 0644 root root
}
EOF

echo "Logrotate configured."
echo ""
echo "=== SELESAI ==="
echo "SIDIX sekarang tumbuh sendiri di background:"
echo " 02:00 — Learn Agent"
echo " 03:00 — OTAK+ Self-Critique (BARU)"
echo " 04:00 — Daily Growth"
echo " 04:30 — Process Queue"
echo " 14:00 — Learn Agent (afternoon)"
echo " 22:00 — Daily Synthesis"
Loading