Legal Pages Plan
Plan Metadata
- Plan type:
plan - Parent plan:
N/A - Depends on:
N/A - Status:
draft
Status semantics: - draft: Plan is being created or updated and is not final. - approved: Plan is approved but not yet applied in code. - documentation: Code currently exists and matches the plan contract.
System Intent
- What is being built: Two static legal pages (Privacy Policy and Terms of Service) for the Encache website, adapted from the Bee Computer templates
- Primary consumer(s): Website visitors and app users who need to read Encache's privacy and terms
- Boundary (black-box scope only): Website page serving and routing for
/privacyand/termsendpoints
Stage Gate Tracker
- [ ] Stage 1 Mermaid approved
- [ ] Stage 2 I/O contracts approved
- [ ] Stage 3 pseudocode/technical details approved or skipped
1. Mermaid Diagram
Reference: .agent/skills/create-mermaid-diagram/SKILL.md
flowchart TD
User[User Browser] -->|GET /privacy or /terms| Server[Website Server]
Server -->|Route request| Router[Next.js Router]
Router -->|Load page| LegalPages[Legal Pages Component]
LegalPages -->|Render HTML| Response[HTML Response]
Response -->|Display to user| User
Bee[Bee Computer Templates] -->|Reference & Adapt| LegalPages
Config[Encache Config] -->|Inject branding/company info| LegalPages AWAITING APPROVAL FROM DEVELOPER - Please review the diagram above and confirm if this captures the flow, or suggest changes.
2. Black-Box Inputs and Outputs
Keep this short. Define types in JSON-style blocks and capture each flow with path-level rows.
Global Types
LegalPageRequest {
path: string (either '/privacy' or '/terms')
user_agent: string (optional, for analytics)
locale: string (optional, for future i18n support, defaults to 'en')
}
LegalPageResponse {
status: number (HTTP status 200 for success)
content_type: string ('text/html; charset=utf-8')
body: string (rendered HTML page)
cache_control: string (caching directive for CDN/browser)
}
StandardError {
status: number (HTTP status)
code: string (stable machine-readable code)
message: string (human-readable summary)
}
Flow: serveLegalPage
- Test files: N/A (static content serving, manual validation acceptable)
- Core files:
main/app/pages/privacy.tsx,main/app/pages/terms.tsx
Type Definitions
ServeLegalPageInput {
path: LegalPageRequest (request metadata)
}
ServeLegalPageOutput {
result: LegalPageResponse (rendered legal page)
}
Paths
| path-name | input | output/expected state change | path-type | notes | updated |
|---|---|---|---|---|---|
serveLegalPage.privacy-success | LegalPageRequest path=/privacy | LegalPageResponse status=200; Privacy Policy rendered and cached | happy path | Page contains Encache-specific privacy statements, data collection practices, user rights | Y |
serveLegalPage.terms-success | LegalPageRequest path=/terms | LegalPageResponse status=200; Terms of Service rendered and cached | happy path | Page contains Encache-specific terms, service limitations, liability disclaimers, EULA | Y |
serveLegalPage.not-found | LegalPageRequest path=/unknown-legal-page | StandardError status=404 code=page-not-found | error | Unrecognized legal page path returns 404 |
3. Pseudocode / Technical Details for Critical Flows (Optional)
Implementation details for legal page setup:
- Page Structure: Use Next.js static pages at
/pages/privacy.tsxand/pages/terms.tsx - Content Source: Adapt Bee Computer legal templates from
https://bee.computer/termsandhttps://bee.computer/privacy, replace: - "Bee" → "Encache"
- "Bee Computer" → "Encache"
- Company address, contact email, and support links as needed
- Branding: Encache logo, consistent styling with main site
- Navigation: Add links to both pages in website footer and/or legal links section
- SEO: Add proper meta tags (title, description, og:image) for search indexability
- Caching: Set appropriate cache headers (immutable or long-lived, since legal docs rarely change mid-day)
AWAITING APPROVAL FROM DEVELOPER - Please confirm technical approach is acceptable, or suggest changes (e.g., different routing, different content source, additional pages).
4. Handoff to Related Plan Reconciliation
After all stages are approved, apply .agent/skills/reconcile-plans/SKILL.md to propagate contract updates across linked plans.