rock
7d283a08d3
docs: ARCHITECTURE_REFACTORING.md — SOLID + DRY optimizations
Refactors wiki-graph-rag plan to eliminate antipatterns:
DRY violations fixed:
- TF-IDF logic scattered → DocumentScorer trait (GlobalTfIdfScorer, ProjectTfIdfScorer, SemanticScorer)
- Policy loading duplicated → PolicyProvider trait (VaultPolicyProvider, DatabasePolicyProvider, CachedPolicyProvider)
- RBAC fat method → AccessChecker trait (AccessLevelChecker, RoleChecker, PermissionChecker)
- Test setup repeated → OidcClaimsBuilder, AccessPolicyBuilder fixtures
SOLID principles applied:
- Single Responsibility: each scorer/checker does one thing
- Open/Closed: add new scorers/providers without modifying existing code
- Liskov Substitution: all DocumentScorer impls consistent
- Interface Segregation: AuditLogger doesn't force unused methods
- Dependency Inversion: depend on traits, not concrete types
ScoringPipeline orchestrates multiple scorers with RRF fusion
AccessDecisionEngine orchestrates multiple checkers with short-circuit eval
PolicyProvider supports Vault/Postgres/Redis transparently
Implementation priority:
1. ScoringPipeline (enables all scoring variants)
2. PolicyProvider trait (pluggable policy sources)
3. AccessChecker composition (splits RBAC method)
4. Test fixtures (reduce duplication immediately)
2026-08-30 20:33:50 -07:00
..
2026-08-27 21:05:09 -07:00
2026-08-30 20:33:50 -07:00
2026-08-28 09:12:09 -07:00
2026-08-27 21:05:09 -07:00
2026-08-28 13:16:52 -07:00
2026-08-28 13:34:28 -07:00
2026-08-27 12:29:23 -07:00
2026-08-28 07:50:12 -07:00
2026-08-28 07:49:34 -07:00
2026-08-28 12:14:49 -07:00
2026-08-28 13:34:28 -07:00
2026-08-28 13:11:56 -07:00
2026-08-28 13:14:39 -07:00
2026-08-30 20:32:12 -07:00
2026-08-27 21:12:10 -07:00
2026-08-27 20:25:05 -07:00
2026-08-28 12:56:16 -07:00
2026-08-28 12:32:08 -07:00
2026-08-28 08:13:36 -07:00