# Coding Actions Reorganization Plan **Directories to organize:** 1. `NNT Ecosystem/` - Mixed architecture docs, workflows, and planning 2. `Obsidian/` - Flat directory with various topics ## Problem Analysis ### NNT Ecosystem Current Issues **Current structure:** ``` NNT Ecosystem/ ├── Compiler/ ← Good ├── Components/ ← Good ├── Development Workflows/ ← Good ├── Search Bar/ ← Good ├── Typescript/ ← Should be in Development Workflows? ├── Workflows/ ← Confusing (vs Development Workflows) ├── docs/ ← What's this vs other docs? ├── AGENTS.md └── [15 loose files at root level] ← TOO MANY! ``` **Problems:** 1. ❌ 15+ files at root level (should be in subdirectories) 2. ❌ `Workflows/` vs `Development Workflows/` confusion 3. ❌ `docs/` subfolder unclear purpose 4. ❌ Mix of infrastructure docs (nginx) with project docs 5. ❌ Planning vs implementation not separated ### Obsidian Directory Current Issues **Current structure:** ``` Obsidian/ ├── Capslock to Escape.md ├── Daily Notes Vector Search - Planning.md ├── Github Project Obsidian Workflow.md ├── Managing Long Frontmatter.md ├── Obsidian Inlet.md ├── OpenCode Obsidian Integration Planning.md ├── Preventing Duplicate Image References.md ├── Smart Connections - Implementation Notes.md ├── TEST Obsidian Closed Test.md ├── TEST Template Processing.md └── TEST Template Syntax Literal.md ``` **Problems:** 1. ❌ Flat structure (no subdirectories) 2. ❌ Mix of workflows, planning, tests, and notes 3. ❌ Some files are system-level (Capslock) vs Obsidian-specific 4. ❌ TEST files should be in separate folder ## Proposed Reorganization ### NNT Ecosystem - New Structure ``` NNT Ecosystem/ ├── 1. Infrastructure/ ← NEW: All web server/deployment docs │ ├── Web Server/ │ │ ├── Complete Request Lifecycle.md │ │ ├── How React Islands and MDX Get Served.md │ │ ├── Web Server Architecture.md │ │ ├── Why Multiple Web Servers.md │ │ └── nginx Configuration Quick Setup.md │ ├── Hosting/ │ │ └── Hostinger VPS Deployment with Bun.md │ └── Monetization/ │ └── midimaze Monetization Strategy.md │ ├── 2. Architecture/ ← NEW: Data, state, patterns │ ├── Data Storage Architecture.md │ ├── React Component State Management.md │ └── Tech Stack.md │ ├── 3. Components/ ← KEEP: UI components │ ├── NNT Composer.md │ └── tscribe Component Planning.md │ ├── 4. Compiler/ ← KEEP: NNT language │ ├── NML vs NNT.md │ └── NNT Query.md │ ├── 5. Search/ ← RENAME: From "Search Bar" │ ├── Implementation/ │ │ ├── Astro Static Site with Client-Side Search.md │ │ ├── Client-Side vs Server-Side Explained.md │ │ └── Search Bar Architecture.md │ ├── Hosting & Performance/ │ │ ├── Hostinger VPS Hosting.md │ │ ├── Rate Limiting Strategies.md │ │ └── Semantic Search Cost Analysis.md │ └── Embeddings/ ← NEW: Quiz + vector search │ ├── Using Smart Connections for Quiz Generation.md │ └── Interactive Request Flow Diagram with Quiz System.md │ ├── 6. Development/ ← MERGE: All dev workflows │ ├── Git & Deployment/ │ │ ├── midimaze-git-workflow.md │ │ ├── astro-site-integration.md │ │ └── unified-development-workflow.md │ ├── Multi-Repo/ │ │ ├── nnt and nnt docs.md │ │ └── multi-repo-workflow.md │ ├── TypeScript/ │ │ └── Required vs Optional Elements.md │ ├── Styling/ │ │ └── midimaze Styling Guidelines.md │ └── Testing/ │ └── test-formatting.md │ ├── 7. Content Workflows/ ← RENAME: From "Workflows" │ ├── Article Structure Patterns.md │ ├── Gear Manuals Migration.md │ ├── RAT Manuals Midimaze Sync Tool.md │ └── Studio Database.md │ ├── 8. Planning/ ← NEW: High-level planning │ ├── Project Timeline.md │ ├── student-contribution-guide.md │ └── mobile-app-development-strategy.md │ ├── AGENTS.md ← KEEP: At root └── midimaze.com.md ← KEEP: Project overview at root ``` ### Obsidian - New Structure ``` Obsidian/ ├── 1. Workflows/ ← NEW: How to use Obsidian │ ├── Github Project Obsidian Workflow.md │ ├── OpenCode Obsidian Integration Planning.md │ └── Obsidian Inlet.md │ ├── 2. Technical Notes/ ← NEW: Configuration & issues │ ├── Managing Long Frontmatter.md │ ├── Preventing Duplicate Image References.md │ └── Smart Connections - Implementation Notes.md │ ├── 3. Planning/ ← NEW: Future features │ └── Daily Notes Vector Search - Planning.md │ ├── 4. System Integration/ ← NEW: OS-level stuff │ └── Capslock to Escape.md │ └── _tests/ ← NEW: Test files ├── TEST Obsidian Closed Test.md ├── TEST Template Processing.md └── TEST Template Syntax Literal.md ``` ## Migration Steps ### Phase 1: NNT Ecosystem (30 minutes) #### Step 1: Create New Folders ```bash cd "_Nakul/5. Coding Actions/NNT Ecosystem" # Create new structure mkdir -p "1. Infrastructure/Web Server" mkdir -p "1. Infrastructure/Hosting" mkdir -p "1. Infrastructure/Monetization" mkdir -p "2. Architecture" mkdir -p "5. Search/Implementation" mkdir -p "5. Search/Hosting & Performance" mkdir -p "5. Search/Embeddings" mkdir -p "6. Development/Git & Deployment" mkdir -p "6. Development/Multi-Repo" mkdir -p "6. Development/TypeScript" mkdir -p "6. Development/Styling" mkdir -p "6. Development/Testing" mkdir -p "7. Content Workflows" mkdir -p "8. Planning" ``` #### Step 2: Move Files to New Locations **Infrastructure/Web Server:** ```bash mv "Complete Request Lifecycle - From Browser to Database and Back.md" \ "1. Infrastructure/Web Server/" mv "How React Islands and MDX Content Get Served.md" \ "1. Infrastructure/Web Server/" mv "Web Server Architecture - nginx Cloudflare Bun GitHub Webhooks.md" \ "1. Infrastructure/Web Server/Web Server Architecture.md" mv "Why Multiple Web Servers - nginx and Bun Architecture.md" \ "1. Infrastructure/Web Server/" mv "nginx Configuration for midimaze.com - Quick Setup.md" \ "1. Infrastructure/Web Server/" ``` **Infrastructure/Hosting:** ```bash mv "Development Workflows/Hostinger VPS Deployment with Bun.md" \ "1. Infrastructure/Hosting/" ``` **Infrastructure/Monetization:** ```bash mv "midimaze Monetization Strategy.md" \ "1. Infrastructure/Monetization/" ``` **Architecture:** ```bash mv "Components/Data Storage Architecture.md" "2. Architecture/" mv "Components/React Component State Management.md" "2. Architecture/" mv "Tech Stack.md" "2. Architecture/" ``` **Components (keep folder, just move specific files):** ```bash # Rename folder mv "Components" "3. Components" # Files already in place ``` **Compiler:** ```bash mv "Compiler" "4. Compiler" ``` **Search:** ```bash # Move and reorganize Search Bar folder mv "Search Bar/Astro Static Site with Client-Side Semantic Search.md" \ "5. Search/Implementation/" mv "Search Bar/Client-Side vs Server-Side Search Explained.md" \ "5. Search/Implementation/" mv "Search Bar/Search Bar Architecture - Semantic vs Traditional.md" \ "5. Search/Implementation/Search Bar Architecture.md" mv "Search Bar/Hostinger VPS Hosting for Semantic Search.md" \ "5. Search/Hosting & Performance/" mv "Search Bar/Rate Limiting Strategies for Student Search.md" \ "5. Search/Hosting & Performance/" mv "Search Bar/Semantic Search Cost Analysis for Student Use.md" \ "5. Search/Hosting & Performance/" mv "Interactive Request Flow Diagram with Quiz System - Planning.md" \ "5. Search/Embeddings/" mv "Using Smart Connections Embeddings for Quiz Generation - Planning.md" \ "5. Search/Embeddings/" # Remove old folder rmdir "Search Bar" ``` **Development:** ```bash mv "Development Workflows/midimaze-git-workflow.md" \ "6. Development/Git & Deployment/" mv "Development Workflows/astro-site-integration.md" \ "6. Development/Git & Deployment/" mv "Development Workflows/unified-development-workflow.md" \ "6. Development/Git & Deployment/" mv "Development Workflows/nnt and nnt docs.md" \ "6. Development/Multi-Repo/" mv "docs/multi-repo-workflow.md" \ "6. Development/Multi-Repo/" mv "Typescript" "6. Development/TypeScript" mv "Development Workflows/midimaze Styling Guidelines.md" \ "6. Development/Styling/" mv "docs/test-formatting.md" \ "6. Development/Testing/" # Remove old folders rmdir "Development Workflows" rmdir "docs" ``` **Content Workflows:** ```bash mv "Workflows" "7. Content Workflows" ``` **Planning:** ```bash mv "Project Timeline.md" "8. Planning/" mv "Development Workflows/student-contribution-guide.md" "8. Planning/" 2>/dev/null || true mv "Development Workflows/mobile-app-development-strategy.md" "8. Planning/" 2>/dev/null || true ``` #### Step 3: Update AGENTS.md Add section explaining new structure: ```markdown ## Directory Structure The NNT Ecosystem is organized into 8 main categories: 1. **Infrastructure** - Web servers, hosting, deployment 2. **Architecture** - Data models, state management, tech stack 3. **Components** - React UI components 4. **Compiler** - NNT language and parser 5. **Search** - Semantic search implementation and quiz generation 6. **Development** - Git workflows, TypeScript, styling, testing 7. **Content Workflows** - Article patterns, migrations 8. **Planning** - Project timeline, contribution guide When creating new files, place them in the appropriate numbered category. ``` ### Phase 2: Obsidian (15 minutes) ```bash cd "_Nakul/5. Coding Actions/Obsidian" # Create new structure mkdir -p "1. Workflows" mkdir -p "2. Technical Notes" mkdir -p "3. Planning" mkdir -p "4. System Integration" mkdir -p "_tests" # Move files mv "Github Project Obsidian Workflow.md" "1. Workflows/" mv "OpenCode Obsidian Integration Planning.md" "1. Workflows/" mv "Obsidian Inlet.md" "1. Workflows/" mv "Managing Long Frontmatter.md" "2. Technical Notes/" mv "Preventing Duplicate Image References.md" "2. Technical Notes/" mv "Smart Connections - Implementation Notes.md" "2. Technical Notes/" mv "Daily Notes Vector Search - Planning.md" "3. Planning/" mv "Capslock to Escape.md" "4. System Integration/" mv "TEST"*.md "_tests/" ``` ## Benefits of New Structure ### For NNT Ecosystem **Before:** - 15 files at root level - Unclear separation of concerns - Hard to find infrastructure vs content docs **After:** - ✅ Clear numbered categories - ✅ Related docs grouped together - ✅ Infrastructure separated from content - ✅ Planning vs implementation clear - ✅ Easier navigation ### For Obsidian **Before:** - 11 files in flat structure - Mix of workflows, notes, tests, system config **After:** - ✅ 4 clear categories - ✅ Tests isolated in _tests/ - ✅ Workflows separated from technical notes - ✅ Planning documents identified ## Files That Stay at Root Level ### NNT Ecosystem - `AGENTS.md` - AI agent guidelines - `midimaze.com.md` - Project overview (entry point) ### Obsidian - (None - everything categorized) ## Post-Migration Tasks ### Update Internal Links **After moving files, check for broken wiki links:** ```bash # Find all wiki links in moved files cd "_Nakul/5. Coding Actions/NNT Ecosystem" rg '\[\[.*\]\]' --type md # Common patterns to update: # [[Web Server Architecture]] # → [[1. Infrastructure/Web Server/Web Server Architecture]] # OR use relative links: # [[../1. Infrastructure/Web Server/Web Server Architecture]] ``` **Consider:** Do we want to update links to include full path, or rely on Obsidian's automatic link resolution? **Recommendation:** Leave as-is initially. Obsidian resolves `[[Filename]]` regardless of location. Only update if ambiguity exists. ### Update AGENTS.md Files **NNT Ecosystem AGENTS.md:** ```markdown ## Directory Structure (Updated 2025-11-10) 1. **Infrastructure/** - Web servers (nginx, Bun), hosting (Hostinger), monetization 2. **Architecture/** - Data models, state management, tech stack decisions 3. **Components/** - React UI components (NNT Composer, tscribe) 4. **Compiler/** - NNT language, parser, query system 5. **Search/** - Semantic search, vector embeddings, quiz generation 6. **Development/** - Git workflows, TypeScript patterns, styling, testing 7. **Content Workflows/** - Article patterns, content migration, database 8. **Planning/** - Project timeline, contribution guide, mobile strategy **Key files at root:** - `midimaze.com.md` - Project overview - `AGENTS.md` - This file ``` **Obsidian AGENTS.md (create if doesn't exist):** ```markdown # Obsidian Workflows - AI Agent Guidelines This directory contains Obsidian-specific workflows, technical notes, and integrations. ## Directory Structure 1. **Workflows/** - How to use Obsidian with other tools 2. **Technical Notes/** - Configuration, troubleshooting, plugin notes 3. **Planning/** - Future features and improvements 4. **System Integration/** - OS-level configurations 5. **_tests/** - Test files and experiments When creating new Obsidian-related files, place them in the appropriate category. ``` ## Timeline **Total time: ~45 minutes** - Phase 1 (NNT Ecosystem): 30 minutes - Create folders: 5 min - Move files: 20 min - Update AGENTS.md: 5 min - Phase 2 (Obsidian): 15 minutes - Create folders: 2 min - Move files: 10 min - Create AGENTS.md: 3 min **Best time to do this:** When you're between tasks, not actively working on any of these files. ## Validation Checklist After migration, verify: - [ ] All files accounted for (no files lost) - [ ] AGENTS.md updated with new structure - [ ] No broken wiki links (test a few key files) - [ ] Numbered folders appear in correct order - [ ] Test files properly isolated in _tests/ - [ ] Git commit with clear message: "Reorganize Coding Actions directory structure" ## Rollback Plan If anything goes wrong: ```bash # Git undo cd "_Nakul/5. Coding Actions" git checkout -- . # Or restore from commit git log --oneline # Find commit before reorganization git reset --hard <commit-hash> ``` **Important:** Commit current state BEFORE starting migration, so you can easily rollback if needed. ## Future Maintenance ### Adding New Files **NNT Ecosystem:** - Infrastructure docs → `1. Infrastructure/` - Architecture decisions → `2. Architecture/` - New React components → `3. Components/` - Language changes → `4. Compiler/` - Search features → `5. Search/` - Dev workflows → `6. Development/` - Content migration → `7. Content Workflows/` - High-level planning → `8. Planning/` **Obsidian:** - New workflows → `1. Workflows/` - Config/troubleshooting → `2. Technical Notes/` - Future features → `3. Planning/` - OS integration → `4. System Integration/` - Experiments → `_tests/` ### Periodic Reviews **Every 3 months:** - Review file locations - Identify misplaced files - Update AGENTS.md if structure changes - Archive outdated planning docs ## Questions Before Starting - [ ] Do you want to update wiki links to include full paths, or rely on Obsidian auto-resolution? - [ ] Should we create a backup before starting? - [ ] Any files you're actively editing that we should wait on? - [ ] Want to do both directories at once, or one at a time? ## Next Steps **Option A: Do it now** 1. Commit current state 2. Run Phase 1 (NNT Ecosystem) 3. Test links 4. Run Phase 2 (Obsidian) 5. Commit with clear message **Option B: Schedule for later** 1. Pick a 1-hour window when not actively working 2. Follow checklist 3. Validate and commit **Option C: Automated script** 1. I can create a bash script that does all moves automatically 2. You review and approve 3. Run script 4. Validate results Which approach would you prefer?