Skip to content

Conversation

@minkichoe-lbox
Copy link
Contributor

@minkichoe-lbox minkichoe-lbox commented Jan 16, 2026

Summary

  • Replace hardcoded year references (2024/2025) with dynamic ${new Date().getFullYear()} calculation
  • Prevents prompt from becoming outdated each year

Changes

  • src/agents/librarian.ts: 5 occurrences updated (lines 49, 50, 51, 52, 252)

Testing

  • bun run typecheck passes
  • bun run build succeeds

Summary by cubic

Switched the librarian agent’s date guidance to use the current year dynamically instead of hardcoded 2024/2025. This keeps search instructions and “Latest Info” queries up to date automatically.

  • Bug Fixes
    • Replaced hardcoded years with new Date().getFullYear() (and -1 where needed) in date checks, search examples, and the tooling table.

Written for commit 47e64a4. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

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

Copy link

@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.

1 issue found across 1 file

Confidence score: 3/5

  • Escaped template literal in src/agents/librarian.ts causes the prompt to show the literal ${new Date().getFullYear()} instead of the actual year, so users will see stale text immediately.
  • This is a concrete behavior regression that should be corrected before merge to avoid confusing users about the date context.
  • Pay close attention to src/agents/librarian.ts - escaped template literal keeps ${new Date().getFullYear()} literal.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/agents/librarian.ts">

<violation number="1" location="src/agents/librarian.ts:49">
P2: Escaped template literal prevents dynamic year; prompt contains literal `${new Date().getFullYear()}` text instead of interpolated current year.</violation>
</file>

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
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@minkichoe-lbox
Copy link
Contributor Author

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

github-actions bot added a commit that referenced this pull request Jan 16, 2026
@kdcokenny
Copy link
Collaborator

Awesome, thanks!

@kdcokenny kdcokenny merged commit cf7b23b into code-yeongyu:dev Jan 16, 2026
5 of 7 checks passed
@minkichoe-lbox minkichoe-lbox deleted the fix/dynamic-year branch January 17, 2026 03:34
sssgun pushed a commit to sssgun/oh-my-opencode that referenced this pull request Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants