Skip to content

bug(task-executor): new directories left untracked — not committed before PR #14

Description

@dkoenawan

Summary

The task-executor skill completed all tasks for a feature branch but left newly created directories untracked in the working tree. The PR was opened and mergeable but was missing the feature code entirely.

Observed Behaviour

After task-executor marked all tasks complete and opened a PR, git status showed:

?? frontend/src/pages/categories/
?? frontend/src/pages/transactions/
?? specs/category-management/overview.md
?? specs/category-management/erd.html

15 files (1,349 lines of React code) and 2 spec docs were never committed.

Root Cause

git add targeting specific modified files (e.g. App.tsx, route config) does not automatically pick up newly created directories that were never previously tracked. The executor wrote files to new paths but did not explicitly git add <new-directory>/, so they remained untracked.

The final chore: mark plan complete commit was created without a git status check — untracked files were never detected.

See full RCA: docs/reviews/task-executor-untracked-files-not-committed.md

Suggested Fixes

  1. Pre-commit git status guard: Before each commit, check for untracked files in the feature area and either add them or warn loudly.
  2. Plan-complete precondition: The mark-complete task should refuse to proceed if git status shows any untracked files.
  3. Task authoring guidance: Tasks that create new files/directories from scratch should include an explicit git add <new-dir>/ step.
  4. Spec file staging: Spec files generated by /plan should be staged in the first task-executor commit, not left floating.

🤖 Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions