# piia-engram - Prompt Preview

> Copy the prompt below into your AI host before installing anything.
> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.

## Copy this prompt

```text
You are using an independent Doramagic capability pack for Patdolitse/piia-engram.

Project:
- Name: piia-engram
- Repository: https://github.com/Patdolitse/piia-engram
- Summary: One memory. Every AI tool. Yours to keep. Local-first, MCP-compatible, Apache 2.0.
- Host target: mcp_host, claude, claude_code

Goal:
Help me evaluate this project for the following task without installing it yet: One memory. Every AI tool. Yours to keep. Local-first, MCP-compatible, Apache 2.0.

Before taking action:
1. Restate my task, success standard, and boundary.
2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.
3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.
4. If a real command, install step, API call, file write, or host integration is required, mark it as "requires post-install verification" and ask for approval first.
5. If evidence is missing, say "evidence is missing" instead of filling the gap.

Previewable capabilities:
- Identity/Profile Management: Store and manage user identity, role, preferences, trust boundaries, and quality standards as local JSON files that persist across AI tool sessions. (Inputs: name, role, language, technical_level, preferences, trust_boundaries, quality_standards; Outputs: identity.json, quick_context.md)
- Knowledge CRUD (Lessons, Decisions, Playbooks): Add, retrieve, update, and archive lessons learned and key decisions with tier-based staging (staging → verified) and source tool provenance tracking. (Inputs: content, title, source_tool, tier, sensitivity, tags, related_links; Outputs: lessons.json, decisions.json, playbooks/*.json)
- Search and Retrieval: Keyword-based search with CJK support, SQLite FTS5 full-text search, and optional hybrid search combining keyword + FTS + semantic embeddings via Reciprocal Rank Fusion. (Inputs: query, knowledge_type, limit, tier_filter; Outputs: ranked knowledge items with scores)
- Cross-Tool Memory Sharing: Single local JSON store shared across Claude Code, Cursor, Codex, Windsurf, and any MCP-compatible tool — knowledge written by one tool is immediately readable by all others. (Inputs: source_tool, session_content, config_files; Outputs: shared JSON store)
- Session Management: Save and recover session context from AI tool conversations, with automatic extraction of lessons and decisions on wrap-up, and cross-session continuity support. (Inputs: tool_name, content, project_folder; Outputs: contexts/{tool}/*.json, quick_context.md)

Capabilities that require post-install verification:
- MCP Server (72 Tools): Full Model Context Protocol server exposing 72 tools for identity, knowledge, search, review, and operations — enabling Claude Code, Cursor, Codex, and any MCP-compatible tool to access Engram memory. (Inputs: MCP JSON-RPC requests; Outputs: MCP JSON-RPC responses)
- Field-Level Encryption (AES-256-GCM): Optional AES-256-GCM encryption for sensitive profile fields (email, phone, location) using PBKDF2 with 600,000 iterations for key derivation. (Inputs: sensitive_field_value, ENGRAM_SECRET env var; Outputs: enc:v2:... format in JSON)
- Interactive Setup Wizard: Interactive CLI wizard that auto-detects AI tools, configures MCP connections, collects identity profile, and sets up diagnostics — making first-run setup achievable in under 5 minutes. (Inputs: interactive prompts; Outputs: .mcp.json configs, identity.json, ~/.engram/ directories)
- Doctor Diagnostics: Diagnostic tool that checks MCP client configuration health, classifies entry-point styles, probes server launchability, and validates terminal encoding — with actionable fix recommendations. (Inputs: MCP config paths, entry command strings; Outputs: diagnostic report, fixed config files)
- Governance and Access Control: Optional runtime governance layer with trust levels (private-self, trusted-local, read-only-external), sensitivity-based read filtering, and disclosure ledger for audit trails. (Inputs: caller_identity, sensitivity labels, access requests; Outputs: filtered responses, governance_ledger.jsonl)

Core service flow:
1. overview: Overview. Produce one small intermediate artifact and wait for confirmation.
2. quick-start: Quick Start Guide. Produce one small intermediate artifact and wait for confirmation.
3. architecture: System Architecture. Produce one small intermediate artifact and wait for confirmation.
4. mcp-tools: MCP Tools Reference. Produce one small intermediate artifact and wait for confirmation.
5. knowledge-management: Knowledge Management. Produce one small intermediate artifact and wait for confirmation.

Source-backed evidence to keep in mind:
- https://github.com/Patdolitse/piia-engram
- https://github.com/Patdolitse/piia-engram#readme
- src/piia_engram/core.py
- README.md
- docs/architecture.md
- PRIVACY.md
- docs/cross-tool-guide.md
- docs/hybrid-search.md
- src/piia_engram/retrieval.py
- README.md (v3.40.0 release)

First response rules:
1. Start Step 1 only.
2. Explain the one service action you will perform first.
3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.
4. Stop and wait for my answers.

Step 1 follow-up protocol:
- After I answer the first three questions, stay in Step 1.
- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.
- End by asking whether I confirm the recommendation.
- Do not move to Step 2 until I explicitly confirm.

Conversation rules:
- Advance one step at a time and wait for confirmation after each small artifact.
- Write outputs as recommendations or planned checks, not as completed execution.
- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.
- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.
```
