Real-Time Coaching
The Prism plugin scores every prompt in real time and provides coaching when quality is low.
How it works
Section titled “How it works”When you type a prompt and press Enter:
- The UserPromptSubmit hook fires before the prompt reaches Claude
- The hook scores Prompt Quality (PQ) using local heuristics
- Based on the score and your threshold setting:
- Below threshold — shows a suggested rewrite with specific tips
- 4.0–6.0 — shows light improvement suggestions
- Above 6.0 — silent pass (no interruption)
- The prompt is always submitted — coaching is advisory, never blocking
What you see
Section titled “What you see”When PQ is below your threshold (default: 4.0):
Prism Advisor PQ Score: 2.5/10 Specificity: 1.0 | Decomposition: 4.0
Issues: - No file paths — which file are you working on? - No function names — what specifically needs to change?
Your prompt: "fix the authentication bug"
Suggested rewrite: "Fix the authentication bug in src/auth/validate.ts — the validateToken() function throws when the JWT has expired. Should return { valid: false, reason: 'expired' } instead."
Why this is better: Adds the file path, function name, error condition, and expected behavior — the AI can act immediately without guessing.Skipped prompts
Section titled “Skipped prompts”The advisor skips scoring for:
- Short prompts (<10 characters) — “yes”, “no”, “ok”
- Slash commands —
/compact,/clear,/model sonnet - Simple confirmations — “y”, “n”, “continue”, “go ahead”
These are navigational — scoring them would be noise.
Threshold tuning
Section titled “Threshold tuning”The prismThreshold in your config controls sensitivity:
| Threshold | Behavior |
|---|---|
| 2 | Only catches the worst prompts |
| 4 (default) | Balanced — catches vague prompts, allows moderate ones |
| 6 | Strict — suggests improvements for most prompts |
| 8 | Very strict — only elite prompts pass silently |
Edit in ~/.prism/config.json:
{ "prismThreshold": 5}Context nudges
Section titled “Context nudges”In addition to PQ scoring, the submit hook provides context management nudges:
| Condition | Nudge |
|---|---|
| Turn count >80 or context grew >10x | Suggests /clear |
| Turn count >20 and context grew >3x | Suggests /compact |
| Every 15 turns | Periodic context check reminder |
These help prevent context bloat from degrading response quality.