5 KiB
OpenAugi Obsidian Plugin - Technical Overview
Project Purpose
OpenAugi is an Obsidian plugin that transforms voice notes and linked notes into organized, atomic notes using AI. It helps users process unstructured thoughts into a structured "second brain" by breaking down content into self-contained ideas.
The goal is to help humans process information faster.
Read the docs/CODEBASE_MAP.md to understand the project at a high level. Be sure to update this map as we make any siginficant changes.
Architecture Overview
Project Structure
/
├── src/
│ ├── main.ts # Plugin entry point, command registration
│ ├── services/
│ │ ├── openai.service.ts # AI processing logic
│ │ ├── file.service.ts # File operations, output management
│ │ └── distill.service.ts # Linked note extraction, content aggregation
│ ├── ui/
│ │ └── settings.ts # Settings tab UI component
│ └── utils/
│ └── filename.utils.ts # Filename sanitization, backlink mapping
├── manifest.json # Obsidian plugin metadata
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── esbuild.config.mjs # Build configuration
Key Features
1. Voice Transcript Parsing
- Processes voice transcripts into atomic notes (one idea per note)
- Extracts actionable tasks and creates summaries
- Supports "auggie" voice commands for special behaviors
- Estimates token usage before processing
2. Linked Notes Distillation
- Analyzes a root note and all its linked notes
- Supports both standard Obsidian links and Dataview queries
- Deduplicates and merges overlapping ideas
- Creates comprehensive summaries with source attribution
3. Custom Context Instructions
- Users can add
context:sections to notes for focused extraction - Context instructions guide AI processing behavior
Development Guidelines
Build Commands
Important: npm is not on the default PATH in this environment. Source nvm first:
export PATH="$HOME/.nvm/versions/node/$(ls $HOME/.nvm/versions/node/ | head -1)/bin:$PATH"
Then run commands as normal:
# Development build with hot reload
npm run dev
# Production build (includes typecheck)
npm run build
There is no standalone typecheck script — npm run build runs tsc -noEmit -skipLibCheck before bundling.
Code Standards
- TypeScript with strict mode enabled
- ESLint configuration for code quality
- No external runtime dependencies (only Obsidian API)
Testing
Currently no automated tests. Manual testing through Obsidian's developer console.
API Integration
OpenAI Service
- Model: GPT-4.1-2025-04-14
- Temperature: 0.7 for parsing, 0.3 for distilling
- Structured output using JSON schema
- Token estimation before API calls
File Operations
- Creates atomic notes in configurable folders
- Generates summaries with backlinks
- Handles special characters in filenames
- Maintains backlink mappings for navigation
Configuration
User Settings
openaiApiKey: Required for AI processingsummaryFolderPath: Default "OpenAugi/Summaries"notesFolderPath: Default "OpenAugi/Notes"useDataview: Enable/disable Dataview integration
Build Configuration
- Target: ES2018/ES6
- Platform: Browser (Electron)
- External: Obsidian modules
- Sourcemaps enabled for development
Output Structure
Summary Files
- Format:
[original-name] - summary.mdor[original-name] - distilled.md - Contains: Summary, atomic note links, extracted tasks
- For distilled notes: Shows source note references
Atomic Notes
- Self-contained ideas with context
- Includes relevant backlinks
- Organized by timestamp or topic
Common Development Tasks
Adding New Features
- Extend services in
/src/services/ - Update command registration in
main.ts - Add settings if needed in
settings.ts
Debugging
- Use Obsidian's developer console (Ctrl+Shift+I)
- Check console for error messages
- Enable verbose logging in development
Publishing
See docs/PUBLISHING.md for the complete release process.
Quick summary:
- Update version in
manifest.jsonandpackage.json - Commit and push to master
- Tag with matching version:
git tag -a X.Y.Z -m "X.Y.Z" && git push origin X.Y.Z - Generate release notes (Claude: compare commits since last tag, focus on user-facing changes)
- Edit draft release on GitHub and publish
*** Be sure to update manifest.json version number as part of PR ***
Important Considerations
- Always handle API errors gracefully
- Respect rate limits and token usage
- Sanitize filenames to prevent filesystem issues
- Maintain backwards compatibility with existing notes
- Test with various note structures and edge cases
Testing
My local testing vault is in: /Users/chris/zk-for-testing
Add any notes to /Users/chris/Documents/DEV-TESTING/Test to capture edge cases when relevant.