alma-memory 0.3.0__tar.gz → 0.4.0__tar.gz

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 (57) hide show
  1. {alma_memory-0.3.0 → alma_memory-0.4.0}/PKG-INFO +53 -3
  2. {alma_memory-0.3.0 → alma_memory-0.4.0}/README.md +52 -2
  3. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/__init__.py +27 -1
  4. alma_memory-0.4.0/alma/confidence/__init__.py +47 -0
  5. alma_memory-0.4.0/alma/confidence/engine.py +506 -0
  6. alma_memory-0.4.0/alma/confidence/types.py +331 -0
  7. alma_memory-0.4.0/alma/initializer/__init__.py +37 -0
  8. alma_memory-0.4.0/alma/initializer/initializer.py +410 -0
  9. alma_memory-0.4.0/alma/initializer/types.py +242 -0
  10. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/storage/azure_cosmos.py +6 -0
  11. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma_memory.egg-info/PKG-INFO +53 -3
  12. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma_memory.egg-info/SOURCES.txt +6 -0
  13. {alma_memory-0.3.0 → alma_memory-0.4.0}/pyproject.toml +1 -1
  14. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/config/__init__.py +0 -0
  15. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/config/loader.py +0 -0
  16. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/core.py +0 -0
  17. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/domains/__init__.py +0 -0
  18. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/domains/factory.py +0 -0
  19. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/domains/schemas.py +0 -0
  20. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/domains/types.py +0 -0
  21. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/harness/__init__.py +0 -0
  22. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/harness/base.py +0 -0
  23. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/harness/domains.py +0 -0
  24. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/integration/__init__.py +0 -0
  25. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/integration/claude_agents.py +0 -0
  26. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/integration/helena.py +0 -0
  27. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/integration/victor.py +0 -0
  28. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/learning/__init__.py +0 -0
  29. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/learning/forgetting.py +0 -0
  30. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/learning/heuristic_extractor.py +0 -0
  31. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/learning/protocols.py +0 -0
  32. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/learning/validation.py +0 -0
  33. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/mcp/__init__.py +0 -0
  34. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/mcp/__main__.py +0 -0
  35. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/mcp/resources.py +0 -0
  36. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/mcp/server.py +0 -0
  37. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/mcp/tools.py +0 -0
  38. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/progress/__init__.py +0 -0
  39. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/progress/tracker.py +0 -0
  40. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/progress/types.py +0 -0
  41. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/retrieval/__init__.py +0 -0
  42. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/retrieval/cache.py +0 -0
  43. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/retrieval/embeddings.py +0 -0
  44. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/retrieval/engine.py +0 -0
  45. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/retrieval/scoring.py +0 -0
  46. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/session/__init__.py +0 -0
  47. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/session/manager.py +0 -0
  48. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/session/types.py +0 -0
  49. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/storage/__init__.py +0 -0
  50. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/storage/base.py +0 -0
  51. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/storage/file_based.py +0 -0
  52. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/storage/sqlite_local.py +0 -0
  53. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma/types.py +0 -0
  54. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma_memory.egg-info/dependency_links.txt +0 -0
  55. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma_memory.egg-info/requires.txt +0 -0
  56. {alma_memory-0.3.0 → alma_memory-0.4.0}/alma_memory.egg-info/top_level.txt +0 -0
  57. {alma_memory-0.3.0 → alma_memory-0.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alma-memory
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Agent Learning Memory Architecture - Persistent memory for AI agents
5
5
  Author-email: RBKunnela <aiagentsprompt@gmail.com>
6
6
  License: MIT
@@ -366,8 +366,8 @@ alma:
366
366
  | 8 | Forgetting Mechanism | ✅ Done |
367
367
  | 9 | MCP Server + Testing Suite | ✅ Done |
368
368
  | 10 | Progress, Sessions, Domains | ✅ Done |
369
- | 11 | Initializer Agent Pattern | Planned |
370
- | 12 | Forward-Looking Confidence | Planned |
369
+ | 11 | Initializer Agent Pattern | Done |
370
+ | 12 | Forward-Looking Confidence | Done |
371
371
 
372
372
  ## API Reference
373
373
 
@@ -425,6 +425,56 @@ schema = get_coding_schema() # or research, sales, general
425
425
  alma = factory.create_alma(schema, "project-id")
426
426
  ```
427
427
 
428
+ ### Session Initializer (NEW in v0.4.0)
429
+
430
+ ```python
431
+ from alma.initializer import SessionInitializer
432
+
433
+ initializer = SessionInitializer(alma)
434
+
435
+ # Full initialization before starting work
436
+ result = initializer.initialize(
437
+ project_id="my-project",
438
+ agent="Helena",
439
+ user_prompt="Test the login form validation",
440
+ project_path="/path/to/project",
441
+ )
442
+
443
+ # Inject into agent prompt
444
+ prompt = f"""
445
+ {result.to_prompt()}
446
+
447
+ Now proceed with the first work item.
448
+ """
449
+ ```
450
+
451
+ ### Confidence Engine (NEW in v0.4.0)
452
+
453
+ ```python
454
+ from alma.confidence import ConfidenceEngine
455
+
456
+ engine = ConfidenceEngine(alma)
457
+
458
+ # Assess a strategy before trying it
459
+ signal = engine.assess_strategy(
460
+ strategy="Use incremental validation",
461
+ context="Testing a 5-field registration form",
462
+ agent="Helena",
463
+ )
464
+
465
+ print(f"Confidence: {signal.confidence_score:.0%}")
466
+ print(f"Recommendation: {signal.recommendation}")
467
+ # → Confidence: 78%
468
+ # → Recommendation: yes
469
+
470
+ # Rank multiple strategies
471
+ rankings = engine.rank_strategies(
472
+ strategies=["Strategy A", "Strategy B", "Strategy C"],
473
+ context="Current task",
474
+ agent="Helena",
475
+ )
476
+ ```
477
+
428
478
  ## License
429
479
 
430
480
  MIT
@@ -322,8 +322,8 @@ alma:
322
322
  | 8 | Forgetting Mechanism | ✅ Done |
323
323
  | 9 | MCP Server + Testing Suite | ✅ Done |
324
324
  | 10 | Progress, Sessions, Domains | ✅ Done |
325
- | 11 | Initializer Agent Pattern | Planned |
326
- | 12 | Forward-Looking Confidence | Planned |
325
+ | 11 | Initializer Agent Pattern | Done |
326
+ | 12 | Forward-Looking Confidence | Done |
327
327
 
328
328
  ## API Reference
329
329
 
@@ -381,6 +381,56 @@ schema = get_coding_schema() # or research, sales, general
381
381
  alma = factory.create_alma(schema, "project-id")
382
382
  ```
383
383
 
384
+ ### Session Initializer (NEW in v0.4.0)
385
+
386
+ ```python
387
+ from alma.initializer import SessionInitializer
388
+
389
+ initializer = SessionInitializer(alma)
390
+
391
+ # Full initialization before starting work
392
+ result = initializer.initialize(
393
+ project_id="my-project",
394
+ agent="Helena",
395
+ user_prompt="Test the login form validation",
396
+ project_path="/path/to/project",
397
+ )
398
+
399
+ # Inject into agent prompt
400
+ prompt = f"""
401
+ {result.to_prompt()}
402
+
403
+ Now proceed with the first work item.
404
+ """
405
+ ```
406
+
407
+ ### Confidence Engine (NEW in v0.4.0)
408
+
409
+ ```python
410
+ from alma.confidence import ConfidenceEngine
411
+
412
+ engine = ConfidenceEngine(alma)
413
+
414
+ # Assess a strategy before trying it
415
+ signal = engine.assess_strategy(
416
+ strategy="Use incremental validation",
417
+ context="Testing a 5-field registration form",
418
+ agent="Helena",
419
+ )
420
+
421
+ print(f"Confidence: {signal.confidence_score:.0%}")
422
+ print(f"Recommendation: {signal.recommendation}")
423
+ # → Confidence: 78%
424
+ # → Recommendation: yes
425
+
426
+ # Rank multiple strategies
427
+ rankings = engine.rank_strategies(
428
+ strategies=["Strategy A", "Strategy B", "Strategy C"],
429
+ context="Current task",
430
+ agent="Helena",
431
+ )
432
+ ```
433
+
384
434
  ## License
385
435
 
386
436
  MIT
@@ -14,7 +14,7 @@ This makes any tool-using agent appear to "learn" by injecting relevant
14
14
  memory slices before each run and updating memory after.
15
15
  """
16
16
 
17
- __version__ = "0.3.0"
17
+ __version__ = "0.4.0"
18
18
 
19
19
  # Core
20
20
  from alma.core import ALMA
@@ -76,6 +76,22 @@ from alma.domains import (
76
76
  get_general_schema,
77
77
  )
78
78
 
79
+ # Session Initializer (Phase 11)
80
+ from alma.initializer import (
81
+ CodebaseOrientation,
82
+ InitializationResult,
83
+ RulesOfEngagement,
84
+ SessionInitializer,
85
+ )
86
+
87
+ # Confidence Engine (Phase 12)
88
+ from alma.confidence import (
89
+ ConfidenceEngine,
90
+ ConfidenceSignal,
91
+ OpportunitySignal,
92
+ RiskSignal,
93
+ )
94
+
79
95
  __all__ = [
80
96
  # Core
81
97
  "ALMA",
@@ -121,4 +137,14 @@ __all__ = [
121
137
  "get_research_schema",
122
138
  "get_sales_schema",
123
139
  "get_general_schema",
140
+ # Session Initializer
141
+ "CodebaseOrientation",
142
+ "InitializationResult",
143
+ "RulesOfEngagement",
144
+ "SessionInitializer",
145
+ # Confidence Engine
146
+ "ConfidenceEngine",
147
+ "ConfidenceSignal",
148
+ "OpportunitySignal",
149
+ "RiskSignal",
124
150
  ]
@@ -0,0 +1,47 @@
1
+ """
2
+ ALMA Confidence Module.
3
+
4
+ Forward-looking confidence signals for strategies.
5
+ Not just "this worked before" but "this will likely work now."
6
+
7
+ Inspired by Ilya Sutskever's insight: emotions are forward-looking value functions,
8
+ while reinforcement learning is backward-looking.
9
+
10
+ Usage:
11
+ from alma.confidence import ConfidenceEngine, ConfidenceSignal
12
+
13
+ engine = ConfidenceEngine(alma)
14
+
15
+ # Assess a strategy
16
+ signal = engine.assess_strategy(
17
+ strategy="Use incremental validation for forms",
18
+ context="Testing a registration form with 5 fields",
19
+ agent="Helena",
20
+ )
21
+
22
+ print(f"Confidence: {signal.confidence_score:.0%}")
23
+ print(f"Recommendation: {signal.recommendation}")
24
+
25
+ # Rank multiple strategies
26
+ rankings = engine.rank_strategies(
27
+ strategies=["Strategy A", "Strategy B"],
28
+ context="Current context",
29
+ agent="Helena",
30
+ )
31
+ """
32
+
33
+ from alma.confidence.types import (
34
+ ConfidenceSignal,
35
+ OpportunitySignal,
36
+ Recommendation,
37
+ RiskSignal,
38
+ )
39
+ from alma.confidence.engine import ConfidenceEngine
40
+
41
+ __all__ = [
42
+ "ConfidenceSignal",
43
+ "ConfidenceEngine",
44
+ "OpportunitySignal",
45
+ "Recommendation",
46
+ "RiskSignal",
47
+ ]