vault backup: 2026-08-21 06:05:31
This commit is contained in:
@@ -0,0 +1,515 @@
|
|||||||
|
Use this `bootstrap-vault.sh`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "======================================"
|
||||||
|
echo " SecondBrain Vault Bootstrap"
|
||||||
|
echo "======================================"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
folders=(
|
||||||
|
"00 Inbox/MeetMic"
|
||||||
|
|
||||||
|
"10 Knowledge/CTO Academy/Data"
|
||||||
|
"10 Knowledge/CTO Academy/Project Management"
|
||||||
|
"10 Knowledge/CTO Academy/Infrastructure"
|
||||||
|
"10 Knowledge/CTO Academy/Security"
|
||||||
|
"10 Knowledge/Quotes"
|
||||||
|
"10 Knowledge/Templates"
|
||||||
|
|
||||||
|
"20 Work/Contracts/Active"
|
||||||
|
"20 Work/Contracts/Archive"
|
||||||
|
|
||||||
|
"20 Work/Decisions"
|
||||||
|
"20 Work/Ideas"
|
||||||
|
"20 Work/Journal"
|
||||||
|
"20 Work/KPIs"
|
||||||
|
|
||||||
|
"20 Work/Meetings/Internal"
|
||||||
|
"20 Work/Meetings/Vendors"
|
||||||
|
|
||||||
|
"20 Work/Projects"
|
||||||
|
"20 Work/Team"
|
||||||
|
"20 Work/Tracking"
|
||||||
|
"20 Work/Weekly Review"
|
||||||
|
|
||||||
|
"90 Archives"
|
||||||
|
)
|
||||||
|
|
||||||
|
for folder in "${folders[@]}"; do
|
||||||
|
mkdir -p "$folder"
|
||||||
|
|
||||||
|
if [ ! -f "$folder/.gitkeep" ]; then
|
||||||
|
touch "$folder/.gitkeep"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✓ $folder"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Vault structure created."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Important:"
|
||||||
|
echo "- Employee folders under 20 Work/Team are created dynamically by Templater."
|
||||||
|
echo "- Month folders under employee 1-1 folders are also created dynamically."
|
||||||
|
echo "- Templates themselves should already exist in Git under 10 Knowledge/Templates."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "SecondBrain bootstrap complete."
|
||||||
|
echo ""
|
||||||
|
```
|
||||||
|
|
||||||
|
Save it as:
|
||||||
|
|
||||||
|
scripts/bootstrap-vault.sh
|
||||||
|
|
||||||
|
Then:
|
||||||
|
|
||||||
|
chmod +x scripts/bootstrap-vault.sh
|
||||||
|
|
||||||
|
And commit it.
|
||||||
|
|
||||||
|
---
|
||||||
|
For the README, I’d use something like this:
|
||||||
|
|
||||||
|
# SecondBrain
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Personal work and leadership knowledge system built with Obsidian.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The vault is backed up through Git and a private Gitea repository.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The goal is to make the environment easy to restore on a new computer with minimal manual reconstruction.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Quick Restore
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 1. Clone the vault
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
|
||||||
|
git clone <GITEA_REPOSITORY_URL>
|
||||||
|
|
||||||
|
cd SecondBrain
|
||||||
|
|
||||||
|
## 2. Restore the folder structure
|
||||||
|
|
||||||
|
./scripts/bootstrap-vault.sh
|
||||||
|
|
||||||
|
## 3. Open the vault in Obsidian
|
||||||
|
|
||||||
|
Open Obsidian and choose:
|
||||||
|
|
||||||
|
**Open folder as vault**
|
||||||
|
|
||||||
|
Select the cloned `SecondBrain` directory.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Required Obsidian Plugins
|
||||||
|
|
||||||
|
Install and enable:
|
||||||
|
|
||||||
|
- Templater
|
||||||
|
- Dataview
|
||||||
|
- Obsidian Git
|
||||||
|
|
||||||
|
Check `10 Knowledge/Templates` for the templates used by the system.
|
||||||
|
|
||||||
|
Important machine-specific Obsidian files such as `workspace.json` are intentionally not synchronized.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Vault Structure
|
||||||
|
|
||||||
|
00 Inbox/
|
||||||
|
|
||||||
|
└── MeetMic/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10 Knowledge/
|
||||||
|
|
||||||
|
├── CTO Academy/
|
||||||
|
|
||||||
|
├── Quotes/
|
||||||
|
|
||||||
|
├── Templates/
|
||||||
|
|
||||||
|
└── Principles.md
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
20 Work/
|
||||||
|
|
||||||
|
├── Contracts/
|
||||||
|
|
||||||
|
│ ├── Active/
|
||||||
|
|
||||||
|
│ └── Archive/
|
||||||
|
|
||||||
|
├── Decisions/
|
||||||
|
|
||||||
|
├── Ideas/
|
||||||
|
|
||||||
|
├── Journal/
|
||||||
|
|
||||||
|
├── KPIs/
|
||||||
|
|
||||||
|
├── Meetings/
|
||||||
|
|
||||||
|
│ ├── Internal/
|
||||||
|
|
||||||
|
│ └── Vendors/
|
||||||
|
|
||||||
|
├── Projects/
|
||||||
|
|
||||||
|
├── Team/
|
||||||
|
|
||||||
|
├── Tracking/
|
||||||
|
|
||||||
|
└── Weekly Review/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
90 Archives/
|
||||||
|
|
||||||
|
Employee and monthly 1-1 folders are created dynamically by Templater.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
20 Work/Team/
|
||||||
|
|
||||||
|
└── Employee Name/
|
||||||
|
|
||||||
|
└── 1-1/
|
||||||
|
|
||||||
|
└── 08/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# MeetMic Integration
|
||||||
|
|
||||||
|
MeetMic is used for local meeting transcription and/or summaries.
|
||||||
|
|
||||||
|
MeetMic should output Markdown or transcript files into:
|
||||||
|
|
||||||
|
00 Inbox/MeetMic/
|
||||||
|
|
||||||
|
The Inbox is intentionally a temporary landing area.
|
||||||
|
|
||||||
|
After reviewing a MeetMic note:
|
||||||
|
|
||||||
|
- move useful meeting information into `20 Work/Meetings`
|
||||||
|
- extract decisions into `20 Work/Decisions`
|
||||||
|
- extract action items into Jira, Twos, or Monday
|
||||||
|
- delete/archive the raw MeetMic output when no longer useful
|
||||||
|
|
||||||
|
## MeetMic machine setup
|
||||||
|
|
||||||
|
MeetMic itself is not stored in this vault.
|
||||||
|
|
||||||
|
On a new computer:
|
||||||
|
|
||||||
|
1. Install MeetMic.
|
||||||
|
2. Configure its output folder to point to:
|
||||||
|
|
||||||
|
<VAULT_PATH>/00 Inbox/MeetMic
|
||||||
|
|
||||||
|
3. Confirm Markdown output is enabled.
|
||||||
|
4. Test with a short recording.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Contract Processing Integration
|
||||||
|
|
||||||
|
Contract PDFs are deliberately NOT stored inside the Obsidian vault.
|
||||||
|
|
||||||
|
The local contract processor lives separately, typically at:
|
||||||
|
|
||||||
|
~/Herd/scripts/obsidian-contracts
|
||||||
|
|
||||||
|
Expected source structure:
|
||||||
|
|
||||||
|
obsidian-contracts/
|
||||||
|
|
||||||
|
├── Algolia/
|
||||||
|
|
||||||
|
│ └── 2024/
|
||||||
|
|
||||||
|
│ └── contract.pdf
|
||||||
|
|
||||||
|
├── Directus/
|
||||||
|
|
||||||
|
│ └── 2026/
|
||||||
|
|
||||||
|
│ └── contract.pdf
|
||||||
|
|
||||||
|
├── process_contracts.py
|
||||||
|
|
||||||
|
├── prompt.md
|
||||||
|
|
||||||
|
├── .env
|
||||||
|
|
||||||
|
└── logs/
|
||||||
|
|
||||||
|
The vendor folder name is the canonical vendor name.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Directus/2026/
|
||||||
|
|
||||||
|
will generate:
|
||||||
|
|
||||||
|
Directus - 2026-2027.md
|
||||||
|
|
||||||
|
even if the contract itself names TFO as the purchaser.
|
||||||
|
|
||||||
|
Generated contract notes are written to:
|
||||||
|
|
||||||
|
20 Work/Contracts/Active/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Contract Processor Requirements
|
||||||
|
|
||||||
|
## Python
|
||||||
|
|
||||||
|
Create a virtual environment:
|
||||||
|
|
||||||
|
cd ~/Herd/scripts/obsidian-contracts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
python3 -m venv .venv
|
||||||
|
|
||||||
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
pip install requests python-dotenv
|
||||||
|
|
||||||
|
## PDF extraction
|
||||||
|
|
||||||
|
Install Poppler:
|
||||||
|
|
||||||
|
brew install poppler
|
||||||
|
|
||||||
|
This provides:
|
||||||
|
|
||||||
|
pdftotext
|
||||||
|
|
||||||
|
## Local AI
|
||||||
|
|
||||||
|
Ollama is used for local contract extraction.
|
||||||
|
|
||||||
|
Install Ollama and confirm:
|
||||||
|
|
||||||
|
ollama --version
|
||||||
|
|
||||||
|
The current contract model is:
|
||||||
|
|
||||||
|
contract-reader
|
||||||
|
|
||||||
|
Example base model:
|
||||||
|
|
||||||
|
qwen3:1.7b
|
||||||
|
|
||||||
|
The dedicated model should use a limited context to avoid excessive memory usage.
|
||||||
|
|
||||||
|
Example Modelfile:
|
||||||
|
|
||||||
|
FROM qwen3:1.7b
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PARAMETER num_ctx 4096
|
||||||
|
|
||||||
|
PARAMETER temperature 0.1
|
||||||
|
|
||||||
|
PARAMETER num_predict 1200
|
||||||
|
|
||||||
|
Create it:
|
||||||
|
|
||||||
|
ollama create contract-reader -f Modelfile
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Contract Processor Environment
|
||||||
|
|
||||||
|
The local `.env` file is NOT committed to Git.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
OBSIDIAN_VAULT="/Users/YOUR_USER/Documents/Obsidian Vault/SecondBrain"
|
||||||
|
|
||||||
|
CONTRACT_OUTPUT="20 Work/Contracts/Active"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
OLLAMA_BASE_URL="http://127.0.0.1:11434"
|
||||||
|
|
||||||
|
OLLAMA_MODEL="contract-reader"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
MAX_CONTEXT_CHARS="5000"
|
||||||
|
|
||||||
|
Then process one contract:
|
||||||
|
|
||||||
|
python3 process_contracts.py --folder Algolia/2024
|
||||||
|
|
||||||
|
Force regeneration:
|
||||||
|
|
||||||
|
python3 process_contracts.py --folder Algolia/2024 --force
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Contract Processor Behavior
|
||||||
|
|
||||||
|
The processor:
|
||||||
|
|
||||||
|
1. extracts PDF text locally using `pdftotext`
|
||||||
|
2. reduces the contract to important sections
|
||||||
|
3. sends only those excerpts to local Ollama
|
||||||
|
4. extracts commercial and renewal information
|
||||||
|
5. validates important renewal clauses against the actual PDF text
|
||||||
|
6. creates an Obsidian Markdown contract record
|
||||||
|
|
||||||
|
Nothing is intentionally sent to a cloud AI provider.
|
||||||
|
|
||||||
|
Important renewal fields include:
|
||||||
|
|
||||||
|
auto_renewal
|
||||||
|
|
||||||
|
renewal_term_months
|
||||||
|
|
||||||
|
customer_notice_days
|
||||||
|
|
||||||
|
vendor_notice_days
|
||||||
|
|
||||||
|
notice_deadline
|
||||||
|
|
||||||
|
renewal_increase_percent
|
||||||
|
|
||||||
|
renewal_pricing_rule
|
||||||
|
|
||||||
|
The generated note also contains source evidence from the PDF.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Git Ignore
|
||||||
|
|
||||||
|
Recommended `.gitignore` entries:
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Obsidian machine-specific state
|
||||||
|
|
||||||
|
.obsidian/workspace.json
|
||||||
|
|
||||||
|
.obsidian/workspace-mobile.json
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# PDFs should never be stored in the vault repository
|
||||||
|
|
||||||
|
*.pdf
|
||||||
|
|
||||||
|
The contract automation repository should additionally ignore:
|
||||||
|
|
||||||
|
.env
|
||||||
|
|
||||||
|
.venv/
|
||||||
|
|
||||||
|
logs/
|
||||||
|
|
||||||
|
token.json
|
||||||
|
|
||||||
|
credentials.json
|
||||||
|
|
||||||
|
*.pdf
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# What Is NOT Backed Up By This Vault
|
||||||
|
|
||||||
|
The following must be restored separately:
|
||||||
|
|
||||||
|
- Ollama models
|
||||||
|
- MeetMic application/settings
|
||||||
|
- contract PDFs
|
||||||
|
- `~/Herd/scripts/obsidian-contracts` unless stored in its own private repository
|
||||||
|
- `.env`
|
||||||
|
- authentication tokens
|
||||||
|
- local application settings
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Recommended Recovery Strategy
|
||||||
|
|
||||||
|
Maintain two private Git repositories:
|
||||||
|
|
||||||
|
SecondBrain
|
||||||
|
|
||||||
|
└── Obsidian content, templates and structure
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
obsidian-automation
|
||||||
|
|
||||||
|
└── scripts, prompts, Modelfiles and setup documentation
|
||||||
|
|
||||||
|
Never commit:
|
||||||
|
|
||||||
|
- contracts
|
||||||
|
- PDFs
|
||||||
|
- secrets
|
||||||
|
- `.env`
|
||||||
|
- authentication tokens
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Recovery Checklist
|
||||||
|
|
||||||
|
After moving to a new computer:
|
||||||
|
|
||||||
|
- [ ] Install Git
|
||||||
|
- [ ] Clone SecondBrain from Gitea
|
||||||
|
- [ ] Run `bootstrap-vault.sh`
|
||||||
|
- [ ] Install Obsidian
|
||||||
|
- [ ] Install Templater
|
||||||
|
- [ ] Install Dataview
|
||||||
|
- [ ] Install Obsidian Git
|
||||||
|
- [ ] Configure MeetMic output
|
||||||
|
- [ ] Install Python
|
||||||
|
- [ ] Install Poppler
|
||||||
|
- [ ] Install Ollama
|
||||||
|
- [ ] Restore/create `contract-reader`
|
||||||
|
- [ ] Clone/copy contract automation scripts
|
||||||
|
- [ ] Recreate `.env`
|
||||||
|
- [ ] Test contract extraction
|
||||||
|
- [ ] Test Git pull/push
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
# Second Brain
|
|
||||||
|
|
||||||
## Current Focus
|
|
||||||
- Become a CTO (able)
|
|
||||||
- Improve executive communication
|
|
||||||
- Learn finance
|
|
||||||
- Build technical breadth
|
|
||||||
|
|
||||||
## Current Projects
|
|
||||||
- Gitea
|
|
||||||
- Obsidian
|
|
||||||
- Modji
|
|
||||||
- Team Performance
|
|
||||||
|
|
||||||
## This Week
|
|
||||||
- [ ] Reverse Proxy
|
|
||||||
- [ ] Medallion Architecture
|
|
||||||
- [ ] Pyramid Principle
|
|
||||||
- [ ] Finish High Output Management
|
|
||||||
|
|
||||||
## Quick Links
|
|
||||||
- [[50 Principles/ | Principles]]
|
|
||||||
- [[10 Knowledge/CTO Academy/ | CTO Academy]]
|
|
||||||
- [[10 Knowledge/Executive Playbook/ | Executive Playbook]]
|
|
||||||
Reference in New Issue
Block a user