← Về thư mục
📄 / / root / GitHub / IMPLEMENTATION_PLAN.md

Kế hoạch: Workspace Thống nhất — Antigravity + Hermes Desktop + VPS 24/7

Thông tin VPS (đã xác nhận)

IP 161.97.131.21
User root / Password
Hermes đang chạy hermes-gateway (systemd, Telegram bot CEO OS)
GitHub Token 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

[!WARNING] Không commit credentials vào Git. File .env đã có trong .gitignore.


Kiến trúc tổng thể

github.com/nhivo2504/keira-workspace  ← Private repo (tạo mới)
           │
           ├── .agents/AGENTS.md      ← Antigravity rules (toàn workspace)
           ├── Projects/
           │   ├── GLV/               ← Project SEO Dashboard & tài liệu GLV
           │   │   ├── CONTEXT.md     ← Bộ nhớ chung AG + HM
           │   │   ├── seo-dashboard-app/ ← Code app (Antigravity làm chính)
           │   │   ├── reports/       ← Báo cáo SEO
           │   │   └── docs/          ← SEO data, research
           │   ├── nhi-nhi-vo-blog/
           │   ├── Hermes-agents/
           │   └── ...
           └── docs/

                    ↕ git pull/push

    ┌──────────────────────────────────────────────┐
    │  Mac                          VPS 24/7        │
    │  ┌─────────────┐  ┌───────────────────────┐  │
    │  │ Antigravity │  │ Antigravity Daemon     │  │
    │  │ (IDE local) │  │ /root/GitHub/          │  │
    │  └─────────────┘  └───────────────────────┘  │
    │  ┌─────────────┐  ┌───────────────────────┐  │
    │  │ Hermes      │  │ Hermes Agent           │  │
    │  │ Desktop     │  │ (CEO OS, Telegram)     │  │
    │  └─────────────┘  └───────────────────────┘  │
    └──────────────────────────────────────────────┘

Phân vai rõ ràng: Antigravity vs Hermes Desktop

[!IMPORTANT] Hai tool KHÔNG cạnh tranh nhau — chúng làm việc khác nhau trên cùng 1 repo.

Task Antigravity Hermes Desktop
Viết code / debug ✅ Làm chính ❌ Không phù hợp
Chạy terminal, build, deploy ✅ Làm chính ❌ Không phù hợp
Multi-file edit, refactor ✅ Làm chính ❌ Không phù hợp
LLM mạnh (Gemini, Claude) ✅ Switcher tích hợp ⚠️ Phụ thuộc gateway
Research, web search ✅ MCP tools ⚠️ Hạn chế
Kanban / task tracking ⚠️ Qua markdown ✅ Native skill
Learning / AI Mentor ❌ Không có ✅ Native skill
Telegram bot control ❌ Không có ✅ CEO OS
Chạy 24/7 khi Mac tắt ✅ VPS Daemon ✅ VPS Gateway

Nguyên tắc đơn giản: - Antigravity = Làm việc (code, build, research, chạy lệnh) - Hermes Desktop = Quản lý + Học (plan, kanban, mentor, Telegram) - Git = Bộ nhớ chung (cả 2 đều push/pull cùng 1 repo)


Cơ chế "CONTEXT.md" — Không bị mất context khi đổi tool

Mỗi project con có 1 file CONTEXT.mdcả Antigravity lẫn Hermes đều đọc file này trước khi làm việc.

# GLV SEO Dashboard — CONTEXT

## Trạng thái hiện tại
- Sprint: W34 — SEO audit phase
- Done: keyword research, competitor analysis
- In progress: dashboard UI

## Quyết định kỹ thuật
- Stack: Astro.js + Python crawl
- Data source: GSC API / Crawlers

## Việc tiếp theo
- [ ] Hoàn thiện dashboard UI
- [ ] Chạy pipeline crawl tự động

## Session log
- 2026-08-26 (Antigravity): Sync GLV, tạo CONTEXT.md
- 2026-08-26 (Hermes): Cập nhật kanban sprint W34

Antigravity đọc CONTEXT.md qua rule trong .agents/AGENTS.md. Hermes Desktop đọc CONTEXT.md qua SOUL.md hoặc skill instruction.


Kế hoạch thực hiện — 7 Phases


PHASE 0 — Đồng bộ GLV từ ceo-ai-os vào Projects/GLV/

Tool thực hiện: Antigravity (Mac local)


PHASE 1 — Chuẩn bị GitHub Private Repo

Mục tiêu: Push toàn bộ /Documents/GitHub/ (bao gồm GLV vừa sync) lên private repo.

# 1. Kiểm tra .gitignore
cat /Users/keira/Documents/GitHub/.gitignore

# 2. Tạo GitHub private repo
export GITHUB_TOKEN=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
gh repo create keira-workspace --private

# 3. Add remote và push
git -C /Users/keira/Documents/GitHub \
  remote add origin \
  https://github.com/$(gh api user --jq .login)/keira-workspace.git
git -C /Users/keira/Documents/GitHub push -u origin main

