Custom Speckit Commands
Relevant source files
The following files were used as context for generating this wiki page:
Custom Speckit (Spec-Kit) commands are specialized tools within the bl1nk-skill-platform designed to facilitate constitution-based, spec-driven development. These commands integrate with the GitHub Spec-Kit CLI to guide developers through a structured 7-phase workflow, ensuring that feature development aligns with foundational project principles and technical standards.
Sources: plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:1-12, plugins/kiro-skill/commands/kiro/spec.md:68-80
Architecture and Core Workflow
The Speckit command system is built around a sequential development methodology. It transitions a rough feature idea into a technical implementation plan through rigorous documentation phases. Each phase relies on specific scripts and file structures located within the .specify/ directory.
The 7-Phase Lifecycle
The system enforces a linear progression through the following stages:
| Phase | Purpose | Output Artifact |
|---|---|---|
| 1. Constitution | Establish governing values and technical standards. | .specify/memory/constitution.md |
| 2. Specify | Define functional requirements and user stories. | .specify/specs/NNN-feature/spec.md |
| 3. Clarify | Resolve ambiguities through targeted questions. | ## Clarifications section in spec.md |
| 4. Plan | Create the technical implementation strategy. | .specify/specs/NNN-feature/plan.md |
| 5. Tasks | Generate actionable, dependency-ordered tasks. | .specify/specs/NNN-feature/tasks.md |
| 6. Analyze | Validate consistency across all artifacts. | Analysis Report (Internal/Read-only) |
| 7. Implement | Execute implementation based on the task list. | Codebase changes |
Sources: plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:15-28, plugins/kiro-skill/commands/kiro/spec.md:95-105
Workflow Logic
The following diagram illustrates the state transitions and dependency checks performed by Speckit commands during the development lifecycle.
The workflow ensures ground-truths are established at every step before moving to the next.
Sources: plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:120-135, plugins/kiro-skill/commands/kiro/spec.md:295-325
Command Execution and Automation
Speckit commands utilize a set of underlying Bash scripts to automate file creation and state detection.
Script-Based Operations
Custom commands trigger specific scripts to manage the environment:
create-new-feature.sh: Initializes a new feature branch and aspec.mdtemplate.setup-plan.sh: Configures the planning phase, ensuringspec.mdis present.check-prerequisites.sh: Verifies that previous phases are complete before allowing progression.
Sources: plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:183-195, plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:310-315
Task Execution Logic
When executing tasks (Phase 7), the system follows a strict "One Task at a Time" protocol to ensure precision and quality.
Command Creation Infrastructure
The platform provides internal mechanisms for creating and managing these custom commands. This is handled by the command-creator agent and the /create-command utility.
Configuration and Metadata
Custom commands are defined using Markdown files with YAML frontmatter.
| Field | Description |
|---|---|
description | A brief summary of the command's purpose. |
argument-hint | Expected format for user-provided arguments. |
allowed-tools | List of system tools (Write, Read, Bash, etc.) the command requires. |
Sources: apps/agents/command-creator.md:30-40, apps/client/commands/cc/create-command.md:1-10
Directory Structure
Custom commands and their associated artifacts are organized within the repository as follows:
.specify/ (or .kiro/)
├── memory/
│ └── constitution.md # Core project principles
├── scripts/
│ └── bash/ # Automation scripts (setup-plan, etc.)
├── specs/
│ └── NNN-feature-name/ # Individual feature directories
│ ├── spec.md # Requirements (EARS format)
│ ├── plan.md # Architecture & Design
│ └── tasks.md # Checkbox implementation list
└── templates/ # Standardized Markdown templates
Sources: plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:520-540, plugins/kiro-skill/skills/kiro-skill/SKILL.md:38-42
Requirements and Technical Standards
Speckit commands enforce specific technical standards for documentation:
- EARS Format: Acceptance criteria must use the "Easy Approach to Requirements Syntax" (e.g.,
WHEN [event] THEN [system] SHALL [response]). - Minimal Implementation: The system prioritizes the absolute minimal code needed to address a requirement.
- Dependency Tracking: Tasks in
tasks.mdmust explicitly reference granular requirements (e.g.,_Requirements: 1.2_) and list dependencies.
Sources: plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:415-430, plugins/kiro-skill/commands/kiro/spec.md:120-135, plugins/kiro-skill/skills/kiro-skill/SKILL.md:125-135
Summary
Custom Speckit Commands transform feature development from an ad-hoc process into a disciplined, constitution-driven workflow. By integrating automated state detection, sequential validation phases, and strict task execution rules, the system ensures that every code change is rooted in documented requirements and approved technical designs. This architecture minimizes "orphaned code" and maintains high alignment with project-wide principles.
Sources: plugins/spec-kit-skill/skills/spec-kit-skill/SKILL.md:555-565, specs/main/plan.md:30-45