# MEGA PLAN: Antoine's Unified Brain System > **For Claude Code**: This document contains complete instructions for setting up Antoine's knowledge management, code, and document system on his dalidou server. --- ## Overview ### Who is Antoine? - **Name**: Antoine Bherer-Simard - **Company**: Atomaste Inc. (FEA/optimization consulting) - **Product in development**: Atomizer (FEA optimization framework) - **Location**: Rouyn-Noranda, Quebec - **Server**: dalidou (192.168.86.50) ### Objective Create a unified system with 3 layers: 1. **brain/** → PKM (Personal Knowledge Management) - Markdown notes, documentation, journal 2. **code/** → Version-controlled source code with Git/Gitea 3. **storage/** → Binary files (PDFs, invoices, legal documents) via Seafile All accessible via VSCode with contextual workspaces, automatically synchronized, and optimized for working with Claude. --- ## Target Architecture ### Folder Structure ``` /home/antoine/ ├── brain/ # PKM (Syncthing) - MARKDOWN NOTES │ ├── .obsidian/ # Obsidian config │ ├── _templates/ # Reusable templates │ │ ├── daily.md │ │ ├── client.md │ │ ├── meeting.md │ │ └── project.md │ │ │ ├── atomizer/ # Atomizer product documentation │ │ ├── CLAUDE.md # Context for Claude │ │ ├── 00-master-plan.md # Central document │ │ ├── architecture.md │ │ ├── roadmap.md │ │ ├── dev-decisions.md │ │ ├── api/ │ │ │ └── optimizer.md │ │ └── reports/ # Jupyter notebook exports │ │ │ ├── atomaste/ # Atomaste Business │ │ ├── CLAUDE.md │ │ ├── overview.md │ │ ├── clients/ │ │ │ ├── _index.md # Client list │ │ │ ├── _template-client.md │ │ │ └── starspec/ │ │ │ ├── overview.md │ │ │ ├── meetings/ │ │ │ └── projects/ │ │ ├── finances/ │ │ │ ├── CLAUDE.md │ │ │ ├── rates.md │ │ │ ├── 2024-summary.md │ │ │ ├── 2025-budget.md │ │ │ └── quarterly/ │ │ │ └── 2025-Q1.md │ │ └── marketing/ │ │ └── website-content.md │ │ │ ├── engineering/ # Technical knowledge base │ │ ├── CLAUDE.md │ │ ├── _index.md │ │ ├── fea/ │ │ │ ├── nastran-tips.md │ │ │ ├── mesh-convergence.md │ │ │ └── nonlinear-analysis.md │ │ ├── optimization/ │ │ │ ├── optuna-guide.md │ │ │ ├── bayesian-methods.md │ │ │ └── multi-objective.md │ │ └── cad/ │ │ ├── nx-simcenter.md │ │ └── solidworks-api.md │ │ │ ├── personal/ # Personal life │ │ ├── CLAUDE.md │ │ └── goals/ │ │ │ ├── journal/ # Daily notes │ │ └── 2025/ │ │ └── 01/ │ │ └── .gitkeep │ │ │ └── inbox/ # Quick capture │ └── .gitkeep │ ├── code/ # CODE (Git/Gitea) │ ├── atomizer/ # Main product │ │ ├── CLAUDE.md │ │ ├── README.md │ │ ├── src/ │ │ │ └── atomizer/ │ │ │ └── __init__.py │ │ ├── tests/ │ │ │ └── .gitkeep │ │ └── notebooks/ │ │ ├── exploration/ │ │ └── examples/ │ │ │ ├── finance/ # Financial tools │ │ ├── CLAUDE.md │ │ ├── README.md │ │ ├── tax_calculator/ │ │ │ └── __init__.py │ │ ├── invoice_generator/ │ │ │ └── __init__.py │ │ └── reports/ │ │ └── .gitkeep │ │ │ ├── tools/ # Miscellaneous tools │ │ ├── CLAUDE.md │ │ ├── scripts/ │ │ │ └── .gitkeep │ │ └── mcp-servers/ │ │ └── .gitkeep │ │ │ └── server/ # dalidou server config │ ├── CLAUDE.md │ ├── docker-compose/ │ │ └── .gitkeep │ └── configs/ │ └── .gitkeep │ ├── storage/ # BINARY FILES (Seafile) │ └── atomaste/ │ ├── clients/ │ │ └── starspec/ │ │ ├── contracts/ │ │ ├── invoices/ │ │ └── correspondence/ │ ├── finances/ │ │ ├── invoices-received/ │ │ │ ├── 2024/ │ │ │ └── 2025/ │ │ ├── taxes/ │ │ │ ├── 2024/ │ │ │ └── 2025/ │ │ ├── bank-statements/ │ │ └── receipts/ │ ├── legal/ │ │ ├── incorporation/ │ │ ├── contracts/ │ │ └── insurance/ │ └── archive/ │ └── workspaces/ # VSCode workspace files ├── atomizer-dev.code-workspace ├── atomaste-business.code-workspace ├── atomaste-finance.code-workspace ├── engineering-kb.code-workspace ├── daily-assistant.code-workspace ├── server-admin.code-workspace └── everything.code-workspace ``` --- ## Required Services on dalidou ### Existing Services (verify they're running) - **Syncthing**: For syncing brain/ (sync.dalidou.home or port 8384) - **Seafile**: For storage/ (cloud.dalidou.home or port 8083) - **Gitea**: For code/ (git.dalidou.home or port 3000) - **Caddy**: Reverse proxy ### Syncthing Configuration The `/home/antoine/brain/` folder must be shared via Syncthing: - Bidirectional sync with Antoine's laptop - Later: sync with Android (Pixel) - Folder Type: "Send & Receive" --- ## CLAUDE.md File Contents These files provide context to Claude for each section. ### brain/atomizer/CLAUDE.md ```markdown # Context: Atomizer Development ## What is Atomizer? Atomizer is a Python optimization framework for FEA (Finite Element Analysis). It uses Optuna with TPE sampler to optimize CAD geometries via NX Simcenter. ## Tech Stack - Python 3.11+ - Optuna (TPE, CMA-ES samplers) - NX Simcenter API - Nastran solver ## Locations - **Source code**: ~/code/atomizer/ - **Documentation**: This folder (~/brain/atomizer/) - **Jupyter Notebooks**: ~/code/atomizer/notebooks/ ## Key files - `00-master-plan.md` - Overview and roadmap - `architecture.md` - Technical architecture - `dev-decisions.md` - Design decisions and conventions - `roadmap.md` - Version planning ## Code Conventions - Naming: snake_case for functions, PascalCase for classes - Tests: pytest, minimum 80% coverage on core/ - Docstrings: Google style - Type hints: mandatory ## Current focus See `00-master-plan.md` section "Current Focus" ``` ### brain/atomaste/CLAUDE.md ```markdown # Context: Atomaste Business ## What is Atomaste? Atomaste Inc. is a mechanical engineering consulting company specializing in finite element analysis (FEA) and optimization. ## Owner Antoine Bherer-Simard Rouyn-Noranda, Quebec, Canada ## Services - FEA Analysis (stress, thermal, modal) - Design optimization - Custom tool development (Atomizer) ## Structure - `clients/` - Folders per client - `finances/` - Financial notes (PDFs are in ~/storage/atomaste/finances/) - `marketing/` - Marketing content, website ## Important - PDF/binary documents are in ~/storage/atomaste/, NOT here - This folder contains MARKDOWN NOTES only - To reference a file: use a link to storage/ ``` ### brain/atomaste/finances/CLAUDE.md ```markdown # Context: Atomaste Finances ## Structure - **Notes** (this folder): Summaries, analyses, budgets in markdown - **Code** (~/code/finance/): Scripts for calculations, automated reports - **Documents** (~/storage/atomaste/finances/): PDFs, invoices, bank statements ## Fiscal info - Fiscal year: January - December - GST/QST: Quarterly filings - T2 (corporate tax): Annual, deadline 6 months after fiscal year end ## Rates See `rates.md` for hourly rates and packages. ## Tools - ~/code/finance/tax_calculator/ - Estimated tax calculation - ~/code/finance/invoice_generator/ - Invoice generation - ~/code/finance/reports/ - Financial report scripts ## Convention - Amounts are in CAD unless otherwise noted - Date format: YYYY-MM-DD ``` ### brain/engineering/CLAUDE.md ```markdown # Context: Engineering Knowledge Base ## Purpose Antoine's technical knowledge base covering: - Finite Element Analysis (FEA) - Optimization - CAD/CAM ## Structure - `fea/` - Nastran tips and guides, meshing, analyses - `optimization/` - Optuna, Bayesian methods, multi-objective - `cad/` - NX Simcenter, SolidWorks, APIs ## Usage These notes are technical references accumulated over time. They can be linked from Atomizer docs or client projects. ## Conventions - Include code examples when relevant - Link to official documentation - Update when new discoveries are made ``` ### brain/personal/CLAUDE.md ```markdown # Context: Personal ## Note This folder contains Antoine's personal notes. Treat with discretion and respect for privacy. ## Typical Content - Personal goals - Reflections - Family notes ## Expected Behavior - Do not share contents of this folder - Do not include in reports or exports - Help only if explicitly requested ``` ### code/atomizer/CLAUDE.md ```markdown # Context: Atomizer Codebase ## Repository - Git remote: gitea.dalidou.home/antoine/atomizer - Main branch: main ## Structure ``` atomizer/ ├── src/atomizer/ # Main source code │ ├── core/ # Optimization engine │ ├── samplers/ # Optuna wrappers (TPE, CMA-ES) │ ├── interfaces/ # CAD connectors (NX, SolidWorks) │ └── utils/ # Nastran parsing, plotting ├── tests/ # pytest tests ├── notebooks/ # Jupyter notebooks │ ├── exploration/ # Exploratory work │ └── examples/ # Documented examples └── configs/ # YAML configuration files ``` ## Development workflow 1. Read ~/brain/atomizer/00-master-plan.md for context 2. Create a branch for the feature 3. Implement with tests 4. Document in ~/brain/atomizer/ if necessary 5. PR to main ## Testing ```bash cd ~/code/atomizer pytest tests/ -v ``` ## Associated Documentation See ~/brain/atomizer/ for complete documentation. ``` ### code/finance/CLAUDE.md ```markdown # Context: Finance Tools ## Purpose Python tools for Atomaste financial management. ## Modules - `tax_calculator/` - Tax estimation (federal, provincial, corporate) - `invoice_generator/` - PDF invoice generation - `reports/` - Automated financial report scripts ## Usage These tools work with: - Notes in ~/brain/atomaste/finances/ - Documents in ~/storage/atomaste/finances/ ## Example ```python from tax_calculator import estimate_quarterly_tax from invoice_generator import create_invoice # Generate an invoice create_invoice( client="Starspec", items=[{"desc": "FEA Analysis", "hours": 40, "rate": 150}], output="~/storage/atomaste/clients/starspec/invoices/2025-01.pdf" ) ``` ``` ### code/tools/CLAUDE.md ```markdown # Context: Tools & Scripts ## Purpose Collection of utility tools and scripts. ## Structure - `scripts/` - One-off bash/python scripts - `mcp-servers/` - Custom MCP servers for Claude ## Guidelines - Document each script with a header - Include usage examples - Test before committing ``` ### code/server/CLAUDE.md ```markdown # Context: Server Configuration (dalidou) ## Server info - Hostname: dalidou - IP: 192.168.86.50 - OS: Linux (probably Ubuntu) - Tailscale: Enabled ## Docker Services - Syncthing (sync.dalidou.home) - Seafile (cloud.dalidou.home) - Gitea (git.dalidou.home) - Immich (photos.dalidou.home) - Paperless (docs.dalidou.home) - Caddy (reverse proxy) ## Structure - `docker-compose/` - docker-compose files per service - `configs/` - Configuration files ## Access - Local: 192.168.86.50 - External: Via Tailscale (100.x.x.x) ## Backup TODO: Document backup strategy ``` --- ## Templates ### _templates/daily.md ```markdown # {{date}} ## Daily Focus - [ ] ## Notes ## Links ## Accomplished ## Tomorrow ``` ### _templates/client.md ```markdown # {{client_name}} ## Overview - **Contact**: - **Email**: - **Since**: - **Status**: Active / Inactive ## Projects | Project | Status | Notes | |---------|--------|-------| | | | | ## Documents See: [storage/atomaste/clients/{{client_name}}/](file:///home/antoine/storage/atomaste/clients/{{client_name}}/) ## Notes ## Interaction History ### {{date}} - ``` ### _templates/meeting.md ```markdown # Meeting: {{title}} **Date**: {{date}} **Participants**: **Type**: Client / Internal / Other ## Agenda 1. ## Notes ## Actions - [ ] @antoine: - [ ] @other: ## Next Meeting ``` ### _templates/project.md ```markdown # Project: {{project_name}} ## Overview - **Client**: [[clients/{{client}}]] - **Start date**: - **Status**: Planning / Active / On Hold / Completed - **Budget**: ## Objectives 1. ## Deliverables - [ ] ## Technical Notes ## Timeline | Phase | Start | End | Status | |-------|-------|-----|--------| | | | | | ## Documents - Contract: [link](file:///home/antoine/storage/...) - ## Log ### {{date}} - ``` --- ## VSCode Workspaces ### workspaces/atomizer-dev.code-workspace ```json { "folders": [ { "path": "../code/atomizer", "name": "Code - Atomizer" }, { "path": "../brain/atomizer", "name": "Docs - Atomizer" }, { "path": "../brain/engineering", "name": "Engineering KB" } ], "settings": { "files.exclude": { "**/__pycache__": true, "**/.pytest_cache": true, "**/node_modules": true, "**/.git": true }, "python.defaultInterpreterPath": "python3" }, "extensions": { "recommendations": [ "ms-python.python", "ms-toolsai.jupyter" ] } } ``` ### workspaces/atomaste-business.code-workspace ```json { "folders": [ { "path": "../brain/atomaste", "name": "Atomaste Business" }, { "path": "../brain/atomizer", "name": "Products" }, { "path": "../storage/atomaste", "name": "Documents" } ], "settings": { "files.exclude": { "**/.obsidian": true } } } ``` ### workspaces/atomaste-finance.code-workspace ```json { "folders": [ { "path": "../brain/atomaste/finances", "name": "Finance Notes" }, { "path": "../code/finance", "name": "Finance Code" }, { "path": "../storage/atomaste/finances", "name": "Finance Documents" } ], "settings": { "files.exclude": { "**/__pycache__": true } } } ``` ### workspaces/engineering-kb.code-workspace ```json { "folders": [ { "path": "../brain/engineering", "name": "Engineering KB" }, { "path": "../code/atomizer/notebooks", "name": "Notebooks" } ], "settings": {} } ``` ### workspaces/daily-assistant.code-workspace ```json { "folders": [ { "path": "../brain/journal", "name": "Journal" }, { "path": "../brain/inbox", "name": "Inbox" }, { "path": "../brain/atomaste/clients", "name": "Clients" }, { "path": "../brain/personal", "name": "Personal" } ], "settings": {} } ``` ### workspaces/server-admin.code-workspace ```json { "folders": [ { "path": "../code/server", "name": "Server Config" }, { "path": "../code/tools", "name": "Tools" } ], "settings": {} } ``` ### workspaces/everything.code-workspace ```json { "folders": [ { "path": "../brain", "name": "Brain (PKM)" }, { "path": "../code", "name": "Code" }, { "path": "../storage", "name": "Storage" } ], "settings": { "files.exclude": { "**/.obsidian": true, "**/__pycache__": true, "**/.git": true } } } ``` --- ## Atomizer Master Plan File ### brain/atomizer/00-master-plan.md ```markdown # Atomizer Master Plan > **For Claude**: This document is the entry point for understanding Atomizer. > Read it first before working on the project. **Last updated**: {{date}} --- ## Quick Context **Atomizer** is a Python optimization framework for FEA (Finite Element Analysis). | Aspect | Detail | |--------|--------| | Stack | Python 3.11+, Optuna, NX Simcenter, Nastran | | Code | ~/code/atomizer/ | | Docs | This folder (~/brain/atomizer/) | | Git | gitea.dalidou.home/antoine/atomizer | --- ## Architecture See [[architecture]] for complete details. ``` atomizer/ ├── core/ # Optimization engine ├── samplers/ # TPE, CMA-ES wrappers ├── interfaces/ # NX, SolidWorks connectors └── utils/ # Nastran parsing, plotting ``` ### Key Classes - `Optimizer` - Main entry point - `NXInterface` - Communication with NX Simcenter - `NastranParser` - Reading .f06 results --- ## Roadmap See [[roadmap]] for details. ### v0.3 (current) - [x] Functional TPE sampler - [x] Basic NX integration - [ ] Multi-objective optimization - [ ] Visualization improvements ### v0.4 (planned) - [ ] SolidWorks interface - [ ] Parallel evaluations - [ ] Web dashboard ### Future - [ ] Cloud computing support - [ ] Plugin marketplace --- ## Conventions See [[dev-decisions]] for decision history. - **Naming**: snake_case (functions), PascalCase (classes) - **Config**: YAML files in `configs/` - **Tests**: pytest, minimum 80% coverage on core/ - **Docstrings**: Google style - **Type hints**: Mandatory --- ## Navigation | Topic | Note | Code | |-------|------|------| | Architecture | [[architecture]] | `~/code/atomizer/src/` | | Roadmap | [[roadmap]] | - | | Decisions | [[dev-decisions]] | - | | API | [[api/optimizer]] | `src/atomizer/core/` | | NX Integration | [[../engineering/cad/nx-simcenter]] | `interfaces/nx.py` | | Optuna | [[../engineering/optimization/optuna-guide]] | `samplers/` | --- ## Current Focus **Working on**: **Blockers**: **Next step**: **Recent journal**: [[../../journal/2025/01/]] --- ## For Claude When working on Atomizer: 1. **Start here** - Read this file for context 2. **Check conventions** - [[dev-decisions]] 3. **Code is in** - `~/code/atomizer/` 4. **Notebooks are in** - `~/code/atomizer/notebooks/` 5. **Document important changes** in this folder ### Useful Commands ```bash # Tests cd ~/code/atomizer && pytest tests/ -v # Launch a notebook cd ~/code/atomizer/notebooks && jupyter lab # Git status cd ~/code/atomizer && git status ``` ``` --- ## Installation Instructions ### Step 1: Create Folder Structure ```bash # On dalidou, as antoine cd /home/antoine # Create brain/ mkdir -p brain/{_templates,atomizer/{api,reports},atomaste/{clients/starspec/{meetings,projects},finances/quarterly,marketing},engineering/{fea,optimization,cad},personal/goals,journal/2025/01,inbox} # Create code/ mkdir -p code/{atomizer/{src/atomizer,tests,notebooks/{exploration,examples},configs},finance/{tax_calculator,invoice_generator,reports},tools/{scripts,mcp-servers},server/{docker-compose,configs}} # Create storage/ (if not already mounted via Seafile) mkdir -p storage/atomaste/{clients/starspec/{contracts,invoices,correspondence},finances/{invoices-received/{2024,2025},taxes/{2024,2025},bank-statements,receipts},legal/{incorporation,contracts,insurance},archive} # Create workspaces/ mkdir -p workspaces ``` ### Step 2: Create Base Files Create all files listed in this document: - All CLAUDE.md files - All templates in _templates/ - All .code-workspace files in workspaces/ - The 00-master-plan.md - .gitkeep files for empty folders ### Step 3: Initialize Git Repos ```bash # Atomizer (if it doesn't already exist) cd ~/code/atomizer git init git remote add origin git@gitea.dalidou.home:antoine/atomizer.git # Finance tools cd ~/code/finance git init git remote add origin git@gitea.dalidou.home:antoine/finance-tools.git # Tools cd ~/code/tools git init git remote add origin git@gitea.dalidou.home:antoine/tools.git # Server config cd ~/code/server git init git remote add origin git@gitea.dalidou.home:antoine/server-config.git ``` ### Step 4: Configure Syncthing 1. Access Syncthing on dalidou (sync.dalidou.home or :8384) 2. Add `/home/antoine/brain/` folder as a shared folder 3. Name the folder "brain" or "antoine-brain" 4. Configure as "Send & Receive" 5. Add devices (Antoine's laptop, later: Android) ### Step 5: Verify Seafile 1. Ensure Seafile is mounted at `/home/antoine/storage/` (or create a symlink) 2. If Seafile uses a different path, adjust paths in templates ### Step 6: Configure Obsidian 1. Open Obsidian 2. Open vault: `/home/antoine/brain/` 3. Enable recommended plugins: - Daily Notes - Templates - Backlinks 4. Configure templates folder: `_templates/` --- ## Validation Checklist After installation, verify: - [ ] Folder structure created - [ ] All CLAUDE.md files in place - [ ] Templates created in brain/_templates/ - [ ] Workspaces created in workspaces/ - [ ] 00-master-plan.md created - [ ] Syncthing configured for brain/ - [ ] Seafile accessible via storage/ - [ ] Git repos initialized in code/ - [ ] Obsidian can open brain/ as vault - [ ] VSCode can open .code-workspace files --- ## Reference Information ### dalidou Server - **Local IP**: 192.168.86.50 - **Tailscale**: 100.x.x.x (check with `tailscale ip`) - **Services**: - Syncthing: sync.dalidou.home / :8384 - Seafile: cloud.dalidou.home / :8083 - Gitea: git.dalidou.home / :3000 - Caddy: reverse proxy ### Contacts / Useful Links - **Atomaste**: atomaste.com - **Email**: antoine@atomaste.com --- ## Maintenance ### Daily - Use the daily.md template for daily notes - Capture ideas in inbox/ ### Weekly - Review inbox/ and classify notes - Update "Current Focus" in master plan - Commit/push code/ changes ### Monthly - Review and update CLAUDE.md files if needed - Archive old journals - Verify backups --- *This document was created on {{date}} to initialize Antoine's knowledge management system.*