summaryrefslogtreecommitdiff
path: root/skills/subagent-driven-development/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'skills/subagent-driven-development/scripts')
-rwxr-xr-xskills/subagent-driven-development/scripts/sdd-workspace22
1 files changed, 22 insertions, 0 deletions
diff --git a/skills/subagent-driven-development/scripts/sdd-workspace b/skills/subagent-driven-development/scripts/sdd-workspace
new file mode 100755
index 0000000..ea9bb08
--- /dev/null
+++ b/skills/subagent-driven-development/scripts/sdd-workspace
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+# Resolve and ensure the working-tree directory SDD uses for its short-lived
+# artifacts: task briefs, implementer reports, review packages, and the
+# progress ledger. Print the directory's absolute path.
+#
+# The workspace lives in the working tree (not under .git/) because Claude Code
+# treats .git/ as a protected path and denies agent writes there — which blocks
+# an implementer subagent from writing its report file. A self-ignoring
+# .gitignore keeps the workspace out of `git status` and out of accidental
+# commits without modifying any tracked file.
+#
+# Single source of truth for the workspace location, so task-brief and
+# review-package cannot drift to different directories.
+#
+# Usage: sdd-workspace
+set -euo pipefail
+
+root=$(git rev-parse --show-toplevel)
+dir="$root/.superpowers/sdd"
+mkdir -p "$dir"
+printf '*\n' > "$dir/.gitignore"
+cd "$dir" && pwd