Skip to content

πŸ’« Toolkit to help you get started with SDD or any other process!

Add ignore file verification step to /speckit.implement command

Simon Gent72ed39d8a1c4
diff --git a/templates/commands/implement.md b/templates/commands/implement.md
index da8021e4a..2c9b65b0f 100644
--- a/templates/commands/implement.md
+++ b/templates/commands/implement.md
@@ -54,27 +54,56 @@ You **MUST** consider the user input before proceeding (if not empty).
- **IF EXISTS**: Read research.md for technical decisions and constraints
- **IF EXISTS**: Read quickstart.md for integration scenarios
-4. Parse tasks.md structure and extract:
+4. **Project Setup Verification**:
+ - **REQUIRED**: Create/verify ignore files based on actual project setup:
+
+ **Detection & Creation Logic**:
+ - Check `git rev-parse --git-dir 2>/dev/null` β†’ create/verify .gitignore
+ - Check if Dockerfile* exists or Docker in plan.md β†’ create/verify .dockerignore
+ - Check if .eslintrc* or eslint.config.* exists β†’ create/verify .eslintignore
+ - Check if .prettierrc* exists β†’ create/verify .prettierignore
+ - Check if .npmrc or package.json exists β†’ create/verify .npmignore (if publishing)
+ - Check if terraform files (*.tf) exist β†’ create/verify .terraformignore
+ - Check if .helmignore needed (helm charts present) β†’ create/verify .helmignore
+
+ **If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
+ **If ignore file missing**: Create with full pattern set for detected technology
+
+ **Common Patterns by Technology** (from plan.md tech stack):
+ - **Node.js/JavaScript**: `node_modules/`, `dist/`, `build/`, `*.log`, `.env*`
+ - **Python**: `__pycache__/`, `*.pyc`, `.venv/`, `venv/`, `dist/`, `*.egg-info/`
+ - **Java**: `target/`, `*.class`, `*.jar`, `.gradle/`, `build/`
+ - **C#/.NET**: `bin/`, `obj/`, `*.user`, `*.suo`, `packages/`
+ - **Go**: `*.exe`, `*.test`, `vendor/`, `*.out`
+ - **Universal**: `.DS_Store`, `Thumbs.db`, `*.tmp`, `*.swp`, `.vscode/`, `.idea/`
+
+ **Tool-Specific Patterns**:
+ - **Docker**: `node_modules/`, `.git/`, `.gitignore`, `README.md`, `Dockerfile*`, `.dockerignore`, `*.log*`, `.env*`, `coverage/`
+ - **ESLint**: `node_modules/`, `dist/`, `build/`, `coverage/`, `*.min.js`
+ - **Prettier**: `node_modules/`, `dist/`, `build/`, `coverage/`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`
+ - **Terraform**: `.terraform/`, `*.tfstate*`, `*.tfvars`, `.terraform.lock.hcl`
+
+5. Parse tasks.md structure and extract:
- **Task phases**: Setup, Tests, Core, Integration, Polish
- **Task dependencies**: Sequential vs parallel execution rules
- **Task details**: ID, description, file paths, parallel markers [P]
- **Execution flow**: Order and dependency requirements
-5. Execute implementation following the task plan:
+6. Execute implementation following the task plan:
- **Phase-by-phase execution**: Complete each phase before moving to the next
- **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
- **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
- **File-based coordination**: Tasks affecting the same files must run sequentially
- **Validation checkpoints**: Verify each phase completion before proceeding
-6. Implementation execution rules:
+7. Implementation execution rules:
- **Setup first**: Initialize project structure, dependencies, configuration
- **Tests before code**: If you need to write tests for contracts, entities, and integration scenarios
- **Core development**: Implement models, services, CLI commands, endpoints
- **Integration work**: Database connections, middleware, logging, external services
- **Polish and validation**: Unit tests, performance optimization, documentation
-7. Progress tracking and error handling:
+8. Progress tracking and error handling:
- Report progress after each completed task
- Halt execution if any non-parallel task fails
- For parallel tasks [P], continue with successful tasks, report failed ones
@@ -82,7 +111,7 @@ You **MUST** consider the user input before proceeding (if not empty).
- Suggest next steps if implementation cannot proceed
- **IMPORTANT** For completed tasks, make sure to mark the task off as [X] in the tasks file.
-8. Completion validation:
+9. Completion validation:
- Verify all required tasks are completed
- Check that implemented features match the original specification
- Validate that tests pass and coverage meets requirements