Initial project setup: Obsidian intelligent journal organizer

- 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
This commit is contained in:
windyboy
2025-12-31 17:55:10 +08:00
parent 3200ad3dd5
commit f7e54692a9
67 changed files with 23088 additions and 0 deletions
@@ -0,0 +1,87 @@
# Requirements Document
## Introduction
This specification addresses the need to enhance Claude API configuration flexibility in the Obsidian journal organizer project. Currently, the system has limited Claude API configuration options, lacking support for custom API URLs and comprehensive model selection. This enhancement will provide users with greater flexibility to use different Claude API endpoints and models based on their specific needs and deployment scenarios.
## Glossary
- **System**: The Obsidian journal organizer application
- **Claude_API**: Anthropic's Claude AI service API
- **API_URL**: The base URL endpoint for Claude API requests
- **Model_Name**: The specific Claude model identifier (e.g., claude-3-5-sonnet-20241022)
- **Configuration**: YAML-based settings that control system behavior
- **API_Client**: The component responsible for making requests to Claude API
## Requirements
### Requirement 1: Add Claude API URL Configuration
**User Story:** As a user, I want to configure a custom Claude API URL, so that I can use different Claude API endpoints including proxy servers, regional endpoints, or custom deployments.
#### Acceptance Criteria
1. THE Configuration SHALL support a configurable api_url field in the claude section
2. WHEN api_url is not specified, THE System SHALL use the default Anthropic API URL
3. WHEN api_url is specified, THE System SHALL use the custom URL for all Claude API requests
4. THE System SHALL validate that the api_url follows proper URL format
5. WHEN the api_url is invalid, THE System SHALL provide clear error messages during configuration validation
### Requirement 2: Enhance Model Name Configuration
**User Story:** As a user, I want flexible model name configuration with validation, so that I can easily switch between different Claude models and get clear feedback when using unsupported models.
#### Acceptance Criteria
1. THE Configuration SHALL support model name specification in the claude section
2. THE System SHALL validate that the specified model name follows Claude model naming conventions
3. WHEN an invalid model name is provided, THE System SHALL provide helpful suggestions for valid model names
4. THE System SHALL support all current Claude model variants (claude-3-5-sonnet, claude-3-haiku, claude-3-opus)
5. WHEN model configuration is missing, THE System SHALL use a sensible default model
### Requirement 3: Maintain Backward Compatibility
**User Story:** As an existing user, I want my current configuration to continue working, so that I don't need to modify my setup when upgrading.
#### Acceptance Criteria
1. WHEN existing configuration files lack api_url, THE System SHALL use default values without errors
2. WHEN existing configuration files use the current model format, THE System SHALL continue to work unchanged
3. THE System SHALL not break existing functionality when new configuration options are added
4. WHEN loading legacy configuration, THE System SHALL provide informational messages about new available options
### Requirement 4: Configuration Validation and Error Handling
**User Story:** As a user, I want clear validation and error messages for Claude API configuration, so that I can quickly identify and fix configuration issues.
#### Acceptance Criteria
1. WHEN the api_url is malformed, THE System SHALL provide specific error messages indicating the URL format issue
2. WHEN the model name is invalid, THE System SHALL suggest valid alternatives
3. THE System SHALL validate API connectivity during startup when possible
4. WHEN API credentials are invalid for the specified endpoint, THE System SHALL provide clear authentication error messages
5. THE System SHALL log configuration validation results at appropriate levels
### Requirement 5: Environment Variable Support
**User Story:** As a developer, I want to use environment variables for Claude API configuration, so that I can manage different environments and keep sensitive configuration out of files.
#### Acceptance Criteria
1. THE System SHALL support environment variable expansion for api_url configuration
2. THE System SHALL support environment variable expansion for model name configuration
3. WHEN environment variables are undefined, THE System SHALL provide clear error messages
4. THE System SHALL support mixed configuration (some values from files, some from environment)
5. WHEN using environment variables, THE System SHALL validate expanded values the same as direct configuration
### Requirement 6: Documentation and Examples
**User Story:** As a user, I want clear documentation and examples for Claude API configuration, so that I can understand how to use the new configuration options.
#### Acceptance Criteria
1. THE Configuration example file SHALL include api_url configuration with comments
2. THE Configuration example file SHALL include model name options with descriptions
3. THE System SHALL provide helpful error messages that reference documentation
4. WHEN configuration validation fails, THE System SHALL suggest corrective actions
5. THE Documentation SHALL include examples for common use cases (proxy servers, different regions)