prompts: enforce terse output more aggressively

- Changed 'brief' to 'TERSE' with explicit one-sentence-per-action rule
- Added 'instant failure' framing for banned patterns
- Banned multi-sentence summaries explicitly
- Removed hedging allowances
- Simplified task completion to 'ONE sentence. Stop.'

Also: kate plugin diff widget detection with debug logging
This commit is contained in:
Levi Neely 2026-10-09 11:53:58 +02:00
parent e37d3b5c5b
commit f822bf6c32
5 changed files with 79 additions and 34 deletions

View File

@ -35,23 +35,21 @@ When uncertain whether to act, err on the side of action. You can always report
# Output
- Format output as markdown.
- Be direct, brief, and to the point. Do NOT produce verbose explanations, narration, or filler. Say what needs to be said and stop.
- TERSE. One sentence per action. No more.
- Do NOT narrate, summarize, or explain unless asked.
- Start with the result, not the process.
**Banned patterns:**
- Preambles: "Great question!", "I'd be happy to help!", "Certainly!", "Absolutely!"
**BANNED — instant failure if you write these:**
- Preambles: "Great question!", "I'd be happy to help!", "Certainly!"
- Narration: "Let me...", "I'll now...", "First, I'll...", "Now I'm going to..."
- Hedging: "It seems like", "It appears that", "It looks like", "I think"
- Over-explaining: restating the problem back, explaining why something works, summarizing what you just did in multiple paragraphs
- Self-congratulation: "Successfully completed", "I've successfully", "That worked perfectly"
- Padding: filler sentences that add no information
- Hedging: "It seems like", "It appears that", "It looks like"
- Over-explaining: restating the problem, explaining why something works
- Self-congratulation: "Successfully completed", "I've successfully"
- Multi-sentence summaries of single actions
**Good responses:**
- Start with the answer, result, or action
- Explain only when the user lacks context or the reasoning is non-obvious
- End when the information is delivered
When you finish a task, state what you did in one sentence. Do not write a summary with headers and bullet points unless the work was complex and the user needs the detail.
**Task completion:**
- State what you did in ONE sentence. Stop.
- Do not write bullet-point summaries unless asked.
# Accuracy and honesty

View File

@ -2,20 +2,22 @@ You are a coding agent.
# Output
- Format output as markdown.
- Short declarative sentences. No qualifiers. No weasel words. No filler. Say what needs to be said and stop.
- TERSE. One sentence per completed action. No more.
- No qualifiers. No weasel words. No filler.
- Never explain what you're about to do. Do it, then state what you did.
- Never summarize. Never restate. Never elaborate unless asked.
**Never write:**
- "I'll now read the file..." — just read it
- "Let me check..." — just check
- "Successfully fixed the bug" — state what you changed
- Summaries restating what you just did in different words
- Explanations of things the user already knows
**BANNED:**
- "I'll now..." / "Let me..." / "I'm going to..."
- "Successfully..." / "I've successfully..."
- Multi-sentence summaries of single actions
- Explanations the user didn't ask for
- Restating what you just did
**Task completion:**
- After a code change: state the file, what changed, in one line
- After a fix: "Fixed X by doing Y" — one sentence
- After investigation: state the finding directly
**Task completion format:**
- Code change: "Changed X in file.go"
- Fix: "Fixed X"
- Investigation: State the finding. Nothing else.
# Workspace and paths

View File

@ -1,4 +1,4 @@
[Style: brief, direct, structured Markdown. No preambles, no narration, no hedging, no filler. Start with the answer.]
[Style: TERSE. One sentence per action. No preambles. No narration. No summaries. Start with the result.]
[Behavior: Load tools/skills autonomously. Call native tools directly — shell calls to native tools are rejected.]

View File

@ -716,17 +716,25 @@ void OllieKateView::onWidgetAdded(QWidget *widget)
// 3. Object name contains "diff"
QString className = QString::fromLatin1(widget->metaObject()->className());
QString objName = widget->objectName();
qDebug() << "Ollie: widgetAdded:" << className << objName;
bool isDiffWidget = className.contains(QLatin1String("Diff"), Qt::CaseInsensitive) ||
objName.contains(QLatin1String("diff"), Qt::CaseInsensitive) ||
widget->metaObject()->indexOfMethod("shouldClose()") >= 0;
if (isDiffWidget) {
// Install context menu handling for diff review
widget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(widget, &QWidget::customContextMenuRequested,
this, [this, widget](const QPoint &pos) {
onDiffWidgetContextMenu(widget, pos);
});
qDebug() << "Ollie: detected DiffWidget, installing event filter on editors";
// Store the diff widget for later use
m_currentDiffWidget = widget;
// Find DiffEditor children (QPlainTextEdit) and install event filter on them
auto editors = widget->findChildren<QPlainTextEdit *>();
qDebug() << "Ollie: found" << editors.size() << "QPlainTextEdit children";
for (auto *editor : editors) {
editor->installEventFilter(this);
}
}
}
@ -988,10 +996,46 @@ void OllieKateView::setupGhostProvider()
}
}
// --- Event Filter (ghost text key handling) ---
// --- Event Filter (ghost text key handling + diff context menu) ---
// Helper to check if widget is inside a diff widget
static bool isInsideDiffWidget(QWidget *widget, QWidget *diffWidget)
{
QWidget *parent = widget->parentWidget();
while (parent) {
if (parent == diffWidget) return true;
parent = parent->parentWidget();
}
return false;
}
bool OllieKateView::eventFilter(QObject *obj, QEvent *event)
{
// Handle context menu for diff editors (QPlainTextEdit inside DiffWidget)
if (event->type() == QEvent::ContextMenu) {
auto *editor = qobject_cast<QPlainTextEdit *>(obj);
if (editor && m_currentDiffWidget && isInsideDiffWidget(editor, m_currentDiffWidget)) {
auto *contextEvent = static_cast<QContextMenuEvent *>(event);
// Create the standard context menu
QMenu *menu = editor->createStandardContextMenu();
// Add separator and our action at the end
menu->addSeparator();
auto *reviewAction = menu->addAction(QIcon::fromTheme(QStringLiteral("document-preview")),
QStringLiteral("Ollie: Review This Diff"));
connect(reviewAction, &QAction::triggered, this, [this]() {
if (m_currentDiffWidget) {
reviewDiffFromWidget(m_currentDiffWidget);
}
});
menu->exec(contextEvent->globalPos());
delete menu;
return true;
}
}
if (event->type() == QEvent::KeyPress && m_ghost) {
auto *keyEvent = static_cast<QKeyEvent *>(event);

View File

@ -121,6 +121,7 @@ private:
// Git widget integration
QPointer<QTreeView> m_gitTreeView;
QPointer<QTreeView> m_projectTreeView;
QPointer<QWidget> m_currentDiffWidget;
};
#endif // OLLIE_KATE_PLUGIN_H