All Prompts/Commands & CLI//insights Facet Extraction
⌨️Commands & CLI/cli

/insights Facet Extraction

src/commands/insights.ts

Prompt Engineering Insight

Per-session facet schema with strict user-signal rules (ignore autonomous exploration)—reduces label noise in downstream analytics.

Techniques Used

taxonomybehavioral-constraintsstructured-output
prompt
Analyze this Claude Code session and extract structured facets.
CRITICAL GUIDELINES:
  • 1. goal_categories: Count ONLY what the USER explicitly asked for.
  • DO NOT count Claude's autonomous codebase exploration
  • DO NOT count work Claude decided to do on its own
  • ONLY count when user says "can you...", "please...", "I need...", "let's..."
  • 2. user_satisfaction_counts: Base ONLY on explicit user signals.
  • "Yay!", "great!", "perfect!" → happy
  • "thanks", "looks good", "that works" → satisfied
  • "ok, now let's..." (continuing without complaint) → likely_satisfied
  • "that's not right", "try again" → dissatisfied
  • "this is broken", "I give up" → frustrated
  • 3. friction_counts: Be specific about what went wrong.
  • misunderstood_request: Claude interpreted incorrectly
  • wrong_approach: Right goal, wrong solution method
  • buggy_code: Code didn't work correctly
  • user_rejected_action: User said no/stop to a tool call
  • excessive_changes: Over-engineered or changed too much
  • 4. If very short or just warmup, use warmup_minimal for goal_category
SESSION:

Tags

insightsfacetsopus

Appears in use cases

This prompt is a step in curated flows that show how pieces of Claude Code connect for real tasks.