Do bounded research (official docs first) and produce a high-level implementation sketch in `sketch/<generated-name>.md`. Use when you want an approach and step ordering before implementation.
git rev-parse --show-toplevelplan-sketch must produce:
sketch/, or an explicit --output path if provided).The Questions block must cover:
Format requirements (strict):
BEGIN_USER_QUESTIONSEND_USER_QUESTIONS1), 2), ... (not bullets).1a), 1b), 1c) ... (letters per question), and make the labels easy to copy/paste.Recommended picks (copy/paste): 1a, 2b, 3aBEGIN_USER_QUESTIONS_JSONEND_USER_QUESTIONS_JSONquestions: array of objects with id (number or string) and options.options entry includes label (e.g., 1a) and text.recommended boolean on options and recommended_picks array at the top level.Typically runs 15–45 minutes. Callers should allow the full --timeout (default 3600s) before interrupting.
If you use --progress-log, do not tail -f it into the main context unless you must debug; prefer checking progress via log line counts (for example: wc -l <progress-log>) and/or the heartbeat counters.
Run the sketch as a standalone CLI invocation:
resolve_skill_dir() {
local name="$1"
local repo_root=""
repo_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
local candidates=(
"$repo_root/.agents/skills/$name"
"$repo_root/.claude/skills/$name"
"$HOME/.agents/skills/$name"
"$HOME/.codex/skills/$name"
"$HOME/.claude/skills/$name"
)
for d in "${candidates[@]}"; do
if [[ -d "$d" ]]; then
echo "$d"
return 0
fi
done
echo "Error: skill '$name' not found in repo-scoped or user-scoped skill dirs." >&2
return 1
}
PLAN_SKETCH_SKILL_DIR="$(resolve_skill_dir plan-sketch)"
python3 "$PLAN_SKETCH_SKILL_DIR/scripts/run_plan_sketch.py" "user's rough idea"
Flags:
--idea-file PATH — use a file as the idea input (useful for large/multiline inputs)--output PATH — optional explicit sketch output path (default: model generates sketch/<meaningful-name>.md)--cli codex|claude — override auto-detected CLI--model MODEL — pass a specific model to the CLI--reasoning-effort LEVEL — pass explicit reasoning effort (vhigh aliases to xhigh)--timeout N — CLI invocation timeout in seconds (default: 3600)--progress-log PATH — optional path to append streamed subagent output--heartbeat-seconds N — heartbeat cadence in seconds (0 disables)Default behavior:
--model gpt-5.2 with xhigh reasoning effort.--sandbox danger-full-access and -a never.--search) so it can do bounded research for unstable facts.--dangerously-skip-permissions.The script prints the output file path to stdout on success.
references/prompts/plan-sketch.md.$ARGUMENTS.sketch/ with a meaningful kebab-case filename and report the final path.