بنقرة واحدة
complete-task
Complete work on a GitHub issue - close issue, update artifacts, prompt for doc updates
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Complete work on a GitHub issue - close issue, update artifacts, prompt for doc updates
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Run regression benchmarks, track results, and generate trend reports
Complete a sub-issue of an umbrella issue - close it, check parent checkbox, update design doc
Run code coverage analysis, track class-level results, and generate trend reports
Create a GitHub issue and add it to the Typhon org project
Implement a GitHub issue end-to-end — scope it (whole issue or specific phases), build an acceptance-criteria plan from its design doc, get the plan approved, then develop autonomously with tests and a mandatory code review.
Start design for a GitHub issue - creates design doc from research/ideas, updates status to Todo
| name | complete-task |
| description | Complete work on a GitHub issue - close issue, update artifacts, prompt for doc updates |
| argument-hint | [issue number] |
Finalize work on an issue by closing it, updating project status, and ensuring all artifacts are properly maintained.
$ARGUMENTS should contain the issue number (e.g., "42" or "#42").
If no issue number provided, use AskUserQuestion to ask which issue to complete.
If $ARGUMENTS contains --help or -h, display the following and stop — do not execute the workflow.
/complete-task [#N]
Complete work on a GitHub issue — close issue, update project, prompt for doc updates.
Arguments:
#N Issue number (e.g., 42 or #42)
--help, -h Show this help
What it does:
1. Verifies issue state and checks PR/branch status
2. Closes the issue
3. Updates project status to Done
4. Handles design doc (keep / move to archive)
5. Suggests overview doc updates and ADR creation
6. Offers branch cleanup
Examples:
/complete-task #42
/complete-task 36
Use mcp__GitHub__get_issue with:
"log2n-io""Typhon"<number>Confirm the issue is currently open and has been worked on.
Step 2a: Check for existing PRs (open or merged):
Use mcp__GitHub__search_issues with:
"repo:log2n-io/Typhon type:pr <number>"This returns PRs that mention the issue number.
Step 2b: Detect unmerged feature branch (if no merged PR found):
# Find the feature/fix branch for this issue
git branch --list "feature/<number>*" --list "fix/<number>*"
# If a branch exists, check if it has commits ahead of main
git rev-list --count main..<branch_name>
Decision matrix:
| PR State | Branch State | Action |
|---|---|---|
| Merged PR exists | — | Proceed normally (happy path) |
| Open PR exists | — | Warn: "PR should be merged first" -> ask to proceed or wait |
| No PR | Branch has commits ahead of main | Warn: "Branch has N unmerged commits" -> offer to create PR |
| No PR | No feature branch / branch is even with main | Proceed normally (work may have been committed directly to main) |
If no PR and branch has unmerged commits, ask:
Question: "Branch '<branch_name>' has N commits not yet merged to main. A PR should typically be created and merged before completing the task. What would you like to do?"
Header: "PR"
Options:
- Create a PR now (Recommended) (description: "I'll create a PR from <branch_name> to main, then continue after it's merged")
- Skip PR (description: "Proceed without a PR — I'll handle merging manually")
- Cancel (description: "Stop — I'll create and merge the PR first, then re-run /complete-task")
If "Create a PR now":
git push -u origin <branch_name>Use mcp__GitHub__create_pull_request with:
owner: "log2n-io"
repo: "Typhon"
title: "<summary derived from issue title>"
body: "<summary derived from issue body>"
head: "<branch_name>"
base: "main"
Then check the claude/ documentation repo for a matching branch with changes:
cd claude
# Check if a matching branch exists and has commits ahead of main
CLAUDE_BRANCH=$(git branch --list "<branch_name>" --format="%(refname:short)")
if [ -n "$CLAUDE_BRANCH" ]; then
CLAUDE_AHEAD=$(git rev-list --count main.."$CLAUDE_BRANCH")
echo "claude/ branch: $CLAUDE_BRANCH, commits ahead: $CLAUDE_AHEAD"
else
echo "claude/ has no matching branch"
fi
cd ..
If the claude/ repo has a matching branch with commits ahead of main, also create a PR for it:
cd claude && git push -u origin <branch_name> && cd ..Use mcp__GitHub__create_pull_request with:
"log2n-io""Typhon-docs" (or the actual claude/ remote repo name — check with cd claude && git remote get-url origin && cd ..)"Docs: <same summary as main PR>""Documentation updates for log2n-io/Typhon#<issue_number>""<branch_name>""main"Report both PR URLs.
/complete-taskIf "Skip PR":
If "Cancel":
Use mcp__GitHub__update_issue with:
"log2n-io""Typhon"<number>"closed"Project item lookup: Read .claude/skills/_helpers.md Section 2 for the robust patterns.
# Step 1: Find the item ID by piping directly to Python (no temp files)
gh project item-list 1 --owner Log2n-io --limit 200 --format json 2>&1 | python3 -c "
import json, sys
items = json.load(sys.stdin)['items']
for item in items:
if item.get('content', {}).get('number') == int(sys.argv[1]):
print(item['id'])
sys.exit(0)
print('NOT_FOUND')
" <issue_number>
# Step 2: Update status to Done (using the item ID from step 1)
gh project item-edit --project-id PVT_kwDOEcGj5M4Bb-8P --id <item_id> \
--field-id PVTSSF_lADOEcGj5M4Bb-8PzhWrH1A \
--single-select-option-id 98236657 # "Done"
Look for design doc in:
claude/design/)If a design doc exists, ask the user:
Question: "The design doc 'claude/design/FeatureName.md' was used. What should happen to it?"
Header: "Design Doc"
Options:
- Keep in design/ (Recommended) — still the authoritative spec; stays as living documentation for the feature
- Move to archive/ — outdated, superseded, or no longer relevant
Note: we no longer move shipped design docs to reference/ — design docs are the feature's living spec and stay in design/ after implementation. Archive is reserved for superseded designs.
Check if this issue might affect overview documentation:
Suggest potentially affected overview docs based on Area field:
claude/overview/02-execution.md, claude/overview/04-data.mdclaude/overview/02-execution.mdclaude/overview/04-data.mdclaude/overview/04-data.mdclaude/overview/04-data.mdclaude/overview/03-storage.mdclaude/overview/08-resources.mdclaude/overview/01-concurrency.mdclaude/overview/11-utilities.mdclaude/overview/09-observability.mdAsk:
Question: "These overview docs might need updates based on this work:"
- claude/overview/XX-topic.md
"Would you like to review any of them?"
Options:
- Yes, open them for review
- Skip for now
Ask:
Question: "Did this work involve a significant architectural decision that should be documented?"
Header: "ADR"
Options:
- Yes, create an ADR (I'll help draft it)
- No, no significant decisions
If yes, help create an ADR in claude/adr/ following the template.
Check if a local feature/fix branch still exists for this issue:
git branch --list "feature/<number>*" --list "fix/<number>*"
If a branch exists and a merged PR was found in step 2 (meaning the code is safely on main):
Question: "Branch '<branch_name>' was merged via PR. Delete the local branch?"
Header: "Branch"
Options:
- Yes, delete it (description: "git branch -d <branch_name>")
- Keep it (description: "Leave the branch for now")
If "Yes":
git branch -d <branch_name>claude/ repo branch if it exists:
cd claude && git checkout main && git branch -d <branch_name> 2>/dev/null; cd ..
If no merged PR was found (user chose "Skip PR" in step 2), do not offer to delete — the branch may contain the only copy of the work.
Completing #<number>: <title>
Issue closed
Status: In Progress -> Done
Design doc: claude/design/<Name>.md
-> Kept (or archived)
Overview docs reviewed: (list or "skipped")
ADR created: claude/adr/0XX-decision.md (or "none")
Branch cleaned up: feature/<number>-name (or "kept")
Work complete!
For reference:
f75ad84647fc9ee498236657PVTSSF_lADOEcGj5M4Bb-8PzhWrH1APVT_kwDOEcGj5M4Bb-8P