0
Fork 0
mirror of https://github.com/obra/superpowers.git synced 2026-09-25 22:09:05 +00:00

Use a working-tree SDD directory (.superpowers/sdd) to avoid .git write approvals and improve SDD UX #1780

Closed
opened 2026-06-17 05:39:04 +00:00 by MadMaximusJB · 2 comments
MadMaximusJB commented 2026-06-17 05:39:04 +00:00 (Migrated from github.com)

What problem does this solve?

When running Subagent-Driven Development (SDD), the skill creates and manages short-lived workflow artifacts (task briefs, implementer reports, review packages, and a progress ledger). Those artifacts are currently written under the repository's .git/sdd path (via git rev-parse --git-path sdd). Many agent harnesses (Claude Code and similar) treat writes under .git/ as protected and prompt for explicit user approval on every write. This produces repeated interactive approval prompts that block automated subagent workflows and degrade the UX.

Proposed solution

Move the SDD workspace out of the repository's .git namespace and into a deterministic top-level working-tree path (proposed: .superpowers/sdd). Concretely:

  1. Prefer .superpowers/sdd as the canonical directory for SDD artifacts.
  2. Change scripts and code that use git rev-parse --git-path sdd to prefer .superpowers/sdd and fall back to .git/sdd for compatibility. Example snippet to use in scripts:
if [ -d .superpowers/sdd ]; then
  dir=.superpowers/sdd
elif git rev-parse --git-path sdd >/dev/null 2>&1 && [ -d "$(git rev-parse --git-path sdd)" ]; then
  dir=$(git rev-parse --git-path sdd)
else
  dir=.superpowers/sdd
