RCP-CWK-044 Project Archiver

Creates compressed long-term archives of project state as a single timestamped .tar.gz file suitable for cold storage or off-site transfer

Supports selective inclusion โ€” archive just snapshot bundles, just project files, or everything. Includes integrity verification and optional pruning of archived bundles to reclaim storage.


Project Archiver

Tags: Introduced in Beta, Safety, Archive, Backup, Compression, Storage, Cowork

TL;DR

What It Does
Creates compressed long-term archives of project state as a single timestamped .tar.gz file suitable for cold storage or off-site transfer. Supports selective inclusion — archive just snapshot bundles, just project files, or everything. Includes integrity verification and optional pruning of archived bundles to reclaim storage.
How It Works
Eight steps. (0) Validate the project root. (1) Inventory archivable content — count and size bundles and project files by scope. (2) Prepare output directory. (3) Build the .tar.gz archive with scope-appropriate content and exclusion patterns. (4) Verify archive integrity — file count, content preview, and gzip integrity check. (5) Optionally prune archived bundles with human confirmation. (6) Log the archive in ARCHIVE-LOG.txt. (7) Report final summary.
What To Expect
A timestamped .tar.gz file in the archives/ directory (or custom location). An integrity-verified archive containing the selected scope of project content. An archive log entry recording scope, size, file count, and integrity status.
Best Results When You
Know which scope fits your needs — “bundles” for backup consolidation, “project” for sharing without backup weight, “full” for comprehensive cold storage. Use meaningful labels for milestone archives.
Typical Time
5–15 minutes depending on project size. Bundle-only archives are fastest. Full archives of large projects with many snapshots take longer.
Difficulty
Intermediate — the recipe handles all tar/gzip operations and verification. Understanding archive scope options helps choose the right configuration.

How To Start

This recipe creates compressed archives for long-term storage of project state. Use it at project milestones, before major migrations, or to consolidate multiple snapshot bundles into a single archive. The archives/ directory is excluded from subsequent archives to prevent recursive inclusion.

STEP 1Configure Archive

Specify the project root and optionally customize scope, output location, and labeling.
Available parameters
  • project_root · string · required
    Root directory of the CRAFT project to archive.
  • archive_scope · string · optional · default: full
    What to include: “bundles” = snapshot bundles only, “project” = project + framework files without bundles, “full” = everything.
  • archive_dir · string · optional · default: {project_root}/archives
    Directory to write the archive file.
  • archive_label · string · optional · default: empty
    Optional label appended to the filename (e.g., “pre-v2-migration”). If empty, uses scope name.
  • prune_archived_bundles · boolean · optional · default: false
    If true and scope includes bundles, offers to delete archived bundles after verification. Human confirmation required.
  • exclude_patterns · list · optional · default: [".git", "node_modules", "__pycache__", "*.pyc"]
    Glob patterns to exclude from the archive.
Invocations
Full project archive
#H->AI::Directive: (Execute CWK-044 with project_root="/path/to/project")
Bundles only with pruning
#H->AI::Directive: (Execute CWK-044 with project_root="/path/to/project", archive_scope="bundles", prune_archived_bundles=true)
Labeled milestone archive
#H->AI::Directive: (Execute CWK-044 with project_root="/path/to/project", archive_label="pre-v2-migration")

Usage Examples

EXAMPLE 1Full project archive at milestone

User
We just finished the DR initiative. Archive the whole project.
Cat
Project Archiver — scope: full. Scanning: 8 bundles (240 MB), 1,247 project files (85 MB). Archive created: craft-archive-full-20260405-143022.tar.gz (52 MB compressed). Integrity verified. 1,255 files archived. Logged in ARCHIVE-LOG.txt. Complete.

EXAMPLE 2Bundle consolidation with pruning

User
We have too many snapshot bundles. Archive them and clean up.
Cat
Project Archiver — scope: bundles. Found 12 bundles (480 MB). Archive created (320 MB). Integrity verified. Delete 12 archived bundles to reclaim 480 MB? [User confirms] Bundles deleted. Space reclaimed. Archive logged.

EXAMPLE 3Project files only for sharing

User
I need to share just the project files without all the backup weight.
Cat
Project Archiver — scope: project. 1,247 project files (85 MB), excluding backups/. Archive created: craft-archive-project-20260405-160000.tar.gz (28 MB). Integrity verified. Archive logged.

