搜索

PythonReactSEOPDF
GitHub Skill

archive-increments

Intelligent increment archiving expert. Analyzes increment age, status, and activity to recommend archiving strategy. Keeps workspace clean while preserving history. Activates for archive increments, clean workspace, too many increments, archive old, archive completed, preserve history, _archive folder.

anton-abyzov☆ 28 仓库 Stars3 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Increment Archive Manager

Expert at keeping the .specweave/increments/ folder clean and organized through intelligent archiving.

Core Knowledge

Archiving Philosophy

The 10-10-10 Rule:

  • 10 Active: Keep last 10 increments readily accessible
  • 10 Days: Archive increments inactive for >10 days
  • 10 Seconds: Archive operation should take <10 seconds
Archive Structure
.specweave/increments/
├── 0023-0032 (Active)          ← Last 10 increments
├── _archive/                   ← Completed/old increments
│   ├── 0001-0022              ← Historical increments
│   └── 0029                   ← Abandoned experiments
└── _abandoned/                 ← Failed/obsolete increments
Smart Detection Rules
Never Archive
  • Active increments (status: active)
  • Paused increments (status: paused) - may resume
  • Recent increments (last 10 by default)
  • Increments with open GitHub/JIRA/ADO issues
  • Increments with uncommitted changes
Always Archive
  • Completed >60 days ago
  • No activity >30 days (and status: completed)
  • Superseded increments (replaced by newer version)
  • Failed experiments (after confirmation)
Smart Grouping
  • Release groups: Archive all v0.7.x after v0.8.0 ships
  • Feature groups: Archive related increments together
  • Time-based: Quarter/month-based archiving

Usage Patterns

Keep Workspace Clean
# Interactive archiving - prompts for confirmation
/sw:archive-increments

# Keep only last 5 increments
/sw:archive-increments --keep-last 5

# Archive all completed increments
/sw:archive-increments --archive-completed
Prepare for Release
# Archive all pre-release increments
/sw:archive-increments --pattern "v0.7"

# Archive by date range
/sw:archive-increments --older-than 30d
Restore from Archive
# List archived increments
/sw:archive-increments --list-archived

# Restore specific increment
/sw:archive-increments --restore 0015

Configuration

Default Settings
{
  "archiving": {
    "keepLast": 10,              // Keep last 10 increments
    "autoArchive": false,        // Manual by default
    "archiveAfterDays": 60,      // Archive after 60 days
    "preserveActive": true,      // Never archive active
    "archiveCompleted": false    // Manual control
  }
}
Aggressive Cleanup
{
  "archiving": {
    "keepLast": 5,               // Minimal workspace
    "autoArchive": true,         // Auto-archive on completion
    "archiveAfterDays": 14,      // Archive after 2 weeks
    "archiveCompleted": true     // Auto-archive completed
  }
}

Archive Statistics

Current State Analysis

When asked about archiving, I analyze:

  • Number of active increments
  • Age of oldest active increment
  • Total size of increments folder
  • Number of completed increments
  • External sync status
Recommendations

Based on analysis, I suggest:

  • Overcrowded (>20 active): Archive all but last 10
  • Stale (many >30 days old): Archive by age
  • Post-release: Archive previous version increments
  • Large size (>100MB): Archive largest completed increments

Safety Features

Pre-Archive Checks
  1. Metadata validation: Check increment status
  2. External sync: Verify no open issues
  3. Git status: Check for uncommitted changes
  4. Dependencies: Check if referenced by active increments
  5. User confirmation: Show what will be archived
Archive Operations
  • Atomic moves: Use fs.move with overwrite protection
  • Preserve structure: Maintain full increment structure
  • Update references: Fix links in living docs
  • Reversible: Easy restore from archive
  • Audit trail: Log all archive operations

Smart Suggestions

When to Archive
  • After major release: Archive all pre-release increments
  • Quarterly cleanup: Archive increments >3 months old
  • Before new project phase: Archive previous phase work
  • Low disk space: Archive largest completed increments
Archive Patterns
  • By version: --pattern "v0.7" (all v0.7.x increments)
  • By feature: --pattern "auth|login" (auth-related)
  • By date: --older-than 30d (time-based)
  • By status: --archive-completed (all completed)

Integration Points

Status Line
  • Shows "23-32 (10 active, 22 archived)" format
  • Warns when >15 active increments
  • Suggests archiving when appropriate
Increment Commands
  • /sw:done can trigger auto-archive
  • /sw:status shows archive statistics
  • /sw:next considers archived increments
Living Docs
  • Archive preserves living docs references
  • Restore updates living docs links
  • Archive included in docs statistics

Best Practices

  1. Regular Cleanup: Archive monthly or after releases
  2. Keep Recent: Always keep last 5-10 increments
  3. Preserve Active: Never force-archive active work
  4. Group Related: Archive feature groups together
  5. Document Reasons: Add archive notes for context

Quick Reference

# Archive old increments
/sw:archive-increments --older-than 30d

# Keep workspace minimal
/sw:archive-increments --keep-last 5

# Archive after release
/sw:archive-increments --pattern "pre-release"

# Restore for reference
/sw:archive-increments --restore 0015

# Check archive stats
/sw:archive-increments --stats

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-28
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!