diff --git a/.github/workflows/scripts/create-release-packages.ps1 b/.github/workflows/scripts/create-release-packages.ps1 index 60ad3da97..752b3c125 100644 --- a/.github/workflows/scripts/create-release-packages.ps1 +++ b/.github/workflows/scripts/create-release-packages.ps1 @@ -14,7 +14,7 @@ .PARAMETER Agents Comma or space separated subset of agents to build (default: all) - Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, kiro-cli, bob, qodercli, shai, tabnine, agy, vibe, kimi, generic + Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, kiro-cli, bob, qodercli, shai, tabnine, agy, vibe, kimi, openclaw, generic .PARAMETER Scripts Comma or space separated subset of script types to build (default: both) @@ -288,6 +288,94 @@ function New-KimiSkills { } } +# Create OpenClaw skills in .openclaw/skills//SKILL.md format. +# OpenClaw discovers skills as directories containing a SKILL.md file, +# invoked as speckit- (e.g. speckit-specify). +function New-OpenClawSkills { + param( + [string]$SkillsDir, + [string]$ScriptVariant + ) + + $templates = Get-ChildItem -Path "templates/commands/*.md" -File -ErrorAction SilentlyContinue + + foreach ($template in $templates) { + $name = [System.IO.Path]::GetFileNameWithoutExtension($template.Name) + $skillName = "speckit-$name" + $skillDir = Join-Path $SkillsDir $skillName + New-Item -ItemType Directory -Force -Path $skillDir | Out-Null + + $fileContent = (Get-Content -Path $template.FullName -Raw) -replace "`r`n", "`n" + + # Extract description + $description = "Spec Kit: $name workflow" + if ($fileContent -match '(?m)^description:\s*(.+)$') { + $description = $matches[1] + } + + # Extract script command + $scriptCommand = "(Missing script command for $ScriptVariant)" + if ($fileContent -match "(?m)^\s*${ScriptVariant}:\s*(.+)$") { + $scriptCommand = $matches[1] + } + + # Extract agent_script command from frontmatter if present + $agentScriptCommand = "" + if ($fileContent -match "(?ms)agent_scripts:.*?^\s*${ScriptVariant}:\s*(.+?)$") { + $agentScriptCommand = $matches[1].Trim() + } + + # Replace {SCRIPT}, strip scripts sections, rewrite paths + $body = $fileContent -replace '\{SCRIPT\}', $scriptCommand + if (-not [string]::IsNullOrEmpty($agentScriptCommand)) { + $body = $body -replace '\{AGENT_SCRIPT\}', $agentScriptCommand + } + + $lines = $body -split "`n" + $outputLines = @() + $inFrontmatter = $false + $skipScripts = $false + $dashCount = 0 + + foreach ($line in $lines) { + if ($line -match '^---$') { + $outputLines += $line + $dashCount++ + $inFrontmatter = ($dashCount -eq 1) + continue + } + if ($inFrontmatter) { + if ($line -match '^(scripts|agent_scripts):$') { $skipScripts = $true; continue } + if ($line -match '^[a-zA-Z].*:' -and $skipScripts) { $skipScripts = $false } + if ($skipScripts -and $line -match '^\s+') { continue } + } + $outputLines += $line + } + + $body = $outputLines -join "`n" + $body = $body -replace '\{ARGS\}', '$ARGUMENTS' + $body = $body -replace '__AGENT__', 'openclaw' + $body = Rewrite-Paths -Content $body + + # Strip existing frontmatter, keep only body + $templateBody = "" + $fmCount = 0 + $inBody = $false + foreach ($line in ($body -split "`n")) { + if ($line -match '^---$') { + $fmCount++ + if ($fmCount -eq 2) { $inBody = $true } + continue + } + if ($inBody) { $templateBody += "$line`n" } + } + + # Build SKILL.md with OpenClaw metadata block + $skillContent = "---`nname: `"$skillName`"`ndescription: `"$description`"`nmetadata:`n author: `"github-spec-kit`"`n source: `"templates/commands/$name.md`"`n---`n`n$templateBody" + Set-Content -Path (Join-Path $skillDir "SKILL.md") -Value $skillContent -NoNewline + } +} + function Build-Variant { param( [string]$Agent, @@ -454,6 +542,11 @@ function Build-Variant { New-Item -ItemType Directory -Force -Path $skillsDir | Out-Null New-KimiSkills -SkillsDir $skillsDir -ScriptVariant $Script } + 'openclaw' { + $skillsDir = Join-Path $baseDir ".openclaw/skills" + New-Item -ItemType Directory -Force -Path $skillsDir | Out-Null + New-OpenClawSkills -SkillsDir $skillsDir -ScriptVariant $Script + } 'generic' { $cmdDir = Join-Path $baseDir ".speckit/commands" Generate-Commands -Agent 'generic' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script @@ -470,7 +563,7 @@ function Build-Variant { } # Define all agents and scripts -$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'kiro-cli', 'bob', 'qodercli', 'shai', 'tabnine', 'agy', 'vibe', 'kimi', 'generic') +$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'kiro-cli', 'bob', 'qodercli', 'shai', 'tabnine', 'agy', 'vibe', 'kimi', 'openclaw', 'generic') $AllScripts = @('sh', 'ps') function Normalize-List { diff --git a/.github/workflows/scripts/create-release-packages.sh b/.github/workflows/scripts/create-release-packages.sh index 620da0233..514b2d3f5 100755 --- a/.github/workflows/scripts/create-release-packages.sh +++ b/.github/workflows/scripts/create-release-packages.sh @@ -6,7 +6,7 @@ set -euo pipefail # Usage: .github/workflows/scripts/create-release-packages.sh # Version argument should include leading 'v'. # Optionally set AGENTS and/or SCRIPTS env vars to limit what gets built. -# AGENTS : space or comma separated subset of: claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli kimi generic (default: all) +# AGENTS : space or comma separated subset of: claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli kimi openclaw generic (default: all) # SCRIPTS : space or comma separated subset of: sh ps (default: both) # Examples: # AGENTS=claude SCRIPTS=sh $0 v0.2.0 @@ -191,6 +191,79 @@ create_kimi_skills() { done } +# Create OpenClaw skills in .openclaw/skills//SKILL.md format. +# OpenClaw discovers skills as directories containing a SKILL.md file, +# invoked as speckit- (e.g. speckit-specify). +create_openclaw_skills() { + local skills_dir="$1" + local script_variant="$2" + + for template in templates/commands/*.md; do + [[ -f "$template" ]] || continue + local name + name=$(basename "$template" .md) + local skill_name="speckit-${name}" + local skill_dir="${skills_dir}/${skill_name}" + mkdir -p "$skill_dir" + + local file_content + file_content=$(tr -d '\r' < "$template") + + # Extract description from frontmatter + local description + description=$(printf '%s\n' "$file_content" | awk '/^description:/ {sub(/^description:[[:space:]]*/, ""); print; exit}') + [[ -z "$description" ]] && description="Spec Kit: ${name} workflow" + + # Extract script command + local script_command + script_command=$(printf '%s\n' "$file_content" | awk -v sv="$script_variant" '/^[[:space:]]*'"$script_variant"':[[:space:]]*/ {sub(/^[[:space:]]*'"$script_variant"':[[:space:]]*/, ""); print; exit}') + [[ -z "$script_command" ]] && script_command="(Missing script command for $script_variant)" + + # Extract agent_script command from frontmatter if present + local agent_script_command + agent_script_command=$(printf '%s\n' "$file_content" | awk ' + /^agent_scripts:$/ { in_agent_scripts=1; next } + in_agent_scripts && /^[[:space:]]*'"$script_variant"':[[:space:]]*/ { + sub(/^[[:space:]]*'"$script_variant"':[[:space:]]*/, "") + print + exit + } + in_agent_scripts && /^[a-zA-Z]/ { in_agent_scripts=0 } + ') + + # Build body: replace placeholders, strip scripts sections, rewrite paths + local body + body=$(printf '%s\n' "$file_content" | sed "s|{SCRIPT}|${script_command}|g") + if [[ -n $agent_script_command ]]; then + body=$(printf '%s\n' "$body" | sed "s|{AGENT_SCRIPT}|${agent_script_command}|g") + fi + body=$(printf '%s\n' "$body" | awk ' + /^---$/ { print; if (++dash_count == 1) in_frontmatter=1; else in_frontmatter=0; next } + in_frontmatter && /^scripts:$/ { skip_scripts=1; next } + in_frontmatter && /^agent_scripts:$/ { skip_scripts=1; next } + in_frontmatter && /^[a-zA-Z].*:/ && skip_scripts { skip_scripts=0 } + in_frontmatter && skip_scripts && /^[[:space:]]/ { next } + { print } + ') + body=$(printf '%s\n' "$body" | sed 's/{ARGS}/\$ARGUMENTS/g' | sed 's/__AGENT__/openclaw/g' | rewrite_paths) + + # Strip existing frontmatter and prepend OpenClaw SKILL.md frontmatter + local template_body + template_body=$(printf '%s\n' "$body" | awk '/^---/{p++; if(p==2){found=1; next}} found') + + { + printf -- '---\n' + printf 'name: "%s"\n' "$skill_name" + printf 'description: "%s"\n' "$description" + printf 'metadata:\n' + printf ' author: "github-spec-kit"\n' + printf ' source: "templates/commands/%s.md"\n' "$name" + printf -- '---\n\n' + printf '%s\n' "$template_body" + } > "$skill_dir/SKILL.md" + done +} + build_variant() { local agent=$1 script=$2 local base_dir="$GENRELEASES_DIR/sdd-${agent}-package-${script}" @@ -291,6 +364,9 @@ build_variant() { kimi) mkdir -p "$base_dir/.kimi/skills" create_kimi_skills "$base_dir/.kimi/skills" "$script" ;; + openclaw) + mkdir -p "$base_dir/.openclaw/skills" + create_openclaw_skills "$base_dir/.openclaw/skills" "$script" ;; generic) mkdir -p "$base_dir/.speckit/commands" generate_commands generic md "\$ARGUMENTS" "$base_dir/.speckit/commands" "$script" ;; @@ -300,7 +376,7 @@ build_variant() { } # Determine agent list -ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli kimi generic) +ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli kimi openclaw generic) ALL_SCRIPTS=(sh ps) norm_list() { diff --git a/AGENTS.md b/AGENTS.md index 8f0742eb8..8627eed0b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,6 +45,7 @@ Specify supports multiple AI agents by generating agent-specific command files a | **SHAI** | `.shai/commands/` | Markdown | `shai` | SHAI CLI | | **Tabnine CLI** | `.tabnine/agent/commands/` | TOML | `tabnine` | Tabnine CLI | | **Kimi Code** | `.kimi/skills/` | Markdown | `kimi` | Kimi Code CLI (Moonshot AI) | +| **OpenClaw** | `.openclaw/skills/` | Markdown | `openclaw` | OpenClaw persistent AI agent daemon | | **IBM Bob** | `.bob/commands/` | Markdown | N/A (IDE-based) | IBM Bob IDE | | **Generic** | User-specified via `--ai-commands-dir` | Markdown | N/A | Bring your own agent | @@ -84,7 +85,7 @@ This eliminates the need for special-case mappings throughout the codebase. - `folder`: Directory where agent-specific files are stored (relative to project root) - `commands_subdir`: Subdirectory name within the agent folder where command/prompt files are stored (default: `"commands"`) - Most agents use `"commands"` (e.g., `.claude/commands/`) - - Some agents use alternative names: `"agents"` (copilot), `"workflows"` (windsurf, kilocode), `"prompts"` (codex, kiro-cli), `"command"` (opencode - singular) + - Some agents use alternative names: `"agents"` (copilot), `"workflows"` (windsurf, kilocode), `"prompts"` (codex, kiro-cli), `"command"` (opencode - singular), `"skills"` (kimi, openclaw) - This field enables `--ai-skills` to locate command templates correctly for skill generation - `install_url`: Installation documentation URL (set to `None` for IDE-based agents) - `requires_cli`: Whether the agent requires a CLI tool check during initialization @@ -322,6 +323,7 @@ Require a command-line tool to be installed: - **SHAI**: `shai` CLI - **Tabnine CLI**: `tabnine` CLI - **Kimi Code**: `kimi` CLI +- **OpenClaw**: `openclaw` CLI ### IDE-Based Agents @@ -335,7 +337,7 @@ Work within integrated development environments: ### Markdown Format -Used by: Claude, Cursor, opencode, Windsurf, Kiro CLI, Amp, SHAI, IBM Bob, Kimi Code, Qwen +Used by: Claude, Cursor, opencode, Windsurf, Kiro CLI, Amp, SHAI, IBM Bob, Kimi Code, OpenClaw, Qwen **Standard format:** @@ -373,6 +375,7 @@ Command content with {SCRIPT} and {{args}} placeholders. ## Directory Conventions - **CLI agents**: Usually `./commands/` +- **Skill-based agents**: Use `./skills//SKILL.md` format (Kimi Code, OpenClaw) - **IDE agents**: Follow IDE-specific patterns: - Copilot: `.github/agents/` - Cursor: `.cursor/commands/` diff --git a/README.md b/README.md index 006d55227..2b8c95bec 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,7 @@ See Spec-Driven Development in action across different scenarios with these comm | [IBM Bob](https://www.ibm.com/products/bob) | ✅ | IDE-based agent with slash command support | | [Jules](https://jules.google.com/) | ✅ | | | [Kilo Code](https://github.com/Kilo-Org/kilocode) | ✅ | | +| [OpenClaw](https://openclaw.ai) | ✅ | Persistent AI agent daemon; use `--ai openclaw --ai-skills` | | [opencode](https://opencode.ai/) | ✅ | | | [Qwen Code](https://github.com/QwenLM/qwen-code) | ✅ | | | [Roo Code](https://roocode.com/) | ✅ | | @@ -195,14 +196,14 @@ The `specify` command supports the following options: | Command | Description | | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `init` | Initialize a new Specify project from the latest template | -| `check` | Check for installed tools (`git`, `claude`, `gemini`, `code`/`code-insiders`, `cursor-agent`, `windsurf`, `qwen`, `opencode`, `codex`, `kiro-cli`, `shai`, `qodercli`, `vibe`, `kimi`) | +| `check` | Check for installed tools (`git`, `claude`, `gemini`, `code`/`code-insiders`, `cursor-agent`, `windsurf`, `qwen`, `opencode`, `codex`, `kiro-cli`, `shai`, `qodercli`, `vibe`, `kimi`, `openclaw`) | ### `specify init` Arguments & Options | Argument/Option | Type | Description | | ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `` | Argument | Name for your new project directory (optional if using `--here`, or use `.` for current directory) | -| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, `amp`, `shai`, `kiro-cli` (`kiro` alias), `agy`, `bob`, `qodercli`, `vibe`, `kimi`, or `generic` (requires `--ai-commands-dir`) | +| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, `amp`, `shai`, `kiro-cli` (`kiro` alias), `agy`, `bob`, `qodercli`, `vibe`, `kimi`, `openclaw`, or `generic` (requires `--ai-commands-dir`) | | `--ai-commands-dir` | Option | Directory for agent command files (required with `--ai generic`, e.g. `.myagent/commands/`) | | `--script` | Option | Script variant to use: `sh` (bash/zsh) or `ps` (PowerShell) | | `--ignore-agent-tools` | Flag | Skip checks for AI agent tools like Claude Code | @@ -247,6 +248,9 @@ specify init my-project --ai vibe # Initialize with IBM Bob support specify init my-project --ai bob +# Initialize with OpenClaw support +specify init my-project --ai openclaw --ai-skills + # Initialize with Antigravity support specify init my-project --ai agy --ai-skills @@ -424,7 +428,7 @@ specify init . --force --ai claude specify init --here --force --ai claude ``` -The CLI will check if you have Claude Code, Gemini CLI, Cursor CLI, Qwen CLI, opencode, Codex CLI, Qoder CLI, Tabnine CLI, Kiro CLI, or Mistral Vibe installed. If you do not, or you prefer to get the templates without checking for the right tools, use `--ignore-agent-tools` with your command: +The CLI will check if you have Claude Code, Gemini CLI, Cursor CLI, Qwen CLI, opencode, Codex CLI, Qoder CLI, Tabnine CLI, Kiro CLI, Mistral Vibe, or OpenClaw installed. If you do not, or you prefer to get the templates without checking for the right tools, use `--ignore-agent-tools` with your command: ```bash specify init --ai claude --ignore-agent-tools diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.sh index e0f285484..fd66cc861 100644 --- a/scripts/bash/update-agent-context.sh +++ b/scripts/bash/update-agent-context.sh @@ -30,12 +30,12 @@ # # 5. Multi-Agent Support # - Handles agent-specific file paths and naming conventions -# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, Tabnine CLI, Kiro CLI, Mistral Vibe, Kimi Code, Antigravity or Generic +# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, Tabnine CLI, Kiro CLI, Mistral Vibe, Kimi Code, OpenClaw, Antigravity or Generic # - Can update single agents or all existing agent files # - Creates default Claude file if no agent files exist # # Usage: ./update-agent-context.sh [agent_type] -# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|generic +# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|openclaw|generic # Leave empty to update all existing agent files set -e @@ -73,8 +73,8 @@ AUGGIE_FILE="$REPO_ROOT/.augment/rules/specify-rules.md" ROO_FILE="$REPO_ROOT/.roo/rules/specify-rules.md" CODEBUDDY_FILE="$REPO_ROOT/CODEBUDDY.md" QODER_FILE="$REPO_ROOT/QODER.md" -# AMP, Kiro CLI, and IBM Bob all share AGENTS.md — use AGENTS_FILE to avoid -# updating the same file multiple times. +# AMP, Kiro CLI, IBM Bob, and OpenClaw all share AGENTS.md — use AGENTS_FILE to +# avoid updating the same file multiple times. AMP_FILE="$AGENTS_FILE" SHAI_FILE="$REPO_ROOT/SHAI.md" TABNINE_FILE="$REPO_ROOT/TABNINE.md" @@ -83,6 +83,7 @@ AGY_FILE="$REPO_ROOT/.agent/rules/specify-rules.md" BOB_FILE="$AGENTS_FILE" VIBE_FILE="$REPO_ROOT/.vibe/agents/specify-agents.md" KIMI_FILE="$REPO_ROOT/KIMI.md" +OPENCLAW_FILE="$AGENTS_FILE" # Template file TEMPLATE_FILE="$REPO_ROOT/.specify/templates/agent-file-template.md" @@ -675,12 +676,15 @@ update_specific_agent() { kimi) update_agent_file "$KIMI_FILE" "Kimi Code" || return 1 ;; + openclaw) + update_agent_file "$OPENCLAW_FILE" "OpenClaw" || return 1 + ;; generic) log_info "Generic agent: no predefined context file. Use the agent-specific update script for your agent." ;; *) log_error "Unknown agent type '$agent_type'" - log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|generic" + log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|openclaw|generic" exit 1 ;; esac @@ -692,7 +696,8 @@ update_all_existing_agents() { # Helper: skip non-existent files and files already updated (dedup by # realpath so that variables pointing to the same file — e.g. AMP_FILE, - # KIRO_FILE, BOB_FILE all resolving to AGENTS_FILE — are only written once). + # KIRO_FILE, BOB_FILE, OPENCLAW_FILE all resolving to AGENTS_FILE — are + # only written once). # Uses a linear array instead of associative array for bash 3.2 compatibility. update_if_new() { local file="$1" name="$2" @@ -719,6 +724,7 @@ update_all_existing_agents() { update_if_new "$AMP_FILE" "Amp" update_if_new "$KIRO_FILE" "Kiro CLI" update_if_new "$BOB_FILE" "IBM Bob" + update_if_new "$OPENCLAW_FILE" "OpenClaw" update_if_new "$WINDSURF_FILE" "Windsurf" update_if_new "$KILOCODE_FILE" "Kilo Code" update_if_new "$AUGGIE_FILE" "Auggie CLI" @@ -754,7 +760,7 @@ print_summary() { fi echo - log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|generic]" + log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|openclaw|generic]" } #============================================================================== diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py index a45535aee..a1bfefa13 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -272,6 +272,13 @@ def _format_rate_limit_error(status_code: int, headers: httpx.Headers, url: str) "install_url": "https://code.kimi.com/", "requires_cli": True, }, + "openclaw": { + "name": "OpenClaw", + "folder": ".openclaw/", + "commands_subdir": "skills", # OpenClaw reads skills from .openclaw/skills//SKILL.md + "install_url": "https://openclaw.ai", + "requires_cli": True, + }, "generic": { "name": "Generic (bring your own agent)", "folder": None, # Set dynamically via --ai-commands-dir diff --git a/templates/commands/skill.md b/templates/commands/skill.md new file mode 100644 index 000000000..871711250 --- /dev/null +++ b/templates/commands/skill.md @@ -0,0 +1,45 @@ +--- +name: "speckit" +description: "Full Spec-Driven Development (SDD) workflow powered by github/spec-kit. Use speckit-specify to start a feature, then speckit-plan, speckit-tasks, and speckit-implement in sequence." +metadata: + author: "github-spec-kit" + source: "https://github.com/github/spec-kit" + version: "1.0.0" +--- + +# Spec Kit — Spec-Driven Development + +This skill provides the complete Spec-Driven Development workflow from [github/spec-kit](https://github.com/github/spec-kit). +Individual commands are available as separate skills in this directory — each one maps to a phase of the SDD process. + +## Workflow Order + +Always follow this sequence — never skip phases: + +1. **speckit-constitution** — Establish project governing principles *(run once per project)* +2. **speckit-specify** — Turn a feature description into a structured spec +3. **speckit-clarify** — Resolve ambiguities before planning *(optional but recommended)* +4. **speckit-plan** — Create a phased technical implementation plan +5. **speckit-analyze** — Cross-artifact consistency check *(optional, run after tasks)* +6. **speckit-tasks** — Break the plan into ordered, executable tasks +7. **speckit-implement** — Execute tasks one by one +8. **speckit-checklist** — Post-implementation quality checklist + +## Core Rules + +- Read `.specify/memory/constitution.md` before every coding decision +- Show the spec summary to the user and wait for approval before planning +- Show task count to the user and wait for approval before implementing +- Use `.specify/scripts/bash/` (Linux/macOS) or `.specify/scripts/powershell/` (Windows) for all file and branch operations +- Never create, move, or delete files in `specs/` without explicit user instruction + +## Key File Locations + +| File | Purpose | +|------|---------| +| `.specify/memory/constitution.md` | Project governing principles — read before every decision | +| `specs//spec.md` | Feature specification created by `speckit-specify` | +| `specs//plan.md` | Implementation plan created by `speckit-plan` | +| `specs//tasks.md` | Task breakdown created by `speckit-tasks` | +| `.specify/templates/` | Base templates for spec, plan, tasks, and checklist artifacts | +| `.specify/scripts/` | Automation scripts for branch and file management | diff --git a/templates/skill-file-template.md b/templates/skill-file-template.md new file mode 100644 index 000000000..3c8107da6 --- /dev/null +++ b/templates/skill-file-template.md @@ -0,0 +1,12 @@ +--- +name: "{SKILL_NAME}" +description: "{DESCRIPTION}" +compatibility: "Requires spec-kit project structure with .specify/ directory" +metadata: + author: "github-spec-kit" + source: "templates/commands/{COMMAND_NAME}.md" +--- + +# Spec Kit {COMMAND_TITLE} Skill + +{COMMAND_BODY}