Skip to content

fix(keyword-detector): remove duplicate separator from ultrawork templates#2734

Merged
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
ndaemy:fix/remove-duplicate-ultrawork-separator
Mar 25, 2026
Merged

fix(keyword-detector): remove duplicate separator from ultrawork templates#2734
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
ndaemy:fix/remove-duplicate-ultrawork-separator

Conversation

@ndaemy
Copy link
Copy Markdown
Contributor

@ndaemy ndaemy commented Mar 21, 2026

Summary

  • Remove trailing --- separator from all 4 ultrawork template files (default, gpt, gemini, planner)
  • The keyword-detector hook (hook.ts:120) already injects --- between the injected message and the user's original text, causing a double --- when ultrawork mode activates

Problem

The keyword-detector hook concatenates keyword messages with user text using:

output.parts[textPartIndex].text = `${allMessages}\n\n---\n\n${originalText}`

All ultrawork templates also end with \n\n---\n\n, resulting in:

</ultrawork-mode>

---

---

[user message]

The search and analyze keyword messages do not include a trailing ---, producing the correct single separator. This inconsistency was introduced in the initial commit (64825158) and carried forward to all subsequent ultrawork variants (gpt, gemini, planner).

Changes

Removed the trailing \n\n---\n\n from the template string in each file, leaving \n\n so the hook's separator is the only one rendered.

  • src/hooks/keyword-detector/ultrawork/default.ts
  • src/hooks/keyword-detector/ultrawork/gpt.ts
  • src/hooks/keyword-detector/ultrawork/gemini.ts
  • src/hooks/keyword-detector/ultrawork/planner.ts

Summary by cubic

Removed the trailing --- from all ultrawork templates to prevent double separators when ultrawork mode activates. The keyword-detector hook already inserts --- between the injected message and the user's text, so only one divider is shown.

Written for commit 07ea8de. Summary will update on new commits.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 21, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Fixes a formatting issue by removing redundant separators from templates. Purely a string modification with no risk of logic regressions.


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

@ndaemy
Copy link
Copy Markdown
Contributor Author

ndaemy commented Mar 21, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Mar 21, 2026
@code-yeongyu code-yeongyu added the triage:bug-fix PR: Bug fix label Mar 24, 2026
@code-yeongyu code-yeongyu merged commit c4aa380 into code-yeongyu:dev Mar 25, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:bug-fix PR: Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants