Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28397c2602 | ||
|
|
2f39288102 |
+291
-124
@@ -79,41 +79,28 @@ 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
|
||||
|
||||
```bash
|
||||
./scripts/bootstrap-vault.sh
|
||||
```
|
||||
|
||||
## 3. Open the vault in Obsidian
|
||||
|
||||
@@ -123,87 +110,141 @@ Open Obsidian and choose:
|
||||
|
||||
Select the cloned `SecondBrain` directory.
|
||||
|
||||
## 4. Restore plugins
|
||||
|
||||
Enable Community Plugins in Obsidian and install the plugins listed below.
|
||||
|
||||
Some plugin configuration is stored in `.obsidian/` and may already be restored by Git depending on what is tracked.
|
||||
|
||||
Machine-specific workspace state is intentionally excluded.
|
||||
|
||||
---
|
||||
|
||||
# Required Obsidian Plugins
|
||||
# Obsidian Plugins
|
||||
|
||||
Install and enable:
|
||||
## Core Workflow
|
||||
|
||||
- Templater
|
||||
- Dataview
|
||||
- Obsidian Git
|
||||
These plugins are important to the functionality of SecondBrain.
|
||||
|
||||
Check `10 Knowledge/Templates` for the templates used by the system.
|
||||
### Templater
|
||||
|
||||
Important machine-specific Obsidian files such as `workspace.json` are intentionally not synchronized.
|
||||
Used for dynamic note creation, automatic file naming, folder creation, dates, and structured templates.
|
||||
|
||||
Templates are stored in:
|
||||
|
||||
```text
|
||||
10 Knowledge/Templates/
|
||||
```
|
||||
|
||||
Important: YAML/frontmatter must remain at the very beginning of templates. Do not place Templater JavaScript before the YAML block.
|
||||
|
||||
### Dataview
|
||||
|
||||
Used to generate dynamic lists and views from note properties and metadata.
|
||||
|
||||
### Obsidian Git
|
||||
|
||||
Provides Git integration and automatic backup from the desktop vault.
|
||||
|
||||
Repository synchronization is done against a private Gitea repository.
|
||||
|
||||
### Auto GitKeep
|
||||
|
||||
Automatically creates `.gitkeep` files inside empty directories so the vault structure can be preserved by Git.
|
||||
|
||||
This is particularly useful because Git does not normally track empty directories.
|
||||
|
||||
---
|
||||
|
||||
# Navigation and Editing
|
||||
|
||||
These plugins improve the Obsidian interface but are not required for the underlying vault structure.
|
||||
|
||||
### Notebook Navigator
|
||||
|
||||
Replaces the standard Obsidian file explorer with a two-pane navigation interface.
|
||||
|
||||
### Folder Links
|
||||
|
||||
Allows folder links to reveal the corresponding folder in the navigation interface.
|
||||
|
||||
### Editing Toolbar
|
||||
|
||||
Provides a more visual editing toolbar with commonly used Markdown commands.
|
||||
|
||||
### Iconic
|
||||
|
||||
Adds custom icons to folders, files, properties, bookmarks, and other Obsidian interface elements.
|
||||
|
||||
### Omnisearch
|
||||
|
||||
Provides enhanced full-vault search.
|
||||
|
||||
---
|
||||
|
||||
# Integration
|
||||
|
||||
### Local REST API with MCP
|
||||
|
||||
Provides a local REST API and MCP interface for interacting with the vault from external tools and local automation.
|
||||
|
||||
This is an advanced integration and is not required for basic vault operation.
|
||||
|
||||
Do not expose the REST API directly to the public Internet.
|
||||
|
||||
---
|
||||
|
||||
# Optional / Disabled Plugins
|
||||
|
||||
### Settings Search
|
||||
|
||||
Provides search across Obsidian settings.
|
||||
|
||||
Currently installed but disabled.
|
||||
|
||||
---
|
||||
|
||||
# Vault Structure
|
||||
|
||||
```text
|
||||
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:
|
||||
|
||||
```text
|
||||
20 Work/Team/
|
||||
|
||||
└── Employee Name/
|
||||
|
||||
└── 1-1/
|
||||
|
||||
└── 08/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -213,80 +254,92 @@ MeetMic is used for local meeting transcription and/or summaries.
|
||||
|
||||
MeetMic should output Markdown or transcript files into:
|
||||
|
||||
```text
|
||||
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 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:
|
||||
|
||||
|
||||
```text
|
||||
<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.
|
||||
Contract PDFs are deliberately **not stored inside the Obsidian vault**.
|
||||
|
||||
The local contract processor lives separately, typically at:
|
||||
|
||||
```text
|
||||
~/Herd/scripts/obsidian-contracts
|
||||
```
|
||||
|
||||
Expected source structure:
|
||||
|
||||
```text
|
||||
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:
|
||||
|
||||
```text
|
||||
Directus/2026/
|
||||
```
|
||||
|
||||
will generate:
|
||||
|
||||
```text
|
||||
Directus - 2026-2027.md
|
||||
```
|
||||
|
||||
even if the contract itself names TFO as the purchaser.
|
||||
|
||||
Generated contract notes are written to:
|
||||
|
||||
```text
|
||||
20 Work/Contracts/Active/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -296,27 +349,41 @@ Generated contract notes are written to:
|
||||
|
||||
Create a virtual environment:
|
||||
|
||||
```bash
|
||||
cd ~/Herd/scripts/obsidian-contracts
|
||||
|
||||
|
||||
|
||||
python3 -m venv .venv
|
||||
|
||||
source .venv/bin/activate
|
||||
|
||||
Install dependencies:
|
||||
|
||||
pip install requests python-dotenv
|
||||
```
|
||||
|
||||
## PDF extraction
|
||||
When returning to the project later:
|
||||
|
||||
```bash
|
||||
cd ~/Herd/scripts/obsidian-contracts
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
When finished:
|
||||
|
||||
```bash
|
||||
deactivate
|
||||
```
|
||||
|
||||
## PDF Extraction
|
||||
|
||||
Install Poppler:
|
||||
|
||||
```bash
|
||||
brew install poppler
|
||||
```
|
||||
|
||||
This provides:
|
||||
|
||||
```text
|
||||
pdftotext
|
||||
```
|
||||
|
||||
## Local AI
|
||||
|
||||
@@ -324,63 +391,69 @@ Ollama is used for local contract extraction.
|
||||
|
||||
Install Ollama and confirm:
|
||||
|
||||
```bash
|
||||
ollama --version
|
||||
```
|
||||
|
||||
The current contract model is:
|
||||
|
||||
```text
|
||||
contract-reader
|
||||
```
|
||||
|
||||
Example base model:
|
||||
|
||||
```text
|
||||
qwen3:1.7b
|
||||
```
|
||||
|
||||
The dedicated model should use a limited context to avoid excessive memory usage.
|
||||
|
||||
Example Modelfile:
|
||||
Example `Modelfile`:
|
||||
|
||||
```text
|
||||
FROM qwen3:1.7b
|
||||
|
||||
|
||||
|
||||
PARAMETER num_ctx 4096
|
||||
|
||||
PARAMETER temperature 0.1
|
||||
|
||||
PARAMETER num_predict 1200
|
||||
```
|
||||
|
||||
Create it:
|
||||
|
||||
```bash
|
||||
ollama create contract-reader -f Modelfile
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Contract Processor Environment
|
||||
|
||||
The local `.env` file is NOT committed to Git.
|
||||
The local `.env` file is **not committed to Git**.
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
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:
|
||||
Process one contract:
|
||||
|
||||
```bash
|
||||
python3 process_contracts.py --folder Algolia/2024
|
||||
```
|
||||
|
||||
Force regeneration:
|
||||
|
||||
```bash
|
||||
python3 process_contracts.py --folder Algolia/2024 --force
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -389,69 +462,93 @@ python3 process_contracts.py --folder Algolia/2024 --force
|
||||
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:
|
||||
|
||||
```text
|
||||
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
|
||||
# Git Configuration
|
||||
|
||||
Recommended `.gitignore` entries:
|
||||
## Recommended `.gitignore`
|
||||
|
||||
```gitignore
|
||||
# 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:
|
||||
|
||||
```gitignore
|
||||
.env
|
||||
|
||||
.venv/
|
||||
|
||||
logs/
|
||||
|
||||
token.json
|
||||
|
||||
credentials.json
|
||||
|
||||
*.pdf
|
||||
```
|
||||
|
||||
## `.obsidian` Strategy
|
||||
|
||||
Do not ignore the entire `.obsidian/` directory.
|
||||
|
||||
Keeping selected Obsidian configuration in Git makes it much easier to reproduce the vault on another computer.
|
||||
|
||||
Machine-specific state such as the following should remain ignored:
|
||||
|
||||
```text
|
||||
.obsidian/workspace.json
|
||||
.obsidian/workspace-mobile.json
|
||||
```
|
||||
|
||||
Plugin configuration can be synchronized where appropriate.
|
||||
|
||||
---
|
||||
|
||||
# Mobile
|
||||
|
||||
The mobile vault may use GitSync rather than the Obsidian Git community plugin.
|
||||
|
||||
Mobile and desktop should synchronize against the same private Gitea repository.
|
||||
|
||||
Avoid making conflicting edits to the same note simultaneously on multiple devices.
|
||||
|
||||
Machine-specific mobile workspace state is excluded through:
|
||||
|
||||
```text
|
||||
.obsidian/workspace-mobile.json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -460,56 +557,126 @@ credentials.json
|
||||
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
|
||||
|
||||
- Git/Gitea credentials
|
||||
|
||||
- GitSync application configuration
|
||||
|
||||
|
||||
---
|
||||
|
||||
# Recommended Recovery Strategy
|
||||
|
||||
Maintain two private Git repositories:
|
||||
|
||||
```text
|
||||
SecondBrain
|
||||
|
||||
└── Obsidian content, templates and structure
|
||||
|
||||
|
||||
└── Obsidian content, templates, configuration 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
|
||||
## Vault
|
||||
|
||||
- Install Git
|
||||
|
||||
- Clone SecondBrain from Gitea
|
||||
|
||||
- Run `bootstrap-vault.sh`
|
||||
|
||||
- Install Obsidian
|
||||
|
||||
- Open SecondBrain as a vault
|
||||
|
||||
|
||||
## Obsidian Plugins
|
||||
|
||||
- Install Templater
|
||||
|
||||
- Install Dataview
|
||||
|
||||
- Install Obsidian Git
|
||||
|
||||
- Install Auto GitKeep
|
||||
|
||||
- Install Notebook Navigator
|
||||
|
||||
- Install Folder Links
|
||||
|
||||
- Install Editing Toolbar
|
||||
|
||||
- Install Iconic
|
||||
|
||||
- Install Omnisearch
|
||||
|
||||
- Install Local REST API with MCP
|
||||
|
||||
- Verify Templater template folder
|
||||
|
||||
- Verify Git configuration
|
||||
|
||||
- Verify plugin settings
|
||||
|
||||
|
||||
## Integrations
|
||||
|
||||
- Configure MeetMic output
|
||||
|
||||
- Install Python
|
||||
|
||||
- Install Poppler
|
||||
|
||||
- Install Ollama
|
||||
|
||||
- Restore/create `contract-reader`
|
||||
|
||||
- Clone/copy contract automation scripts
|
||||
|
||||
- Recreate `.env`
|
||||
|
||||
- Test contract extraction
|
||||
|
||||
|
||||
## Synchronization
|
||||
|
||||
- Test Git pull
|
||||
|
||||
- Test Git commit/push
|
||||
|
||||
- Configure GitSync on mobile if required
|
||||
|
||||
- Test mobile pull
|
||||
|
||||
- Test mobile push
|
||||
Reference in New Issue
Block a user