dev
E2E development: investigate → dig → decompose → implement → test → review → PR
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
E2E development: investigate → dig → decompose → implement → test → review → PR
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Process issues sequentially: /dev per issue in isolated sub-agent → CI wait → merge → next
Break a task into ordered subtasks with dependencies
Investigate codebase for an issue in a forked context (context isolation)
Clarify ambiguities in plans with structured questions and auto-decide rules
Audit codebase for tech debt, code quality, and architecture issues — then create GitHub Issues
Create a pull request for the current branch using the project's PR template
| name | dev |
| description | E2E development: investigate → dig → decompose → implement → test → review → PR |
| argument-hint | [issue number or ID, e.g. #42 or PGR-1234] |
| user-invocable | true |
| disable-model-invocation | true |
| allowed-tools | ["Bash(git checkout:*)","Bash(git add:*)","Bash(git commit:*)","Bash(git push:*)","Bash(git diff:*)","Bash(git log:*)","Bash(git status)","Bash(git branch:*)","Bash(gh pr create:*)","Bash(gh issue view:*)","Glob","Grep","Read","Edit","Write","Agent","Skill","TaskCreate","TaskUpdate","TaskList","TaskGet","ToolSearch","AskUserQuestion","mcp__codex__codex"] |
Resolve Issue $ARGUMENTS from investigation to PR creation.
Target: $ARGUMENTS
Use TaskCreate to create a task for each phase. This provides progress visibility and persistence across /compact.
Use TaskUpdate to mark each task in_progress when starting and completed when done.
Phase 1: Issue Understanding
↓
Phase 2: Investigation (← /dev-investigate, context: fork)
↓
Phase 2.5: Technical Design (← Codex, optional)
↓
Phase 3: Ambiguity Resolution (/dig)
↓
Phase 4: Task Decomposition (/decompose)
↓
── AskUserQuestion: confirm approach + task list ──
↓
Phase 5: Branch & Implement
↓
Phase 6: Quality Gate (build + test + lint from CLAUDE.md)
↓
Phase 7: Review (/review)
↓
── AskUserQuestion: commit + PR confirmation ──
↓
Phase 8: Commit & PR Creation
Mark task 1 in_progress.
Detect the issue source from "$ARGUMENTS":
GitHub Issue (starts with # or is a number):
gh issue view <number> --json number,title,body,labels,assignees,commentsLinear Issue (matches XXX-1234 pattern):
ToolSearch with +linear to load the Linear MCPmcp__linear__get_issue with the issue IDFigma links in the issue description (figma.com/design/...):
ToolSearch with +figma-remote to load Figma MCPBranch naming (from labels or issue type):
fix/{issue-ref}-{kebab-case-short-desc}feat/{issue-ref}-{kebab-case-short-desc}Read CLAUDE.md for project architecture and conventions.
If the issue involves library/framework updates, version bumps, or API deprecations:
migration, upgrade, dependency, or breaking-changeandroid CLI is available: run android docs search "{migration topic}" to get latest official migration guidanceMark task 1 completed.
Mark task 2 in_progress.
Invoke the /dev-investigate skill to run investigation in a forked context. This keeps large Read results isolated from this context.
Skill("dev-investigate", args: "{issue title}. {issue description}. Keywords: {keywords}. Affected areas: {areas from labels/description}")
After the skill completes, read the investigation report:
Read("investigation-report.md")
After reading the report:
If anything is ambiguous, use AskUserQuestion. Never assume.
Mark task 2 completed.
Mark task 3 in_progress.
Use Codex to generate a technical design before diving into ambiguity resolution and decomposition.
ToolSearch("select:mcp__codex__codex")
If Codex is available:
mcp__codex__codex(
prompt: "Given this investigation report and issue, produce a technical design:
## Issue
{issue title and description}
## Investigation Findings
{summary from investigation-report.md}
## Affected Files
{affected files table from report}
## Design Request
1. Propose the implementation approach (architecture, data flow changes)
2. Identify interface changes and new abstractions needed
3. List edge cases and error handling strategy
4. Flag risks and trade-offs
Output a concise technical design document."
)
Save the design output for use in Phase 3 (/dig) and Phase 4 (/decompose).
If ToolSearch fails to find Codex or the call errors:
Mark task 3 completed.
Mark task 4 in_progress.
Use the /dig skill with investigation results (and Codex design if available) to resolve decision points.
Mark task 4 completed.
Mark task 5 in_progress.
Use the /decompose skill to break the work into ordered subtasks.
Mark task 5 completed.
Present to the user:
Ask the user to confirm before implementation.
Mark task 6 in_progress.
git checkout -b {branch-name}
TDD mode (when issue has tdd label, or test changes are the primary goal):
LOOP for each subtask:
1. TaskUpdate → in_progress
2. Read target code
3. Write/update tests FIRST (use test-writer agent if needed)
4. Run tests — confirm they FAIL (red)
5. Implement the minimal code to pass
6. Run tests — confirm they PASS (green)
7. Refactor if needed (keep tests passing)
8. TaskUpdate → completed
Standard mode (default):
LOOP for each subtask (in dependency order):
1. TaskUpdate → in_progress
2. Read target code (MUST read before editing)
3. Implement changes (Edit/Write)
4. Self-verify (run Verify step from task description)
5. TaskUpdate → completed
INTERRUPT conditions:
- Unexpected problem → AskUserQuestion
- 3 consecutive failures → STOP and report
Guidelines:
Mark task 6 completed.
Mark task 7 in_progress.
Run the project's build, test, and lint commands as defined in CLAUDE.md's Commands section.
If CLAUDE.md doesn't specify commands, detect from project files:
build.gradle.kts / gradlew → ./gradlew build, ./gradlew test, ./gradlew detektpackage.json → npm test, npm run lintCargo.toml → cargo build, cargo test, cargo clippypyproject.toml / setup.py → pytest, ruff checkpubspec.yaml → flutter test (or dart test), dart analyzeMark task 7 completed.
Mark task 8 in_progress.
Use the /review skill to run multi-agent parallel review.
After the review completes, write workspace/{issue}/review.json:
{
"issue": "{issue reference}",
"branch": "{branch name}",
"timestamp": "{ISO 8601}",
"status": "clean | warnings | critical",
"counts": {
"critical": 0,
"warning": 0,
"suggestion": 0,
"nit": 0
},
"findings": [
{
"severity": "critical | warning | suggestion | nit",
"file": "path/to/file",
"line": 42,
"description": "description of finding",
"resolved": false
}
]
}
review.json findings as "resolved": true.Mark task 8 completed.
Show the user:
Mark task 9 in_progress.
git add {specific files}
git commit -m "{concise message}"
git add .)git push -u origin {branch-name}
Use the project's pull_request_template.md if available. Only fill in Description and Related Issues.
gh pr create --title "#{issue} {description}" --body "$(cat <<'EOF'
## Description
- {bullet point summary}
## Related Issues
Closes #{issue}
EOF
)"
Report PR URL to the user.
Mark task 9 completed.
When the user invokes /dev under a /goal, the workflow runs autonomously. Do not wrap the raw request in /goal — build the condition from the repo per rules/ai-ops.md → /goal for Autonomous Execution. The /goal evaluator cannot run tools; it only reads what is printed in the transcript, so the condition must name real commands and their exact success output.
Condition template (resolve {test command} and {success signal} from CLAUDE.md's Commands section — never guess):
/goal Issue $ARGUMENTS is resolved: in the most recent turn, {test command} was run
and its output shows {success signal, e.g. "0 failed" / "BUILD SUCCESSFUL"}, the
review step printed review.json counts showing "critical": 0, and the PR URL was
printed — or stop after 25 turns or if the same failure recurs 3 times, then
summarize the blocker. Constraints: do not modify or delete test files except those
the issue explicitly requires — show `git diff --stat` each turn.
In autonomous mode:
AskUserQuestion confirmations — proceed with best judgmentreview.json counts as text after Phase 7 — the evaluator cannot read filesOn completion, output a structured result for callers (e.g., /dev-all):
{
"issue": "{issue reference}",
"status": "success | failed | blocked",
"pr_url": "https://github.com/owner/repo/pull/N",
"review": {
"status": "clean | warnings | critical",
"critical_count": 0,
"warning_count": 0
},
"failure_reason": null
}
In autonomous mode, AskUserQuestion is skipped when:
clean or warnings (no unresolved criticals)AskUserQuestion is NOT skipped when:
| Situation | Action |
|---|---|
| Issue not found | Report error, stop |
| Figma fetch fails | Warn, continue without design |
| Investigation unclear | AskUserQuestion before proceeding |
| Tests fail (≤3 attempts) | Fix and retry |
| Tests fail (>3 attempts) | Report to user, stop |
| Critical review finding | Report to user, stop |
| Warning review finding | Fix, re-run quality gate |
| Git/PR creation fails | Report error, stop |