Skip to content

ljbudgie/Mirror-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mirror — see where you stand.

Tell it what happened. It maps your rights, generates the question, and gives you the next step.

Local-first. No data leaves your device. Built on the Burgess Principle (UK00004343685).

MIT licence. Python ≥ 3.11.


What Mirror does

  • Classifies your situation from a plain-English description into one of nine domains: enforcement, benefits, housing, platform, medical, credit, employment, immigration, and consumer.
  • Maps your rights — shows the specific legal rights that apply, with sources and actions.
  • Gives you one next step — not a list, just one clear thing to do now.
  • Drafts the communication — 27 ready-to-send letter templates (SAR requests, FOI requests, grievance letters, NHS complaints, mandatory reconsiderations, tribunal appeals, ICO complaints, chargeback requests, and more), each with the Burgess Principle question included.
  • Tracks deadlines — statutory timelines for DSARs, FOIs, tribunal claims, and complaint acknowledgements.
  • Hashes every outgoing message — SHA-256 commitment hashing so you can prove a message came from you, without revealing personal data.
  • Optional local AI — connect a local AI backend (Ollama) for adaptive classification, context-aware rights mapping, and situationally tailored Burgess questions. Disabled by default. When enabled, all AI processing stays on your device.

Everything runs on your device. No server, no accounts, no tracking, no cookies.


Quickstart

pip install -e ".[dev]"
pytest

Open web/index.html in your browser. No server needed.


Structure

/core        Python modules — conversation, rights, next step, templates, commitment, timeline, AI adapter
/prompts     System prompts for local AI integration (master-system.md)
/templates   Ready-to-send letter templates (27 templates)
/web         Local-first chat interface (HTML + CSS, no dependencies)
/docs        User guide, security policy, contributing guide

Documentation

  • User guide — full usage instructions, configuration, and examples
  • Contributing — how to help, code style, and pull request process
  • Security policy — vulnerability reporting, data handling, and threat model

Privacy

Mirror is local-first by design.

  • No data leaves your device
  • No accounts or registration
  • No analytics or tracking
  • No cookies
  • The web interface makes no network requests
  • Your commitment vault is encrypted on your device
  • AI features (when enabled) use a local backend — no cloud APIs

Local AI (optional)

Mirror can optionally connect to a local AI backend for adaptive classification, context-aware rights mapping, and situationally tailored Burgess questions. AI is disabled by default — the deterministic rule-based engine works without it.

Setup

  1. Install Ollama and pull a model:

    ollama pull mistral
  2. Enable AI in mirror-config.json:

    {
      "ai": {
        "enabled": true,
        "model": "mistral",
        "base_url": "http://localhost:11434",
        "timeout": 120
      }
    }
  3. Install the optional AI dependency:

    pip install -e ".[ai]"

Usage

from core.ai_adapter import adaptive_classify, adaptive_burgess_question, is_backend_available

# Check if the backend is running
if is_backend_available():
    # AI-powered classification
    result = adaptive_classify("My PIP assessment was refused")

    # Situational Burgess question
    question = adaptive_burgess_question("My PIP was refused", "benefits")

When AI is unavailable or disabled, these functions return None, and Mirror falls back to its deterministic engine. Nothing breaks.

About

See where you stand. Mirror is a local-first personal sovereignty toolkit that adapts to any user, any situation, any institution. Tell it what happened in your own words — it maps your rights, generates the one question that matters, and gives you the next step. Built on the Burgess Principle. MIT licensed.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors