Merge OrbitOS into project — one install, everything ready
- Added 15 OrbitOS skills (bundled in skills/orbitos/) - Added vault structure templates (views, templates, prompts) - Added install.sh (macOS + Linux) - Removed references/orbitos-skills.md (no longer needed) - Updated README: 30 skills total, unified install flow Total: 9 mm* + 6 dependencies + 15 orbitos = 30 skills
This commit is contained in:
162
skills/orbitos/orbites-vault-git/SKILL.md
Normal file
162
skills/orbitos/orbites-vault-git/SKILL.md
Normal file
@@ -0,0 +1,162 @@
|
||||
---
|
||||
name: orbites-vault-git
|
||||
description: Git operations for OrbitOS vault — init, push large repos with many files, .gitignore for monorepo, HTTP 413 workarounds, project deploy separation. Use when setting up, pushing, or troubleshooting the OrbitOS vault git repo.
|
||||
---
|
||||
|
||||
# OrbitOS: Vault Git Management
|
||||
|
||||
## Architecture — Single Vault Repo + Separate Deploy Repos
|
||||
|
||||
The OrbitOS vault is a **single git monorepo** that tracks EVERYTHING — metadata (inbox, daily, wiki, plans) AND all project source code, images, CSVs, PDFs, documents. Clone once and you have the complete workspace.
|
||||
|
||||
```
|
||||
~/vault/ ← Git repo A (vault — everything)
|
||||
├── .gitignore ← Build artifacts only
|
||||
├── 00_Inbox/
|
||||
├── 10_Daily/
|
||||
├── 20_Projects/
|
||||
│ ├── CrowdSight/ ← tracked by vault git
|
||||
│ ├── OrbitOS/
|
||||
│ ├── moreminimore/
|
||||
│ └── ... (all 10 projects)
|
||||
├── 90_Plans/
|
||||
└── 99_System/
|
||||
```
|
||||
|
||||
Project repos in `~/Gitea/` remain separate for **deploy-only pushes**:
|
||||
|
||||
```
|
||||
~/Gitea/MiroFish/.git/ ← Git repo B (deploy — CrowdSight)
|
||||
~/Gitea/moreminimore-service-system/ ← Git repo C (deploy — moreminimore)
|
||||
```
|
||||
|
||||
## Vault .gitignore — Build Artifacts ONLY
|
||||
|
||||
The `.gitignore` must exclude **only build artifacts**. NEVER exclude source files, images, PDFs, CSVs, or data files — the vault is a complete snapshot.
|
||||
|
||||
```gitignore
|
||||
# Python build
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
.env
|
||||
.venv/
|
||||
venv/
|
||||
*.egg-info/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# Node build
|
||||
node_modules/
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
|
||||
# AI agent state
|
||||
.omc/
|
||||
.hermes/
|
||||
```
|
||||
|
||||
### DO NOT add:
|
||||
|
||||
```
|
||||
*.csv ❌ — CSV data must be tracked
|
||||
*.pdf ❌ — documents must be tracked
|
||||
*.png *.jpg ❌ — images must be tracked
|
||||
*.mq5 *.ex5 ❌ — MT5 sources must be tracked
|
||||
20_Projects/*/ ❌ — projects must be tracked
|
||||
```
|
||||
|
||||
## Init Vault Git
|
||||
|
||||
```bash
|
||||
cd ~/vault
|
||||
# Only if truly starting fresh:
|
||||
rm -rf .git && git init
|
||||
# Or use existing:
|
||||
git init # if no .git yet
|
||||
|
||||
# First commit
|
||||
git add .
|
||||
git commit -m "init: vault — all projects + metadata"
|
||||
git remote add origin https://git.moreminimore.com/kunthawat/vault.git
|
||||
git push -u origin main --force
|
||||
```
|
||||
|
||||
## HTTP 413 — Fixes in Priority Order
|
||||
|
||||
If `git push` fails with HTTP 413 ("Request Entity Too Large"):
|
||||
|
||||
### ① Increase buffer (first try):
|
||||
```bash
|
||||
git config http.postBuffer 524288000
|
||||
git push
|
||||
```
|
||||
|
||||
### ② Push in split chunks:
|
||||
Commit one project or one file at a time, pushing each incrementally:
|
||||
```bash
|
||||
git add 20_Projects/CrowdSight/
|
||||
git commit -m "add: CrowdSight data/assets"
|
||||
git push
|
||||
```
|
||||
|
||||
### ③ For very large repos, split per-file:
|
||||
```bash
|
||||
for f in $(git diff --cached --name-only); do
|
||||
git add "$f" && git commit -m "add: $(basename "$f")" && git push
|
||||
done
|
||||
```
|
||||
Expect ~600+ small commits — acceptable for initial setup. Optionally squash later with interactive rebase.
|
||||
|
||||
### ⚠️ Pitfall: False HTTP 413
|
||||
`git push` may show HTTP 413 even when the push actually succeeded — the sideband connection closes before the client receives the success response. **Always verify** with:
|
||||
```bash
|
||||
git fetch origin
|
||||
git log origin/main --oneline | head -3
|
||||
```
|
||||
|
||||
### ④ DO NOT nuke `.git` and re-init:
|
||||
`rm -rf .git && git init` destroys commit history and force-pushes can corrupt the remote. Only use this as a last resort when the local state is irrecoverable and no history matters.
|
||||
|
||||
## Project Deploy Workflow
|
||||
|
||||
**Vault** tracks all code changes. **Project repos** in ~/Gitea/ push only deploy-ready releases:
|
||||
|
||||
```bash
|
||||
# Work normally in vault
|
||||
cd ~/vault/20_Projects/CrowdSight
|
||||
# edit code...
|
||||
|
||||
# Commit in vault (tracks everything)
|
||||
cd ~/vault
|
||||
git add . && git commit -m "feat: new simulation engine" && git push
|
||||
|
||||
# When ready for deploy — copy to project repo
|
||||
cp -r ~/vault/20_Projects/CrowdSight/src/ ~/Gitea/MiroFish/
|
||||
cd ~/Gitea/MiroFish
|
||||
git add . && git commit -m "release: v2.1" && git push origin main
|
||||
```
|
||||
|
||||
## Nested .git Handling
|
||||
|
||||
When copying projects from Gitea into vault:
|
||||
1. **Remove** `20_Projects/<Project>/.git` from the vault copy — git creates gitlinks (mode 160000) otherwise
|
||||
2. **Keep** the original `.git` in `~/Gitea/<Project>/` — used for deploy pushes only
|
||||
3. Projects without `.git` in source (PreTradeChecklist, TPOsystem, grid-order-flow-mt5, moreminimore) are tracked as regular folders by vault git
|
||||
|
||||
## Verification Checklist
|
||||
|
||||
After pushing:
|
||||
- [ ] `.gitignore` has build artifacts only (no `*.pdf`, `*.png`, `*.csv` patterns)
|
||||
- [ ] `git ls-files | wc -l` shows ~2,000+ files including all images, CSVs, PDFs
|
||||
- [ ] `git fetch origin && git diff origin/main` is empty
|
||||
- [ ] `du -sh .git/` shows ~150-200MB (normal for full vault with assets)
|
||||
- [ ] Project repos in `~/Gitea/` still have their `.git` for deploy pushes
|
||||
@@ -0,0 +1,93 @@
|
||||
# HTTP 413 Resolution — Vault Git Push Failure
|
||||
|
||||
## Observed Problem
|
||||
|
||||
```
|
||||
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
|
||||
send-pack: unexpected disconnect while reading sideband packet
|
||||
fatal: the remote end hung up unexpectedly
|
||||
```
|
||||
|
||||
## Root Cause
|
||||
|
||||
The vault `.git/objects` pack file exceeded the Gitea server's payload size limit because it contained large binary assets alongside source code:
|
||||
|
||||
- Binary assets: `.png`, `.jpg`, `.jpeg`, `.pdf`, `.ico` (product images, screenshots, logos, price lists)
|
||||
- Data files: `.csv`, `.csv.gz` (tick data, sample data)
|
||||
- Agent state: `.omc/` directories with session checkpoints
|
||||
|
||||
Initial pack size: **175MB**
|
||||
After splitting: **193MB** (all assets successfully pushed)
|
||||
|
||||
## Resolution Path (used in practice — June 2026)
|
||||
|
||||
### Key Insight: The user wants vault to track EVERYTHING
|
||||
|
||||
Do NOT add broad `.gitignore` patterns like `*.png`, `*.pdf`, `*.csv`. The vault is a complete snapshot — clone once and you have all files.
|
||||
|
||||
### Step 1 — Tighten .gitignore to build artifacts only
|
||||
|
||||
```gitignore
|
||||
# Python build
|
||||
__pycache__/
|
||||
.venv/
|
||||
venv/
|
||||
*.egg-info/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# Node build
|
||||
node_modules/
|
||||
|
||||
# OS / IDE
|
||||
.DS_Store
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# AI agent state
|
||||
.omc/
|
||||
.hermes/
|
||||
```
|
||||
|
||||
REMOVE any broad patterns: `*.csv`, `*.pdf`, `*.png`, `*.jpg`, `*.mq5`, `20_Projects/*/`.
|
||||
|
||||
### Step 2 — Remove nested .git from project copies
|
||||
|
||||
Nested `.git` directories cause gitlinks (mode 160000) which break clone. Remove them before first commit:
|
||||
|
||||
```bash
|
||||
for d in ~/vault/20_Projects/*/; do
|
||||
[ -d "$d.git" ] && rm -rf "${d}.git"
|
||||
done
|
||||
```
|
||||
|
||||
### Step 3 — Split push per-file
|
||||
|
||||
When the vault has 200+ files of all types, push one file at a time:
|
||||
|
||||
```bash
|
||||
for f in $(git diff --cached --name-only); do
|
||||
git add "$f" && git commit -m "add: $(basename "$f")" && git push
|
||||
done
|
||||
```
|
||||
|
||||
This produces ~600 small commits — acceptable for initial setup. Can squash later.
|
||||
|
||||
### Step 4 — Verify despite false errors
|
||||
|
||||
`git push` may show HTTP 413 even when the push actually succeeded — the server accepts the pack but the sideband connection closes before the client receives the success response.
|
||||
|
||||
```bash
|
||||
git fetch origin
|
||||
git log origin/main --oneline | head -3
|
||||
```
|
||||
|
||||
If the commit appears on origin, the push succeeded despite the error message.
|
||||
|
||||
## Prevention
|
||||
|
||||
- **Check size before push**: `du -sh .git/`
|
||||
- **Increase post buffer**: `git config http.postBuffer 524288000`
|
||||
- **Push incrementally** for initial full-vault upload
|
||||
- **Never nuke .git**: `rm -rf .git && git init` destroys history — only use when local state is irrecoverable
|
||||
- **Expected vault size**: 150-200MB (normal for complete workspace with assets)
|
||||
Reference in New Issue
Block a user