From 72ed39d8a1c46698e08a80e66a60cfd72fdd294b Mon Sep 17 00:00:00 2001 From: Simon Gent Date: Fri, 10 Oct 2025 10:11:06 +0100 Subject: [PATCH] Add ignore file verification step to /speckit.implement command - Added step 4 for project setup verification - Detects and creates/verifies ignore files based on project setup - Includes patterns for .gitignore, .dockerignore, .eslintignore, .prettierignore, .npmignore, .terraformignore, .helmignore - Provides technology-specific patterns (Node.js, Python, Java, C#/.NET, Go) - Includes tool-specific patterns (Docker, ESLint, Prettier, Terraform) - Renumbered subsequent steps 5-9 --- templates/commands/implement.md | 39 ++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/templates/commands/implement.md b/templates/commands/implement.md index da8021e4..2c9b65b0 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