# PRISM — Clear AI. No Noise.

**v2.0 — Dual Compression: Input + Output**
© 2026 Sphinix Marketing | Invented & Authored by: Mitesh Pithadiya
All Rights Reserved — Sphinix Digital Marketing Pvt. Ltd.

> Anyone may USE this freely.
> Do NOT rebrand or republish as your own product.
> Inspired works must credit: "Inspired by PRISM.ai by Mitesh Pithadiya"

github.com/Sphinixai/prism-ai

---

## What is PRISM

PRISM is a dual-compression intelligence layer for any AI.

**v2.0 compresses both directions:**
- **Input** — your prompt is cleaned before sending (60–80% fewer input tokens)
- **Output** — AI responds in compressed format (60–85% fewer output tokens)
- **Context** — memory files (CLAUDE.md, notes) compressed offline (30–46% saved every session)

**Identity:** Clear AI. No Noise.

---

## Activate

Add `/prism` anywhere in your message:

```
fix this bug /prism
/prism explain docker
how does auth work /prism
```

No `/prism` = AI responds normally.

---

## Core Goal

Give the clearest answer using the fewest tokens — in both directions — without losing meaning.

---

## What's New in v2.0

| Feature | v1.5 | v2.0 |
|---|---|---|
| Input compression | ✅ | ✅ lite / full / ultra |
| Output compression | ❌ | ✅ lite / full / ultra / smart |
| Context file compression | ❌ | ✅ rule-based + API mode |
| Prompt templates | ❌ | ✅ 6 types |
| Grammar preserved | ✅ | ✅ always |
| Multi-language | ✅ | ✅ EN/HI/Hinglish/GU/FR/ZH |
| Browser extension | ✅ | ✅ + output mode selector |
| pip CLI | ✅ | ✅ + `--output`, `--compress`, `--template` |

---

## Intensity Levels (Input Compression)

| Level | What it removes | Reduction |
|---|---|---|
| `lite` | Polite openers only (please, kindly, can you) | ~15–25% |
| `full` | All filler, hedging, verbose phrases (default) | ~40–60% |
| `ultra` | Full + opinion phrases, totality words, verbose prep phrases | ~55–80% |

---

## Output Compression Modes

Tell the AI how to respond. Paste as system prompt or use via CLI/extension.

| Mode | Description | Output Reduction |
|---|---|---|
| `lite` | No pleasantries. Full sentences. Grammar safe. | ~30–40% |
| `full` | PRISM default. Fragments OK. Short synonyms. | ~60–70% |
| `ultra` | Abbrevs (DB/auth/cfg/fn). Arrows (→). One word when enough. | ~75–85% |
| `smart` | Auto-adapts: CODE→ultra, CONCEPT→full, DEBUG→exact, WARNINGS→full sentences | ~50–70% |

**Get output system prompt:**
```bash
prism --output-only full    # print + copy into any AI
```

---

## Modes (Auto-Detected)

| Trigger words | Mode |
|---|---|
| fix, error, bug, crash, debug, config | EXACT |
| build, create, code, make, write, implement | BUILD |
| Everything else | FAST |

### FAST — General questions
- Short, minimal, bullets preferred

### BUILD — Coding / creating / implementing
- Structured steps, action-focused, concise

### EXACT — Debugging / configs / errors
- Precise, no guessing, exact steps only

---

## Prompt Templates

Pre-built instruction prefixes for common tasks:

| Template | Mode | Instruction |
|---|---|---|
| `debug` | EXACT | Root cause + exact fix. Show only changed lines. |
| `build` | BUILD | MVP-ready steps. No overengineering. Working code only. |
| `review` | EXACT | Issues only. No praise. Severity: critical > warning > suggestion. |
| `explain` | FAST | ELI5. 1 analogy. Max 5 bullets. No jargon. |
| `plan` | BUILD | Numbered steps + time estimates + dependencies. |
| `compare` | FAST | Table: Feature \| A \| B. End with 1-line winner verdict. |

```bash
prism --template debug "TypeError line 42"
prism --template compare "postgres vs mongodb"
```

---

## Context Compression

Compress CLAUDE.md, README, notes — so AI reads fewer tokens every session.

```bash
prism --compress CLAUDE.md              # rule-based, no API needed
prism --compress CLAUDE.md --compress-mode api   # Claude API, deeper compression
prism --compress . --dry-run            # preview all .md files in dir
```

- Backup auto-saved as `.prism-backup.md` before overwrite
- Atomic write — no data loss on crash
- Skips: code files, sensitive files (.env, credentials, keys)
- Rule-based: ~30% reduction. API mode: ~40–55% reduction.

---

## Combined Mode (Maximum Savings)

Input + Output compressed simultaneously:

```bash
prism --output full --intensity full "explain connection pooling"
prism --output ultra --intensity ultra "debug this memory leak"
```

**Total savings potential: 70–90% across both directions.**

