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.
- checksums.yaml +4 -4
- data/.agentic.yml +2 -0
- data/.architecture/decisions/ArchitecturalFeatureBuilder.md +136 -0
- data/.architecture/decisions/ArchitectureConsiderations.md +200 -0
- data/.architecture/decisions/adr_001_observer_pattern_implementation.md +196 -0
- data/.architecture/decisions/adr_002_plan_orchestrator.md +320 -0
- data/.architecture/decisions/adr_003_plan_orchestrator_interface.md +179 -0
- data/.architecture/decisions/adrs/ADR-001-dependency-management.md +147 -0
- data/.architecture/decisions/adrs/ADR-002-system-boundaries.md +162 -0
- data/.architecture/decisions/adrs/ADR-003-content-safety.md +158 -0
- data/.architecture/decisions/adrs/ADR-004-agent-permissions.md +161 -0
- data/.architecture/decisions/adrs/ADR-005-adaptation-engine.md +127 -0
- data/.architecture/decisions/adrs/ADR-006-extension-system.md +273 -0
- data/.architecture/decisions/adrs/ADR-007-learning-system.md +156 -0
- data/.architecture/decisions/adrs/ADR-008-prompt-generation.md +325 -0
- data/.architecture/decisions/adrs/ADR-009-task-failure-handling.md +353 -0
- data/.architecture/decisions/adrs/ADR-010-task-input-handling.md +251 -0
- data/.architecture/decisions/adrs/ADR-011-task-observable-pattern.md +391 -0
- data/.architecture/decisions/adrs/ADR-012-task-output-handling.md +205 -0
- data/.architecture/decisions/adrs/ADR-013-architecture-alignment.md +211 -0
- data/.architecture/decisions/adrs/ADR-014-agent-capability-registry.md +80 -0
- data/.architecture/decisions/adrs/ADR-015-persistent-agent-store.md +100 -0
- data/.architecture/decisions/adrs/ADR-016-agent-assembly-engine.md +117 -0
- data/.architecture/decisions/adrs/ADR-017-streaming-observability.md +171 -0
- data/.architecture/decisions/capability_tools_distinction.md +150 -0
- data/.architecture/decisions/cli_command_structure.md +61 -0
- data/.architecture/implementation/agent_self_assembly_implementation.md +267 -0
- data/.architecture/implementation/agent_self_assembly_summary.md +138 -0
- data/.architecture/members.yml +187 -0
- data/.architecture/planning/self_implementation_exercise.md +295 -0
- data/.architecture/planning/session_compaction_rule.md +43 -0
- data/.architecture/planning/streaming_observability_feature.md +223 -0
- data/.architecture/principles.md +151 -0
- data/.architecture/recalibration/0-2-0.md +92 -0
- data/.architecture/recalibration/agent_self_assembly.md +238 -0
- data/.architecture/recalibration/cli_command_structure.md +91 -0
- data/.architecture/recalibration/implementation_roadmap_0-2-0.md +301 -0
- data/.architecture/recalibration/progress_tracking_0-2-0.md +114 -0
- data/.architecture/recalibration_process.md +127 -0
- data/.architecture/reviews/0-2-0.md +181 -0
- data/.architecture/reviews/cli_command_duplication.md +98 -0
- data/.architecture/templates/adr.md +105 -0
- data/.architecture/templates/implementation_roadmap.md +125 -0
- data/.architecture/templates/progress_tracking.md +89 -0
- data/.architecture/templates/recalibration_plan.md +70 -0
- data/.architecture/templates/version_comparison.md +124 -0
- data/.claude/settings.local.json +13 -0
- data/.claude-sessions/001-task-class-architecture-implementation.md +129 -0
- data/.claude-sessions/002-plan-orchestrator-interface-review.md +105 -0
- data/.claude-sessions/architecture-governance-implementation.md +37 -0
- data/.claude-sessions/architecture-review-session.md +27 -0
- data/ArchitecturalFeatureBuilder.md +136 -0
- data/ArchitectureConsiderations.md +229 -0
- data/CHANGELOG.md +57 -2
- data/CLAUDE.md +111 -0
- data/CONTRIBUTING.md +286 -0
- data/MAINTAINING.md +301 -0
- data/README.md +582 -28
- data/docs/agent_capabilities_api.md +259 -0
- data/docs/artifact_extension_points.md +757 -0
- data/docs/artifact_generation_architecture.md +323 -0
- data/docs/artifact_implementation_plan.md +596 -0
- data/docs/artifact_integration_points.md +345 -0
- data/docs/artifact_verification_strategies.md +581 -0
- data/docs/streaming_observability_architecture.md +510 -0
- data/exe/agentic +6 -1
- data/lefthook.yml +5 -0
- data/lib/agentic/adaptation_engine.rb +124 -0
- data/lib/agentic/agent.rb +181 -4
- data/lib/agentic/agent_assembly_engine.rb +442 -0
- data/lib/agentic/agent_capability_registry.rb +260 -0
- data/lib/agentic/agent_config.rb +63 -0
- data/lib/agentic/agent_specification.rb +46 -0
- data/lib/agentic/capabilities/examples.rb +530 -0
- data/lib/agentic/capabilities.rb +14 -0
- data/lib/agentic/capability_provider.rb +146 -0
- data/lib/agentic/capability_specification.rb +118 -0
- data/lib/agentic/cli/agent.rb +31 -0
- data/lib/agentic/cli/capabilities.rb +191 -0
- data/lib/agentic/cli/config.rb +134 -0
- data/lib/agentic/cli/execution_observer.rb +796 -0
- data/lib/agentic/cli.rb +1068 -0
- data/lib/agentic/default_agent_provider.rb +35 -0
- data/lib/agentic/errors/llm_error.rb +184 -0
- data/lib/agentic/execution_plan.rb +53 -0
- data/lib/agentic/execution_result.rb +91 -0
- data/lib/agentic/expected_answer_format.rb +46 -0
- data/lib/agentic/extension/domain_adapter.rb +109 -0
- data/lib/agentic/extension/plugin_manager.rb +163 -0
- data/lib/agentic/extension/protocol_handler.rb +116 -0
- data/lib/agentic/extension.rb +45 -0
- data/lib/agentic/factory_methods.rb +9 -1
- data/lib/agentic/generation_stats.rb +61 -0
- data/lib/agentic/learning/README.md +84 -0
- data/lib/agentic/learning/capability_optimizer.rb +613 -0
- data/lib/agentic/learning/execution_history_store.rb +251 -0
- data/lib/agentic/learning/pattern_recognizer.rb +500 -0
- data/lib/agentic/learning/strategy_optimizer.rb +706 -0
- data/lib/agentic/learning.rb +131 -0
- data/lib/agentic/llm_assisted_composition_strategy.rb +188 -0
- data/lib/agentic/llm_client.rb +215 -15
- data/lib/agentic/llm_config.rb +65 -1
- data/lib/agentic/llm_response.rb +163 -0
- data/lib/agentic/logger.rb +1 -1
- data/lib/agentic/observable.rb +51 -0
- data/lib/agentic/persistent_agent_store.rb +385 -0
- data/lib/agentic/plan_execution_result.rb +129 -0
- data/lib/agentic/plan_orchestrator.rb +464 -0
- data/lib/agentic/plan_orchestrator_config.rb +57 -0
- data/lib/agentic/retry_config.rb +63 -0
- data/lib/agentic/retry_handler.rb +125 -0
- data/lib/agentic/structured_outputs.rb +1 -1
- data/lib/agentic/task.rb +193 -0
- data/lib/agentic/task_definition.rb +39 -0
- data/lib/agentic/task_execution_result.rb +92 -0
- data/lib/agentic/task_failure.rb +66 -0
- data/lib/agentic/task_output_schemas.rb +112 -0
- data/lib/agentic/task_planner.rb +54 -19
- data/lib/agentic/task_result.rb +48 -0
- data/lib/agentic/ui.rb +244 -0
- data/lib/agentic/verification/critic_framework.rb +116 -0
- data/lib/agentic/verification/llm_verification_strategy.rb +60 -0
- data/lib/agentic/verification/schema_verification_strategy.rb +47 -0
- data/lib/agentic/verification/verification_hub.rb +62 -0
- data/lib/agentic/verification/verification_result.rb +50 -0
- data/lib/agentic/verification/verification_strategy.rb +26 -0
- data/lib/agentic/version.rb +1 -1
- data/lib/agentic.rb +74 -2
- data/plugins/README.md +41 -0
- metadata +245 -6
@@ -0,0 +1,124 @@
|
|
1
|
+
# Architectural Comparison: Version X.Y.Z to A.B.C
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
|
5
|
+
This document provides a comprehensive comparison of the architectural changes between version X.Y.Z and version A.B.C of the Agentic gem. It highlights key changes, their impact, and provides guidance for adapting existing implementations.
|
6
|
+
|
7
|
+
## Summary of Changes
|
8
|
+
|
9
|
+
### Major Architectural Changes
|
10
|
+
|
11
|
+
* [Change 1: Brief description of a significant architectural change]
|
12
|
+
* [Change 2: ...]
|
13
|
+
* [...]
|
14
|
+
|
15
|
+
### New Components
|
16
|
+
|
17
|
+
| Component | Purpose | Key Features | Related ADRs |
|
18
|
+
|-----------|---------|--------------|-------------|
|
19
|
+
| [Component Name] | [Brief description] | [List key features] | [ADR-XXX] |
|
20
|
+
|
21
|
+
### Modified Components
|
22
|
+
|
23
|
+
| Component | Type of Change | Before | After | Rationale |
|
24
|
+
|-----------|----------------|--------|-------|-----------|
|
25
|
+
| [Component Name] | [Interface/Implementation/Behavior] | [Previous state] | [New state] | [Why changed] |
|
26
|
+
|
27
|
+
### Removed Components
|
28
|
+
|
29
|
+
| Component | Replacement (if any) | Migration Path | Rationale |
|
30
|
+
|-----------|----------------------|----------------|-----------|
|
31
|
+
| [Component Name] | [Replacement component] | [How to migrate] | [Why removed] |
|
32
|
+
|
33
|
+
## Architectural Diagrams
|
34
|
+
|
35
|
+
### Before (Version X.Y.Z)
|
36
|
+
|
37
|
+
[Include before diagram or link to it]
|
38
|
+
|
39
|
+
### After (Version A.B.C)
|
40
|
+
|
41
|
+
[Include after diagram or link to it]
|
42
|
+
|
43
|
+
## Impact Analysis
|
44
|
+
|
45
|
+
### Developer Experience
|
46
|
+
|
47
|
+
* [Impact 1: How the changes affect developers using the gem]
|
48
|
+
* [Impact 2: ...]
|
49
|
+
* [...]
|
50
|
+
|
51
|
+
**Migration Effort:** [Low/Medium/High]
|
52
|
+
|
53
|
+
### Performance Characteristics
|
54
|
+
|
55
|
+
| Aspect | Before | After | Change Impact |
|
56
|
+
|--------|--------|-------|---------------|
|
57
|
+
| [Performance metric] | [Previous value] | [New value] | [Better/Worse/Neutral] |
|
58
|
+
|
59
|
+
### Security Posture
|
60
|
+
|
61
|
+
| Aspect | Before | After | Change Impact |
|
62
|
+
|--------|--------|-------|---------------|
|
63
|
+
| [Security aspect] | [Previous state] | [New state] | [Better/Worse/Neutral] |
|
64
|
+
|
65
|
+
### Maintainability Metrics
|
66
|
+
|
67
|
+
| Metric | Before | After | Change Impact |
|
68
|
+
|--------|--------|-------|---------------|
|
69
|
+
| [Maintainability metric] | [Previous value] | [New value] | [Better/Worse/Neutral] |
|
70
|
+
|
71
|
+
### Observability Capabilities
|
72
|
+
|
73
|
+
| Capability | Before | After | Change Impact |
|
74
|
+
|------------|--------|-------|---------------|
|
75
|
+
| [Observability feature] | [Previous state] | [New state] | [Better/Worse/Neutral] |
|
76
|
+
|
77
|
+
## Implementation Details
|
78
|
+
|
79
|
+
### Review Recommendations Addressed
|
80
|
+
|
81
|
+
| Review ID | Recommendation | Implementation Approach | Deviation (if any) |
|
82
|
+
|-----------|----------------|-------------------------|--------------------|
|
83
|
+
| [ID from review] | [Original recommendation] | [How it was implemented] | [How implementation differed from recommendation] |
|
84
|
+
|
85
|
+
### Review Recommendations Deferred
|
86
|
+
|
87
|
+
| Review ID | Recommendation | Rationale for Deferral | Planned Version |
|
88
|
+
|-----------|----------------|------------------------|-----------------|
|
89
|
+
| [ID from review] | [Original recommendation] | [Why deferred] | [Future version] |
|
90
|
+
|
91
|
+
## Migration Guide
|
92
|
+
|
93
|
+
### Breaking Changes
|
94
|
+
|
95
|
+
* [Breaking change 1: Description and mitigation]
|
96
|
+
* [Breaking change 2: ...]
|
97
|
+
* [...]
|
98
|
+
|
99
|
+
### Upgrade Steps
|
100
|
+
|
101
|
+
1. [Step 1: What to do first when upgrading]
|
102
|
+
2. [Step 2: ...]
|
103
|
+
3. [...]
|
104
|
+
|
105
|
+
### Code Examples
|
106
|
+
|
107
|
+
#### Before (Version X.Y.Z)
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
# Example code showing usage in previous version
|
111
|
+
```
|
112
|
+
|
113
|
+
#### After (Version A.B.C)
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
# Example code showing equivalent usage in new version
|
117
|
+
```
|
118
|
+
|
119
|
+
## References
|
120
|
+
|
121
|
+
* [Architectural Review for X.Y.Z](link-to-review)
|
122
|
+
* [Recalibration Plan](link-to-plan)
|
123
|
+
* [ADR-XXX: Title](link-to-adr)
|
124
|
+
* [ADR-YYY: Title](link-to-adr)
|
@@ -0,0 +1,129 @@
|
|
1
|
+
# Agentic Framework Session Summary - May 19, 2024
|
2
|
+
|
3
|
+
## Primary Request and Intent
|
4
|
+
The user requested to design and implement a Task class for the Agentic framework, a Ruby gem for building and running AI agents in a plan-and-execute fashion. The primary intent was to create a robust architecture for the Task component that follows good design principles with careful consideration of task execution, error handling, and inter-component communication.
|
5
|
+
|
6
|
+
## Key Technical Concepts
|
7
|
+
- Plan-and-execute AI agent framework in Ruby
|
8
|
+
- Task class as core execution unit
|
9
|
+
- Result-oriented failure handling
|
10
|
+
- Observable pattern for state change notification
|
11
|
+
- Dependency management and minimization
|
12
|
+
- Architectural Decision Records (ADRs)
|
13
|
+
- Task input/output handling
|
14
|
+
- Prompt generation
|
15
|
+
- Integration testing for components
|
16
|
+
- Thread-safety in Observable implementation
|
17
|
+
|
18
|
+
## Files and Code Sections
|
19
|
+
- `/Users/valentinostoll/src/agentic/CLAUDE.md`
|
20
|
+
- Updated with development approach guidelines and architectural evolution principles
|
21
|
+
- Added guidelines for maintaining architecture documentation and implementation strategy
|
22
|
+
|
23
|
+
- `/Users/valentinostoll/src/agentic/ArchitectureConsiderations.md`
|
24
|
+
- Core architectural vision and system layers
|
25
|
+
- Updated Runtime Layer components to include TaskResult and TaskFailure
|
26
|
+
- Added Observable pattern and result-oriented failure handling principles
|
27
|
+
- Updated "Next Steps" section to reflect completed work
|
28
|
+
|
29
|
+
- `/Users/valentinostoll/src/agentic/ArchitecturalFeatureBuilder.md`
|
30
|
+
- Consolidates architectural design approach
|
31
|
+
- Provides guidelines for feature implementation
|
32
|
+
|
33
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/` (Created directory)
|
34
|
+
- Contains specialized architecture documents
|
35
|
+
|
36
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/task_output_handling.md`
|
37
|
+
- Details standardized output structure and usage patterns
|
38
|
+
- Defines component responsibilities for output handling
|
39
|
+
|
40
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/task_input_handling.md`
|
41
|
+
- Defines input structure and sources
|
42
|
+
- Outlines input processing patterns and validation
|
43
|
+
|
44
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/prompt_generation.md`
|
45
|
+
- Specifies prompt structure and generation components
|
46
|
+
- Defines template management and optimization
|
47
|
+
|
48
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/task_failure_handling.md`
|
49
|
+
- Documents result-oriented failure handling approach
|
50
|
+
- Provides TaskResult and TaskFailure class designs
|
51
|
+
- Explains failure recovery strategies
|
52
|
+
|
53
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/task_observable_pattern.md`
|
54
|
+
- Details Observable pattern implementation
|
55
|
+
- Explains integration with system components
|
56
|
+
- Covers thread safety and error handling
|
57
|
+
|
58
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/self_implementation_exercise.md`
|
59
|
+
- Meta example of using Agentic to implement itself
|
60
|
+
- Demonstrates full workflow of the system
|
61
|
+
|
62
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/architecture_alignment.md`
|
63
|
+
- Analyzes consistency across architectural documents
|
64
|
+
- Recommends standardization of terminology and interfaces
|
65
|
+
|
66
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/adr_001_observer_pattern_implementation.md`
|
67
|
+
- Formal decision record for implementing custom Observable
|
68
|
+
- Evaluates options and documents rationale
|
69
|
+
|
70
|
+
- `/Users/valentinostoll/src/agentic/lib/agentic/task_result.rb`
|
71
|
+
- Implements TaskResult class to encapsulate execution outcomes
|
72
|
+
```ruby
|
73
|
+
class TaskResult
|
74
|
+
attr_reader :task_id, :success, :output, :failure
|
75
|
+
|
76
|
+
def initialize(task_id:, success:, output: nil, failure: nil)
|
77
|
+
@task_id = task_id
|
78
|
+
@success = success
|
79
|
+
@output = output
|
80
|
+
@failure = failure
|
81
|
+
end
|
82
|
+
|
83
|
+
# Methods for checking success/failure and serialization
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
87
|
+
- `/Users/valentinostoll/src/agentic/lib/agentic/task_failure.rb`
|
88
|
+
- Implements TaskFailure to capture execution failures
|
89
|
+
```ruby
|
90
|
+
class TaskFailure
|
91
|
+
attr_reader :message, :type, :timestamp, :context
|
92
|
+
|
93
|
+
def initialize(message:, type:, context: {})
|
94
|
+
@message = message
|
95
|
+
@type = type
|
96
|
+
@timestamp = Time.now
|
97
|
+
@context = context
|
98
|
+
end
|
99
|
+
|
100
|
+
# Methods for serialization and creation from exceptions
|
101
|
+
end
|
102
|
+
```
|
103
|
+
|
104
|
+
- `/Users/valentinostoll/src/agentic/lib/agentic/observable.rb`
|
105
|
+
- Custom implementation of Observable pattern
|
106
|
+
```ruby
|
107
|
+
module Observable
|
108
|
+
def add_observer(observer)
|
109
|
+
@_observers ||= []
|
110
|
+
@_observers << observer unless @_observers.include?(observer)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Methods for observer management and notification
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
- `/Users/valentinostoll/src/agentic/lib/agentic/task.rb`
|
118
|
+
- Core Task class implementation
|
119
|
+
- Uses Observable pattern
|
120
|
+
- Implements result-oriented failure handling
|
121
|
+
|
122
|
+
- Unit and integration tests for all implemented components
|
123
|
+
|
124
|
+
## Pending Tasks
|
125
|
+
- Update ArchitecturalFeatureBuilder.md with lessons from implementation:
|
126
|
+
- Dependency minimization principle
|
127
|
+
- Result-oriented error handling
|
128
|
+
- Observable state transitions
|
129
|
+
- Creating Architectural Decision Records
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# Agentic Framework Session Summary - May 20, 2024
|
2
|
+
|
3
|
+
## Primary Request and Intent
|
4
|
+
The user requested a critical review of changes made to the `PlanOrchestrator` class from the perspective of a software architect. The changes involved making three previously private methods public to facilitate testing without using `send(:method_name)`. After providing this review, the user asked to document these architectural observations in an Architecture Decision Record (ADR). The intent was to critically evaluate the design choices, document the decision rationale, and provide recommendations for future improvements.
|
5
|
+
|
6
|
+
## Key Technical Concepts
|
7
|
+
- Ruby method visibility (public vs private)
|
8
|
+
- Encapsulation principles in object-oriented design
|
9
|
+
- Testing anti-patterns (using `send(:method_name)` to test private methods)
|
10
|
+
- Architecture Decision Records (ADRs) as a documentation practice
|
11
|
+
- Separation of concerns and component-based design
|
12
|
+
- Command/Query Separation principle
|
13
|
+
- Task orchestration and dependency management
|
14
|
+
- Test coupling to implementation details
|
15
|
+
- Async Ruby for concurrent task execution
|
16
|
+
- Balancing pragmatic solutions vs architectural ideals
|
17
|
+
|
18
|
+
## Files and Code Sections
|
19
|
+
- `/Users/valentinostoll/src/agentic/lib/agentic/plan_orchestrator.rb`
|
20
|
+
- This is the core implementation file that was changed, where three methods were moved from private to public
|
21
|
+
- The key methods that were made public:
|
22
|
+
```ruby
|
23
|
+
# Checks if all dependencies for a task are met
|
24
|
+
# @param task_id [String] ID of the task to check
|
25
|
+
# @return [Boolean] True if all dependencies are met, false otherwise
|
26
|
+
def all_dependencies_met?(task_id)
|
27
|
+
deps = @dependencies[task_id] || []
|
28
|
+
deps.all? do |dep_id|
|
29
|
+
@execution_state[:completed].include?(dep_id)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# Finds tasks that are eligible for execution (have no dependencies)
|
34
|
+
# @return [Array<String>] IDs of eligible tasks
|
35
|
+
def find_eligible_tasks
|
36
|
+
@dependencies.select do |task_id, deps|
|
37
|
+
deps.empty? && @execution_state[:pending].include?(task_id)
|
38
|
+
end.keys
|
39
|
+
end
|
40
|
+
|
41
|
+
# Determines the overall status of the plan
|
42
|
+
# @return [Symbol] The overall status (:completed, :in_progress, or :partial_failure)
|
43
|
+
def overall_status
|
44
|
+
if @execution_state[:failed].any?
|
45
|
+
:partial_failure
|
46
|
+
elsif @execution_state[:pending].empty? && @execution_state[:in_progress].empty?
|
47
|
+
:completed
|
48
|
+
else
|
49
|
+
:in_progress
|
50
|
+
end
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
- `/Users/valentinostoll/src/agentic/.architecture-review/adr_003_plan_orchestrator_interface.md`
|
55
|
+
- New ADR created to document the interface design decision
|
56
|
+
- Captures the context, options considered, decision, and consequences
|
57
|
+
- Details four alternatives that were considered:
|
58
|
+
1. Making the methods public (implemented solution)
|
59
|
+
2. Creating test-specific interfaces or subclasses
|
60
|
+
3. Refactoring to introduce proper abstractions (recommended long-term solution)
|
61
|
+
4. Using alternative testing approaches focused on observable behavior
|
62
|
+
- Acknowledges architectural debt while providing pragmatic solution
|
63
|
+
- Recommends future work to extract proper component abstractions
|
64
|
+
|
65
|
+
## Problem Solving
|
66
|
+
The primary problem addressed was the tension between proper encapsulation and effective testing in the `PlanOrchestrator` class. The immediate solution was making three private methods public to avoid using the `send(:method_name)` testing anti-pattern. However, this approach creates architectural debt by exposing implementation details that should ideally remain encapsulated.
|
67
|
+
|
68
|
+
The architectural review identified several concerns with the approach:
|
69
|
+
1. Boundary clarity issues (implementation details exposed in public API)
|
70
|
+
2. Test-driven design tension (tests accessing implementation details)
|
71
|
+
3. Missing abstraction layer (need for proper component separation)
|
72
|
+
4. Command/query separation violation
|
73
|
+
5. Test coupling to implementation details
|
74
|
+
|
75
|
+
While the implemented approach solved the immediate problem, the ADR acknowledged that introducing proper abstractions would be the better long-term solution. The document outlined specific future work recommendations, including extracting dependency resolution, plan status management, and execution state management into dedicated components.
|
76
|
+
|
77
|
+
## Architectural Observations
|
78
|
+
1. The current `PlanOrchestrator` has multiple responsibilities that could be better separated:
|
79
|
+
- Task dependency resolution
|
80
|
+
- Execution state management
|
81
|
+
- Status reporting
|
82
|
+
- Task execution coordination
|
83
|
+
|
84
|
+
2. A component-based approach would improve separation of concerns:
|
85
|
+
- DependencyResolver - Manages task dependencies and eligibility
|
86
|
+
- ExecutionStateManager - Tracks task states and transitions
|
87
|
+
- StatusReporter - Provides plan status information
|
88
|
+
- TaskExecutor - Handles the actual execution of tasks
|
89
|
+
|
90
|
+
3. Testing should focus on observable behavior rather than implementation details:
|
91
|
+
- Verify task execution order respects dependencies
|
92
|
+
- Confirm correct plan status reporting for different scenarios
|
93
|
+
- Test proper handling of task failures and retries
|
94
|
+
- Validate concurrent execution behavior
|
95
|
+
|
96
|
+
## Key Principles Reinforced
|
97
|
+
1. Minimal public interfaces - Only expose what clients truly need
|
98
|
+
2. Tell, Don't Ask - Prefer command-based interfaces over query-based
|
99
|
+
3. Law of Demeter - Limit knowledge of object internals
|
100
|
+
4. Single Responsibility Principle - Classes should have only one reason to change
|
101
|
+
5. Proper encapsulation - Hide implementation details
|
102
|
+
6. Component-based design - Use composition over inheritance
|
103
|
+
|
104
|
+
## Outcome
|
105
|
+
The ADR document was created and saved, balancing the pragmatic short-term solution with proper architectural guidance for future improvements. The document follows the established ADR format in the codebase and provides a clear path toward better long-term architectural solutions.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Architecture Governance Implementation
|
2
|
+
|
3
|
+
## Session Summary
|
4
|
+
|
5
|
+
The session focused on implementing architectural governance practices for the Agentic Ruby gem, including:
|
6
|
+
|
7
|
+
1. **Architectural Review System**:
|
8
|
+
- Architecture review for version 0.2.0 with multi-perspective analysis
|
9
|
+
- Team of specialized architecture members evaluating different aspects
|
10
|
+
- Collaborative findings and prioritized improvement suggestions
|
11
|
+
|
12
|
+
2. **AI Engineer Role**:
|
13
|
+
- Added specialized role focused on AI/ML product development
|
14
|
+
- Expanded capabilities to include evaluations, metrics, observability, and agent orchestration
|
15
|
+
- Provided unique user-centered perspective on the architecture
|
16
|
+
|
17
|
+
3. **Post-Review Recalibration Process**:
|
18
|
+
- 5-phase process to translate findings into action
|
19
|
+
- Standardized templates for documentation
|
20
|
+
- Sample recalibration plan based on 0.2.0 review
|
21
|
+
- CLAUDE.md updates for process documentation
|
22
|
+
|
23
|
+
## Key Files Modified
|
24
|
+
|
25
|
+
- `.architecture/members.yml`: Added AI Engineer role with specialized capabilities
|
26
|
+
- `.architecture/reviews/0-2-0.md`: Comprehensive architectural review
|
27
|
+
- `.architecture/recalibration_process.md`: Detailed 5-phase process
|
28
|
+
- `.architecture/templates/`: Standardized documentation templates
|
29
|
+
- `.architecture/recalibration/0-2-0.md`: Sample implementation plan
|
30
|
+
- `CLAUDE.md`: Updated with recalibration process information
|
31
|
+
|
32
|
+
## Next Steps
|
33
|
+
|
34
|
+
All requested implementations have been completed. Potential next steps include:
|
35
|
+
- Assigning owners to action items in the recalibration plan
|
36
|
+
- Drafting ADRs for high-priority architectural changes
|
37
|
+
- Creating implementation roadmap for the next version
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Architecture Review Practice Implementation
|
2
|
+
|
3
|
+
This session documented the implementation of a new architectural design review practice for the Agentic gem, including:
|
4
|
+
|
5
|
+
1. Directory Structure:
|
6
|
+
- Created `.architecture` with `decisions` and `reviews` subdirectories
|
7
|
+
- Moved existing architectural files to `.architecture/decisions`
|
8
|
+
|
9
|
+
2. Review File Format:
|
10
|
+
- Version-based naming (e.g., `0-2-0.md`)
|
11
|
+
- Template includes sections for team member reviews and collaborative analysis
|
12
|
+
|
13
|
+
3. Architecture Members System:
|
14
|
+
- Defined 5 specialized roles in `.architecture/members.yml`
|
15
|
+
- Members include Systems Architect, Domain Expert, Security Specialist, Maintainability Expert, and Performance Specialist
|
16
|
+
- Each member has defined specialties and domains of expertise
|
17
|
+
|
18
|
+
4. Review Process:
|
19
|
+
- Three phases: individual member reviews, collaborative discussion, final consolidated report
|
20
|
+
- Process initiated with "Start architecture review" command
|
21
|
+
- Results in comprehensive analysis across multiple architectural perspectives
|
22
|
+
|
23
|
+
5. Documentation:
|
24
|
+
- Updated CLAUDE.md with the architecture review process details
|
25
|
+
- Created templates for review documents
|
26
|
+
|
27
|
+
This implementation establishes a structured approach to architecture reviews that leverages multiple specialized perspectives for thorough analysis.
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# Architectural Feature Builder Guide
|
2
|
+
|
3
|
+
This document consolidates the architectural design approach for the Agentic framework, providing a streamlined guide for feature implementation.
|
4
|
+
|
5
|
+
## Architectural Philosophy
|
6
|
+
|
7
|
+
Agentic is designed as a domain-agnostic, self-improving framework for AI agent orchestration following these principles:
|
8
|
+
- Extensibility through well-defined interfaces
|
9
|
+
- Progressive automation with human oversight
|
10
|
+
- Learning capability through execution history
|
11
|
+
- Separation of concerns with clearly defined responsibilities
|
12
|
+
|
13
|
+
## Feature Implementation Process
|
14
|
+
|
15
|
+
### 1. Design Phase
|
16
|
+
|
17
|
+
When designing a new feature:
|
18
|
+
|
19
|
+
1. **Reference Architecture**: Consult ArchitectureConsiderations.md for overall system design
|
20
|
+
2. **Component Placement**: Identify which layer(s) the feature belongs to
|
21
|
+
3. **Interface Definition**: Define clear interfaces before implementation
|
22
|
+
4. **Dependency Management**: Minimize dependencies between components
|
23
|
+
5. **Extension Points**: Identify where the feature should support extension
|
24
|
+
|
25
|
+
### 2. Implementation Phase
|
26
|
+
|
27
|
+
When implementing a feature:
|
28
|
+
|
29
|
+
1. **Class Structure**:
|
30
|
+
- Define attributes with clear visibility (public/private)
|
31
|
+
- Implement lifecycle methods (initialization, execution, completion)
|
32
|
+
- Add observability hooks (logging, metrics)
|
33
|
+
- Include verification points
|
34
|
+
|
35
|
+
2. **Communication Patterns**:
|
36
|
+
- Use event-driven communication where appropriate
|
37
|
+
- Implement clear state transitions
|
38
|
+
- Maintain immutability where possible
|
39
|
+
- Include support for serialization/deserialization
|
40
|
+
|
41
|
+
3. **Service Integration**:
|
42
|
+
- Define clear boundaries between services
|
43
|
+
- Implement retry and error handling
|
44
|
+
- Support for asynchronous operation
|
45
|
+
- Include metrics collection
|
46
|
+
|
47
|
+
### 3. Verification Phase
|
48
|
+
|
49
|
+
When verifying a feature:
|
50
|
+
|
51
|
+
1. **Automated Testing**:
|
52
|
+
- Unit tests for individual components
|
53
|
+
- Integration tests for component interaction
|
54
|
+
- System tests for end-to-end workflows
|
55
|
+
|
56
|
+
2. **Manual Verification**:
|
57
|
+
- Identify human intervention points
|
58
|
+
- Verify error handling and recovery
|
59
|
+
- Assess performance characteristics
|
60
|
+
- Confirm extensibility
|
61
|
+
|
62
|
+
## Task Class Design Example
|
63
|
+
|
64
|
+
The Task class exemplifies the architectural approach:
|
65
|
+
|
66
|
+
### Core Requirements
|
67
|
+
|
68
|
+
1. **Functionality**:
|
69
|
+
- Represent a unit of work in the system
|
70
|
+
- Support execution by an agent
|
71
|
+
- Enable verification of results
|
72
|
+
- Track execution state and history
|
73
|
+
|
74
|
+
2. **Communication**:
|
75
|
+
- Interface with agents for execution
|
76
|
+
- Communicate with verification systems
|
77
|
+
- Support dependency resolution
|
78
|
+
- Provide metrics for observability
|
79
|
+
|
80
|
+
3. **Extensibility**:
|
81
|
+
- Support custom execution strategies
|
82
|
+
- Allow plugin-based verification
|
83
|
+
- Enable domain-specific behaviors
|
84
|
+
- Support various input/output formats
|
85
|
+
|
86
|
+
### Implementation Considerations
|
87
|
+
|
88
|
+
1. **State Management**:
|
89
|
+
- Maintain clear task lifecycle (pending, in_progress, completed, failed)
|
90
|
+
- Track timestamps for performance analysis
|
91
|
+
- Support retries with history
|
92
|
+
- Record verification results and confidence scores
|
93
|
+
|
94
|
+
2. **Integration Points**:
|
95
|
+
- Agent execution interface
|
96
|
+
- Verification hub integration
|
97
|
+
- Metrics collection system
|
98
|
+
- Human intervention portal
|
99
|
+
|
100
|
+
3. **Separation of Concerns**:
|
101
|
+
- Task should focus on state and lifecycle
|
102
|
+
- Execution details belong in agents
|
103
|
+
- Verification logic belongs in verifiers
|
104
|
+
- Dependency resolution in specialized resolvers
|
105
|
+
|
106
|
+
## Feature Implementation Checklist
|
107
|
+
|
108
|
+
For each new feature:
|
109
|
+
|
110
|
+
- [ ] Design aligns with overall architecture
|
111
|
+
- [ ] Clear separation of concerns
|
112
|
+
- [ ] Well-defined interfaces
|
113
|
+
- [ ] Appropriate error handling
|
114
|
+
- [ ] Metrics and observability
|
115
|
+
- [ ] Extension points identified
|
116
|
+
- [ ] Human intervention points defined
|
117
|
+
- [ ] Testing strategy established
|
118
|
+
- [ ] Documentation prepared
|
119
|
+
|
120
|
+
## Iteration Approach
|
121
|
+
|
122
|
+
1. Start with a minimal implementation focused on core functionality
|
123
|
+
2. Add verification and observability
|
124
|
+
3. Enhance with extension points
|
125
|
+
4. Refine based on testing and feedback
|
126
|
+
5. Document thoroughly
|
127
|
+
|
128
|
+
When iterating on architectural design:
|
129
|
+
1. Update ArchitectureConsiderations.md with any changes
|
130
|
+
2. Ensure backward compatibility or provide migration path
|
131
|
+
3. Communicate changes to all stakeholders
|
132
|
+
4. Update relevant tests and documentation
|
133
|
+
|
134
|
+
## Conclusion
|
135
|
+
|
136
|
+
This guide provides a structured approach to feature development within the Agentic framework. By following these guidelines, contributors can ensure their implementations align with the overall architectural vision while maintaining quality, extensibility, and consistency across the system.
|