Skip to content

feat(types): add LearningStore trait and L0 trust level#846

Merged
AlexMikhalev merged 1 commit intomainfrom
task/813-learning-shared-types
Apr 23, 2026
Merged

feat(types): add LearningStore trait and L0 trust level#846
AlexMikhalev merged 1 commit intomainfrom
task/813-learning-shared-types

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

  • Add TrustLevel::L0 variant for unreviewed extracted learnings
  • Add LearningCategory enum (Technical/Process/Domain/Failure/SuccessPattern)
  • Add synchronous LearningStore trait (Send+Sync) with full CRUD + query + archive
  • Add InMemoryLearningStore for tests and development

Context

PR 1 of 3 for #813. This establishes the shared contract between terraphim_orchestrator and terraphim_agent so both crates can implement the same LearningStore trait without circular dependencies.

The trait is intentionally synchronous because terraphim_types has no async runtime dependency. Implementations that need async I/O can use internal synchronisation.

Verification

  • cargo test -p terraphim_types -- 76 tests pass (including 12 new)
  • cargo clippy -p terraphim_types -- -D warnings -- clean
  • cargo check -p terraphim_agent -- compiles (no breakage from L0)
  • cargo check -p terraphim_orchestrator -- compiles

Refs #813

@github-actions
Copy link
Copy Markdown
Contributor

Documentation Preview

Your documentation changes have been deployed to:
https://db4f9354.terraphim-docs.pages.dev

This preview will be available until the PR is closed.

Add shared learning infrastructure to terraphim_types for use by both
terraphim_orchestrator and terraphim_agent:

- TrustLevel::L0 variant for unreviewed extracted learnings
- LearningCategory enum
- LearningStore trait (synchronous, Send+Sync)
- InMemoryLearningStore for tests

Refs #813
@AlexMikhalev AlexMikhalev force-pushed the task/813-learning-shared-types branch from badac44 to 5e2af23 Compare April 23, 2026 18:19
@AlexMikhalev AlexMikhalev merged commit 2ce62ef into main Apr 23, 2026
20 of 21 checks passed
@AlexMikhalev AlexMikhalev deleted the task/813-learning-shared-types branch April 23, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant