Get the FREE Ultimate OpenClaw Setup Guide →

archive-kb

npx machina-cli add skill jikig-ai/soleur/archive-kb --openclaw
Files (1)
SKILL.md
1.9 KB

Archive Knowledge-Base Artifacts

Archive brainstorms, plans, and spec directories for a completed feature branch. The script generates timestamps internally and uses git mv to preserve history.

Usage

Run the archive script from the repository root. It derives the feature slug from the current branch name automatically:

bash ./plugins/soleur/skills/archive-kb/scripts/archive-kb.sh

To preview what would be archived without making changes:

bash ./plugins/soleur/skills/archive-kb/scripts/archive-kb.sh --dry-run

To archive a specific slug (override branch detection):

bash ./plugins/soleur/skills/archive-kb/scripts/archive-kb.sh my-feature-slug

What It Archives

The script discovers artifacts matching the feature slug in three locations:

DirectoryMatch PatternType
knowledge-base/brainstorms/Filename contains slugFile glob
knowledge-base/plans/Filename contains slugFile glob
knowledge-base/specs/feat-<slug>/Exact directory nameDirectory match

All archive/ subdirectories are excluded from discovery.

When to Use

  • During the compound skill's archival step (Step E in compound-capture)
  • After completing a feature when brainstorm/plan artifacts should be archived
  • During the ship workflow to archive feature artifacts before merge

Notes

  • The script calls git add before git mv to handle untracked files
  • A single timestamp is generated per invocation for consistency
  • Exit code 0 for success (including "no artifacts found")
  • Exit code 1 for errors (not in git repo, invalid arguments)
  • Spec directories are moved as a whole via git mv on the directory

Source

git clone https://github.com/jikig-ai/soleur/blob/main/plugins/soleur/skills/archive-kb/SKILL.mdView on GitHub

Overview

Archive brainstorms, plans, and specs into archive/ subdirectories with timestamp prefixes. It preserves Git history automatically by using git mv and avoids interactive prompts, making archiving repeatable from the repository root.

How This Skill Works

The script discovers artifacts matching the feature slug in knowledge-base/brainstorms, knowledge-base/plans, and knowledge-base/specs/feat-<slug>/, then moves them with git mv to corresponding archive paths. It generates a single timestamp per invocation and runs git add before git mv to capture untracked files. Archive directories are excluded from discovery to prevent nested archives.

When to Use It

  • When archiving completed features: move brainstorms, plans, and specs to archive/ with a timestamp.
  • During the ship workflow to preserve history before merging to main.
  • To validate changes, use --dry-run to preview what would be archived.
  • When you want to automatically derive the feature slug from the current branch.
  • If you need to archive a specific slug, override branch detection with a slug argument.

Quick Start

  1. Step 1: cd to the repository root
  2. Step 2: Run the script to archive (bash ./plugins/soleur/skills/archive-kb/scripts/archive-kb.sh, which derives the slug from the current branch)
  3. Step 3: Review the git changes; run with --dry-run first to preview results

Best Practices

  • Run from repository root to ensure correct path resolution.
  • Do a dry-run first to preview changes.
  • Verify the feature slug matches the targeted artifacts.
  • Ensure knowledge-base paths exist and artifacts are eligible for archiving.
  • Review git status after archiving to confirm moves and history preservation.

Example Use Cases

  • Archive artifacts for feature/checkout-flow after feature completion.
  • Dry-run to preview archiving for feature/landing-page-redesign.
  • Archive brainstorms and plans for feat-user-authentication.
  • Archive specs folders feat-user-authentication as part of ship workflow.
  • Archive before merge to main to keep history intact.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers