-
Notifications
You must be signed in to change notification settings - Fork 1
Add adaptive review workflow and XML naming standards #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
965ec7d
📚 Expand documentation with autonomous workflows and agent system
18c4a0b
📚 Expand documentation with autonomous workflows and agent system
e2b68e2
📚 Add adaptive review workflow and XML naming standards
10e09be
🔧 Fix critical issues from bot review
9fe4d63
🔧 Address additional bot feedback issues
1e052e0
Remove workflow stats from completion message
4b168e5
🔒 Fix critical shell injection vulnerability
7eb8727
♻️ Refactor autotask to be goal-focused, not prescriptive
60cf9a0
Remove rigid bot feedback categories, trust LLM judgment
7054637
♻️ Refactor autotask to goal-focused, tool-agnostic instructions
cb4df3f
♻️ Simplify autotask to pure goal-focused instructions
9b2ebc0
✨ Improve autotask prompt clarity and agent references
9caf2a5
📚 Add comprehensive context-handling guidance
6f94c70
🔧 Restore critical references and refine requirements
a0d4733
🐛 Fix Petra agent path and description
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,172 @@ | ||
| --- | ||
| description: Execute complete development task autonomously from description to PR-ready state | ||
| --- | ||
|
|
||
| # /autotask - Autonomous Task Execution | ||
|
|
||
| Execute a complete development task autonomously from description to PR-ready state. | ||
|
|
||
| ## Usage | ||
|
|
||
| ``` | ||
| /autotask "task description" | ||
| ``` | ||
|
|
||
| ## What This Command Does | ||
|
|
||
| Takes your task description and autonomously: | ||
|
|
||
| 1. Analyzes complexity and creates structured prompt if needed | ||
| 2. Sets up isolated git worktree environment | ||
| 3. Implements the solution using intelligent agent orchestration | ||
| 4. Adaptive validation & review based on complexity | ||
| 5. Creates PR with proper commit messages | ||
| 6. Handles bot feedback autonomously | ||
| 7. Delivers PR ready for your review | ||
|
|
||
| You only need to provide the task description and review the final PR. | ||
|
|
||
| ## Execution Flow | ||
|
|
||
| <task-preparation> | ||
| Analyze the task complexity. If the requirements are unclear or the task is complex with multiple interpretations, use the create-prompt agent to ask clarifying questions and create a structured prompt. Save to .created-prompts/ and get user confirmation before proceeding. | ||
|
|
||
| For straightforward tasks with clear requirements, proceed directly to worktree setup. | ||
| </task-preparation> | ||
|
|
||
| <worktree-setup> | ||
| **Goal**: Create an isolated development environment in `.gitworktrees/` with a sanitized branch name derived from the task description. | ||
|
|
||
| **Requirements**: | ||
| - Sanitize task description to prevent shell injection | ||
| - Generate feature branch name (lowercase, alphanumeric, max 60 chars) | ||
| - Handle existing worktree conflicts | ||
| - Run /setup-environment to install dependencies, copy configs, and set up git hooks | ||
|
|
||
| **Success criteria**: Clean worktree ready for development work. | ||
| </worktree-setup> | ||
|
|
||
| <autonomous-execution> | ||
| **Goal**: Implement the solution following project patterns and standards. | ||
|
|
||
| Build a plan for which agents or approaches to use based on the task type. Available specialized agents: | ||
|
|
||
| - **Dixon** (dev-agents:debugger): Root cause analysis, reproduces issues, identifies underlying problems | ||
| - **Ada** (dev-agents:autonomous-developer): Implementation work, reads all .cursor/rules/*.mdc, writes tests | ||
| - **Phil** (dev-agents:ux-designer): Reviews user-facing text, validates accessibility, ensures UX consistency | ||
| - **Rivera** (code-review:code-reviewer): Architecture review, validates design patterns, checks security | ||
| - **Petra** (code-review:architecture-auditor): System-level architecture analysis | ||
| - **Explore** (general-purpose): Investigation, research, evaluates trade-offs | ||
|
|
||
| Create your execution plan, then implement the solution. Read all .cursor/rules/*.mdc files to understand project conventions. Run agents in parallel when possible, sequentially when they depend on each other. | ||
| </autonomous-execution> | ||
|
|
||
| <validation-and-review> | ||
| **Goal**: Ensure code quality through adaptive validation that scales with complexity. | ||
|
|
||
| **Review intensity scales with risk**: | ||
| - Simple changes: Git hooks only | ||
| - Medium complexity: Hooks + one relevant agent (Phil for UI, Dixon for bugs, Rivera for architecture) | ||
| - High risk/security: Hooks + multiple agents | ||
|
|
||
| Run git hooks (husky/pre-commit) and auto-fix failures if possible. Analyze what changed to determine review needs. Launch appropriate review agents and address their feedback. | ||
|
|
||
| Decide what's needed based on actual changes - trust your judgment. | ||
| </validation-and-review> | ||
|
|
||
| <create-pr> | ||
| **Goal**: Create a well-documented pull request ready for review. | ||
|
|
||
| **Requirements**: | ||
| - Commit with proper format (emoji, imperative verb, concise description) | ||
| - Include "🤖 Generated with Claude Code" and co-author line | ||
| - Push to feature branch | ||
| - Create PR with summary, changes, testing approach, and checklist | ||
| - Follow project's commit message conventions (read git-commit-message.mdc if it exists) | ||
|
|
||
| **Success criteria**: PR created, all information clear, ready for bot/human review. | ||
| </create-pr> | ||
|
|
||
| <bot-feedback-loop> | ||
| **Goal**: Autonomously address bot feedback without user intervention. | ||
|
|
||
| **Process**: | ||
| 1. Wait 3 minutes for bots to complete initial analysis | ||
| 2. Check for bot comments using GitHub API | ||
| 3. Review each piece of feedback and decide: | ||
| - Fix what's valuable (security issues, real bugs, good suggestions) | ||
| - Reject what's not (use WONTFIX with brief explanation for context-missing or incorrect feedback) | ||
| - **You are the ultimate decider** - trust your judgment on what matters | ||
| 4. Make fixes, commit, push | ||
| 5. Wait for bots to re-review (90s) | ||
| 6. Repeat up to 5 times if needed | ||
|
|
||
| **Success criteria**: All critical issues addressed, PR ready for human review. | ||
| </bot-feedback-loop> | ||
|
|
||
| <completion> | ||
| Task execution complete! Here's your summary: | ||
|
|
||
| ``` | ||
| ✅ Development complete | ||
| ✅ All validations passed | ||
| ✅ PR created and bot feedback addressed | ||
| ✅ Ready for your review | ||
|
|
||
| 📍 PR: {{PR_URL}} | ||
| 🌳 Worktree: .gitworktrees/{{BRANCH_NAME}} | ||
|
|
||
| When you're ready: | ||
| 1. Review the PR at {{PR_URL}} | ||
| 2. Merge when satisfied | ||
| 3. Run: git worktree remove .gitworktrees/{{BRANCH_NAME}} | ||
|
|
||
| The PR is fully ready - all checks passing, bot feedback addressed. | ||
| You have full control over the merge decision. | ||
| ``` | ||
|
|
||
| </completion> | ||
|
|
||
| <error-handling> | ||
| When a phase fails critically, capture the error context and assess recovery options: | ||
|
|
||
| - For validation failures: Attempt automatic fix using appropriate agent | ||
| - For bot feedback that can't be addressed: Continue with PR, note remaining items for user | ||
| - For other failures: Present options to fix and retry, skip if safe, abort and clean up, or switch to manual mode | ||
|
|
||
| Attempt automatic recovery when possible, otherwise inform the user and provide clear options. | ||
| </error-handling> | ||
|
|
||
| ## Key Principles | ||
|
|
||
| - **Single worktree per task**: Clean isolation for parallel development | ||
| - **Adaptive review**: Review intensity matches task complexity and risk | ||
| - **Intelligent agent use**: Right tool for the job, no forced patterns | ||
| - **Git hooks do validation**: Leverage your existing infrastructure | ||
| - **Autonomous bot handling**: Don't wait for human intervention | ||
| - **PR-centric workflow**: Everything leads to a mergeable pull request | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Git worktrees support | ||
| - GitHub CLI (`gh`) installed and authenticated | ||
| - Node.js/npm or yarn | ||
| - Project must have main/master branch | ||
| - `.cursor/rules/*.mdc` standards in place | ||
|
|
||
| ## Configuration | ||
|
|
||
| The command adapts to your project structure: | ||
|
|
||
| - Detects test runners (jest, mocha, vitest, etc.) | ||
| - Finds linting configs (eslint, prettier, etc.) | ||
| - Uses available build scripts | ||
| - Respects project-specific conventions | ||
|
|
||
| ## Notes | ||
|
|
||
| - This command creates real commits and PRs | ||
| - All work happens in isolated worktrees | ||
| - Bot feedback handling is autonomous but intelligent | ||
| - You always have the final say on merging | ||
| - Worktrees are preserved until you explicitly remove them | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.