All Prompts/Commands & CLI/Session Title Generation
⌨️Commands & CLI/cli

Session Title Generation

src/utils/sessionTitle.ts

Prompt Engineering Insight

Sentence-case session titles with JSON schema and contrastive good/bad examplesβ€”few-shot shaping for metadata that must stay scannable in lists.

Techniques Used

few-shot-examplesstructured-outputnegative-examples
prompt
Generate a concise, sentence-case title (3-7 words) that captures the main topic or goal of this coding session. The title should be clear enough that the user recognizes the session in a list. Use sentence case: capitalize only the first word and proper nouns.
Return JSON with a single "title" field.
Good examples:
{"title": "Fix login button on mobile"}
{"title": "Add OAuth authentication"}
{"title": "Debug failing CI tests"}
{"title": "Refactor API client error handling"}
Bad (too vague): {"title": "Code changes"}
Bad (too long): {"title": "Investigate and fix the issue where the login button does not respond on mobile devices"}
Bad (wrong case): {"title": "Fix Login Button On Mobile"}

Tags

titlemetadata