Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Real-Time Coaching

The Prism plugin scores every prompt in real time and provides coaching when quality is low.

When you type a prompt and press Enter:

  1. The UserPromptSubmit hook fires before the prompt reaches Claude
  2. The hook scores Prompt Quality (PQ) using local heuristics
  3. 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)
  4. The prompt is always submitted — coaching is advisory, never blocking

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.

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.

The prismThreshold in your config controls sensitivity:

ThresholdBehavior
2Only catches the worst prompts
4 (default)Balanced — catches vague prompts, allows moderate ones
6Strict — suggests improvements for most prompts
8Very strict — only elite prompts pass silently

Edit in ~/.prism/config.json:

{
"prismThreshold": 5
}

In addition to PQ scoring, the submit hook provides context management nudges:

ConditionNudge
Turn count >80 or context grew >10xSuggests /clear
Turn count >20 and context grew >3xSuggests /compact
Every 15 turnsPeriodic context check reminder

These help prevent context bloat from degrading response quality.