From c7b933dcc60f55d064c9db0c6d5e900abbedf461 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Mon, 16 Mar 2026 10:51:24 -0400 Subject: [PATCH] fix(executor): add untracked files check after task commits (#1074) After committing task changes, the executor now checks for untracked files (git status --short | grep '^??') and handles them: commit if intentional, add to .gitignore if generated/runtime output. This prevents generated artifacts (build outputs, .env files, cache files) from being silently left untracked in the working tree. Changes: - execute-plan.md: Add step 6 to task commit protocol - gsd-executor.md: Add step 6 to task commit protocol Fixes #957 --- agents/gsd-executor.md | 2 ++ get-shit-done/workflows/execute-plan.md | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/agents/gsd-executor.md b/agents/gsd-executor.md index e0ceb78a6..03f604248 100644 --- a/agents/gsd-executor.md +++ b/agents/gsd-executor.md @@ -337,6 +337,8 @@ git commit -m "{type}({phase}-{plan}): {concise task description} ``` **5. Record hash:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — track for SUMMARY. + +**6. Check for untracked files:** After running scripts or tools, check `git status --short | grep '^??'`. For any new untracked files: commit if intentional, add to `.gitignore` if generated/runtime output. Never leave generated files untracked. diff --git a/get-shit-done/workflows/execute-plan.md b/get-shit-done/workflows/execute-plan.md index 96fa61bfc..d47b6a18f 100644 --- a/get-shit-done/workflows/execute-plan.md +++ b/get-shit-done/workflows/execute-plan.md @@ -279,6 +279,15 @@ TASK_COMMIT=$(git rev-parse --short HEAD) TASK_COMMITS+=("Task ${TASK_NUM}: ${TASK_COMMIT}") ``` +**6. Check for untracked generated files:** +```bash +git status --short | grep '^??' +``` +If new untracked files appeared after running scripts or tools, decide for each: +- **Commit it** — if it's a source file, config, or intentional artifact +- **Add to .gitignore** — if it's a generated/runtime output (build artifacts, `.env` files, cache files, compiled output) +- Do NOT leave generated files untracked +