Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 7, 2026

Summary

  • Updates /opsx:archive to perform a quick check before prompting about spec sync
  • Instead of blindly asking "want to sync?", it now checks if sync is actually needed
  • Shows specific issues when sync is needed (which requirements missing, which main specs don't exist)
  • Skips prompt entirely if specs appear to already be synced
  • Improves archive output to always show specs status line

Changes

Smart sync check logic:

  1. Extract requirement names from delta specs (### Requirement: <name>)
  2. Check if corresponding main spec exists at openspec/specs/<capability>/spec.md
  3. Check if ADDED requirements appear in main spec
  4. Only prompt if sync appears needed

Archive output now shows specs status:

  • ✓ Synced to main specs - all requirements found in main specs
  • No delta specs - no specs directory in change
  • ⚠️ Not synced - user chose to archive without syncing

Test plan

  • Run /opsx:archive on a change with unsynced delta specs - should show specific issues and prompt
  • Run /opsx:archive on a change with synced delta specs - should proceed without prompting
  • Run /opsx:archive on a change without delta specs - should proceed without sync-related checks
  • Verify archive summary includes specs status line

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added synchronization status checks for specification deltas with clear status indicators (Synced / Not Synced / No Delta Specs).
    • Added inline warning notifications with direct sync flow options when synchronization updates are needed.
  • Updates

    • Updated template prompts and messaging to display new sync-status indicators consistently across related templates.

✏️ Tip: You can customize this high-level summary in your review settings.

Instead of blindly asking "want to sync?", archive now performs a quick
check to see if delta specs actually need syncing:

- Extracts requirement names from delta specs
- Checks if corresponding main spec exists
- Checks if ADDED requirements appear in main spec
- Only prompts if sync appears needed

Also improves archive output to always show specs status:
- ✓ Synced to main specs
- No delta specs
- ⚠️ Not synced
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

This PR replaces the delta-specs prompt flow with a new quick sync-check flow in the skill templates. The updated flow detects delta specs, extracts added requirements, verifies sync status against main specs, and conditionally presents inline warnings with sync options or proceeds without prompting. Output and messaging have been updated to reflect the new Synced / Not Synced / No Delta Specs status concept across archive and command templates.

Changes

Cohort / File(s) Summary
Delta-specs sync-check flow replacement
src/core/templates/skill-templates.ts
Replaced previous delta-specs prompt flow with quick sync-check logic across skill templates (archive, opsx-archive, and related command templates); detects delta specs existence, extracts added requirements, validates against main specs, presents inline warning when sync needed, and updates success outputs with new Specs status indicators (Synced / Not Synced / No Delta Specs); minor wording adjustments to prompts and guardrails for consistency

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 A rabbit's ode to swifter syncs:

Delta specs once lingered long,
Now a quick check rights the wrong—
Sync or skip, the choice is bright,
Templates aligned, all feels right! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding smart sync check functionality to the /opsx:archive command. It is concise, specific, and clearly identifies the primary modification.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/core/templates/skill-templates.ts (1)

1446-1457: Consider consolidating duplicate output blocks.

The "Output On Success (No Delta Specs)" block (lines 1446-1457) is nearly identical to the standard "Output On Success" block (lines 1435-1444), differing only in the **Specs:** line value. While this explicit documentation is helpful for template consumers, it introduces some duplication.

This is acceptable as-is since templates benefit from explicit examples, but if more status variants are added in the future, consider using a single output block with inline notes about the Specs: line variations.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7f5a42 and 2cec5f7.

📒 Files selected for processing (1)
  • src/core/templates/skill-templates.ts
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/specs/**/spec.md : Use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` headers in spec delta files
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/*.md : Scaffold proposal using `proposal.md`, `tasks.md`, optional `design.md`, and delta specs under `openspec/changes/<id>/`
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/*.md : Scaffold proposal using `proposal.md`, `tasks.md`, optional `design.md`, and delta specs under `openspec/changes/<id>/`

Applied to files:

  • src/core/templates/skill-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/specs/**/spec.md : Use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` headers in spec delta files

Applied to files:

  • src/core/templates/skill-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Use `openspec archive <change-id> --skip-specs --yes` for tooling-only changes

Applied to files:

  • src/core/templates/skill-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/*/tasks.md : Ensure `tasks.md` contains implementation checklist with numbered sections and checkbox items

Applied to files:

  • src/core/templates/skill-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/specs/**/spec.md : Include at least one `#### Scenario:` per requirement in spec delta files

Applied to files:

  • src/core/templates/skill-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Move completed changes from `changes/[name]/` to `changes/archive/YYYY-MM-DD-[name]/` after deployment

Applied to files:

  • src/core/templates/skill-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Search existing work using `openspec spec list --long`, `openspec list` for enumerating changes; use `rg` only for full-text search

Applied to files:

  • src/core/templates/skill-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Run `openspec validate [change-id] --strict` before requesting approval

Applied to files:

  • src/core/templates/skill-templates.ts
🔇 Additional comments (6)
src/core/templates/skill-templates.ts (6)

1102-1133: LGTM - Clear smart sync check logic for the skill template.

The sync check flow is well-structured:

  • Extracts requirement names from delta specs using the ### Requirement: <name> pattern (consistent with learnings about delta spec format).
  • Checks main spec existence and presence of ADDED requirements.
  • Conditionally prompts only when sync is actually needed.

One minor observation: the check only verifies ADDED requirements against main specs. MODIFIED and REMOVED requirements are noted but not validated against the main spec. This seems intentional per the PR objectives (focusing on whether "requirements appear in the main spec"), but worth confirming this is the desired behavior since MODIFIED requirements that don't exist in main specs could also indicate a sync issue.


1169-1169: LGTM - Output format clearly communicates specs status.

The three status variants ("✓ Synced to main specs", "No delta specs", "⚠️ Not synced") provide clear feedback to users about the state of their delta specs.


1180-1181: LGTM - Guardrails updated to reflect the new sync check approach.

The guardrails now document the quick sync check behavior, which helps maintain consistency with the implementation instructions above.


1374-1405: Sync check logic is consistent with skill template - good for maintainability.

The command template (getOpsxArchiveCommandTemplate) mirrors the skill template (getArchiveChangeSkillTemplate) sync check logic, which ensures consistent behavior regardless of how users invoke the archive functionality.

Minor difference noted: Line 1400 references /opsx:sync logic while Line 1128 in the skill template references "openspec-sync-specs skill". Both are functionally equivalent but use different terminology appropriate to their context (command vs skill).


1467-1472: Warning output correctly captures all three warning scenarios.

The "Output On Success With Warnings" block now includes the delta specs not synced case alongside incomplete artifacts and tasks, providing comprehensive feedback to users.


1498-1500: Guardrails appropriately document the quick sync check approach.

The guardrail on line 1498 succinctly describes the sync check mechanism, maintaining consistency with the skill template's guardrails.

@TabishB
Copy link
Contributor Author

TabishB commented Jan 7, 2026

Upgrade notes

To get the new behavior, re-run the experimental setup command:

openspec artifact-experimental-setup

This regenerates the skill and command files in .claude/ from the updated templates.

@TabishB TabishB merged commit cd172a4 into main Jan 7, 2026
7 checks passed
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