sdd-workspace 888 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. # Resolve and ensure the working-tree directory SDD uses for its short-lived
  3. # artifacts: task briefs, implementer reports, review packages, and the
  4. # progress ledger. Print the directory's absolute path.
  5. #
  6. # The workspace lives in the working tree (not under .git/) because Claude Code
  7. # treats .git/ as a protected path and denies agent writes there — which blocks
  8. # an implementer subagent from writing its report file. A self-ignoring
  9. # .gitignore keeps the workspace out of `git status` and out of accidental
  10. # commits without modifying any tracked file.
  11. #
  12. # Single source of truth for the workspace location, so task-brief and
  13. # review-package cannot drift to different directories.
  14. #
  15. # Usage: sdd-workspace
  16. set -euo pipefail
  17. root=$(git rev-parse --show-toplevel)
  18. dir="$root/.superpowers/sdd"
  19. mkdir -p "$dir"
  20. printf '*\n' > "$dir/.gitignore"
  21. cd "$dir" && pwd