Skip to content

Commit 32c933c

Browse files
committed
Update with support for /implement
1 parent 46ba4d5 commit 32c933c

7 files changed

Lines changed: 197 additions & 58 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.0.7] - 2025-09-18
11+
12+
### Changed
13+
14+
- Updated command instructions in the CLI.
15+
- Cleaned up the code to not render agent-specific information when it's generic.
16+
17+
1018
## [0.0.6] - 2025-09-17
1119

1220
### Added

README.md

Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,45 @@ Initialize your project depending on the coding agent you're using:
4444
uvx --from git+https://github.com/github/spec-kit.git specify init <PROJECT_NAME>
4545
```
4646

47-
### 2. Create the spec
47+
### 2. Establish project principles
48+
49+
Use the **`/constitution`** command to create your project's governing principles and development guidelines that will guide all subsequent development.
50+
51+
```bash
52+
/constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements
53+
```
54+
55+
### 3. Create the spec
4856

4957
Use the **`/specify`** command to describe what you want to build. Focus on the **what** and **why**, not the tech stack.
5058

5159
```bash
5260
/specify Build an application that can help me organize my photos in separate photo albums. Albums are grouped by date and can be re-organized by dragging and dropping on the main page. Albums are never in other nested albums. Within each album, photos are previewed in a tile-like interface.
5361
```
5462

55-
### 3. Create a technical implementation plan
63+
### 4. Create a technical implementation plan
5664

5765
Use the **`/plan`** command to provide your tech stack and architecture choices.
5866

5967
```bash
6068
/plan The application uses Vite with minimal number of libraries. Use vanilla HTML, CSS, and JavaScript as much as possible. Images are not uploaded anywhere and metadata is stored in a local SQLite database.
6169
```
6270

63-
### 4. Break down and implement
71+
### 5. Break down into tasks
72+
73+
Use **`/tasks`** to create an actionable task list from your implementation plan.
74+
75+
```bash
76+
/tasks
77+
```
78+
79+
### 6. Execute implementation
80+
81+
Use **`/implement`** to execute all tasks and build your feature according to the plan.
6482

65-
Use **`/tasks`** to create an actionable task list, then ask your agent to implement the feature.
83+
```bash
84+
/implement
85+
```
6686

6787
For detailed step-by-step instructions, see our [comprehensive guide](./spec-driven.md).
6888

@@ -124,6 +144,18 @@ specify init my-project --ai claude --debug
124144
specify check
125145
```
126146

147+
### Available Slash Commands
148+
149+
After running `specify init`, your AI coding agent will have access to these slash commands for structured development:
150+
151+
| Command | Description |
152+
|-----------------|-----------------------------------------------------------------------|
153+
| `/constitution` | Create or update project governing principles and development guidelines |
154+
| `/specify` | Define what you want to build (requirements and user stories) |
155+
| `/plan` | Create technical implementation plans with your chosen tech stack |
156+
| `/tasks` | Generate actionable task lists for implementation |
157+
| `/implement` | Execute all tasks to build the feature according to the plan |
158+
127159
## 📚 Core philosophy
128160

129161
Spec-Driven Development is a structured process that emphasizes:
@@ -219,15 +251,25 @@ The CLI will check if you have Claude Code, Gemini CLI, Qwen CLI or opencode ins
219251
specify init <project_name> --ai claude --ignore-agent-tools
220252
```
221253

222-
### **STEP 1:** Bootstrap the project
254+
### **STEP 1:** Establish project principles
223255

224256
Go to the project folder and run your AI agent. In our example, we're using `claude`.
225257

226258
![Bootstrapping Claude Code environment](./media/bootstrap-claude-code.gif)
227259

228-
You will know that things are configured correctly if you see the `/specify`, `/plan`, and `/tasks` commands available.
260+
You will know that things are configured correctly if you see the `/constitution`, `/specify`, `/plan`, `/tasks`, and `/implement` commands available.
261+
262+
The first step should be establishing your project's governing principles using the `/constitution` command. This helps ensure consistent decision-making throughout all subsequent development phases:
263+
264+
```text
265+
/constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements. Include governance for how these principles should guide technical decisions and implementation choices.
266+
```
267+
268+
This step creates or updates the `/memory/constitution.md` file with your project's foundational guidelines that the AI agent will reference during specification, planning, and implementation phases.
269+
270+
### **STEP 2:** Create project specifications
229271

230-
The first step should be creating a new project scaffolding. Use `/specify` command and then provide the concrete requirements for the project you want to develop.
272+
With your project principles established, you can now create the functional specifications. Use the `/specify` command and then provide the concrete requirements for the project you want to develop.
231273

232274
>[!IMPORTANT]
233275
>Be as explicit as possible about _what_ you are trying to build and _why_. **Do not focus on the tech stack at this point**.
@@ -281,7 +323,7 @@ At this stage, your project folder contents should resemble the following:
281323
└── tasks-template.md
282324
```
283325

