Get the FREE Ultimate OpenClaw Setup Guide →

init-specs

Scanned
npx machina-cli add skill datamaker-kr/synapse-claude-marketplace/init-specs --openclaw
Files (1)
SKILL.md
5.9 KB

Init Specs

Skill Info

Part of the spec-manager agent. This skill scaffolds the initial spec documents for a new task.

Input

The user provides a task title as arguments: $ARGUMENTS

Arguments may optionally include a ticket ID prefix. Supported formats:

  • /init-specs SYN-1234 User Authentication Flow — ticket ID + title
  • /init-specs User Authentication Flow — title only (ticket ID asked later)

If no task title is provided, ask the user for a task title before proceeding.

Process

Step 0: Collect Ticket ID

  1. Check if the first argument matches a ticket ID pattern (e.g., SYN-1234, PROJ-99, #123). If so, extract it as the ticket ID and use the remaining text as the task title.
  2. If no ticket ID was found in the arguments, ask the user for a ticket ID using AskUserQuestion. Provide options:
    • Skip — No ticket ID for this task
    • Other — Let the user type a ticket ID
  3. The ticket ID will be used for:
    • The git branch name
    • The Ticket field in the requirements template

Step 1: Slug the Task Title

Convert the task title to a URL-friendly slug:

  • Lowercase all characters
  • Replace spaces and special characters with hyphens
  • Remove consecutive hyphens
  • Trim leading/trailing hyphens

Example: "User Authentication Flow" -> user-authentication-flow

Step 2: Create Git Branch

Create and checkout a new git branch for this task:

  1. Build branch name:

    • If ticket ID exists: {ticket-id}-{slug} (e.g., syn-1234-user-authentication-flow)
    • If no ticket ID: feat-{slug} (e.g., feat-user-authentication-flow)
    • Entire branch name should be lowercased
  2. Check current git state:

    • Run git status to check for uncommitted changes
    • If there are uncommitted changes, warn the user and ask whether to proceed (changes will carry over to the new branch) or abort
  3. Create and checkout the branch:

    • Run git checkout -b {branch-name}
    • If the branch already exists, warn the user and ask whether to:
      • Switch to the existing branch (git checkout {branch-name})
      • Choose a different name
      • Abort
  4. Report: Confirm the branch was created and checked out

Step 3: Check for Existing Directory

Check if a directory already exists at specs/{slug}/. If it does, warn the user and ask whether to overwrite or choose a different title.

Step 4: Create Spec Files

Create the specs/{slug}/ directory and the following three files inside it:

1. specs/{slug}/requirements.md

# Requirements: {Original Task Title}

> Created: {YYYY-MM-DD}
> Status: Draft
> Ticket: {ticket-id or "N/A"}

## Overview

<!-- Describe the task/feature at a high level. What problem does it solve? -->

## Goals

<!-- What are the primary goals of this task? -->

- [ ] Goal 1
- [ ] Goal 2

## Functional Requirements

<!-- Describe what the system should DO. Be specific and measurable. -->

### FR-1: {Requirement Name}

- **Description**:
- **Acceptance Criteria**:
  - [ ]

### FR-2: {Requirement Name}

- **Description**:
- **Acceptance Criteria**:
  - [ ]

## Non-Functional Requirements

<!-- Performance, security, scalability, maintainability, etc. -->

- **Performance**:
- **Security**:
- **Scalability**:

## Constraints

<!-- Technical constraints, time constraints, dependencies, etc. -->

-

## Out of Scope

<!-- Explicitly state what is NOT included in this task -->

-

## References

<!-- Links to related documents, designs, APIs, etc. -->

-

2. specs/{slug}/specs.md

# Specs: {Original Task Title}

> Created: {YYYY-MM-DD}
> Status: Pending (waiting for requirements)
> Requirements: [requirements.md](./requirements.md)

## Overview

<!-- This document will be generated from requirements. Run /specify-with-requirements after completing requirements. -->

## Technical Specifications

<!-- Auto-generated from requirements analysis -->

## Architecture

<!-- Component design, data flow, integrations -->

## API / Interface Design

<!-- Endpoints, function signatures, data models -->

## Error Handling

<!-- Error scenarios and handling strategies -->

## Dependencies

<!-- External and internal dependencies -->

## Open Questions

<!-- Unresolved questions to clarify -->

-

3. specs/{slug}/plans.md

# Plans: {Original Task Title}

> Created: {YYYY-MM-DD}
> Status: Pending (waiting for specs)
> Specs: [specs.md](./specs.md)

## Overview

<!-- This document will be generated from specs. Run /plan-with-specs after specs are finalized. -->

## Implementation Steps

<!-- Auto-generated from specs analysis -->

## Task Breakdown

<!-- Ordered list of implementation tasks -->

## Testing Strategy

<!-- Test plan for verification -->

## Rollback Plan

<!-- How to undo changes if needed -->

## Progress Tracking

| Step | Status | Notes |
|------|--------|-------|
|      |        |       |

Step 5: Report Completion

After creating all three files, display a summary:

Spec documents initialized for: "{Original Task Title}"

Branch: {branch-name}
Ticket: {ticket-id or "N/A"}

Created files:
  - specs/{slug}/requirements.md  <- Write your requirements here
  - specs/{slug}/specs.md         <- Generated after /specify-with-requirements
  - specs/{slug}/plans.md         <- Generated after /plan-with-specs

Next step: Edit specs/{slug}/requirements.md with your requirements, then run:
  /specify-with-requirements {slug}

Important

  • Always create the specs/ directory if it doesn't exist
  • Use the actual current date for the "Created" field
  • Preserve the original task title (with proper casing) in document headers
  • Use the slugged version only for file names and cross-references

Source

git clone https://github.com/datamaker-kr/synapse-claude-marketplace/blob/main/plugins/sdd-helper/skills/init-specs/SKILL.mdView on GitHub

Overview

Init-specs automates the kickoff for a new task by scaffolding essential specification documents. It creates a standardized set of Markdown templates under specs/{slug}/, including requirements.md, specs.md, and plans.md. Ticket IDs can be attached to the branch name and the requirements template for traceability.

How This Skill Works

The skill takes a task title (with optional ticket ID), derives a slug, and creates a new git branch. It then checks for an existing specs/{slug}/ directory and warns if it would overwrite content. Finally, it creates specs/{slug}/requirements.md, specs/{slug}/specs.md, and specs/{slug}/plans.md as starter templates populated with standard sections.

When to Use It

  • You are starting a new task and want a formal spec scaffold (requirements, specs, plans).
  • You have a ticket ID and want the branch name to reflect the ticket for traceability.
  • You want a consistent, reusable spec structure to align with teammates and stakeholders.
  • You need to guard against accidentally overwriting an existing specs/{slug}/ directory.
  • You’re launching a new feature or bugfix and want to bootstrap planning docs before work begins.

Quick Start

  1. Step 1: Run /init-specs <Task Title> [Ticket-ID].
  2. Step 2: If prompted, provide or confirm a ticket ID; slug and branch name are generated automatically.
  3. Step 3: Review specs/{slug}/ and fill in requirements.md, specs.md, and plans.md.

Best Practices

  • Provide a clear, descriptive task title to generate a meaningful slug.
  • Include or confirm a ticket ID early to name the branch and track work.
  • Check if specs/{slug}/ already exists to avoid overwriting content.
  • Populate the three templates with concrete, testable content and acceptance criteria.
  • Update requirements, specs, and plans as the task evolves and decisions are made.

Example Use Cases

  • Example 1: Init-specs for 'User Authentication Flow' with SYN-1234.
  • Example 2: Init-specs for 'API Rate Limiter' with no ticket ID yet.
  • Example 3: Init-specs for 'Database Migration Audit' with DB-55 as the ticket.
  • Example 4: Init-specs for 'Mobile Onboarding Tutorial' with SYN-9999.
  • Example 5: Init-specs for 'Logging Framework Upgrade' with #101.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers