docs(architecture): persona template consolidation pattern + proposal

Document how admin/merchant/store templates share a single shared/ body
partial while keeping their three separate base templates. Covers:

- The wrapper/partial split and why the three base templates must stay
  separate (nav + permissions isolation).
- The scope contract: pass strings + booleans only, no macro objects,
  no `persona` enum.
- The backend mirror: services scope-agnostic, routes inject scope via
  auth deps, same Pydantic shape across personas.
- Legit exceptions and the heuristic for when to keep a template
  standalone (multi-tenant aggregators, persona-unique features).
- Forward reference to the TPL-016 architecture rule.

Adds both docs to mkdocs nav under Architecture and Proposals
sections.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-23 23:10:29 +02:00
parent c661c1e394
commit f82dce30ca
3 changed files with 170 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ nav:
- Media Architecture: architecture/media-architecture.md
- Metrics Provider Pattern: architecture/metrics-provider-pattern.md
- Multi-Platform CMS: architecture/multi-platform-cms.md
- Persona Template Consolidation: architecture/persona-template-consolidation.md
- Tenancy Module Migration: architecture/tenancy-module-migration.md
- Widget Provider Pattern: architecture/widget-provider-pattern.md
- Architecture Violations Status: architecture/architecture-violations-status.md
@@ -339,6 +340,7 @@ nav:
- Hosting Cascade Delete: proposals/hosting-cascade-delete.md
- Hosting Site Creation Fix: proposals/hosting-site-creation-fix.md
- Loyalty Go-Live Readiness: proposals/loyalty-go-live-readiness.md
- Persona Template Consolidation: proposals/persona-template-consolidation.md
- Loyalty Phase 2 Interfaces: proposals/loyalty-phase2-interfaces-plan.md
- Loyalty Program Analysis: proposals/loyalty-program-analysis.md
- Merchant Intake Checklist: proposals/merchant-intake-checklist.md