Clarify archive sync for new specs#1271
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughTwo archive workflow template functions gain explicit guidance for delta specs when the corresponding main spec is missing. Parity test hashes are updated, and a new test asserts the added instruction strings are present. ChangesArchive workflow missing main spec guidance
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
Pull request overview
Updates the archive-change workflow templates so agent-driven archive instructions explicitly handle delta specs whose target main spec does not yet exist (aligning guidance with the CLI behavior described in #1264).
Changes:
- Extends the archive workflow template instructions with a missing-main-spec decision branch for
ADDED/MODIFIED/RENAMED/REMOVEDrequirement ops. - Updates template parity hashes and adds a regression test asserting both the skill and
/opsx:archivetemplates contain the new guidance.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/core/templates/skill-templates-parity.test.ts | Updates expected template hashes and adds regression assertions for missing-main-spec guidance (but currently has a backtick-matching bug in the new assertions). |
| src/core/templates/workflows/archive-change.ts | Adds explicit instructions for how to handle delta specs when the corresponding main spec is missing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| expect(content).toContain('If a corresponding main spec does not exist yet'); | ||
| expect(content).toContain('ADDED` requirements as sync work that will create a new main spec'); | ||
| expect(content).toContain('MODIFIED` or `RENAMED` requirements as blocking errors'); | ||
| expect(content).toContain('Do not skip sync just because the target main spec is missing'); |
There was a problem hiding this comment.
he new assertions for the archive templates have mismatched backtick quoting: they look for "ADDED"/"MODIFIED" (missing the leading backtick), but the templates include markdown code spans like "ADDED" and "MODIFIED". As written, this test will fail even when the templates are correct.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@src/core/templates/workflows/archive-change.ts`:
- Around line 67-72: The missing-main-spec handling in archive-change.ts still
allows the generic "Archive without syncing" flow to continue even when
`MODIFIED` or `RENAMED` requirements are marked as blocking errors. Update the
logic around the missing-main-spec analysis in the workflow template so that the
archive/skip path is explicitly disabled when those blocking deltas are present,
and only allow proceed-with-archive behavior for cases like `ADDED` or `REMOVED`
that are allowed by the rules. Use the existing missing-main-spec decision block
and any sync/archive gating branch in archive-change.ts to enforce this stop
condition.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5cd9e663-2d9b-42ff-9a6b-2a0938be16b0
📒 Files selected for processing (2)
src/core/templates/workflows/archive-change.tstest/core/templates/skill-templates-parity.test.ts
Summary
Closes #1264 by making archive workflow instructions explicitly handle delta specs whose target main spec does not exist yet.
Changes
/opsx:archivecommand templates.ADDEDrequirements still need sync and create a new main spec.MODIFIED/RENAMEDas blocking for a new spec, andREMOVEDas ignored with a warning.Validation
./node_modules/.bin/vitest run test/core/templates/skill-templates-parity.test.tsnode build.js./node_modules/.bin/eslint src/core/templates/workflows/archive-change.tsSummary by CodeRabbit
Bug Fixes
ADDEDrequirements now proceed as sync work to create a new main spec;MODIFIED/RENAMEDrequirements are treated as blocking errors.REMOVEDrequirements are ignored with a warning; sync is no longer skipped due to a missing target, and the workflow will stop when blocking errors are present (without offering “archive without syncing”).Tests