# 4. Verify
gh repo view keira-workspace --web

Ghi lại URL: https://github.com/<username>/keira-workspace.git


PHASE 2 — Thêm Hermes Desktop Config vào Workspace

Tạo file config để Hermes Desktop nhận diện được workspace này, không đụng vào Hermes CEO OS trên VPS.

# Tạo SOUL.md cho Hermes Desktop (persona dev assistant)
cat > /Users/keira/Documents/GitHub/SOUL.md << 'EOF'
# Dev Workspace Assistant

Bạn là trợ lý phát triển phần mềm và quản lý dự án cho workspace cá nhân.

## Vai trò
- Theo dõi tiến độ các project trong /Projects/
- Quản lý kanban và task tracking
- Hỗ trợ research, học tập (AI/SEO/dev)
- KHÔNG viết code trực tiếp (đó là việc của Antigravity)

## Quy tắc
1. Trước mỗi câu trả lời về 1 project, đọc CONTEXT.md của project đó
2. Cập nhật CONTEXT.md sau mỗi quyết định hoặc milestone
3. Dùng kanban/ folder để track tasks
4. Commit và push sau mỗi session
EOF

PHASE 3 — Cập nhật AGENTS.md cho Antigravity

Thêm rule vào .agents/AGENTS.md để Antigravity tự động đọc CONTEXT.md của project đang làm việc:

## Project Context Rule
Trước khi làm việc với bất kỳ project nào trong /Projects/:
1. Đọc file `CONTEXT.md` trong folder project đó (nếu có)
2. Sau khi hoàn thành task lớn, cập nhật section "Session log" trong CONTEXT.md
3. Commit message format: "feat/fix/docs: <mô tả> [AG]"

PHASE 4 — Cài Antigravity Headless Daemon trên VPS

VPS hiện đang chạy hermes-gateway. Antigravity daemon sẽ chạy song song, không đụng vào Hermes.

# SSH vào VPS
ssh root@161.97.131.21
# Password: ddltkctb@Nh1

# Verify Hermes vẫn đang chạy (không đụng vào)
systemctl status hermes-gateway

# Cài Antigravity daemon
curl -fsSL https://antigravity.google/cli/agy-daemon.sh | bash
source ~/.bashrc

# Đăng nhập Google Account (cùng account Mac)
antigravity auth login

# Kích hoạt Remote Control
antigravity config set remote_control.enabled true
antigravity config set machine_name "Contabo-VPS-24x7"

PHASE 5 — Clone Workspace + Copy Config lên VPS

# Trên VPS: Clone workspace
git clone https://<PAT>@github.com/<username>/keira-workspace.git /root/GitHub

# Verify có GLV
ls /root/GitHub/Projects/GLV/

# Tạo Python venv trên VPS
cd /root/GitHub && python3 -m venv .venv
.venv/bin/pip install paramiko requests

# Từ Mac: Copy MCP config (có API keys — không vào Git)
scp ~/.gemini/config/mcp_config.json root@161.97.131.21:/root/.gemini/config/mcp_config.json
scp ~/.gemini/config/config.json root@161.97.131.21:/root/.gemini/config/config.json

# Trỏ workspace Antigravity về đúng folder
antigravity workspace set /root/GitHub

PHASE 6 — Cài Systemd Service + Auto-sync

# Trên VPS: Cài Antigravity service (chạy song song Hermes)
antigravity daemon install-service
systemctl enable antigravity
systemctl start antigravity

# Verify CẢ 2 service đều chạy
systemctl status hermes-gateway  # → active ✅  (Hermes Telegram bot)
systemctl status antigravity     # → active ✅  (Antigravity daemon)

# Setup auto-pull git mỗi 15 phút
(crontab -l 2>/dev/null; echo "*/15 * * * * cd /root/GitHub && git pull origin main >> /root/sync.log 2>&1") | crontab -

PHASE 7 — Verify Remote Control

# Từ Mac Antigravity IDE:
# Cmd+, → App → Remote Instances → thấy "Contabo-VPS-24x7"
# Click switch → file tree /root/GitHub/ hiển thị

Test từ điện thoại (Mac tắt hoàn toàn): 1. Mở antigravity.google/remote 2. Chọn Contabo-VPS-24x7 3. Chat: "Xem CONTEXT.md của GLV" 4. Verify output đúng


Quy trình làm việc hàng ngày

Khi dùng Antigravity (code, build, research)

1. Mở Antigravity → Remote: chọn VPS hoặc local
2. Antigravity tự đọc CONTEXT.md của project (theo rule AGENTS.md)
3. Viết code / chạy lệnh / research
4. Antigravity commit: "feat: xxx [AG]"
5. Push lên GitHub

Khi dùng Hermes Desktop (plan, kanban, review)

1. Mở Hermes Desktop → workspace /Documents/GitHub/
2. Hermes đọc SOUL.md + CONTEXT.md của project
3. Update kanban, lên plan, review progress
4. Hermes commit: "chore: update context/kanban [HM]"
5. Push lên GitHub