ワンクリックで
autodev
Pick an issue from the backlog, implement it in a fresh worktree, and open a PR
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Pick an issue from the backlog, implement it in a fresh worktree, and open a PR
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit codebase for architectural drift, pattern violations, complexity creep, dead code, and test gaps from continuous autonomous development
Audit documentation for accuracy and completeness — checks command refs, landing page, feature pages, and developer docs against the actual codebase
Audit CLI output, docs, and site content for personality and tone consistency
Strategic product ownership — roadmap health checks, spec authoring, and vision-coherence enforcement for mine
Cut a release: analyze unreleased work, propose semver bump, draft CHANGELOG, tag, and push
Audit the autodev pipeline health, recent PR quality, and identify improvement opportunities
| name | autodev |
| description | Pick an issue from the backlog, implement it in a fresh worktree, and open a PR |
| disable-model-invocation | true |
You are autonomously implementing a GitHub issue for the mine CLI tool, end-to-end:
pick an issue, create a fresh worktree, implement it, verify it, and open a PR.
The user may provide an issue number as an argument: $ARGUMENTS
/autodev — auto-pick the highest-value backlog/ready issue/autodev 42 — implement a specific issue number/autodev 42 "custom branch suffix" — optional branch name overrideBefore touching any issues, read CLAUDE.md for architecture patterns, design principles,
key files, and the GitHub Issue Workflow section. This is your operating manual.
gh issue view $ISSUE_NUMBER --repo rnwolfe/mine --json number,title,body,labels,state
Validate:
backlog/ready label (warn but proceed if missing — the user is overriding)agent/implementing (abort if it is and tell the user why)Check concurrency guard first:
gh pr list --repo rnwolfe/mine --label "via/autodev" --state open --json number,title
If there's already 1 or more open via/autodev PRs, stop and report what's in flight. Do
not start new work when there are open autodev PRs. Ask the user if they want to override.
Fetch candidates:
gh issue list --repo rnwolfe/mine \
--label "backlog/ready" \
--state open \
--json number,title,body,labels \
--limit 30
Filter out any issues that already have the agent/implementing label.
If no backlog/ready issues exist, broaden the search:
gh issue list --repo rnwolfe/mine \
--state open \
--label "feature" \
--json number,title,body,labels \
--limit 20
Evaluate and pick the highest-value issue. Consider:
human/blocked, blocked, or wip labelsPresent your selection with a brief rationale (1-2 sentences) before proceeding. Give the user a moment to redirect if they disagree — but do not wait for approval unless this is an interactive session. If non-interactive, proceed.
ISSUE_NUMBER=<picked number>
ISSUE_TITLE=$(gh issue view $ISSUE_NUMBER --repo rnwolfe/mine --json title --jq .title)
# Slugify the title (lowercase, hyphens, max 50 chars)
SLUG=$(echo "$ISSUE_TITLE" \
| tr '[:upper:]' '[:lower:]' \
| sed -E 's/[^a-z0-9]+/-/g' \
| sed -E 's/^-+|-+$//g' \
| cut -c1-50)
BRANCH="autodev/issue-${ISSUE_NUMBER}-${SLUG}"
Mark the issue in-progress:
gh issue edit $ISSUE_NUMBER --repo rnwolfe/mine --add-label "agent/implementing"
Ensure main is up to date:
git fetch origin main
Create a worktree branching from origin/main (not local main, which may be stale):
WORKTREE_PATH=".worktrees/${BRANCH##autodev/}"
git worktree add -b "$BRANCH" "$WORKTREE_PATH" origin/main
All implementation work happens in $WORKTREE_PATH. Use absolute paths when reading
and writing files. Use cd <worktree> prefix for make commands.
Read the full issue body:
gh issue view $ISSUE_NUMBER --repo rnwolfe/mine --json body --jq .body
Then implement. Follow all conventions from CLAUDE.md:
cmd/ files are thin orchestration — domain logic lives in internal/_test.go next to each changed file)internal/ui helpers for all output — never raw fmt.PrintlnCLAUDE.md, .github/workflows/, scripts/autodev/Read before writing. Before creating or editing any file, read the existing file first to understand the current state. Explore related files to match patterns.
For example, before implementing a new mine tmux subcommand, read:
cmd/tmux.go — existing command structureinternal/tmux/tmux.go — domain logic patternsBefore running make test, review your implementation against these checks:
Reference implementation: If the issue cites a reference file (e.g. "follow the
pattern in cmd/config.go:174"), verify you read it and matched its patterns. Check:
editor invocation, error message style, stdin/stdout/stderr wiring, temp file cleanup.
Testing quality:
runXxx handler, not just internal helperst.TempDir()Error messages:
ui.Accent.Render() (see cmd/config.go:180)"saving profile: %w")Documentation completeness:
site/src/content/docs/features/<feature>.md (when capabilities change)site/src/content/docs/commands/<command>.md (when flags/subcommands change)site/src/components/FeatureTabs.tsx (feature descriptions and examples)site/src/components/TerminalDemo.tsx (animated demo scripts)site/src/content/docs/index.mdx (docs landing page with hardcoded feature claims)site/src/content/docs/getting-started/quick-start.md (onboarding examples)From the worktree directory, run:
cd $WORKTREE_PATH && make test
cd $WORKTREE_PATH && make build
If tests fail: fix them. Do not open a PR with failing tests. If build fails: fix it. Do not open a PR that doesn't compile.
If you cannot make tests pass after a reasonable attempt (2-3 iterations), add the
human/blocked label and stop:
gh issue edit $ISSUE_NUMBER --repo rnwolfe/mine \
--add-label "human/blocked" \
--remove-label "agent/implementing"
Stage and commit all changes. git add -A is safe here because the worktree
is an isolated copy containing only intentional changes — no risk of staging
sensitive files or unrelated work.
cd $WORKTREE_PATH
git add -A
git commit -m "$(cat <<EOF
feat: implement #${ISSUE_NUMBER} — ${ISSUE_TITLE}
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Use conventional commit types: feat, fix, refactor, test, docs.
For bugs, use fix:. For new features, use feat:. Keep the first line under 72 chars.
Write a detailed PR description to /tmp/pr-description-${ISSUE_NUMBER}.md:
## Summary
<2-4 sentences: what was implemented and why>
Closes #$ISSUE_NUMBER
## Changes
- **New files**: list each new file and its purpose
- **Modified files**: list each modified file and what changed
- **Architecture**: any design decisions or patterns used
## CLI Surface
<If new commands/flags were added:>
- `mine <command>` — description
- Flags: `--flag` — description
## Test Coverage
- Unit tests for ...
- Edge cases covered: ...
## Acceptance Criteria
<Verify each criterion from the issue:>
- [x] Criterion — how it was met
- [ ] Criterion — why it was not met (note as follow-up issue if significant)
Push the branch:
cd $WORKTREE_PATH
git push -u origin "$BRANCH"
Create the PR:
gh pr create \
--repo rnwolfe/mine \
--head "$BRANCH" \
--base main \
--title "$ISSUE_TITLE" \
--body "$(cat /tmp/pr-description-${ISSUE_NUMBER}.md)
<!-- autodev-state: {\"phase\": \"copilot\", \"copilot_iterations\": 0} -->" \
--label "via/autodev"
Print a clean summary:
✓ Implemented #$ISSUE_NUMBER: $ISSUE_TITLE
Branch: $BRANCH
Worktree: $WORKTREE_PATH
PR: <PR URL>
The worktree is at .worktrees/<name>. Run `git worktree list` to see it.
To clean up after merge: git worktree remove .worktrees/<name>
via/autodev PR is already open, report it and stop..github/workflows/, scripts/autodev/make test or broken make build..worktrees/. Never create
worktrees at the repo root or outside the project directory.git ls-remote --exit-code origin "refs/heads/$BRANCH" 2>/dev/null && \
git push origin --delete "$BRANCH" || true
| Situation | Action |
|---|---|
| Tests fail after 3 attempts | Add human/blocked label, clean up worktree, report to user |
| Issue has no acceptance criteria | Note it in PR, implement based on title/description |
No backlog/ready issues exist | Broaden to open feature/enhancement issues, pick highest value |
| Worktree already exists | Remove it first: git worktree remove --force <path>, then recreate |
| Push fails (auth) | Report the error — never force-push or bypass auth |