Repository navigation
fix(content): tell generators the current year and show past years in titles as this year - #1922
Merged
gkhngyk merged 1 commit intoNov 1, 2026
Conversation
… titles as this year
Prompt generators wrote the year into their examples ("Top CRM software
for small businesses 2026", "top email marketing tools for startups in
2026") and the opportunity generator had no year at all, so "2026" froze
into 2 opportunity titles, 4 representative questions, 2 prompts and a
fan-out query on dev, all stale on 2027-01-01.
- current-year.js: the year rule every generator now carries ("Leave years
out unless the need is about a particular year; when one belongs, write
<this year>, never an earlier year"), and refreshYears, which reads a
past year as this year and moves a range ending in a past year to end
this year ("2024-2025" in 2026: "2025-2026"). Years before 2025, after
since/from/until/before/after/between, and this year or later stay.
- Onboarding's prompts, the topics' prompts, prompt suggestions, a page's
prompt suggestions and the opportunity generator get the rule; the
examples no longer carry a year.
- Stored opportunities read with this year in their titles, asset titles
and question (cleanStoredOpportunity, and on the web: MCP, the Content
Plan, New content's opportunities and a content opportunity's action
title). Stored text is unchanged, and a tracked prompt's own text is
never changed: it is what the prompt is tracked by.
Help: Find content opportunities says years are left out and a past one
shows as this year.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
8 of 13 tasks
5 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Generated titles and prompts kept the year they were written in. Measured on dev: titles, suggestions and prompts said "2026" with no rule behind it, so next January they'll look a year old, and a past year already does. Generators now know the current year. Titles show a past year as this year. Customer priorities plan, P0 item 2 (list hygiene).
What changes
yearRule().refreshYears):cleanStoredOpportunity: title, asset titles and the representative question;content-opportunities.md;approved-articles.jsonrefreshed.No migration.
Follow-up (not in this PR): tracked prompts with a past year could get a suggestion: "This prompt names a past year; update it?" That would open a new prompt and keep the tracking history. Two prompts on dev name 2026.
Related issue
None. Customer priorities plan, P0 item 2.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
yearRule,refreshYears(past year, ranges, "since 2019", years before 2025) and each generator's prompt.Checklist
yarn lintpasses (0 errors; 7 old warnings in files this PR doesn't touch)yarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)Full checks on this branch (eb71379, from bf707cb; it merges cleanly with current main): web 798 files / 8,295 tests pass, and
yarn buildpasses. Serverformat:checkand lint are clean, and 352 files / 4,986 tests pass (3 skipped). It touches the same help article andapproved-articles.jsonas the same-question PR, in different sections.🤖 Generated with Claude Code