fix(templates): stop instructing a second date prefix on dated archive names#1388
fix(templates): stop instructing a second date prefix on dated archive names#1388mc856 wants to merge 1 commit into
Conversation
…e names The archive-change and bulk-archive-change workflow templates told agents to unconditionally build the archive target as YYYY-MM-DD-<name>, so a change already named with the common YYYY-MM-DD- convention came out double-dated — the template-side twin of the CLI bug fixed in Fission-AI#1316, which a CLI fix cannot reach because the behavior is baked into instruction text. The generate-target-name step and the bulk guardrail now mirror the CLI rule: use the change name as-is when it already starts with a YYYY-MM-DD- prefix, otherwise prepend the current date. The literal mv commands move to <target-name> so an agent copying them verbatim cannot stack dates, and the onboarding walkthrough's archived-path example carries the same caveat. Regenerated skills/ and updated the pinned parity hashes; a new parity test guards the caveat and rejects the raw stacked mv target.
📝 WalkthroughWalkthroughArchive workflow templates, generated skill instructions, onboarding guidance, and parity tests now avoid adding a second ChangesArchive date-prefix deduplication
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/core/templates/workflows/archive-change.ts (1)
80-87: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUpdate mock outputs to reflect
<target-name>.The new
target-namederivation logic successfully prevents stacking date prefixes. However, theOutput On Successmock examples further down in these templates still hardcode the old format (e.g.,YYYY-MM-DD-<name>orYYYY-MM-DD-<change-1>). While the LLM will likely substitute the actual path correctly based on themvcommand, updating these placeholders ensures perfect consistency and removes any speculative chance of the LLM hallucinating a double date in its summary.
src/core/templates/workflows/archive-change.ts#L80-L87: update the mock output placeholders (e.g., around lines 106, 224, 237) to use<target-name>instead ofYYYY-MM-DD-<name>.src/core/templates/workflows/archive-change.ts#L198-L205: apply the same placeholder update to the OPSX command template's output examples.src/core/templates/workflows/bulk-archive-change.ts#L133-L138: update the mock output placeholders (e.g., around lines 211, 225) to use<change-n-target-name>(or similar) instead ofYYYY-MM-DD-<change-n>.src/core/templates/workflows/bulk-archive-change.ts#L385-L390: apply the same placeholder update to the bulk archive OPSX command template.(Note: Updating these templates will require regenerating the skill files and updating the corresponding Vitest hashes).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/core/templates/workflows/archive-change.ts` around lines 80 - 87, Update all archive workflow mock output placeholders to use the derived target-name values rather than hardcoded date-prefixed names: in src/core/templates/workflows/archive-change.ts at lines 80-87 and 198-205, use <target-name>; in src/core/templates/workflows/bulk-archive-change.ts at lines 133-138 and 385-390, use per-change placeholders such as <change-n-target-name>. Regenerate the corresponding skill files and update the affected Vitest hashes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/core/templates/workflows/archive-change.ts`:
- Around line 80-87: Update all archive workflow mock output placeholders to use
the derived target-name values rather than hardcoded date-prefixed names: in
src/core/templates/workflows/archive-change.ts at lines 80-87 and 198-205, use
<target-name>; in src/core/templates/workflows/bulk-archive-change.ts at lines
133-138 and 385-390, use per-change placeholders such as <change-n-target-name>.
Regenerate the corresponding skill files and update the affected Vitest hashes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8fa9e7b3-d9f0-4951-8d7e-002de945b881
📒 Files selected for processing (8)
.changeset/fix-template-archive-date-dedup.mdskills/openspec-archive-change/SKILL.mdskills/openspec-bulk-archive-change/SKILL.mdskills/openspec-onboard/SKILL.mdsrc/core/templates/workflows/archive-change.tssrc/core/templates/workflows/bulk-archive-change.tssrc/core/templates/workflows/onboard.tstest/core/templates/skill-templates-parity.test.ts
The agent workflow templates carry the same double-dating bug as the CLI (#1309, fixed in #1316): the archive-change and bulk-archive-change instructions tell agents to unconditionally build the archive target as
YYYY-MM-DD-<name>, so a change already named2026-07-04-voice-copilot-v1comes out asarchive/2026-07-07-2026-07-04-voice-copilot-v1— whatever the CLI does, because the behavior is baked into instruction text.This mirrors #1316's keep-as-is rule in the templates:
YYYY-MM-DD-prefix, otherwise prepend the current date; the literalmvtarget becomes<target-name>so an agent copying the command verbatim cannot stack dates.mvmoved to<target-name>, and the "Archive directory target uses current date" guardrail carries the caveat.skills/distribution and updated the pinned template hashes; a new parity test asserts every archive-instructing template carries the caveat and never reinstates the raw stackedmvtarget.Notes:
skills/mirror, so the fix also flows throughpnpm generate:skills.**Archived to:** …/YYYY-MM-DD-<name>/summary formulas and the bulk-> archive/YYYY-MM-DD-<change-N>/output examples) are left untouched: they illustrate summary format, while the naming rule is defined once at the step that generates the target. Happy to sweep them too if preferred.Fixes #1317
Written and reviewed with Claude Code using claude-fable-5
Summary by CodeRabbit
Bug Fixes
YYYY-MM-DD-.Documentation