- Add core agent architecture with Command + Skill pattern - Implement Claude API integration for content analysis - Add Obsidian REST API integration for vault operations - Create conversational interface (v2.0) with natural language processing - Add comprehensive configuration management and validation - Include project documentation and developer guides - Set up testing framework with unit, integration, and property tests - Add Kiro specs for Claude API configuration and code quality improvements - Configure project steering files for development guidelines
2.8 KiB
2.8 KiB
Technology Stack
Core Technologies
- Python 3.8+: Primary programming language
- asyncio: Asynchronous programming for concurrent operations
- aiohttp: HTTP client for API interactions
- PyYAML: Configuration file management
- Anthropic Claude API: AI-powered content analysis and understanding
- Obsidian Local REST API: Integration with Obsidian vault
Key Dependencies
anthropic>=0.25.0 # Claude API client
aiohttp>=3.9.0 # Async HTTP client
pyyaml>=6.0 # YAML configuration parsing
Architecture Patterns
Command + Skill Pattern
- Commands: High-level operations that orchestrate multiple Skills
- Skills: Atomic functional units for specific tasks (READ, WRITE, ANALYZE, TRANSFORM, INTEGRATE)
- Agent Core: Base framework defining interfaces and interaction logic
Async/Await Pattern
- All Skills and Commands use async/await for non-blocking operations
- HTTP API calls are asynchronous using aiohttp
- Supports concurrent execution of multiple operations
Configuration-Driven Design
- YAML-based configuration files for all settings
- Environment variable support for sensitive data
- Separation of code and configuration
Common Commands
Development Setup
# Install dependencies
pip install -r requirements.txt
# Copy and configure settings
cp config.example.yaml config.yaml
# Edit config.yaml with your API keys and paths
Running the Application
v1.0 - Direct Commands
# Organize today's journal
python -m journal_organizer organize
# Organize specific date
python -m journal_organizer organize --date 2025-12-31
# List available commands
python -m journal_organizer list
# Get help for specific command
python -m journal_organizer help organize
v2.0 - Conversational Interface
# Start interactive chat
python -m journal_organizer.chat_main
# Single query mode
python -m journal_organizer.chat_main --query "整理今天的日记"
Configuration
# Use custom config file
python -m journal_organizer --config /path/to/config.yaml organize
# Set log level
python -m journal_organizer --log-level DEBUG organize
API Integration Requirements
Obsidian Setup
- Install "Local REST API" plugin in Obsidian
- Generate API key in plugin settings
- Configure API URL (default: https://localhost:27123)
- Disable SSL verification for local development
Claude API Setup
- Obtain Anthropic API key
- Set environment variable:
ANTHROPIC_API_KEY - Configure model in config.yaml (default: claude-3-5-sonnet-20241022)
Error Handling Patterns
- All Skills return
SkillResultobjects with success/failure status - Comprehensive logging at DEBUG, INFO, WARNING, ERROR levels
- Graceful degradation when external APIs are unavailable
- SSL context configuration for local HTTPS endpoints