How AI Reads This Recipe

When this recipe is triggered, the AI creates a compressed archive of project state. The AI should:
  1. Validate project root. Confirm directory exists. Check for .git presence. Report project root, git status, and archive scope.
  2. Inventory content. Based on archive_scope, count and size snapshot bundles and project files (excluding .git, backups, archives, and exclude_patterns). Abort if no archivable content found.
  3. Prepare output directory. Create archive_dir if it doesn’t exist.
  4. Build archive. Generate timestamped filename with scope and optional label. Execute tar -czf with scope-appropriate includes and exclusions. Report name and compressed size.
  5. Verify integrity. Count files in archive. Preview first 20 entries. Run gzip -t integrity check. If verification fails, report error and do NOT proceed to pruning.
  6. Optional bundle pruning. If prune_archived_bundles is true and scope includes bundles, ask human to confirm deletion. Delete only after explicit confirmation.
  7. Update archive log. Write or append to ARCHIVE-LOG.txt with archive metadata: name, date, scope, label, size, file count, bundle count, integrity status, path.
  8. Report. Present final summary: filename, size, scope, file count, bundle count, integrity status, location.

When To Use This Recipe

Use this recipe when you want to create a long-term archive of project state at a milestone, need to consolidate multiple snapshot bundles into a single compressed file, want to share project files in a portable format, or need to reclaim storage by archiving and pruning old bundles.
Do Not Use When
You need a quick incremental snapshot — use CWK-037 instead. For automated periodic backups, let CWK-ADM-076 handle the schedule. For disaster recovery from an existing archive, use CWK-041 which knows how to locate and restore from various backup sources.

Recipe FAQ

What’s the difference between CWK-044 and CWK-037?
CWK-037 creates git bundle snapshots for quick incremental backups. CWK-044 creates comprehensive .tar.gz archives for long-term cold storage — it can include project files, framework files, and bundles in a single compressed package. Think of CWK-037 as daily backups and CWK-044 as milestone archives.

Can I restore from a CWK-044 archive?
Yes — extract the .tar.gz with standard tools (tar -xzf). For full restores, CWK-041 (Disaster Recovery) can also work with archive contents. The archive preserves the original directory structure.

Why is .git excluded from archives?
Git repositories contain a lot of internal data that inflates archive size. The git state is better preserved via CWK-037 snapshot bundles (included in “bundles” and “full” scopes). Excluding .git keeps archives focused on file content.

Is it safe to prune bundles after archiving?
Yes, if the archive integrity check passes. The recipe runs gzip -t to verify before offering to prune. Pruning requires explicit human confirmation. If uncertain, keep the bundles — storage is cheaper than data loss.

How are archives named?
Format: craft-archive-{scope}-{label}-{YYYYMMDD-HHMMSS}.tar.gz. The label is optional — if omitted, just scope and timestamp are used. Examples: craft-archive-full-20260405-143022.tar.gz or craft-archive-bundles-pre-v2-migration-20260405-150000.tar.gz.

Version History

v1.00a — 2026-02-17
Initial creation. Compressed .tar.gz archives with three scope options (bundles, project, full). Integrity verification via gzip -t. Optional bundle pruning with human confirmation. Archive log tracking. Exclusion patterns for .git, node_modules, __pycache__, *.pyc.

Get this recipe with CRAFT for Claude Cowork

Cowork recipes ship bundled with CRAFT for Claude Cowork — there’s no separate download. Clone the framework once, and your AI runs every recipe automatically when invoked.

Pull anytime to stay on the latest version — free to clone, no login or email required.

Then start your session

Once CRAFT is in your project folder, open a new Cowork session and ask Claude to initialize. For example:

You

Please initialize my CRAFT session.

Claude

CRAFT session ready. Your project is loaded, your persona is active, and your recipes are available. What would you like to work on?

What is CRAFT for Claude Cowork?

Not familiar with Git? Download as a ZIP

No command line needed. Just download, move, and unzip:

  1. Open the CRAFT framework repo on GitHub.
  2. Click the green Code button, then choose Download ZIP.
  3. Move the downloaded ZIP into your Claude Cowork project folder.
  4. Unzip it: double-click on Mac, or right-click → Extract All on Windows.

Similar Posts