Script lifecycle manager

From 5throck/ai-workspace-standards · View interactive version

Script lifecycle manager is an AI agent skill from the GitHub repository 5throck/ai-workspace-standards. Manages the creation, versioning, deprecation, and maintenance of automation scripts across the workspace and templates. Use when: creating new scripts, updating script versions, deprecating scripts, or managing script dependencies in SCRIPTS.md.

How to use this skill

Skill file

Overview

This skill provides a systematic approach to managing the lifecycle of automation scripts (scripts/*.sh, scripts/*.ps1, scripts/*.ts) in accordance with workspace standards. It ensures scripts are properly registered in SCRIPTS.md, have strict version bumps, handle dependencies, and follow deprecation protocols (90-day notice).

When to Use This Skill

Create New Script:

Update Existing Script:

Deprecate Script:

Lifecycle Management Rules

  1. Ownership Layers:
  1. State Management:
  1. Dependency Tracking:
  1. Encoding & Compatibility:
  1. PS5.1 Error Propagation:

```powershell

try { git <command> 2>&1 | Out-Null } catch { }

```

Step-by-Step Execution

Step 1: Script Implementation

Implement the requested logic in the appropriate script file. If adding a new script, ensure both .sh and .ps1 pairs are created (or use .ts for cross-platform). Apply the UTF-8 safeguard to .ps1 files.

Step 2: Update Registry

Update the scripts/SCRIPTS.md registry (L0 SSOT) with the new version, status, and any dependencies. After making changes, run bun run propagate:apply to propagate to L1.

Step 3: Auto-generate Documentation

Run the generate-scripts-readme.ts script to ensure README.md is synchronized with SCRIPTS.md.

Step 4: Verification

Run bun scripts/verify-scripts.ts (if available) to ensure dependencies are valid and no circular dependencies exist.

L3 Projects: When registering a new script in an L3 project's scripts/SCRIPTS.md, use source: L2 (the script's origin layer — the L2 variant template it was scaffolded from) and layer: L0+L1 (not L0). Scripts placed in scripts/<variant>/ subdirectories should be registered in the sub-registry at scripts/<variant>/SCRIPTS.md, not the main registry. See §6.5 Script Lifecycle Management for Tier 3 filtering details.

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.