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
This commit is contained in:
Tom Boucher
2026-03-16 10:51:24 -04:00
committed by GitHub
parent 406b998d45
commit c7b933dcc6
2 changed files with 11 additions and 0 deletions

View File

@@ -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.
</task_commit_protocol>
<summary_creation>