agentic 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.agentic.yml +2 -0
  3. data/.architecture/decisions/ArchitecturalFeatureBuilder.md +136 -0
  4. data/.architecture/decisions/ArchitectureConsiderations.md +200 -0
  5. data/.architecture/decisions/adr_001_observer_pattern_implementation.md +196 -0
  6. data/.architecture/decisions/adr_002_plan_orchestrator.md +320 -0
  7. data/.architecture/decisions/adr_003_plan_orchestrator_interface.md +179 -0
  8. data/.architecture/decisions/adrs/ADR-001-dependency-management.md +147 -0
  9. data/.architecture/decisions/adrs/ADR-002-system-boundaries.md +162 -0
  10. data/.architecture/decisions/adrs/ADR-003-content-safety.md +158 -0
  11. data/.architecture/decisions/adrs/ADR-004-agent-permissions.md +161 -0
  12. data/.architecture/decisions/adrs/ADR-005-adaptation-engine.md +127 -0
  13. data/.architecture/decisions/adrs/ADR-006-extension-system.md +273 -0
  14. data/.architecture/decisions/adrs/ADR-007-learning-system.md +156 -0
  15. data/.architecture/decisions/adrs/ADR-008-prompt-generation.md +325 -0
  16. data/.architecture/decisions/adrs/ADR-009-task-failure-handling.md +353 -0
  17. data/.architecture/decisions/adrs/ADR-010-task-input-handling.md +251 -0
  18. data/.architecture/decisions/adrs/ADR-011-task-observable-pattern.md +391 -0
  19. data/.architecture/decisions/adrs/ADR-012-task-output-handling.md +205 -0
  20. data/.architecture/decisions/adrs/ADR-013-architecture-alignment.md +211 -0
  21. data/.architecture/decisions/adrs/ADR-014-agent-capability-registry.md +80 -0
  22. data/.architecture/decisions/adrs/ADR-015-persistent-agent-store.md +100 -0
  23. data/.architecture/decisions/adrs/ADR-016-agent-assembly-engine.md +117 -0
  24. data/.architecture/decisions/adrs/ADR-017-streaming-observability.md +171 -0
  25. data/.architecture/decisions/capability_tools_distinction.md +150 -0
  26. data/.architecture/decisions/cli_command_structure.md +61 -0
  27. data/.architecture/implementation/agent_self_assembly_implementation.md +267 -0
  28. data/.architecture/implementation/agent_self_assembly_summary.md +138 -0
  29. data/.architecture/members.yml +187 -0
  30. data/.architecture/planning/self_implementation_exercise.md +295 -0
  31. data/.architecture/planning/session_compaction_rule.md +43 -0
  32. data/.architecture/planning/streaming_observability_feature.md +223 -0
  33. data/.architecture/principles.md +151 -0
  34. data/.architecture/recalibration/0-2-0.md +92 -0
  35. data/.architecture/recalibration/agent_self_assembly.md +238 -0
  36. data/.architecture/recalibration/cli_command_structure.md +91 -0
  37. data/.architecture/recalibration/implementation_roadmap_0-2-0.md +301 -0
  38. data/.architecture/recalibration/progress_tracking_0-2-0.md +114 -0
  39. data/.architecture/recalibration_process.md +127 -0
  40. data/.architecture/reviews/0-2-0.md +181 -0
  41. data/.architecture/reviews/cli_command_duplication.md +98 -0
  42. data/.architecture/templates/adr.md +105 -0
  43. data/.architecture/templates/implementation_roadmap.md +125 -0
  44. data/.architecture/templates/progress_tracking.md +89 -0
  45. data/.architecture/templates/recalibration_plan.md +70 -0
  46. data/.architecture/templates/version_comparison.md +124 -0
  47. data/.claude/settings.local.json +13 -0
  48. data/.claude-sessions/001-task-class-architecture-implementation.md +129 -0
  49. data/.claude-sessions/002-plan-orchestrator-interface-review.md +105 -0
  50. data/.claude-sessions/architecture-governance-implementation.md +37 -0
  51. data/.claude-sessions/architecture-review-session.md +27 -0
  52. data/ArchitecturalFeatureBuilder.md +136 -0
  53. data/ArchitectureConsiderations.md +229 -0
  54. data/CHANGELOG.md +57 -2
  55. data/CLAUDE.md +111 -0
  56. data/CONTRIBUTING.md +286 -0
  57. data/MAINTAINING.md +301 -0
  58. data/README.md +582 -28
  59. data/docs/agent_capabilities_api.md +259 -0
  60. data/docs/artifact_extension_points.md +757 -0
  61. data/docs/artifact_generation_architecture.md +323 -0
  62. data/docs/artifact_implementation_plan.md +596 -0
  63. data/docs/artifact_integration_points.md +345 -0
  64. data/docs/artifact_verification_strategies.md +581 -0
  65. data/docs/streaming_observability_architecture.md +510 -0
  66. data/exe/agentic +6 -1
  67. data/lefthook.yml +5 -0
  68. data/lib/agentic/adaptation_engine.rb +124 -0
  69. data/lib/agentic/agent.rb +181 -4
  70. data/lib/agentic/agent_assembly_engine.rb +442 -0
  71. data/lib/agentic/agent_capability_registry.rb +260 -0
  72. data/lib/agentic/agent_config.rb +63 -0
  73. data/lib/agentic/agent_specification.rb +46 -0
  74. data/lib/agentic/capabilities/examples.rb +530 -0
  75. data/lib/agentic/capabilities.rb +14 -0
  76. data/lib/agentic/capability_provider.rb +146 -0
  77. data/lib/agentic/capability_specification.rb +118 -0
  78. data/lib/agentic/cli/agent.rb +31 -0
  79. data/lib/agentic/cli/capabilities.rb +191 -0
  80. data/lib/agentic/cli/config.rb +134 -0
  81. data/lib/agentic/cli/execution_observer.rb +796 -0
  82. data/lib/agentic/cli.rb +1068 -0
  83. data/lib/agentic/default_agent_provider.rb +35 -0
  84. data/lib/agentic/errors/llm_error.rb +184 -0
  85. data/lib/agentic/execution_plan.rb +53 -0
  86. data/lib/agentic/execution_result.rb +91 -0
  87. data/lib/agentic/expected_answer_format.rb +46 -0
  88. data/lib/agentic/extension/domain_adapter.rb +109 -0
  89. data/lib/agentic/extension/plugin_manager.rb +163 -0
  90. data/lib/agentic/extension/protocol_handler.rb +116 -0
  91. data/lib/agentic/extension.rb +45 -0
  92. data/lib/agentic/factory_methods.rb +9 -1
  93. data/lib/agentic/generation_stats.rb +61 -0
  94. data/lib/agentic/learning/README.md +84 -0
  95. data/lib/agentic/learning/capability_optimizer.rb +613 -0
  96. data/lib/agentic/learning/execution_history_store.rb +251 -0
  97. data/lib/agentic/learning/pattern_recognizer.rb +500 -0
  98. data/lib/agentic/learning/strategy_optimizer.rb +706 -0
  99. data/lib/agentic/learning.rb +131 -0
  100. data/lib/agentic/llm_assisted_composition_strategy.rb +188 -0
  101. data/lib/agentic/llm_client.rb +215 -15
  102. data/lib/agentic/llm_config.rb +65 -1
  103. data/lib/agentic/llm_response.rb +163 -0
  104. data/lib/agentic/logger.rb +1 -1
  105. data/lib/agentic/observable.rb +51 -0
  106. data/lib/agentic/persistent_agent_store.rb +385 -0
  107. data/lib/agentic/plan_execution_result.rb +129 -0
  108. data/lib/agentic/plan_orchestrator.rb +464 -0
  109. data/lib/agentic/plan_orchestrator_config.rb +57 -0
  110. data/lib/agentic/retry_config.rb +63 -0
  111. data/lib/agentic/retry_handler.rb +125 -0
  112. data/lib/agentic/structured_outputs.rb +1 -1
  113. data/lib/agentic/task.rb +193 -0
  114. data/lib/agentic/task_definition.rb +39 -0
  115. data/lib/agentic/task_execution_result.rb +92 -0
  116. data/lib/agentic/task_failure.rb +66 -0
  117. data/lib/agentic/task_output_schemas.rb +112 -0
  118. data/lib/agentic/task_planner.rb +54 -19
  119. data/lib/agentic/task_result.rb +48 -0
  120. data/lib/agentic/ui.rb +244 -0
  121. data/lib/agentic/verification/critic_framework.rb +116 -0
  122. data/lib/agentic/verification/llm_verification_strategy.rb +60 -0
  123. data/lib/agentic/verification/schema_verification_strategy.rb +47 -0
  124. data/lib/agentic/verification/verification_hub.rb +62 -0
  125. data/lib/agentic/verification/verification_result.rb +50 -0
  126. data/lib/agentic/verification/verification_strategy.rb +26 -0
  127. data/lib/agentic/version.rb +1 -1
  128. data/lib/agentic.rb +74 -2
  129. data/plugins/README.md +41 -0
  130. metadata +245 -6