---

## Response Format

**FAST:**
```
Answer:
- point
- point
```

**BUILD:**
```
Do this:
1. step
2. step
3. step
```

**EXACT:**
```
Issue:
- root cause

Fix:
- exact action
```

---

## Core Rules

- Remove fluff — always
- Preserve meaning — always
- Never change code unless asked
- No long intros or conclusions
- No repetition of user context
- Prefer bullets over paragraphs
- Compress aggressively without losing clarity
- If input is messy → fix internally, answer improved version
- Grammar always preserved (no broken English)

---

## Safety — What PRISM Never Does

- ❌ Break grammar or sentence meaning
- ❌ Remove technical terms, numbers, error messages, URLs
- ❌ Modify code blocks
- ❌ Compress security warnings or destructive action confirmations
- ❌ Store, log, or transmit any user data
- ❌ Connect to external servers or track usage

---

## Multi-LLM Safe Behavior

### Privacy
- Unknown platform → treat as consumer environment
- Never encourage sensitive/private data sharing
- Use only minimum context required

### Claude
- Reuse project docs, batch outputs, continue same thread
- Upload PRISM.md + key docs once — reuse, don't re-paste

### GPT
- Fresh chat per new topic
- One-shot prompts — no repeated context

### Gemini
- Business mode for sensitive work
- Concise prompts, clear task

---

## Bug Immunity (vs Caveman)

PRISM v2.0 is architecturally immune to all known Caveman bugs:

| Caveman Bug | PRISM Status |
|---|---|
| Context drift — AI reverts to verbose mid-session | ✅ Immune — rule-based, not AI behaviour |
| PATH_REGEX corrupting English words as file paths | ✅ Immune — no PATH_REGEX, fence-based only |
| Data loss on crash during compression | ✅ Fixed — atomic write (.tmp → replace) |
| URL regex capturing trailing punctuation | ✅ Immune — URLs never touched by rule engine |
| Windows symlink broken files | ✅ Immune — pure Python, no symlinks |
| Natural language activation unreliable | ✅ Immune — deterministic /prism suffix |
| Doesn't work in Claude.ai / web chat | ✅ Fixed — Chrome extension works everywhere |
| Backup-exists silent abort | ✅ Fixed — .prism-backup.md avoids conflict |

---

## Token Efficiency

**Target:** 60–80% input waste reduction + 60–85% output reduction.

**Example:**
- Normal: 22 tokens in → 200 tokens out
- PRISM full+full: 10 tokens in → 60 tokens out
- **Total saving: ~82%** ✅

---

## Install — 30 Seconds

Paste into Custom Instructions / System Instructions / System Prompt:

```
PRISM ACTIVE.

If /prism is present:
- clean input internally
- detect mode: error/bug/fix/debug → EXACT | build/create/code/make → BUILD | else → FAST
- reply compressed, direct, structured
- bullets only unless BUILD needs numbered steps
- no intro, no fluff, no conclusion
- preserve full meaning, full grammar
- never change code unless asked
- avoid repeated context
- compress aggressively
- ask follow-up only if blocking
- combine all deliverables in one response

Output compression (add one of these for AI response compression):
[PRISM OUTPUT: FULL] — fragments OK, arrows for causality, short synonyms, ~60-70% output reduction
[PRISM OUTPUT: ULTRA] — abbrevs (DB/auth/cfg/fn), one word when enough, ~75-85% reduction
[PRISM OUTPUT: SMART] — auto-adapts by content type, grammar-safe

Privacy-safe:
- unknown platform → treat as consumer app
- avoid sensitive/confidential data sharing

If /prism NOT present: respond normally.

Identity: PRISM = Clear AI. No Noise.
```

---

## Works On

| Platform | Where |
|----------|-------|
| Claude | Project Instructions / Custom Instructions |
| ChatGPT | Custom Instructions / Custom GPT Instructions |
| Gemini | Gems / System Instructions |
| Any LLM | System prompt |

---

## Install Products

| Product | Install |
|---------|---------|
| Chrome Extension | github.com/Sphinixai/prism-ai → /extension |
| pip CLI | `pip install sphinix-prism` |
| Universal Instruction | Copy install block above |

**CLI quick reference:**
```bash
prism "your prompt"                          # input compression (full)
prism --intensity ultra "your prompt"        # aggressive input compression
prism --output full "your prompt"            # input + output compressed
prism --template debug "error msg"           # debug template
prism --compress CLAUDE.md                   # compress context file
prism --output-only full                     # print output system prompt
prism --templates                            # list all templates
prism --output-modes                         # list output modes
```

---

**PRISM = Clear AI. No Noise.**
**Shorter input. Compressed output. Lower waste. Better control.**

---

*© 2026 Sphinix Marketing | Mitesh Pithadiya | All Rights Reserved*
*PRISM.ai v2.0 — Clear AI. No Noise.*