fi
mkdir -p "$dir"
  1. Update skills/subagent-driven-development/SKILL.md and relevant docs to reference the new path and show example commands.
  2. Add .superpowers/ to the repository .gitignore to avoid accidental commits.
  3. Optionally include a migration helper that moves existing .git/sdd content to .superpowers/sdd on first run (logged) and preserves file permissions where reasonable.
  4. Update tests (including tests/claude-code/*) to accept the new path or both locations during transition.
  5. Add a short release note/changelog entry describing the change and upgrade path.

What alternatives did you consider?

  • Keep using .git/sdd and ask harnesses to whitelist it: requires per-harness changes and is out-of-repo, fragile, and inconsistent across environments.
  • Add a pre-creation step in controllers that pre-creates all task report files: mitigates prompts in some cases but is a fragile, partial workaround and leaves artifacts hidden under .git/.
  • Use a configurable environment variable or user config to override the path: valid, but adds complexity and opt-in burden; a repo-default working-tree path avoids per-user configuration.

This proposal favors a simple, consistent default with a graceful compatibility fallback.

Is this appropriate for core Superpowers?

Yes. This change affects where SDD stores its workflow artifacts and benefits any user of the SDD skills regardless of project or domain. It reduces accidental friction across harnesses and improves cross-harness reliability.

Environment (required)

Field Value
Superpowers version
Harness (Claude Code, Cursor, etc.)
Harness version
Your model + version
All plugins installed

Context

Conversation history: this change is proposed because agent harnesses (notably Claude Code) prompt for approval on writes under .git/, blocking subagent-driven-development. The proposed migration keeps backward compatibility (fallback to .git/sdd) and suggests an optional migration helper to move existing files the first run.

## What problem does this solve? When running Subagent-Driven Development (SDD), the skill creates and manages short-lived workflow artifacts (task briefs, implementer reports, review packages, and a progress ledger). Those artifacts are currently written under the repository's `.git/sdd` path (via `git rev-parse --git-path sdd`). Many agent harnesses (Claude Code and similar) treat writes under `.git/` as protected and prompt for explicit user approval on every write. This produces repeated interactive approval prompts that block automated subagent workflows and degrade the UX. ## Proposed solution Move the SDD workspace out of the repository's `.git` namespace and into a deterministic top-level working-tree path (proposed: `.superpowers/sdd`). Concretely: 1. Prefer `.superpowers/sdd` as the canonical directory for SDD artifacts. 2. Change scripts and code that use `git rev-parse --git-path sdd` to prefer `.superpowers/sdd` and fall back to `.git/sdd` for compatibility. Example snippet to use in scripts: ```bash if [ -d .superpowers/sdd ]; then dir=.superpowers/sdd elif git rev-parse --git-path sdd >/dev/null 2>&1 && [ -d "$(git rev-parse --git-path sdd)" ]; then dir=$(git rev-parse --git-path sdd) else dir=.superpowers/sdd fi mkdir -p "$dir" ``` 3. Update `skills/subagent-driven-development/SKILL.md` and relevant docs to reference the new path and show example commands. 4. Add `.superpowers/` to the repository `.gitignore` to avoid accidental commits. 5. Optionally include a migration helper that moves existing `.git/sdd` content to `.superpowers/sdd` on first run (logged) and preserves file permissions where reasonable. 6. Update tests (including `tests/claude-code/*`) to accept the new path or both locations during transition. 7. Add a short release note/changelog entry describing the change and upgrade path. ## What alternatives did you consider? - Keep using `.git/sdd` and ask harnesses to whitelist it: requires per-harness changes and is out-of-repo, fragile, and inconsistent across environments. - Add a pre-creation step in controllers that pre-creates all task report files: mitigates prompts in some cases but is a fragile, partial workaround and leaves artifacts hidden under `.git/`. - Use a configurable environment variable or user config to override the path: valid, but adds complexity and opt-in burden; a repo-default working-tree path avoids per-user configuration. This proposal favors a simple, consistent default with a graceful compatibility fallback. ## Is this appropriate for core Superpowers? Yes. This change affects where SDD stores its workflow artifacts and benefits any user of the SDD skills regardless of project or domain. It reduces accidental friction across harnesses and improves cross-harness reliability. ## Environment (required) | Field | Value | |-------|-------| | Superpowers version | | | Harness (Claude Code, Cursor, etc.) | | | Harness version | | | Your model + version | | | All plugins installed | | ## Context Conversation history: this change is proposed because agent harnesses (notably Claude Code) prompt for approval on writes under `.git/`, blocking subagent-driven-development. The proposed migration keeps backward compatibility (fallback to `.git/sdd`) and suggests an optional migration helper to move existing files the first run.
obra commented 2026-06-17 05:47:59 +00:00 (Migrated from github.com)

Do you have a trace showing this failure? That's not a thing we saw in testing.

Do you have a trace showing this failure? That's not a thing we saw in testing.
obra commented 2026-06-17 06:10:02 +00:00 (Migrated from github.com)

Thanks for the detailed proposal. I'm an agent (Claude) working with the maintainer, and I tested this directly before we changed anything — the premise doesn't hold up, so I don't think this change is warranted. Here's what I found.

The claim is that .git/ writes are gated, so SDD's .git/sdd artifacts cause repeated approval prompts that block the workflow.

What's actually true: .git/ is a protected path, but only for the Write/Edit tools. SDD doesn't use those tools for its artifacts — task-brief and review-package are bash scripts, and the progress ledger is read with cat and appended with >>. Bash subprocess writes to .git/ are not path-gated; only the command itself is, and that's allowlistable.

I verified this empirically in a non-bypass (acceptEdits) Claude Code session:

Operation Target Result
Write tool .git/sdd/probe.md Prompted (protected path — fires even in acceptEdits)
Write tool hello.txt (working tree) Auto-approved, no prompt
Bash ./task-brief plan.md 1 wrote .git/sdd/task-1-brief.md One command prompt (offers "don't ask again for ./task-brief *"); no .git/ write prompt
Read tool .git/sdd/task-1-brief.md No prompt

So the real cost is at most a single, allowlistable command approval per script — not a per-write .git/ approval, and nothing that blocks a run.

The proposed move to .superpowers/sdd wouldn't change this: the writes are still bash commands, which prompt on the command regardless of target path. It would trade a non-problem for a worse default — artifacts in the working tree, where they clutter git status and can be committed by accident.

If you're hitting actual repeated prompts in a real run, please attach a trace (transcript or --debug log) showing the prompts and your permission mode — that's what we asked for and still haven't seen. The environment table in the report is blank and we can't reproduce the described failure.


— Claude (Opus 4.8, claude-opus-4-8[1m]) in Claude Code 2.1.179, working on behalf of the maintainer (@obra). The verification above was a real non-bypass acceptEdits Claude Code session I drove in tmux with the superpowers plugin loaded.

Thanks for the detailed proposal. I'm an agent (Claude) working with the maintainer, and I tested this directly before we changed anything — the premise doesn't hold up, so I don't think this change is warranted. Here's what I found. **The claim** is that `.git/` writes are gated, so SDD's `.git/sdd` artifacts cause repeated approval prompts that block the workflow. **What's actually true:** `.git/` is a protected path, but only for the **Write/Edit tools**. SDD doesn't use those tools for its artifacts — `task-brief` and `review-package` are bash scripts, and the progress ledger is read with `cat` and appended with `>>`. Bash subprocess writes to `.git/` are *not* path-gated; only the command itself is, and that's allowlistable. I verified this empirically in a non-bypass (`acceptEdits`) Claude Code session: | Operation | Target | Result | |---|---|---| | Write tool | `.git/sdd/probe.md` | **Prompted** (protected path — fires even in acceptEdits) | | Write tool | `hello.txt` (working tree) | Auto-approved, no prompt | | Bash `./task-brief plan.md 1` | wrote `.git/sdd/task-1-brief.md` | One *command* prompt (offers "don't ask again for `./task-brief *`"); **no** `.git/` write prompt | | Read tool | `.git/sdd/task-1-brief.md` | No prompt | So the real cost is at most a single, allowlistable command approval per script — not a per-write `.git/` approval, and nothing that blocks a run. The proposed move to `.superpowers/sdd` wouldn't change this: the writes are still bash commands, which prompt on the command regardless of target path. It would trade a non-problem for a worse default — artifacts in the working tree, where they clutter `git status` and can be committed by accident. If you're hitting actual repeated prompts in a real run, please attach a trace (transcript or `--debug` log) showing the prompts and your permission mode — that's what we asked for and still haven't seen. The environment table in the report is blank and we can't reproduce the described failure. --- *— Claude (Opus 4.8, `claude-opus-4-8[1m]`) in Claude Code 2.1.179, working on behalf of the maintainer (@obra). The verification above was a real non-bypass `acceptEdits` Claude Code session I drove in tmux with the superpowers plugin loaded.*
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skills/obra-superpowers#1780
No description provided.