@@ -0,0 +1,229 @@
1
+ # Architecture Considerations for Agentic
2
+
3
+ ## Core Architecture Vision
4
+
5
+ Agentic aims to be a domain-agnostic, self-improving framework for AI agent orchestration using a plan-and-execute paradigm. This document outlines the architectural considerations for creating a robust, extensible system.
6
+
7
+ ## System Layers
8
+
9
+ ### 1. Foundation Layer
10
+
11
+ **Purpose**: Provides core abstractions and fundamental capabilities.
12
+
13
+ **Components**:
14
+ - **AgentRegistry**: Central registry for managing different agent types
15
+ - **CapabilityManager**: Handles extensible agent abilities and tools
16
+ - **MetaLearningSystem**: Enables cross-execution improvements and adaptation
17
+ - **StreamingObservabilityHub**: Central coordinator for real-time event streaming and observability
18
+
19
+ **Design Principles**:
20
+ - Dependency injection for all components
21
+ - Registry pattern for plugin management
22
+ - Abstract interfaces for all core functionalities
23
+
24
+ ### 2. Runtime Layer
25
+
26
+ **Purpose**: Manages the execution of tasks and plans.
27
+
28
+ **Components**:
29
+ - **TaskFactory**: Creates task instances from specifications
30
+ - **PlanOrchestrator**: Manages workflow execution
31
+ - **ExecutionContext**: Maintains state during execution
32
+ - **Task**: Represents individual units of work
33
+ - Properties: id, description, agent_spec, input, output, status
34
+ - Behaviors: initialization, performance, verification
35
+ - **TaskResult**: Encapsulates the outcome of task execution
36
+ - Properties: task_id, success, output, failure
37
+ - Behaviors: result inspection, serialization
38
+ - **TaskFailure**: Captures detailed failure information
39
+ - Properties: message, type, timestamp, context
40
+ - Behaviors: error contextualization, serialization
41
+
42
+ **Design Principles**:
43
+ - State management through immutable objects
44
+ - Event-driven communication between components
45
+ - Transaction-like semantics for task execution
46
+ - Observable pattern for task state notification
47
+ - Streaming observability for real-time insights
48
+ - Result-oriented failure handling
49
+
50
+ ### 3. Verification Layer
51
+
52
+ **Purpose**: Ensures quality and correctness of execution.
53
+
54
+ **Components**:
55
+ - **VerificationHub**: Coordinates verification strategies
56
+ - **CriticFramework**: Provides multi-perspective evaluation
57
+ - **AdaptationEngine**: Implements feedback-driven adjustments
58
+ - **Verification Strategies**:
59
+ - Schema validation
60
+ - LLM-based evaluation
61
+ - Quantitative metrics analysis
62
+ - Goal alignment checking
63
+
64
+ **Design Principles**:
65
+ - Strategy pattern for verification methods
66
+ - Observer pattern for reporting and monitoring
67
+ - Progressive verification with escalation paths
68
+
69
+ ### 4. Extension System
70
+
71
+ **Purpose**: Enables adaptation to different domains and use cases.
72
+
73
+ **Components**:
74
+ - **PluginManager**: Handles third-party extensions, registration, and lifecycle
75
+ - Plugin discovery and auto-loading
76
+ - Enable/disable functionality
77
+ - Metadata tracking for version management
78
+ - Event hooks for plugin lifecycle events
79
+ - **DomainAdapter**: Integrates domain-specific knowledge
80
+ - Context-aware adaptation of prompts, tasks, and verification
81
+ - Domain knowledge repository
82
+ - Custom adapters for different components
83
+ - Pluggable adaptation strategies
84
+ - **ProtocolHandler**: Standardizes external system connections
85
+ - Uniform interface for different communication protocols
86
+ - Configuration management
87
+ - Request/response standardization
88
+ - Error handling and logging
89
+
90
+ **Design Principles**:
91
+ - Interface-based contracts for extensions
92
+ - Composition over inheritance
93
+ - Versioned APIs for stability
94
+ - Progressive enhancement of functionality
95
+ - Defensive programming with graceful degradation
96
+ - Standardized logging and error reporting
97
+
98
+ ## Learning System
99
+
100
+ **Purpose**: Enables the system to improve over time.
101
+
102
+ **Components**:
103
+ - **ExecutionHistoryStore**: Captures performance data
104
+ - **PatternRecognizer**: Identifies optimization opportunities
105
+ - **StrategyOptimizer**: Improves execution strategies
106
+
107
+ **Design Principles**:
108
+ - Anonymized telemetry collection
109
+ - Incremental learning with stability guarantees
110
+ - Performance benchmarking against baselines
111
+
112
+ ## Observability System
113
+
114
+ **Purpose**: Provides real-time insights into system execution and behavior.
115
+
116
+ **Components**:
117
+ - **StreamingObservabilityHub**: Central coordinator for all observability events
118
+ - **ObservabilityStream**: Generic streaming interface supporting multiple backends (console, file, WebSocket, memory)
119
+ - **StreamProcessor**: Event filtering, transformation, and routing capabilities
120
+ - **MetricsAggregator**: Real-time metrics calculation and windowed aggregation
121
+ - **Enhanced Observable Pattern**: Streaming-aware extension of existing Observable pattern
122
+
123
+ **Design Principles**:
124
+ - Non-blocking streaming to prevent execution delays
125
+ - Pluggable stream backends for different use cases
126
+ - Configurable event filtering and transformation
127
+ - Thread-safe concurrent stream processing
128
+ - Backwards compatible with existing Observable behavior
129
+
130
+ **Stream Types**:
131
+ - **Task Execution Streams**: Intermediate steps, progress updates, and performance metrics
132
+ - **Agent Assembly Streams**: Capability analysis, selection reasoning, and construction steps
133
+ - **Plan Building Streams**: Goal analysis, task generation, and dependency resolution
134
+ - **Orchestration Streams**: Scheduling decisions, resource allocation, and execution coordination
135
+ - **LLM Interaction Streams**: Token usage, response times, and content flow
136
+
137
+ ## Human Interface
138
+
139
+ **Purpose**: Facilitates human oversight and intervention.
140
+
141
+ **Components**:
142
+ - **InterventionPortal**: Manages human input requests/responses
143
+ - **ExplanationEngine**: Provides transparency into system decisions
144
+ - **ConfigurationInterface**: Enables system customization
145
+
146
+ **Design Principles**:
147
+ - Progressive automation of common interventions
148
+ - Clear explanation of system reasoning
149
+ - Configurable confidence thresholds
150
+
151
+ ## Critical Human Intervention Points
152
+
153
+ 1. **Ethical Boundaries**: Human approval for ethically sensitive tasks
154
+ 2. **Domain Expertise Gaps**: Specialized knowledge provision
155
+ 3. **Novel Situation Handling**: Guidance for unprecedented scenarios
156
+ 4. **Success Criteria Definition**: Establishing nuanced evaluation metrics
157
+ 5. **Error Recovery**: Intervention when automatic recovery fails
158
+ 6. **Agent Selection Validation**: Confirming appropriate agent assignments
159
+ 7. **Resource Authorization**: Approving access to restricted resources
160
+ 8. **Strategic Direction**: High-level course correction
161
+ 9. **Confidence Thresholds**: Proceeding despite uncertainty
162
+ 10. **Final Output Validation**: Approving complete solutions
163
+
164
+ ## Implementation Strategy
165
+
166
+ 1. **Layered Development**:
167
+ - Start with core execution components
168
+ - Add verification layer
169
+ - Implement learning capabilities
170
+ - Enhance human interface
171
+
172
+ 2. **Progressive Automation**:
173
+ - Begin with high human oversight
174
+ - Track intervention patterns
175
+ - Gradually automate common interventions
176
+ - Build intervention knowledge base
177
+
178
+ 3. **Extensibility First**:
179
+ - Define clear extension points
180
+ - Create minimal implementations
181
+ - Document interfaces thoroughly
182
+ - Provide example extensions
183
+
184
+ 4. **Continuous Verification**:
185
+ - Implement metrics collection early
186
+ - Establish performance baselines
187
+ - Create automated verification
188
+ - Build regression test suite
189
+
190
+ ## Data Flow
191
+
192
+ ```
193
+ Goal → TaskPlanner → Tasks → PlanOrchestrator
194
+
195
+ Agent Selection → Task Execution → Verification
196
+
197
+ Feedback Loop → Task Adaptation → Final Output
198
+ ```
199
+
200
+ With verification points at each transition and potential human intervention based on confidence thresholds.
201
+
202
+ ## Next Steps
203
+
204
+ 1. ✅ Implement the Task class with result-oriented failure handling
205
+ 2. ✅ Implement TaskResult and TaskFailure supporting classes
206
+ 3. ✅ Add Observable pattern for task state notification
207
+ 4. ✅ Create PlanOrchestrator for task execution with Async
208
+ 5. ✅ Implement verification hub and basic verification strategies
209
+ 6. ✅ Implement AdaptationEngine for feedback-driven adjustments
210
+ 7. ✅ Implement Extension System components (PluginManager, DomainAdapter, ProtocolHandler)
211
+ 8. ✅ Implement Learning System components (ExecutionHistoryStore, PatternRecognizer, StrategyOptimizer)
212
+ 9. ✅ Implement metrics collection
213
+ 10. 🚧 Implement Streaming Observability System (StreamingObservabilityHub, ObservabilityStream, enhanced Observable pattern)
214
+ 11. Add human intervention portal
215
+
216
+ For detailed design documentation on specific architectural decisions, see the @.architecture/decisions/adrs directory, which contains in-depth analysis of:
217
+ - Task Input Handling
218
+ - Task Output Handling
219
+ - Task Failure Handling
220
+ - Prompt Generation
221
+ - Task Observable Pattern
222
+ - Adaptation Engine
223
+ - Extension System
224
+ - Learning System
225
+ - Streaming Observability
226
+
227
+ ## Conclusion
228
+
229
+ This architecture provides a flexible, extensible framework for AI agent orchestration that can adapt to different domains while maintaining quality through verification and human oversight. The system is designed to improve over time through learning from execution history and human feedback.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
- ## [Unreleased]
1
+ ## [0.2.0] - 2025-05-29
2
+
3
+ ### Added
4
+ - Agent Self-Assembly System for dynamic agent construction
5
+ - AgentCapabilityRegistry for managing capability specifications and providers
6
+ - PersistentAgentStore for saving and retrieving agent configurations
7
+ - AgentAssemblyEngine for analyzing tasks and assembling appropriate agents
8
+ - CapabilityOptimizer for improving capability implementations
9
+ - LLM-assisted capability selection strategy
10
+ - Capability System with rich specification and versioning
11
+ - Clear distinction between capabilities and tools
12
+ - Semantic versioning for capability evolution
13
+ - Capability composition for building complex capabilities
14
+ - Dependency management for capabilities
15
+ - CLI commands for capability and agent management
16
+ - Listing and filtering capabilities
17
+ - Viewing capability details
18
+ - Searching for capabilities
19
+ - Agent creation and management
20
+ - Example capabilities for common tasks
21
+ - Integration with learning system for capability optimization
22
+ - Comprehensive integration tests for agent assembly workflow
23
+ - Documentation for capability API and agent self-assembly
24
+ - Comprehensive CLI implementation with subcommands for plan, execute, agent, and config
25
+ - Real-time feedback with progress bars, spinners, and colorized output
26
+ - Per-user and per-project configuration support
27
+ - Enhanced LLM error and refusal handling with categorization
28
+ - First-class configuration objects for LLM, retry handling, and orchestration
29
+ - Value objects for task definitions, agent specifications, and execution results
30
+ - Expanded test coverage for core components
31
+
32
+ ### Improved
33
+ - Test coverage across all major features
34
+ - Documentation for integration testing
35
+ - Stability in edge cases like timeouts and partial failures
36
+ - Metrics collection for learning system analysis
37
+ - Agent reusability through persistent storage
38
+ - Decoupled data from presentation throughout the codebase
39
+ - Improved error handling with specific error types and recovery strategies
40
+ - Enhanced documentation with CLI examples and API snippets
41
+
42
+ ## [0.1.0] - 2024-06-27
43
+
44
+ ### Added
45
+ - Comprehensive CLI implementation with subcommands for plan, execute, agent, and config
46
+ - Real-time feedback with progress bars, spinners, and colorized output
47
+ - Per-user and per-project configuration support
48
+ - Enhanced LLM error and refusal handling with categorization
49
+ - First-class configuration objects for LLM, retry handling, and orchestration
50
+ - Value objects for task definitions, agent specifications, and execution results
51
+ - Expanded test coverage for core components
52
+
53
+ ### Changed
54
+ - Decoupled data from presentation throughout the codebase
55
+ - Improved error handling with specific error types and recovery strategies
56
+ - Enhanced documentation with CLI examples and API snippets
2
57
 
