adr-knowledge-repository-abstraction
Decision
Formalise the Knowledge Repository Abstraction as a standard infrastructure pattern for CAS implementations.
Context
- Source: governance-flow
- Pattern: knowledge-repository-abstraction
- Promotion Recommendation: recommendation-knowledge-repository-abstraction
- Scope Classification: global
- Scope Classification Artifact: pattern-scope-classification
The system must support various storage backends (filesystem, cloud buckets, databases) without leaking IO details into the orchestration logic.
Scope
Applicability: Mandatory for all components interacting with the CAS knowledge layer or requiring persistence abstraction.
Infrastructure abstraction for data persistence.
Consequences
Governance
Ensures storage backends can be swapped without re-approving application logic.
Execution
Minimal overhead due to protocol-based dispatch.
System Behaviour
Isolates filesystem failures to the provider implementation.
Evidence Summary
Promotion Evidence
Fully implemented via KnowledgeProvider protocol and LocalKnowledgeProvider in io.py.
Promotion Criteria
High reusability and strategic alignment for multi-environment deployment.
Governance Risks
Centralization in a single provider means bugs there affect all data access.
Traceability
Pattern Proposal
knowledge-repository-abstraction
Scope Classification
Artifact: pattern-scope-classification
Classification: global
Promotion Recommendation
recommendation-knowledge-repository-abstraction
Promotion Decision
promotion-decision-knowledge-repository-abstraction
Next Step
- Submit ADR to Architecture Forum for formal institutionalisation
- Update core documentation to reflect KnowledgeProvider as the standard persistence interface