Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 20, 2026

Summary

  • Add /opsx:bulk-archive skill that allows archiving multiple completed changes in a single operation
  • Add getBulkArchiveChangeSkillTemplate() and getOpsxBulkArchiveCommandTemplate() to skill templates
  • Register new skill and command in artifact-workflow.ts for generation via openspec artifact-experimental-setup

Features

  • Multi-select change selection via AskUserQuestion
  • Batch validation of artifacts, tasks, and delta specs for all selected changes
  • Spec conflict detection when multiple changes touch the same capability
  • Agentic conflict resolution by checking codebase for implementation evidence
  • Consolidated status table showing per-change status before confirmation
  • Single confirmation for the entire batch operation
  • Serial execution with ordered spec sync (chronological for conflicts)
  • Comprehensive summary showing archived/skipped/failed changes

Use Case

This is useful when working on multiple changes in parallel and wanting to archive them together after implementation is complete, rather than archiving each one individually.

Test plan

  • Run openspec artifact-experimental-setup to verify the skill and command files are generated
  • Verify /opsx:bulk-archive appears in available commands
  • Test with 2+ active changes to verify multi-select and batch archiving works

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added bulk archive workflow for efficiently managing and archiving multiple artifacts simultaneously
    • New skill interface and slash command available to access bulk archiving functionality
    • Bulk operations include comprehensive features: batch status aggregation, conflict resolution capabilities, and progress reporting
    • Enables streamlined batch management with automated execution steps and multiple output scenario handling

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

Add `/opsx:bulk-archive` skill that allows archiving multiple completed
changes in a single operation. Features include:

- Multi-select change selection via AskUserQuestion
- Batch validation of artifacts, tasks, and delta specs
- Spec conflict detection when multiple changes touch same capability
- Agentic conflict resolution by checking codebase for implementation
- Consolidated status table before confirmation
- Single confirmation for entire batch operation
- Comprehensive summary showing archived/skipped/failed changes

This is useful when working on multiple changes in parallel and wanting
to archive them together after implementation is complete.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

The changes introduce support for bulk archive artifact workflows by adding two new template functions (bulk-archive-change skill and bulk-archive OPSX command) to the skill-templates module and integrating them into the experimental artifact setup flow with corresponding imports and array registrations.

Changes

Cohort / File(s) Summary
Bulk Archive Template Declarations
src/core/templates/skill-templates.ts
Added getBulkArchiveChangeSkillTemplate() returning a SkillTemplate with batch status aggregation, conflict resolution, and execution workflows (~250 lines). Added getOpsxBulkArchiveCommandTemplate() returning a CommandTemplate with equivalent bulk-archiving logic for OPSX /bulk-archive command (~240 lines).
Experimental Setup Integration
src/commands/artifact-workflow.ts
Imported new bulk-archive template functions and wired them into experimental setup: registered openspec-bulk-archive-change skill and bulk-archive.md command into their respective creation sequences.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Hop, hop! Bulk archives we go,
Many files in one big flow,
Conflicts smoothed, statuses flow,
Templates built, commands aglow!

🚥 Pre-merge checks | ✅ 3
✅ 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 clearly and concisely summarizes the main change: adding a new bulk-archive skill for archiving multiple changes. It directly aligns with the primary objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

@greptile-apps
Copy link

greptile-apps bot commented Jan 20, 2026

Greptile Summary

This PR adds a new /opsx:bulk-archive skill that enables batch archiving of multiple completed changes in a single operation. The implementation follows the existing patterns established by other workflow skills (explore, archive, sync-specs, etc.).

Key additions:

  • getBulkArchiveChangeSkillTemplate() in skill-templates.ts - comprehensive 252-line skill template with detailed workflow instructions
  • getOpsxBulkArchiveCommandTemplate() in skill-templates.ts - corresponding slash command template (identical content)
  • Registration in artifact-workflow.ts - adds bulk-archive to skill/command generation arrays

Functionality:

  • Multi-select change selection via AskUserQuestion
  • Batch validation of artifacts, tasks, and delta specs across all selected changes
  • Intelligent spec conflict detection when multiple changes touch the same capability
  • Agentic conflict resolution by checking codebase for implementation evidence
  • Consolidated status table showing per-change readiness before confirmation
  • Serial execution with chronologically-ordered spec sync for conflicts
  • Comprehensive summary reporting archived/skipped/failed changes

Architecture:
The implementation is well-structured and consistent with existing skills. It reuses the openspec-sync-specs approach for spec merging and follows the same file organization patterns. The conflict resolution logic is particularly thoughtful - it searches the codebase to determine what's actually implemented rather than blindly applying changes.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are purely additive (no modifications to existing code), follow established patterns perfectly, and are well-documented. The implementation is self-contained within template functions that generate skill files, so there's no risk of runtime issues. The code quality is high with comprehensive instructions and guardrails.
  • No files require special attention

Important Files Changed

Filename Overview
src/commands/artifact-workflow.ts Added imports and registration for bulk-archive skill/command templates
src/core/templates/skill-templates.ts Added getBulkArchiveChangeSkillTemplate() and getOpsxBulkArchiveCommandTemplate() with comprehensive instructions

Sequence Diagram

sequenceDiagram
    participant User
    participant Agent as Claude Agent
    participant CLI as OpenSpec CLI
    participant FS as File System
    
    User->>Agent: /opsx:bulk-archive
    Agent->>CLI: openspec list --json
    CLI-->>Agent: List of active changes
    
    alt No active changes
        Agent->>User: No changes to archive
    else Active changes exist
        Agent->>User: AskUserQuestion (multi-select changes)
        User-->>Agent: Selected changes
        
        loop For each selected change
            Agent->>CLI: openspec status --change "name" --json
            CLI-->>Agent: Artifact status
            Agent->>FS: Read openspec/changes/name/tasks.md
            FS-->>Agent: Task completion status
            Agent->>FS: Check openspec/changes/name/specs/
            FS-->>Agent: Delta spec files
        end
        
        Agent->>Agent: Detect spec conflicts
        
        opt Conflicts exist
            loop For each conflict
                Agent->>FS: Read delta specs
                FS-->>Agent: Spec content
                Agent->>FS: Search codebase for implementation
                FS-->>Agent: Implementation evidence
                Agent->>Agent: Determine resolution order
            end
        end
        
        Agent->>User: Display status table with warnings
        Agent->>User: AskUserQuestion (confirm archive)
        User-->>Agent: Confirmation
        
        loop For each confirmed change (in resolution order)
            opt Delta specs exist
                Agent->>Agent: Execute sync-specs logic
                Agent->>FS: Update main specs
            end
            
            Agent->>FS: mkdir -p openspec/changes/archive
            Agent->>FS: mv changes/name to archive/YYYY-MM-DD-name
            FS-->>Agent: Archive result (success/fail)
        end
        
        Agent->>User: Display summary (archived/skipped/failed)
    end
Loading

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