lex-agentic-learning 0.1.0 → 0.1.1
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/CHANGELOG.md +6 -0
- data/README.md +41 -3
- data/lib/legion/extensions/agentic/learning/fermentation/helpers/fermentation_engine.rb +4 -0
- data/lib/legion/extensions/agentic/learning/fermentation/version.rb +1 -1
- data/lib/legion/extensions/agentic/learning/version.rb +1 -1
- data/spec/legion/extensions/agentic/learning/fermentation/helpers/fermentation_engine_spec.rb +26 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e3d434a965969263653baeab0cc752684ec0d7634b9b6eddf9caddc3de87883
|
|
4
|
+
data.tar.gz: 739255e9c779173dc965bfbe2bb3b4eb6f960f24cd10650e18eff611b99ab530
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d368996971593e6615df6c0495edfd70571cfabfebe7d5d58a47a5fc41fb285a7594d877345cde439e0e276e97379982f30675de1a38c5d87223f3cc2751bd42
|
|
7
|
+
data.tar.gz: 206ed5333af646c9261cf3647bdd521b6225a62092ed1f8e2aa863c41aa4ec1fdd2ba67aebda29ab9405ea8a7e4e7053b511118172e677ab5ec1b6f44285bcd1
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.1] - 2026-03-18
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Enforce SUBSTRATE_TYPES validation in FermentationEngine#create_substrate (returns nil for invalid type)
|
|
9
|
+
- Enforce CATALYST_TYPES validation in FermentationEngine#catalyze (returns nil for invalid catalyst)
|
|
10
|
+
|
|
5
11
|
## [0.1.0] - 2026-03-18
|
|
6
12
|
|
|
7
13
|
### Added
|
data/README.md
CHANGED
|
@@ -1,13 +1,51 @@
|
|
|
1
1
|
# lex-agentic-learning
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Domain consolidation gem for learning, adaptation, and knowledge acquisition. Bundles 14 source extensions into one loadable unit under `Legion::Extensions::Agentic::Learning`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Gem**: `lex-agentic-learning`
|
|
8
|
+
**Version**: 0.1.1
|
|
9
|
+
**Namespace**: `Legion::Extensions::Agentic::Learning`
|
|
10
|
+
|
|
11
|
+
## Sub-Modules
|
|
12
|
+
|
|
13
|
+
| Sub-Module | Source Gem | Purpose |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `Learning::Curiosity` | `lex-curiosity` | Intrinsic curiosity — knowledge gap detection, wonder queue, salience decay |
|
|
16
|
+
| `Learning::EpistemicCuriosity` | `lex-epistemic-curiosity` | Information-gap theory — specific vs. diversive curiosity |
|
|
17
|
+
| `Learning::Hebbian` | `lex-hebbian-assembly` | Cell assembly formation — neurons that fire together wire together |
|
|
18
|
+
| `Learning::Habit` | `lex-habit` | Habit formation — action sequence pattern recognition, maturity stages |
|
|
19
|
+
| `Learning::LearningRate` | `lex-learning-rate` | Dynamic learning rate adaptation based on accuracy and stability |
|
|
20
|
+
| `Learning::MetaLearning` | `lex-meta-learning` | Learning-to-learn — strategy selection per domain |
|
|
21
|
+
| `Learning::PreferenceLearning` | `lex-preference-learning` | Learns stable preferences from choices over time |
|
|
22
|
+
| `Learning::Procedural` | `lex-procedural-learning` | Skill acquisition through practice — automatization |
|
|
23
|
+
| `Learning::Anchoring` | `lex-anchoring` | Anchoring bias in estimation |
|
|
24
|
+
| `Learning::Plasticity` | `lex-cognitive-plasticity` | Neural-style plasticity — synaptic weight adjustment |
|
|
25
|
+
| `Learning::Scaffolding` | `lex-cognitive-scaffolding` | Temporary learning assists that fade as competence grows |
|
|
26
|
+
| `Learning::Fermentation` | `lex-cognitive-fermentation` | Time-based transformation of knowledge |
|
|
27
|
+
| `Learning::Chrysalis` | `lex-cognitive-chrysalis` | Metamorphic state change — transformation through withdrawal |
|
|
28
|
+
| `Learning::Catalyst` | `lex-cognitive-catalyst` | Accelerating cognitive transformation |
|
|
29
|
+
|
|
30
|
+
## Actors
|
|
31
|
+
|
|
32
|
+
- `Learning::Hebbian::Actors::Decay` — interval actor, decays Hebbian assembly connection strength
|
|
33
|
+
- `Learning::PreferenceLearning::Actors::Decay` — interval actor, decays older preference observations
|
|
8
34
|
|
|
9
35
|
## Installation
|
|
10
36
|
|
|
11
37
|
```ruby
|
|
12
38
|
gem 'lex-agentic-learning'
|
|
13
39
|
```
|
|
40
|
+
|
|
41
|
+
## Development
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bundle install
|
|
45
|
+
bundle exec rspec # 1316 examples, 0 failures
|
|
46
|
+
bundle exec rubocop # 0 offenses
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
|
@@ -15,6 +15,8 @@ module Legion
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def create_substrate(substrate_type:, domain:, content: '', potency: nil, volatility: nil)
|
|
18
|
+
return nil unless SUBSTRATE_TYPES.include?(substrate_type.to_sym)
|
|
19
|
+
|
|
18
20
|
sub = Substrate.new(substrate_type: substrate_type, domain: domain, content: content,
|
|
19
21
|
potency: potency, volatility: volatility)
|
|
20
22
|
@substrates[sub.id] = sub
|
|
@@ -33,6 +35,8 @@ module Legion
|
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
def catalyze(substrate_id:, catalyst_type:)
|
|
38
|
+
return nil unless CATALYST_TYPES.include?(catalyst_type.to_sym)
|
|
39
|
+
|
|
36
40
|
sub = @substrates[substrate_id]
|
|
37
41
|
return nil unless sub
|
|
38
42
|
|
data/spec/legion/extensions/agentic/learning/fermentation/helpers/fermentation_engine_spec.rb
CHANGED
|
@@ -26,6 +26,18 @@ RSpec.describe Legion::Extensions::Agentic::Learning::Fermentation::Helpers::Fer
|
|
|
26
26
|
engine.create_substrate(substrate_type: :raw_idea, domain: :emotional)
|
|
27
27
|
expect(engine.fermentation_report[:total_batches]).to eq(2)
|
|
28
28
|
end
|
|
29
|
+
|
|
30
|
+
it 'rejects invalid substrate_type' do
|
|
31
|
+
expect(engine.create_substrate(substrate_type: :telekinesis, domain: :cognitive)).to be_nil
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'accepts all valid SUBSTRATE_TYPES' do
|
|
35
|
+
constants = Legion::Extensions::Agentic::Learning::Fermentation::Helpers::Constants
|
|
36
|
+
constants::SUBSTRATE_TYPES.each do |st|
|
|
37
|
+
result = engine.create_substrate(substrate_type: st, domain: :cognitive)
|
|
38
|
+
expect(result).not_to be_nil
|
|
39
|
+
end
|
|
40
|
+
end
|
|
29
41
|
end
|
|
30
42
|
|
|
31
43
|
describe '#ferment' do
|
|
@@ -50,6 +62,20 @@ RSpec.describe Legion::Extensions::Agentic::Learning::Fermentation::Helpers::Fer
|
|
|
50
62
|
it 'returns nil for unknown substrate' do
|
|
51
63
|
expect(engine.catalyze(substrate_id: 'x', catalyst_type: :analogy)).to be_nil
|
|
52
64
|
end
|
|
65
|
+
|
|
66
|
+
it 'rejects invalid catalyst_type' do
|
|
67
|
+
sub = engine.create_substrate(substrate_type: :raw_idea, domain: :cognitive)
|
|
68
|
+
expect(engine.catalyze(substrate_id: sub.id, catalyst_type: :magic)).to be_nil
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
it 'accepts all valid CATALYST_TYPES' do
|
|
72
|
+
constants = Legion::Extensions::Agentic::Learning::Fermentation::Helpers::Constants
|
|
73
|
+
sub = engine.create_substrate(substrate_type: :raw_idea, domain: :cognitive, potency: 0.1)
|
|
74
|
+
constants::CATALYST_TYPES.each do |ct|
|
|
75
|
+
result = engine.catalyze(substrate_id: sub.id, catalyst_type: ct)
|
|
76
|
+
expect(result).not_to be_nil
|
|
77
|
+
end
|
|
78
|
+
end
|
|
53
79
|
end
|
|
54
80
|
|
|
55
81
|
describe '#ferment_all!' do
|