## CHANGES

- Synopsis parsing now strips conversational filler to surface real summaries 🔍
- Added robust filler phrase detection across many variants and punctuation 🧹
- Synopsis fallback now skips filler-only outputs, returning “Task completed” 🛟
- Renderer short-summary generator ignores filler sentences before summarizing 🧠
- Autorun synopsis prompt updated to enforce scientific, verb-first logging 📓
- Expanded test suite to verify filler filtering and fallback behavior 🧪
This commit is contained in:
Pedram Amini
2026-01-22 13:25:40 -06:00
parent 2667cbdd77
commit a4213b8f66
4 changed files with 95 additions and 5 deletions

View File

@@ -128,6 +128,68 @@ describe('synopsis', () => {
});
});
describe('conversational filler filtering', () => {
it('should skip "Excellent!" and use next meaningful line', () => {
const response = 'Excellent!\n\nThe markdown generation is working perfectly.';
const result = parseSynopsis(response);
expect(result.shortSummary).toBe('The markdown generation is working perfectly.');
});
it('should skip "Perfect!" and use next meaningful line', () => {
const response = 'Perfect!\n\nAll tests are passing now.';
const result = parseSynopsis(response);
expect(result.shortSummary).toBe('All tests are passing now.');
});
it('should skip multiple filler words at start', () => {
const response = 'Great!\n\nExcellent!\n\nFixed the authentication bug in login handler.';
const result = parseSynopsis(response);
expect(result.shortSummary).toBe('Fixed the authentication bug in login handler.');
});
it('should skip filler with exclamation marks and variations', () => {
const fillers = [
'Excellent!',
'Perfect!',
'Great!',
'Awesome!',
'Done!',
'Wonderful!',
'Fantastic!',
];
for (const filler of fillers) {
const response = `${filler}\n\nActual content here.`;
const result = parseSynopsis(response);
expect(result.shortSummary).toBe('Actual content here.');
}
});
it('should skip phrase fillers like "Looks good!"', () => {
const response = 'Looks good!\n\nUpdated the config file with new settings.';
const result = parseSynopsis(response);
expect(result.shortSummary).toBe('Updated the config file with new settings.');
});
it('should skip "All done!" style fillers', () => {
const response = 'All done!\n\nRefactored the component to use hooks.';
const result = parseSynopsis(response);
expect(result.shortSummary).toBe('Refactored the component to use hooks.');
});
it('should fall back to "Task completed" if only filler exists', () => {
const response = 'Excellent!';
const result = parseSynopsis(response);
expect(result.shortSummary).toBe('Task completed');
});
});
describe('fallback behavior', () => {
it('should use first line as summary when no format detected', () => {
const response = 'Just a plain text response\nWith multiple lines.\nAnd more content.';

View File

@@ -5,9 +5,11 @@ Provide a brief synopsis of what you just accomplished in this task using this e
**Details:** [A paragraph with more specifics about what was done, files changed, etc.]
Rules:
- Write in a scientific log style: factual, concise, and informative. Example: "Added user authentication endpoint with JWT validation" not "I helped you add authentication".
- Be specific about what was actually accomplished, not what was attempted.
- Focus only on meaningful work that was done. Omit filler phrases like "the task is complete", "no further action needed", "everything is working", etc.
- NEVER start with conversational words like "Excellent!", "Perfect!", "Great!", "Awesome!", "Done!", or any similar expressions. These add no information value.
- NEVER include preamble about session context, interaction history, or caveats like "This is our first interaction", "there's no prior work to summarize", "you asked me to", etc. Jump straight to the accomplishment.
- Start directly with the action taken (e.g., "Fixed button visibility..." not "You asked me to fix...").
- Start directly with the action taken using a verb (e.g., "Fixed button visibility..." not "You asked me to fix..." and not "Excellent! Fixed...").
- If nothing meaningful was accomplished (no code changes, no files modified, no research completed, just greetings or introductions), respond with ONLY the text: NOTHING_TO_REPORT
- Use NOTHING_TO_REPORT when the conversation was just a greeting, introduction, or there genuinely was no work to summarize.

View File

@@ -1983,11 +1983,19 @@ function MaestroConsoleInner() {
}
// Create a short summary from the last AI response
// Skip conversational fillers like "Excellent!", "Perfect!", etc.
let summary = '';
if (lastAiLog?.text) {
const text = lastAiLog.text.trim();
if (text.length > 10) {
const firstSentence = text.match(/^[^.!?\n]*[.!?]/)?.[0] || text.substring(0, 120);
// Match sentences (text ending with . ! or ?)
const sentences = text.match(/[^.!?\n]+[.!?]+/g) || [];
// Pattern to detect conversational filler sentences
const fillerPattern =
/^(excellent|perfect|great|awesome|wonderful|fantastic|good|nice|cool|done|ok|okay|alright|sure|yes|yeah|absolutely|certainly|definitely|looks?\s+good|all\s+(set|done|ready)|got\s+it|understood|will\s+do|on\s+it|no\s+problem|no\s+worries|happy\s+to\s+help)[!.\s]*$/i;
// Find the first non-filler sentence
const meaningfulSentence = sentences.find((s) => !fillerPattern.test(s.trim()));
const firstSentence = meaningfulSentence?.trim() || text.substring(0, 120);
summary =
firstSentence.length < text.length
? firstSentence

View File

@@ -38,6 +38,23 @@ function isTemplatePlaceholder(text: string): boolean {
return placeholderPatterns.some((pattern) => pattern.test(text.trim()));
}
/**
* Check if text is a conversational filler that should be stripped.
* These are words/phrases that add no information value to a scientific log.
*/
function isConversationalFiller(text: string): boolean {
const fillerPatterns = [
/^(excellent|perfect|great|awesome|wonderful|fantastic|good|nice|cool|done|ok|okay|alright|sure|yes|yeah|yep|absolutely|certainly|definitely|indeed|affirmative)[\s!.]*$/i,
/^(that's|that is|this is|it's|it is)\s+(great|good|perfect|excellent|done|complete|finished)[\s!.]*$/i,
/^(all\s+)?(set|done|ready|complete|finished|good\s+to\s+go)[\s!.]*$/i,
/^(looks?\s+)?(good|great|perfect)[\s!.]*$/i,
/^(here\s+you\s+go|there\s+you\s+go|there\s+we\s+go|here\s+it\s+is)[\s!.]*$/i,
/^(got\s+it|understood|will\s+do|on\s+it|right\s+away)[\s!.]*$/i,
/^(no\s+problem|no\s+worries|happy\s+to\s+help)[\s!.]*$/i,
];
return fillerPatterns.some((pattern) => pattern.test(text.trim()));
}
/**
* Check if a response indicates nothing meaningful to report.
* Looks for the NOTHING_TO_REPORT sentinel token anywhere in the response.
@@ -94,15 +111,16 @@ export function parseSynopsis(response: string): ParsedSynopsis {
let shortSummary = summaryMatch?.[1]?.trim() || '';
let details = detailsMatch?.[1]?.trim() || '';
// Check if summary is a template placeholder (model output format instructions literally)
if (!shortSummary || isTemplatePlaceholder(shortSummary)) {
// Try to find actual content by looking for non-placeholder lines
// Check if summary is a template placeholder or conversational filler
if (!shortSummary || isTemplatePlaceholder(shortSummary) || isConversationalFiller(shortSummary)) {
// Try to find actual content by looking for non-placeholder, non-filler lines
const lines = clean.split('\n').filter((line) => {
const trimmed = line.trim();
return (
trimmed &&
!trimmed.startsWith('**') &&
!isTemplatePlaceholder(trimmed) &&
!isConversationalFiller(trimmed) &&
!trimmed.match(/^Rules:/i) &&
!trimmed.match(/^-\s+Be specific/i) &&
!trimmed.match(/^-\s+Focus only/i) &&