3
58
  ## [0.1.0] - 2024-06-27
4
59
 
5
- - Initial release
60
+ - Initial release
data/CLAUDE.md ADDED
@@ -0,0 +1,111 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ Agentic is a Ruby gem for building and running AI agents in a plan-and-execute fashion. It provides a simple command-line tool and library to build, manage, deploy, and run purpose-driven AI agents, using OpenAI's LLM API.
8
+
9
+ ## Architecture Documentation
10
+
11
+ This project follows a rigorous architectural design approach inspired by the [ai-software-architect](https://github.com/codenamev/ai-software-architect) framework. Before implementing new features or making significant changes:
12
+
13
+ 1. **Consult Architectural Documents**:
14
+ - @ArchitectureConsiderations.md - Core architectural vision and system layers
15
+ - @ArchitecturalFeatureBuilder.md - Feature implementation guidelines and checklist
16
+ - @.architecture/ folder (when available) - Detailed architectural decision records and reviews
17
+
18
+ 2. **Follow Architectural Design Process**:
19
+ - Design Phase: Reference existing architecture, identify component placement, define interfaces
20
+ - Implementation Phase: Follow established patterns, maintain separation of concerns
21
+ - Verification Phase: Implement comprehensive testing and manual verification
22
+
23
+ 3. **Architectural Principles**:
24
+ - Domain-agnostic, self-improving framework design
25
+ - Progressive automation with human oversight
26
+ - Learning capability through execution history
27
+ - Extensibility through well-defined interfaces
28
+ - Clear separation of concerns across system layers
29
+
30
+ ## Key Commands
31
+
32
+ ### Setup and Installation
33
+
34
+ ```bash
35
+ # Install dependencies
36
+ bin/setup
37
+
38
+ # Install the gem locally
39
+ bundle exec rake install
40
+ ```
41
+
42
+ ### Testing and Linting
43
+
44
+ ```bash
45
+ # Run the test suite
46
+ bundle exec rake spec
47
+
48
+ # Run a specific test file
49
+ bundle exec rspec spec/path/to/file_spec.rb
50
+
51
+ # Run a specific test
52
+ bundle exec rspec spec/path/to/file_spec.rb:LINE_NUMBER
53
+
54
+ # Run linting (StandardRB)
55
+ bundle exec rake standard
56
+
57
+ # Run both tests and linting (default task)
58
+ bundle exec rake
59
+
60
+ # Autofix linter issues with StandardRB
61
+ standardrb --fix
62
+ ```
63
+
64
+ ### Release
65
+
66
+ ```bash
67
+ # Release a new version (after updating version.rb)
68
+ bundle exec rake release
69
+ ```
70
+
71
+ ## Development Guidelines
72
+
73
+ You are an experienced Ruby on Rails developer, very accurate for details. The
74
+ last 10 years you've spent managing open source Ruby gems and architecting
75
+ object oriented solutions.
76
+
77
+ You must keep your answers very short, concise, simple and informative.
78
+
79
+ ### Architectural Rigor
80
+
81
+ Before implementing any feature:
82
+ 1. **Review Architecture**: Consult `ArchitectureConsiderations.md` and `ArchitecturalFeatureBuilder.md`
83
+ 2. **System Layer Identification**: Determine which architectural layer(s) your feature affects:
84
+ - Foundation Layer (core abstractions, registries)
85
+ - Runtime Layer (task execution, orchestration)
86
+ - Verification Layer (quality assurance, validation)
87
+ - Extension System (plugins, domain adapters)
88
+ 3. **Interface Design**: Define clear interfaces following established patterns
89
+ 4. **Implementation Checklist**: Use the checklist in `ArchitecturalFeatureBuilder.md`
90
+
91
+ ### Code Standards
92
+
93
+ 1. Prepend all Ruby commands with "bundle exec"
94
+ 2. Use the project's .rubocop.yml for formatting of all Ruby code.
95
+ 3. Use YARD comments for properly documenting all generated Ruby code.
96
+ 4. **Testing with VCR**: The project uses VCR to record and replay HTTP interactions for tests. When adding new API interactions, ensure that they are properly recorded in cassettes.
97
+ 5. **Structured Outputs**: When working with LLM responses, use the StructuredOutputs module to define schemas and validate responses.
98
+ 6. **Factory Pattern**: Follow the established factory pattern when extending or creating new agents.
99
+ 7. **API Key Handling**: Never hardcode API keys. Use the configuration system or environment variables.
100
+ 8. **Ruby Style**: The project follows StandardRB conventions. Ensure your code passes `rake standard`.
101
+ 9. **Documentation**: Document new classes and methods using YARD-style comments.
102
+
103
+ ### Architectural Decision Documentation
104
+
105
+ When making significant architectural decisions:
106
+ 1. Document rationale in relevant architectural files
107
+ 2. Update @ArchitectureConsiderations.md if system design changes
108
+ 3. Consider creating @.architecture/decisions/adrs/ entries for major decisions
109
+ 4. Ensure decisions align with multi-perspective review principles (systems, domain, security, performance, maintainability)
110
+
111
+ (Rest of the document remains the same as the previous content)
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,286 @@
1
+ # Contributing to Agentic
2
+
3
+ Thank you for your interest in contributing to Agentic! This guide will help you get started with contributing to our AI agent orchestration framework.
4
+
5
+ ## Quick Start
6
+
7
+ 1. **Fork the repository** on GitHub
8
+ 2. **Clone your fork** locally:
9
+ ```bash
10
+ git clone https://github.com/YOUR_USERNAME/agentic.git
11
+ cd agentic
12
+ ```
13
+ 3. **Set up development environment**:
14
+ ```bash
15
+ bin/setup
16
+ ```
17
+ 4. **Run tests** to ensure everything works:
18
+ ```bash
19
+ bundle exec rake
20
+ ```
21
+
22
+ ## Development Guidelines
23
+
24
+ ### Code Standards
25
+
26
+ - **Ruby Style**: Follow [StandardRB](https://github.com/testdouble/standard) conventions
27
+ - **Testing**: Use RSpec for tests, aim for >90% coverage on new code
28
+ - **Documentation**: Use YARD comments for all public APIs
29
+ - **Commit Messages**: Follow [Conventional Commits](https://www.conventionalcommits.org/)
30
+
31
+ ### Before You Code
32
+
33
+ 1. **Check existing issues** and discussions
34
+ 2. **Open an issue** for significant changes to discuss approach
35
+ 3. **Review architectural documentation**:
36
+ - `ArchitectureConsiderations.md` - Overall system design
37
+ - `ArchitecturalFeatureBuilder.md` - Implementation guidelines
38
+ - `.architecture/principles.md` - Core architectural principles
39
+
40
+ ### Architectural Guidelines
41
+
42
+ **Before implementing any feature**:
43
+
44
+ 1. **Review Architecture**: Consult architectural documentation
45
+ 2. **System Layer Identification**: Determine which layer(s) your feature affects:
46
+ - Foundation Layer (core abstractions, registries)
47
+ - Runtime Layer (task execution, orchestration)
48
+ - Verification Layer (quality assurance, validation)
49
+ - Extension System (plugins, domain adapters)
50
+ 3. **Interface Design**: Define clear interfaces following established patterns
51
+ 4. **Implementation Checklist**: Use the checklist in `ArchitecturalFeatureBuilder.md`
52
+
53
+ ### Code Workflow
54
+
55
+ 1. **Create a feature branch** from main:
56
+ ```bash
57
+ git checkout -b feature/your-feature-name
58
+ ```
59
+
60
+ 2. **Write tests first** (TDD approach encouraged):
61
+ ```bash
62
+ bundle exec rspec spec/path/to/new_feature_spec.rb
63
+ ```
64
+
65
+ 3. **Implement your feature** following our patterns:
66
+ - Use dependency injection
67
+ - Follow the Observable pattern for state changes
68
+ - Implement proper error handling with detailed context
69
+ - Add comprehensive logging
70
+
71
+ 4. **Run the full test suite**:
72
+ ```bash
73
+ bundle exec rake
74
+ ```
75
+
76
+ 5. **Check code style**:
77
+ ```bash
78
+ bundle exec rake standard
79
+ # Auto-fix style issues:
80
+ standardrb --fix
81
+ ```
82
+
83
+ 6. **Update documentation** as needed
84
+
85
+ ## Testing Guidelines
86
+
87
+ ### Test Structure
88
+
89
+ - **Unit Tests**: Test individual classes and methods
90
+ - **Integration Tests**: Test component interactions
91
+ - **Feature Tests**: Test end-to-end workflows
92
+
93
+ ### VCR Cassettes
94
+
95
+ The project uses VCR to record HTTP interactions. When adding new API calls:
96
+
97
+ 1. **Record cassettes** during initial test runs
98
+ 2. **Commit cassettes** with your changes
99
+ 3. **Use descriptive cassette names** that relate to the test scenario
100
+
101
+ ### Test Examples
102
+
103
+ ```ruby
104
+ # spec/agentic/your_feature_spec.rb
105
+ require 'spec_helper'
106
+
107
+ RSpec.describe Agentic::YourFeature do
108
+ describe '#method_name' do
109
+ it 'does something useful' do
110
+ # Arrange
111
+ feature = described_class.new
112
+
113
+ # Act
114
+ result = feature.method_name
115
+
116
+ # Assert
117
+ expect(result).to be_successful
118
+ end
119
+ end
120
+ end
121
+ ```
122
+
123
+ ## Making Changes
124
+
125
+ ### Types of Changes
126
+
127
+ - **Bug Fix**: Fix incorrect behavior
128
+ - **Enhancement**: Improve existing functionality
129
+ - **New Feature**: Add new capability
130
+ - **Breaking Change**: Modify public API (requires special care)
131
+
132
+ ### For New Features
133
+
134
+ 1. **Create an ADR** (Architectural Decision Record) for significant features:
135
+ ```bash
136
+ cp .architecture/templates/adr.md .architecture/decisions/adrs/ADR-XXX-your-feature.md
137
+ ```
138
+
139
+ 2. **Follow the feature implementation process** from `ArchitecturalFeatureBuilder.md`
140
+
141
+ 3. **Add comprehensive tests** including edge cases
142
+
143
+ 4. **Update documentation** including README if needed
144
+
145
+ ### For Breaking Changes
146
+
147
+ 1. **Discuss in an issue first** - breaking changes require community input
148
+ 2. **Follow semantic versioning** - breaking changes increment major version
149
+ 3. **Provide migration guide** in CHANGELOG.md
150
+ 4. **Deprecate before removing** when possible
151
+
152
+ ## Pull Request Process
153
+
154
+ ### Before Submitting
155
+
156
+ - [ ] All tests pass: `bundle exec rake`
157
+ - [ ] Code follows style guide: `bundle exec rake standard`
158
+ - [ ] Documentation is updated
159
+ - [ ] CHANGELOG.md is updated (for user-facing changes)
160
+ - [ ] Commit messages follow conventional format
161
+
162
+ ### PR Description Template
163
+
164
+ ```markdown
165
+ ## Summary
166
+ Brief description of changes
167
+
168
+ ## Type of Change
169
+ - [ ] Bug fix
170
+ - [ ] Enhancement
171
+ - [ ] New feature
172
+ - [ ] Breaking change
173
+ - [ ] Documentation update
174
+
175
+ ## Testing
176
+ - [ ] Unit tests added/updated
177
+ - [ ] Integration tests added/updated
178
+ - [ ] All tests pass locally
179
+
180
+ ## Documentation
181
+ - [ ] Code comments updated
182
+ - [ ] README updated (if needed)
183
+ - [ ] CHANGELOG updated (if needed)
184
+ - [ ] ADR created (for significant changes)
185
+
186
+ ## Additional Notes
187
+ Any additional context or considerations
188
+ ```
189
+
190
+ ### Review Process
191
+
192
+ 1. **Automated checks** must pass (CI, linting, tests)
193
+ 2. **Code review** by maintainers
194
+ 3. **Architectural review** for significant changes
195
+ 4. **Documentation review** for user-facing changes
196
+
197
+ ## Release Process
198
+
199
+ ### Version Strategy
200
+
201
+ - **Patch** (0.0.X): Bug fixes, documentation
202
+ - **Minor** (0.X.0): New features, non-breaking enhancements
203
+ - **Major** (X.0.0): Breaking changes
204
+
205
+ ### Release Steps
206
+
207
+ 1. Update `lib/agentic/version.rb`
208
+ 2. Update `CHANGELOG.md`
209
+ 3. Create release PR
210
+ 4. Tag and release via `bundle exec rake release`
211
+
212
+ ## Community Guidelines
213
+
214
+ ### Communication
215
+
216
+ - **Be respectful** and inclusive
217
+ - **Ask questions** when you're unsure
218
+ - **Share knowledge** and help others
219
+ - **Give constructive feedback** in reviews
220
+
221
+ ### Getting Help
222
+
223
+ - **GitHub Issues**: Bug reports and feature requests
224
+ - **GitHub Discussions**: Questions and general discussion
225
+ - **Code Comments**: Implementation-specific questions
226
+
227
+ ## Advanced Topics
228
+
229
+ ### Extension Development
230
+
231
+ If you're developing plugins or extensions:
232
+
233
+ 1. **Review extension patterns** in `lib/agentic/extension/`
234
+ 2. **Follow plugin interfaces** defined in extension system
235
+ 3. **Add comprehensive tests** for extension points
236
+ 4. **Document extension API** changes
237
+
238
+ ### Performance Considerations
239
+
240
+ - **Profile before optimizing** using Ruby profiling tools
241
+ - **Consider LLM API costs** in design decisions
242
+ - **Test performance impact** of changes
243
+ - **Use caching appropriately** following established patterns
244
+
245
+ ### Security Considerations
246
+
247
+ - **Review security implications** of changes
248
+ - **Follow secure coding practices**
249
+ - **Consider content filtering** for user inputs
250
+ - **Implement appropriate permissions** for new capabilities
251
+
252
+ ## Development Tools
253
+
254
+ ### Useful Commands
255
+
256
+ ```bash
257
+ # Run specific tests
258
+ bundle exec rspec spec/path/to/file_spec.rb
259
+
260
+ # Run tests with coverage
261
+ COVERAGE=true bundle exec rspec
262
+
263
+ # Generate documentation
264
+ bundle exec yard doc
265
+
266
+ # Interactive console with gem loaded
267
+ bundle exec rake console
268
+ ```
269
+
270
+ ### IDE Setup
271
+
272
+ The project includes configuration for:
273
+ - **VS Code**: `.vscode/` directory with recommended extensions
274
+ - **RuboCop**: For linting integration
275
+ - **YARD**: For documentation generation
276
+
277
+ ## Questions?
278
+
279
+ If you have questions not covered in this guide:
280
+
281
+ 1. **Check existing documentation** in the repository
282
+ 2. **Search GitHub issues** for similar questions
283
+ 3. **Open a GitHub Discussion** for general questions
284
+ 4. **Open a GitHub Issue** for specific bugs or feature requests
285
+
286
+ Thank you for contributing to Agentic! 🚀