Skip to content
Back to skills

Phase Init

ASecurity

Instantiate a phase artefact (requirements-spec / design-spec / test-spec) from the Programme bundle's template into docs/specs/<feature-id>/. Refuses to overwrite existing artefacts.

  • 41 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
researchbash

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add SteveGJones/ai-first-sdlc-practices --skill phase-init --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Phase Init?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Phase Init
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/stevegjones-phase-init/badge)](https://www.skillsdirectory.com/skills/stevegjones-phase-init)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: phase-init
description: Instantiate a phase artefact (requirements-spec / design-spec / test-spec) from the Programme bundle's template into docs/specs/<feature-id>/. Refuses to overwrite existing artefacts.
disable-model-invocation: false
argument-hint: "<phase> <feature-id>"
---
<!-- implements: DES-programme-skills-002 -->

# Initialise a Phase Artefact

Instantiate a phase artefact from the Programme bundle's template.

## Arguments

- `<phase>` — one of `requirements`, `design`, `test`
- `<feature-id>` — short slug for the feature (e.g., `oauth-flow`, `cross-library-query`)

## Steps

```bash
PHASE="$1"
FEATURE_ID="$2"

if [ -z "$PHASE" ] || [ -z "$FEATURE_ID" ]; then
    echo "Usage: phase-init <phase> <feature-id>" >&2
    exit 1
fi

case "$PHASE" in
    requirements|design|test) ;;
    *)
        echo "phase must be one of: requirements, design, test" >&2
        exit 1
        ;;
esac

# Validate feature-id format (lowercase alphanumeric + hyphens, starting with alpha-numeric)
if ! echo "$FEATURE_ID" | grep -qE '^[a-z0-9][a-z0-9-]*$'; then
    echo "feature-id must match /^[a-z0-9][a-z0-9-]*$/" >&2
    exit 1
fi

FEATURE_DIR="docs/specs/$FEATURE_ID"
SPEC_PATH="$FEATURE_DIR/$PHASE-spec.md"

if [ -f "$SPEC_PATH" ]; then
    echo "$SPEC_PATH already exists; refusing to overwrite" >&2
    exit 1
fi

mkdir -p "$FEATURE_DIR"

# Locate the template — try project-installed first (./.sdlc/templates/), then fallback to plugin
if [ -f ".sdlc/templates/$PHASE-spec.md" ]; then
    TEMPLATE=".sdlc/templates/$PHASE-spec.md"
elif [ -f "$CLAUDE_PLUGIN_ROOT/templates/$PHASE-spec.md" ]; then
    TEMPLATE="$CLAUDE_PLUGIN_ROOT/templates/$PHASE-spec.md"
else
    echo "template for phase '$PHASE' not found (looked in .sdlc/templates/ and \$CLAUDE_PLUGIN_ROOT/templates/)" >&2
    exit 1
fi

# Copy template; substitute the feature-id placeholder
sed "s/<feature-id>/$FEATURE_ID/g" "$TEMPLATE" > "$SPEC_PATH"

echo "Created $SPEC_PATH from $TEMPLATE"
echo "Edit the file, then run: phase-gate $PHASE $FEATURE_ID"
```

## Done

Report:

- File created: `docs/specs/<feature-id>/<phase>-spec.md`
- Source template: shown in output
- Next step: edit the file, then `phase-gate <phase> <feature-id>`

## Model selection

This skill is mechanical (file copy + sed substitution). Smaller models are sufficient.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in research →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.