Smith migrate specs

From ATTCKDigital/smith · View interactive version

Smith migrate specs is an AI agent skill from the GitHub repository ATTCKDigital/smith. One-time migration of existing flat spec folders into the system-based hierarchy under .specify/systems/.

How to use this skill

Skill file

Workflow requirement (Smith 20+): This skill must be invoked from inside an active top-level workflow (/smith-new, /smith-bugfix, /smith-debug, /smith-build). The workflow-gate hook will block standalone invocation. To use this skill standalone, start a top-level workflow first.

Smith Spec Migration

Migrate existing feature spec folders from specs/<NNN-feature>/ into the system-based hierarchy at .specify/systems/<system>/features/<NNN-feature>/.

Arguments: $ARGUMENTS

Prerequisites

Behavior

Step 1: Scan for Migratable Features

Scan specs/ for all feature spec folders. Exclude the following (they are not feature specs):

A valid feature folder must:

List all candidates with their folder name and a one-line summary from the first heading in their spec.md.

Step 2: System Detection (per feature)

For each feature folder, determine the primary system:

  1. Read the feature's spec.md — extract what the feature does, which services it touches, what data it modifies
  2. Read all .specify/systems/system-*/spec.md — understand each system's scope
  3. Determine primary_system — the system most directly impacted by the feature
  4. Determine also_affects — other systems the feature touches

Use these heuristics for mapping:

Also check git history and the feature's plan.md (if it exists) for additional context.

Step 3: Present & Confirm (One at a Time)

For each feature, present the proposed mapping:

Feature: 024-triage-review-actions
Summary: Add review actions (approve/reject/archive) to the triage log
Primary: system-05-communication-triage
Also affects: system-15-command-center
Files to move: spec.md, plan.md, tasks.md, checklists/, questions.md (5 items)

Move to: .specify/systems/system-05-communication-triage/features/024-triage-review-actions/

Confirm? [y/n/skip/quit]

IMPORTANT: Process ONE feature at a time. Do NOT batch-move all features without individual confirmation.

Step 4: Execute Migration

For each confirmed feature:

  1. Create the target directory: mkdir -p .specify/systems/<primary-system>/features/<feature-name>/
  2. Copy all files from specs/<feature-name>/ to the new location (copy, not move — we preserve originals until verified)
  3. Add frontmatter to the migrated spec.md if not already present:

```yaml


feature: <feature-name>

primary_system: <system-folder-name>

also_affects:

branch: <branch-name if detectable from git>

created: <date from spec or git>

status: complete


```

  1. Log the migration to .smith/vault/sessions/ (current session log if active)

Step 5: Summary

After processing all features (or quitting), display:

## Migration Summary

Migrated: 15 features
Skipped: 3 features
Remaining: 37 features (not yet processed)

### Migrated Features
| Feature | System | Path |
|---------|--------|------|
| 024-triage-review-actions | system-05-communication-triage | .specify/systems/system-05-communication-triage/features/024-triage-review-actions/ |
| ... | ... | ... |

### Skipped Features
| Feature | Reason |
|---------|--------|
| 025-nav-label-rename | User skipped |

Note: Original folders in specs/ are preserved. Once verified, you can remove them manually.

Flags

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.