ワンクリックで
fork-iteration
Use when user wants to create new autonomy branch from current commit or specific past iteration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when user wants to create new autonomy branch from current commit or specific past iteration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | fork-iteration |
| description | Use when user wants to create new autonomy branch from current commit or specific past iteration |
| user-invocable | true |
Create new autonomy branch forked from current commit or any iteration tag in git history. Enables "slime mold strategy" of parallel exploration.
Core principle: Branch creation is independent of iteration management. Fork creates branch, start-iteration begins work.
Use this skill when:
/fork-iteration commandDO NOT use for:
| Step | Action | Tool |
|---|---|---|
| 1. Parse arguments | Extract iteration (optional) and strategy-name | Manual |
| 2. Validate strategy-name | Check kebab-case, not already exists | Bash |
| 3. Resolve fork point | Find iteration tag or use HEAD | Bash |
| 4. Create branch | Checkout fork point, create autonomy branch | Bash |
| 5. Report success | Confirm creation with next steps | Direct output |
Extract arguments from command args:
Format: [iteration] <strategy-name>
Parse:
If args contains only one word:
iteration = None
strategy_name = args
Else if args contains two words:
iteration = first word
strategy_name = second word
Else:
Error: "Invalid arguments. Usage: /fork-iteration [iteration] <strategy-name>"
Validate strategy-name:
Normalize strategy-name:
# Convert to lowercase, replace invalid chars with hyphens
strategy_name=$(echo "$strategy_name" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]-' '-' | sed 's/^-*//; s/-*$//')
Validate that autonomy/<strategy-name> doesn't already exist:
# Check for existing branch (local or remote)
if git branch -a | grep -q "autonomy/$strategy_name\$"; then
# Error: branch exists
fi
If exists:
Error: Branch 'autonomy/<strategy-name>' already exists.
To work on existing branch:
git checkout autonomy/<strategy-name>
To create with different name:
/fork-iteration [iteration] <different-name>
Available autonomy branches:
[List from git branch -a | grep autonomy/]
Stop here if branch exists.
Determine what commit to fork from:
If iteration specified:
# Search for iteration tag in current branch history
matching_tags=$(git tag --merged HEAD | grep "iteration-$(printf '%04d' $iteration)\$")
tag_count=$(echo "$matching_tags" | wc -l)
if [ "$tag_count" -eq 0 ]; then
# Error: iteration not found
echo "Error: Iteration $iteration not found in current branch history."
echo ""
echo "Most recent iterations in current branch:"
git tag --merged HEAD | grep 'iteration-' | tail -5
exit 1
elif [ "$tag_count" -eq 1 ]; then
# Use the tag
fork_point="$matching_tags"
else
# Multiple matches (shouldn't happen with branch-namespaced tags, but handle it)
echo "Multiple iteration tags found for iteration $iteration:"
echo "$matching_tags"
echo ""
# Use AskUserQuestion to let user choose
exit 1
fi
If iteration NOT specified:
# Fork from current HEAD
fork_point=$(git rev-parse HEAD)
fork_description="current commit (HEAD)"
Validate fork point exists:
if ! git rev-parse "$fork_point" >/dev/null 2>&1; then
echo "Error: Fork point '$fork_point' not found in git history."
exit 1
fi
Checkout fork point and create new autonomy branch:
# Checkout fork point (detached HEAD)
git checkout "$fork_point"
# Create and switch to new branch
git checkout -b "autonomy/$strategy_name"
# Confirm creation
current_branch=$(git branch --show-current)
if [ "$current_branch" != "autonomy/$strategy_name" ]; then
echo "Error: Failed to create branch 'autonomy/$strategy_name'"
exit 1
fi
On success:
/start-iterationAnnounce successful branch creation:
✓ Branch `autonomy/<strategy-name>` created
Forked from: [tag or commit hash]
Current branch: autonomy/<strategy-name>
Next step: Run `/start-iteration` to begin work on this branch.
This skill ONLY creates branches:
start-iteration will handle iteration logic when user runs itCan fork from:
autonomy/experiment-a)main, develop)Autonomy branches NEVER merge:
/analyze-branch (read-only)Branch name becomes identity:
autonomy/<strategy-name>/iteration-NNNNGood names:
usage-based-pricingcdn-optimizationreact-migrationBad names:
test (too generic)new (not descriptive)experiment1 (meaningless)When start-iteration runs on new branch:
/create-goal first| Mistake | Reality |
|---|---|
| "I'll also start the iteration in this skill" | NO. Branch creation is separate. User runs /start-iteration when ready. |
| "User wants to fork, I'll check out the branch for them" | Already doing this. Checkout happens during creation. |
| "Branch name has spaces, I'll keep them" | NO. Normalize to kebab-case. |
| "I'll search all branches for iteration tag" | NO. Only search tags reachable from current HEAD (git tag --merged HEAD). |
| "Branch exists, I'll overwrite it" | NO. Error and show user how to work with existing branch. |
| "No goal found, I'll create one" | NO. User must run /create-goal explicitly. |
Once branch is created:
autonomy/<strategy-name> branch/start-iteration to begin workUse when working in a project that has a `.agents/` directory or when the user asks about Conway Architecture, the conway-architecture plugin, domain agents, owned_paths enforcement, or how to coordinate a persistent subagent team that shadows the application's architecture
Use when reading or writing OST (Outcome / Strategy / Tactic) graph data in the `agents` TypeDB database - covers the falsifiability rubric, the three-layer discipline, ID conventions, lifecycle transitions, and the structured Task fields that replace generic descriptions
Use when interacting with a TypeDB 3.x database via the typedb MCP tools (typedb-query, typedb-database_schema, etc.) - covers schema-first workflow, transaction types, TypeQL 3.x syntax (which differs materially from 2.x), and the most common failure modes
Use when analyzing another branch's iteration journals to extract findings, decisions, and insights from divergent work
Use when user wants detailed status report for single autonomy branch including iteration timeline and metrics progression
Use when saving current iteration progress mid-conversation, before context compaction, or at interim pause points