284-
### **STEP 2:** Functional specification clarification
326+
### **STEP 3:** Functional specification clarification
285327

286328
With the baseline specification created, you can go ahead and clarify any of the requirements that were not captured properly within the first shot attempt. For example, you could use a prompt like this within the same Claude Code session:
287329

@@ -299,7 +341,7 @@ Read the review and acceptance checklist, and check off each item in the checkli
299341

300342
It's important to use the interaction with Claude Code as an opportunity to clarify and ask questions around the specification - **do not treat its first attempt as final**.
301343

302-
### **STEP 3:** Generate a plan
344+
### **STEP 4:** Generate a plan
303345

304346
You can now be specific about the tech stack and other technical requirements. You can use the `/plan` command that is built into the project template with a prompt like this:
305347

@@ -368,7 +410,7 @@ That's way too untargeted research. The research needs to help you solve a speci
368410
>[!NOTE]
369411
>Claude Code might be over-eager and add components that you did not ask for. Ask it to clarify the rationale and the source of the change.
370412
371-
### **STEP 4:** Have Claude Code validate the plan
413+
### **STEP 5:** Have Claude Code validate the plan
372414

373415
With the plan in place, you should have Claude Code run through it to make sure that there are no missing pieces. You can use a prompt like this:
374416

@@ -387,20 +429,25 @@ You can also ask Claude Code (if you have the [GitHub CLI](https://docs.github.c
387429
>[!NOTE]
388430
>Before you have the agent implement it, it's also worth prompting Claude Code to cross-check the details to see if there are any over-engineered pieces (remember - it can be over-eager). If over-engineered components or decisions exist, you can ask Claude Code to resolve them. Ensure that Claude Code follows the [constitution](base/memory/constitution.md) as the foundational piece that it must adhere to when establishing the plan.
389431
390-
### STEP 5: Implementation
432+
### STEP 6: Implementation
391433

392-
Once ready, instruct Claude Code to implement your solution (example path included):
434+
Once ready, use the `/implement` command to execute your implementation plan:
393435

394436
```text
395-
implement specs/002-create-taskify/plan.md
437+
/implement
396438
```
397439

398-
Claude Code will spring into action and will start creating the implementation.
440+
The `/implement` command will:
441+
- Validate that all prerequisites are in place (constitution, spec, plan, and tasks)
442+
- Parse the task breakdown from `tasks.md`
443+
- Execute tasks in the correct order, respecting dependencies and parallel execution markers
444+
- Follow the TDD approach defined in your task plan
445+
- Provide progress updates and handle errors appropriately
399446

400447
>[!IMPORTANT]
401-
>Claude Code will execute local CLI commands (such as `dotnet`) - make sure you have them installed on your machine.
448+
>The AI agent will execute local CLI commands (such as `dotnet`, `npm`, etc.) - make sure you have the required tools installed on your machine.
402449
403-
Once the implementation step is done, ask Claude Code to try to run the application and resolve any emerging build errors. If the application runs, but there are _runtime errors_ that are not directly available to Claude Code through CLI logs (e.g., errors rendered in browser logs), copy and paste the error in Claude Code and have it attempt to resolve it.
450+
Once the implementation is complete, test the application and resolve any runtime errors that may not be visible in CLI logs (e.g., browser console errors). You can copy and paste such errors back to your AI agent for resolution.
404451

405452
</details>
406453

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "specify-cli"
3-
version = "0.0.6"
4-
description = "Setup tool for Specify spec-driven development projects"
3+
version = "0.0.7"
4+
description = "Specify CLI, part of GitHub Spec Kit. A tool to bootstrap your projects for Spec-Driven Development (SDD)."
55
requires-python = ">=3.11"
66
dependencies = [
77
"typer",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
JSON_MODE=false
4+
for arg in "$@"; do case "$arg" in --json) JSON_MODE=true ;; --help|-h) echo "Usage: $0 [--json]"; exit 0 ;; esac; done
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
source "$SCRIPT_DIR/common.sh"
7+
eval $(get_feature_paths)
8+
check_feature_branch "$CURRENT_BRANCH" || exit 1
9+
if [[ ! -d "$FEATURE_DIR" ]]; then echo "ERROR: Feature directory not found: $FEATURE_DIR"; echo "Run /specify first."; exit 1; fi
10+
if [[ ! -f "$IMPL_PLAN" ]]; then echo "ERROR: plan.md not found in $FEATURE_DIR"; echo "Run /plan first."; exit 1; fi
11+
if [[ ! -f "$TASKS" ]]; then echo "ERROR: tasks.md not found in $FEATURE_DIR"; echo "Run /tasks first."; exit 1; fi
12+
if $JSON_MODE; then
13+
docs=(); [[ -f "$RESEARCH" ]] && docs+=("research.md"); [[ -f "$DATA_MODEL" ]] && docs+=("data-model.md"); ([[ -d "$CONTRACTS_DIR" ]] && [[ -n "$(ls -A "$CONTRACTS_DIR" 2>/dev/null)" ]]) && docs+=("contracts/"); [[ -f "$QUICKSTART" ]] && docs+=("quickstart.md"); [[ -f "$TASKS" ]] && docs+=("tasks.md");
14+
json_docs=$(printf '"%s",' "${docs[@]}"); json_docs="[${json_docs%,}]"; printf '{"FEATURE_DIR":"%s","AVAILABLE_DOCS":%s}\n' "$FEATURE_DIR" "$json_docs"
15+
else
16+
echo "FEATURE_DIR:$FEATURE_DIR"; echo "AVAILABLE_DOCS:"; check_file "$RESEARCH" "research.md"; check_file "$DATA_MODEL" "data-model.md"; check_dir "$CONTRACTS_DIR" "contracts/"; check_file "$QUICKSTART" "quickstart.md"; check_file "$TASKS" "tasks.md"; fi
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env pwsh
2+
[CmdletBinding()]
3+
param([switch]$Json)
4+
$ErrorActionPreference = 'Stop'
5+
. "$PSScriptRoot/common.ps1"
6+
7+
$paths = Get-FeaturePathsEnv
8+
if (-not (Test-FeatureBranch -Branch $paths.CURRENT_BRANCH)) { exit 1 }
9+
10+
if (-not (Test-Path $paths.FEATURE_DIR -PathType Container)) {
11+
Write-Output "ERROR: Feature directory not found: $($paths.FEATURE_DIR)"
12+
Write-Output "Run /specify first to create the feature structure."
13+
exit 1
14+
}
15+
if (-not (Test-Path $paths.IMPL_PLAN -PathType Leaf)) {
16+
Write-Output "ERROR: plan.md not found in $($paths.FEATURE_DIR)"
17+
Write-Output "Run /plan first to create the plan."
18+
exit 1
19+
}
20+
if (-not (Test-Path $paths.TASKS -PathType Leaf)) {
21+
Write-Output "ERROR: tasks.md not found in $($paths.FEATURE_DIR)"
22+
Write-Output "Run /tasks first to create the task list."
23+
exit 1
24+
}
25+
26+
if ($Json) {
27+
$docs = @()
28+
if (Test-Path $paths.RESEARCH) { $docs += 'research.md' }
29+
if (Test-Path $paths.DATA_MODEL) { $docs += 'data-model.md' }
30+
if ((Test-Path $paths.CONTRACTS_DIR) -and (Get-ChildItem -Path $paths.CONTRACTS_DIR -ErrorAction SilentlyContinue | Select-Object -First 1)) { $docs += 'contracts/' }
31+
if (Test-Path $paths.QUICKSTART) { $docs += 'quickstart.md' }
32+
if (Test-Path $paths.TASKS) { $docs += 'tasks.md' }
33+
[PSCustomObject]@{ FEATURE_DIR=$paths.FEATURE_DIR; AVAILABLE_DOCS=$docs } | ConvertTo-Json -Compress
34+
} else {
35+
Write-Output "FEATURE_DIR:$($paths.FEATURE_DIR)"
36+
Write-Output "AVAILABLE_DOCS:"
37+
Test-FileExists -Path $paths.RESEARCH -Description 'research.md' | Out-Null
38+
Test-FileExists -Path $paths.DATA_MODEL -Description 'data-model.md' | Out-Null
39+
Test-DirHasFiles -Path $paths.CONTRACTS_DIR -Description 'contracts/' | Out-Null
40+
Test-FileExists -Path $paths.QUICKSTART -Description 'quickstart.md' | Out-Null
41+
Test-FileExists -Path $paths.TASKS -Description 'tasks.md' | Out-Null
42+
}

src/specify_cli/__init__.py

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -950,53 +950,29 @@ def init(
950950
steps_lines.append("1. You're already in the project directory!")
951951
step_num = 2
952952

953-
if selected_ai == "claude":
954-
steps_lines.append(f"{step_num}. Open in Visual Studio Code and start using / commands with Claude Code")
955-
steps_lines.append(" - Type / in any file to see available commands")
956-
steps_lines.append(" - Use /specify to create specifications")
957-
steps_lines.append(" - Use /plan to create implementation plans")
958-
steps_lines.append(" - Use /tasks to generate tasks")
959-
elif selected_ai == "gemini":
960-
steps_lines.append(f"{step_num}. Use / commands with Gemini CLI")
961-
steps_lines.append(" - Run gemini /specify to create specifications")
962-
steps_lines.append(" - Run gemini /plan to create implementation plans")
963-
steps_lines.append(" - Run gemini /tasks to generate tasks")
964-
steps_lines.append(" - See GEMINI.md for all available commands")
965-
elif selected_ai == "copilot":
966-
steps_lines.append(f"{step_num}. Open in Visual Studio Code and use [bold cyan]/specify[/], [bold cyan]/plan[/], [bold cyan]/tasks[/] commands with GitHub Copilot")
967-
elif selected_ai == "qwen":
968-
steps_lines.append(f"{step_num}. Use / commands with Qwen CLI")
969-
steps_lines.append(" - Run qwen /specify to create specifications")
970-
steps_lines.append(" - Run qwen /plan to create implementation plans")
971-
steps_lines.append(" - Run qwen /tasks to generate tasks")
972-
steps_lines.append(" - See QWEN.md for all available commands")
973-
elif selected_ai == "opencode":
974-
steps_lines.append(f"{step_num}. Use / commands with opencode")
975-
steps_lines.append(" - Use /specify to create specifications")
976-
steps_lines.append(" - Use /plan to create implementation plans")
977-
steps_lines.append(" - Use /tasks to generate tasks")
978-
979-
# Removed script variant step (scripts are transparent to users)
953+
steps_lines.append(f"{step_num}. Start using slash commands with your AI agent:")
954+
steps_lines.append(" [bold cyan]/constitution[/] - Establish project principles")
980955
step_num += 1
981-
steps_lines.append(f"{step_num}. Update [bold magenta]CONSTITUTION.md[/bold magenta] with your project's non-negotiable principles")
956+
steps_lines.append(f"{step_num}. [bold cyan]/specify[/] - Create specifications")
957+
step_num += 1
958+
steps_lines.append(f"{step_num}. [bold cyan]/plan[/] - Create implementation plans")
959+
step_num += 1
960+
steps_lines.append(f"{step_num}. [bold cyan]/tasks[/] - Generate actionable tasks")
961+
step_num += 1
962+
steps_lines.append(f"{step_num}. [bold cyan]/implement[/] - Execute implementation")
982963

983964
steps_panel = Panel("\n".join(steps_lines), title="Next steps", border_style="cyan", padding=(1,2))
984-
console.print() # blank line
965+
console.print()
985966
console.print(steps_panel)
986-
987-
# Removed farewell line per user request
988-
989967

990968
@app.command()
991969
def check():
992970
"""Check that all required tools are installed."""
993971
show_banner()
994972
console.print("[bold]Checking for installed tools...[/bold]\n")
995973

996-
# Create tracker for checking tools
997974
tracker = StepTracker("Check Available Tools")
998975

999-
# Add all tools we want to check
1000976
tracker.add("git", "Git version control")
1001977
tracker.add("claude", "Claude Code CLI")
1002978
tracker.add("gemini", "Gemini CLI")
@@ -1005,25 +981,20 @@ def check():
1005981
tracker.add("cursor-agent", "Cursor IDE agent (optional)")
1006982
tracker.add("opencode", "opencode")
1007983

1008-
# Check each tool
1009984
git_ok = check_tool_for_tracker("git", "https://git-scm.com/downloads", tracker)
1010985
claude_ok = check_tool_for_tracker("claude", "https://docs.anthropic.com/en/docs/claude-code/setup", tracker)
1011986
gemini_ok = check_tool_for_tracker("gemini", "https://github.com/google-gemini/gemini-cli", tracker)
1012987
qwen_ok = check_tool_for_tracker("qwen", "https://github.com/QwenLM/qwen-code", tracker)
1013-
# Check for VS Code (code or code-insiders)
1014988
code_ok = check_tool_for_tracker("code", "https://code.visualstudio.com/", tracker)
1015989
if not code_ok:
1016990
code_ok = check_tool_for_tracker("code-insiders", "https://code.visualstudio.com/insiders/", tracker)
1017991
cursor_ok = check_tool_for_tracker("cursor-agent", "https://cursor.sh/", tracker)
1018992
opencode_ok = check_tool_for_tracker("opencode", "https://opencode.ai/", tracker)
1019-
1020-
# Render the final tree
993+
1021994
console.print(tracker.render())
1022995

1023-
# Summary
1024996
console.print("\n[bold green]Specify CLI is ready to use![/bold green]")
1025997

1026-
# Recommendations
1027998
if not git_ok:
1028999
console.print("[dim]Tip: Install git for repository management[/dim]")
10291000
if not (claude_ok or gemini_ok or cursor_ok or qwen_ok or opencode_ok):

0 commit comments

Comments
 (0)