بنقرة واحدة
itx-execute
Execute the plan for an issue (parent or subtask)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Execute the plan for an issue (parent or subtask)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Cut a new clawrium release — bump version, sync docs, tag, trigger PyPI publish
Record a CLI demo (GIF or MP4) using VHS, with storyboard support for long-form / YouTube demos
Watch ric03uec/clawrium release tags; draft a short blog post per user-visible feature as a PR against blog/.
Detect user-visible changes from the last 24h of commits on main and propose doc and scenario updates as PRs.
Execute the plan for an issue (parent or subtask)
Know the clawctl CLI and manage your Clawrium fleet (hosts, agents, providers, channels, integrations, skills, secrets)
| name | itx:execute |
| description | Execute the plan for an issue (parent or subtask) |
| argument-hint | [orchestrate] <issue-number> [in a subtree|--worktree] |
name: itx:execute
Execute the implementation plan for a GitHub issue.
Triggered by orchestrate as the first token in arguments
(e.g. /itx:execute orchestrate 112). Use when the issue is a parent
with linked subtasks and you want a hands-off, stacked-PR pipeline
across all subtasks.
addSubIssue). Detect via:
gh issue view <parent> --json title,body,labels && \
gh api graphql -f query='query($owner: String!, $repo: String!, $num: Int!) {
repository(owner: $owner, name: $repo) {
issue(number: $num) {
subIssues(first: 50) { nodes { number title state } }
}
}
}' -f owner="$OWNER" -f repo="$REPO" -F num=<parent>
tmux available on the host. If not, fail with a clear message —
orchestrate mode requires tmux..itx/<parent>/00_PLAN.md (created by
/itx:plan-create). Refuse to start otherwise.ATX availability is not a precondition. Children use the
fallback chain in ATX Review below. Handoff is still keyed on
PR-open — without ATX, that just means the child opens the PR after
local make test + make lint pass instead of after an ATX rating
clears.
The orchestrator (the claude session that runs orchestrate mode) does only these things:
claude --dangerously-skip-permissions '/itx:execute <N>' in the
subtask's worktree.[ITX-STUCK]) in the
end-of-run summary table, but does not halt the pipeline
waiting for user input — see "Stuck child" below.The orchestrator does NOT:
--no-verify.Given subtasks A, B, C, D (in dependency order from sub-issue metadata), the orchestrator opens each child's PR against the predecessor's branch, not main:
| Sub | Branch | PR base |
|---|---|---|
| A | issue-<A>-<slug> | main |
| B | issue-<B>-<slug> | issue-<A>-<slug> |
| C | issue-<C>-<slug> | issue-<B>-<slug> |
| D | issue-<D>-<slug> | issue-<C>-<slug> |
As predecessors merge, GitHub auto-updates downstream PR bases to main.
<project-name>-issue-<parent> where <project-name>
is the repo name from basename $(git rev-parse --show-toplevel).
Example: clawrium-issue-478.issue-<N> (the subtask issue number).
Example: issue-481, issue-482, issue-483.tmux attach -t <project-name>-issue-<parent>.Parse args. Extract orchestrate token + parent issue number.
Fall through to regular execution mode if orchestrate absent.
Verify preconditions (above). On failure, exit with a clear message citing the missing precondition.
Enumerate subtasks. Order by sub-issue number (creation order). Treat order as dependency order unless the plan file specifies otherwise.
Create tmux session:
REPO_NAME=$(basename $(git rev-parse --show-toplevel))
SESSION="${REPO_NAME}-issue-${PARENT}"
tmux has-session -t "$SESSION" 2>/dev/null || \
tmux new-session -d -s "$SESSION"
Spawn subtask A:
REPO_PARENT=$(dirname $(git rev-parse --show-toplevel))
WORKTREE_A="${REPO_PARENT}/${REPO_NAME}-issue-${A_NUM}"
BRANCH_A="issue-${A_NUM}-<slug>"
git worktree add "$WORKTREE_A" -b "$BRANCH_A" main
tmux new-window -t "$SESSION" -n "issue-${A_NUM}" -c "$WORKTREE_A"
tmux send-keys -t "${SESSION}:issue-${A_NUM}" \
"claude --dangerously-skip-permissions '/itx:execute ${A_NUM}'" Enter
Poll predecessor PR state every 5 minutes:
gh pr list --repo "$OWNER/$REPO" --head "$BRANCH_A" \
--json number,state,reviewDecision,body --jq '.[0]'
The child opens its PR when its work is ready — that means
tests + lint pass and, if ATX is available, its iteration loop
has either cleared or exhausted (with unresolved blockers
documented as Callouts and an [ITX-STUCK] marker on the PR).
Do not poll faster than 5 minutes. Child iterations take minutes; faster polling burns cache without changing outcomes.
On predecessor PR open, spawn next subtask:
${REPO_PARENT}/${REPO_NAME}-issue-${NEXT_NUM}.claude --dangerously-skip-permissions \
"/itx:execute ${NEXT_NUM} --pr-base=${PREV_BRANCH}"
(Child sessions in standard mode must honor --pr-base — see
"PR base override" below.)Repeat until all subtasks have open PRs.
Final state. Orchestrator reports a summary table with each subtask's PR URL, ATX rating, and base branch. Then stands down. Merging is the user's decision; merging happens bottom-up.
A child that exhausts its 3-iteration ATX ceiling without clearing
still opens its PR. The PR body documents every unresolved
blocker as a Callout and the PR carries an [ITX-STUCK] marker
comment.
The orchestrator's polling loop treats an [ITX-STUCK]-marked PR the
same as a clean PR for the purpose of advancing the pipeline — the
child has done its best, recorded the gaps, and handed off. Do not
halt and do not block on user input.
In the end-of-run summary, flag every stuck subtask with the count of unresolved blockers so the user sees them up front. Merging decisions remain entirely the user's — they can read the Callouts, push back on the PR, take it over manually, or abandon. The orchestrator stands down after reporting; it does not wait for that decision.
If the orchestrator itself encounters a genuinely unrecoverable
condition (e.g., worktree directory already exists with a conflicting
branch), it records a Callout on the parent issue (#<parent>)
and exits non-zero with a summary. It does not prompt.
When a child receives --pr-base=<branch>, it MUST:
main.Stacked on top of <branch> in the PR body so reviewers know
the dependency chain.If the child's mode does not support --pr-base, the orchestrator
falls back to opening the PR itself after the child finishes:
gh pr edit <pr-num> --base "$PREV_BRANCH"
/itx:execute <N> (without orchestrate) for direct execution."Note: ATX availability is not a precondition. If ATX is unavailable or fails, the orchestrator still spawns subtasks; PR-open remains the handoff signal. See ATX Review below.
Code review via ATX is desired but not required. Children execute review with a strict fallback chain and persist state so an interrupted execution can resume without re-running ATX on identical changes.
Try each step in order; use the first that works. Never block the user waiting for ATX to become available.
mcp__atx__request_review is available in the tool list. If yes,
call it with the iteration body specified in
AGENTS.md.command -v atx on the host. If found, invoke
atx review --pr <pr-number> --json (or the project's documented
CLI invocation in .claude/itx-config.json if specified) and parse
the JSON output the same way you'd parse the MCP response.Whenever an ATX review is requested (MCP or CLI), persist the session
metadata immediately to .itx/<N>/atx-session.json:
{
"session_id": "<id returned by ATX>",
"transport": "mcp" | "cli",
"commit_sha": "<HEAD sha at the moment review was requested>",
"iteration": 1,
"last_rating": null,
"last_blockers": [],
"started_at": "<ISO-8601 UTC>",
"updated_at": "<ISO-8601 UTC>"
}
Update the file after every iteration with iteration, last_rating,
last_blockers, and updated_at. Commit this file alongside your
code changes — it's a planning artifact and helps the next run.
When /itx:execute <N> starts and .itx/<N>/atx-session.json exists:
commit_sha with current git rev-parse HEAD.
last_rating > 3 + no blockers → ATX already cleared
these changes. Skip ATX entirely; proceed to PR open / push.transport differs from what's currently available (e.g., file
says mcp but only CLI is available now): treat as stale, start
fresh — sessions are not portable across transports.Run at most 3 ATX iterations. After the 3rd iteration:
<pr-format-atx> in AGENTS.md).[ITX-STUCK] marker comment on the PR so the
orchestrator's polling loop can flag it.This replaces the older "wait for user direction" behavior. The orchestrator may still surface a stuck child in its end-of-run summary, but it will not pause the pipeline waiting for input — it either proceeds to the next subtask (if one is queued) or stands down with the report.
Every PR opened by /itx:execute MUST include a Callouts section
near the bottom of the body — even if empty. Format:
## Callouts
- [DECISION] <one-line summary of a non-obvious choice you made>
- Why: <best-guess rationale based on existing project standards>
- Alternatives considered: <briefly>
- Reviewer: confirm or push back.
- [UNRESOLVED] <what could not be resolved by the agent alone>
- Best guess applied: <what you did anyway>
- Reviewer: please verify.
- [ENVIRONMENT] <anything unusual about the execution environment>
- Example: "ATX unavailable; review path was manual."
- [TODO-FOLLOWUP] <work intentionally deferred>
- Tracking: <issue number or `to be filed`>
If you would otherwise want to ask the user a question via
AskUserQuestion, don't — make a best-guess decision using
existing project conventions (CLAUDE.md, AGENTS.md, neighboring code)
and record it as a [DECISION] callout instead. The PR is the
synchronization point with the user; do not block during execution.
If there are genuinely no callouts, write:
## Callouts
_None._
so the reviewer knows the section wasn't forgotten.
Triggered by in a subtree or --worktree in arguments. Enables working on multiple issues simultaneously.
<repo-parent>/<repo-name>-issue-<number>/
Example:
~/projects/myrepo/ # Main repo
~/projects/myrepo-issue-35/ # Worktree for issue 35
~/projects/myrepo-issue-42/ # Worktree for issue 42
Create Worktree:
REPO_NAME=$(basename $(git rev-parse --show-toplevel))
REPO_PARENT=$(dirname $(git rev-parse --show-toplevel))
WORKTREE_PATH="${REPO_PARENT}/${REPO_NAME}-issue-${NUMBER}"
git worktree add "${WORKTREE_PATH}" -b issue-${NUMBER}-<slug> main
Launch Execution:
If tmux available (interactive execution in background):
REPO_NAME=$(basename $(git rev-parse --show-toplevel))
SESSION="${REPO_NAME}-issue-${NUMBER}"
# Create session if not exists. Session-per-issue keeps standalone
# runs isolated from orchestrate-mode sessions (which use the parent
# issue number).
tmux has-session -t "$SESSION" 2>/dev/null || \
tmux new-session -d -s "$SESSION"
# Create window and run claude interactively (no -p flag so you can watch execution)
tmux new-window -t "$SESSION" -n "issue-${NUMBER}" -c "${WORKTREE_PATH}"
tmux send-keys -t "${SESSION}:issue-${NUMBER}" \
"claude --dangerously-skip-permissions '/itx:execute ${NUMBER}'" Enter
echo "Spawned in tmux '${SESSION}:issue-${NUMBER}'"
echo "Attach: tmux attach -t ${SESSION}"
If tmux not available (fallback):
Do not prompt the user. Spawn a Task subagent
(subagent_type="general-purpose") in the worktree with prompt
/itx:execute ${NUMBER}. Record this fallback in the PR's
Callouts section so the user knows the execution path differed
from the default (tmux + interactive claude).
Exit: After spawning tmux window, exit current execution (work continues in tmux)
After PR is merged:
# Remove worktree
git worktree remove ../<repo>-issue-35
# Or force remove if dirty
git worktree remove --force ../<repo>-issue-35
# Clean up tmux session (standalone mode: one session per issue)
tmux kill-session -t "<repo>-issue-35"
# Or, for orchestrate mode (one session per parent, kill just the window):
tmux kill-window -t "<repo>-issue-<parent>:issue-35"
Project board integration is optional and controlled via .claude/itx-config.json.
ITX_CONFIG="$(git rev-parse --show-toplevel)/.claude/itx-config.json"
if [ -f "$ITX_CONFIG" ]; then
PROJECT_ENABLED=$(jq -r '.github.project_board.enabled // false' "$ITX_CONFIG")
if [ "$PROJECT_ENABLED" = "true" ]; then
# Load project board configuration
PROJECT_ID=$(jq -r '.github.project_board.project_id' "$ITX_CONFIG")
STATUS_FIELD_ID=$(jq -r '.github.project_board.status_field_id' "$ITX_CONFIG")
BACKLOG_ID=$(jq -r '.github.project_board.status_options.backlog' "$ITX_CONFIG")
READY_ID=$(jq -r '.github.project_board.status_options.ready' "$ITX_CONFIG")
EXECUTING_ID=$(jq -r '.github.project_board.status_options.executing' "$ITX_CONFIG")
IN_REVIEW_ID=$(jq -r '.github.project_board.status_options.in_review' "$ITX_CONFIG")
DONE_ID=$(jq -r '.github.project_board.status_options.done' "$ITX_CONFIG")
fi
else
PROJECT_ENABLED="false"
fi
Only execute if PROJECT_ENABLED="true":
# Extract repository info
REMOTE_URL=$(git config --get remote.origin.url)
OWNER_REPO=$(echo "$REMOTE_URL" | sed -E 's/.*[:/]([^/]+\/[^/]+)(\.git)?$/\1/')
OWNER=$(echo "$OWNER_REPO" | cut -d'/' -f1)
REPO=$(echo "$OWNER_REPO" | cut -d'/' -f2)
# Get issue node ID
NODE_ID=$(gh api repos/$OWNER/$REPO/issues/<number> --jq '.node_id')
# Add to project (returns item ID)
ITEM_ID=$(gh api graphql -f query='
mutation($projectId: ID!, $contentId: ID!) {
addProjectV2ItemById(input: {
projectId: $projectId
contentId: $contentId
}) { item { id } }
}
' -f projectId="$PROJECT_ID" -f contentId="$NODE_ID" --jq '.data.addProjectV2ItemById.item.id')
# Set status to Executing
gh project item-edit --project-id "$PROJECT_ID" --id "$ITEM_ID" \
--field-id "$STATUS_FIELD_ID" --single-select-option-id "$EXECUTING_ID"
If project board not enabled, skip all project board operations silently.
NEVER push directly to the main branch.
Always:
issue-<number>-<slug>mainFetch Issue: Get full issue details
gh issue view <number> --json number,title,body,labels,comments
Identify Issue Type:
[Parent #N]Route Execution:
[Parent #<number>] in titleLog Start: Add execution start comment
## Execution Started
Beginning implementation...
---
<details>
<summary>Prompt Log</summary>
**Stage**: execution
**Skill**: /itx:execute
**Timestamp**: <ISO timestamp>
**Model**: <model>
```prompt
<user prompt that triggered execution>
```
Update Status to Executing (if project board enabled): Use the conditional project board commands above. If not enabled, skip this step silently.
Read Plan: Find the implementation plan in issue comments or .itx/<N>/01_EXECUTION.md
Load Build Configuration:
ITX_CONFIG="$(git rev-parse --show-toplevel)/.claude/itx-config.json"
if [ -f "$ITX_CONFIG" ]; then
TEST_CMD=$(jq -r '.build.test_command // "make test"' "$ITX_CONFIG")
LINT_CMD=$(jq -r '.build.lint_command // "make lint"' "$ITX_CONFIG")
else
TEST_CMD="make test"
LINT_CMD="make lint"
fi
Create Execution Checklist:
CRITICAL: ALWAYS create task checklist before any execution. Do not skip this step.
Parse the implementation plan and create tasks for tracking:
a. Create Implementation Tasks: For each phase/step in the plan, create a task:
TaskCreate(
subject="Implement: <phase/step description>",
description="<detailed requirements from plan>",
activeForm="Implementing <phase/step>"
)
b. Create Verification Tasks:
TaskCreate(
subject="Run test suite",
description="Execute configured test command and ensure all tests pass",
activeForm="Running tests"
)
TaskCreate(
subject="Run linter",
description="Execute configured lint command and fix any issues",
activeForm="Running linter"
)
c. Set Dependencies (if needed):
TaskUpdate(
taskId="<later-task-id>",
addBlockedBy=["<prerequisite-task-id>"]
)
d. Review Task List:
TaskList() # Confirm all tasks created correctly
Execute Tasks Systematically:
a. Get Next Task: TaskList() - Find first pending task with no blockedBy
b. Start Task: TaskUpdate(taskId="<task-id>", status="in_progress")
c. Execute Changes: Implement the task requirements
d. Complete Task: TaskUpdate(taskId="<task-id>", status="completed")
e. Check Progress: TaskList() - See remaining tasks
f. Repeat until all implementation tasks are completed
Execute Verification Tasks:
Follow the same pattern as implementation:
Create PR:
PR body MUST follow the templates in AGENTS.md (ATX or manual,
depending on what was actually used during execution) and MUST
include a ## Callouts section near the bottom — see the
Callouts section earlier in this skill. The Callouts section is
non-optional; write _None._ if there are none.
If in worktree mode: Branch already exists (created during worktree setup)
git add <files>
git commit -m "<message>"
git push -u origin issue-<number>-<slug>
gh pr create --title "<title>" --body-file <body-file> # body must include Callouts
If in regular mode: Create branch first
git checkout -b issue-<number>-<slug>
git add <files>
git commit -m "<message>"
git push -u origin issue-<number>-<slug>
gh pr create --title "<title>" --body-file <body-file>
WARNING: Never push to main. Always push to feature branch and create PR.
When reading the implementation plan, extract:
subject: "Implement: <what>"
description: "<detailed requirements>"
activeForm: "Implementing <what>"
Examples:
subject: "Implement: Update CLI help text for new terminology"
description: "Update all help text in src/cli/main.py to use new terminology"
activeForm: "Updating CLI help text"
subject: "Implement: Refactor service.py function names"
description: "Rename functions: old_name -> new_name, another_old -> another_new"
activeForm: "Refactoring service.py"
Always create these verification tasks:
If execution feels unclear or you lose track of progress:
TaskList() to see current stateUse the Task tool to spawn subagents:
Task(
subagent_type="general-purpose",
prompt="Execute /itx:execute <subtask-number>",
description="Execute subtask #<number>"
)
Execute subtasks sequentially to avoid conflicts.
After completing a subtask, check if all sibling subtasks are done:
# Find parent number from title [Parent #N]
# List all subtasks for that parent
# If all closed, close the parent
Build commands are configurable via .claude/itx-config.json:
{
"build": {
"test_command": "npm test",
"lint_command": "npm run lint"
}
}
Defaults (no config): make test, make lint
See CONFIG.md for full configuration options.
AskUserQuestion, no interactive
prompts. When in doubt, follow existing project standards (CLAUDE.md,
AGENTS.md, neighboring code) and record the decision as a Callout on
the PR. The PR is the synchronization point with the user._None._ if empty..itx/<N>/atx-session.json so interrupted runs don't re-run ATX on
identical changes.REQUIRED: Append prompt log to .itx/<N>/01_EXECUTION.md.
See AGENTS.md for format specification.