一键导入
autodev-pipeline
Build or use the proactive auto-development pipeline (issue detection → spec → plan → implement → PR). Covers the autodev Django app architecture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build or use the proactive auto-development pipeline (issue detection → spec → plan → implement → PR). Covers the autodev Django app architecture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Check for drift between spec.md, plan.md, tasks.md, and the actual code. Reports the gaps; does not fix them.
Run a category-specific quality pass (security / performance / accessibility / i18n / privacy / observability) against the current plan and code.
Surface [NEEDS CLARIFICATION] markers in spec.md (or plan.md) to the user, one at a time, and edit the file with the answers.
Bootstrap or amend constitution.md (framework, preset, or project). Inspects existing project context first; enforces the amendment process: issue first, one article per PR, reviewer non-author.
Print the pipeline quick-reference — a one-screen summary of every /aia:* command and its hand-offs, prefixed by a state-aware "Próximo passo" line.
Execute an approved plan + tasks list by dispatching one fresh subagent per task and applying two-stage review (spec compliance, then code quality) before moving on.
| name | autodev-pipeline |
| description | Build or use the proactive auto-development pipeline (issue detection → spec → plan → implement → PR). Covers the autodev Django app architecture. |
The proactive auto-development system: automatically detects issues from connected trackers, generates specs via AI, executes the SpecKit flow, and creates a PR linked to the original issue.
Issue Tracker (GitHub/GitLab/Jira/Linear)
↓ [polling or webhook, every 5 min]
IssueTrackerSyncEngine
↓
AutoDevDemand (detected, eligible?)
↓ [Celery: process_demand task]
DemandAnalyzer (LiteLLM → spec.md)
↓ [human approval gate if configured]
PipelineOrchestrator (specify → plan → tasks)
↓ [Claude Agent SDK in Docker sandbox]
CodeExecutor (implement, commit, push)
↓
PRCreator (GitHub/GitLab API → PR linked to issue)
↓
AutoDevPipeline (status: pr_created)
backend/autodev/)autodev/
├── models.py # IssueTrackerConfig, AutoDevDemand, AutoDevPipeline, AutoDevConfig
├── serializers.py # DRF serializers
├── views.py # ViewSets: config, demands, pipeline
├── urls.py # /api/v1/autodev/*
├── tasks.py # Celery: poll_issue_trackers, process_demand, execute_pipeline_step
├── signals.py # Pipeline status change handlers
└── services/
├── issue_tracker.py # IssueTrackerSyncEngine
├── demand_analyzer.py # AI spec generation
├── pipeline_orchestrator.py # specify → plan → tasks flow
├── code_executor.py # Claude Agent SDK + Docker sandbox
└── pr_creator.py # GitHub/GitLab PR creation
# Connects a user's issue tracker to their repos
tracker_type: 'github_issues' | 'gitlab_issues' | 'jira' | 'linear'
filter_labels: list # Labels that trigger autodev (e.g., ["autodev", "ai-implement"])
filter_assignee: bool # Only process issues assigned to the user
credentials: EncryptedTextField # Encrypted at rest
status: 'detected' | 'analyzing' | 'awaiting_approval' | 'implementing' | 'pr_created' | 'failed' | 'skipped'
issue_url: str
issue_title: str
spec_content: str # Generated spec.md content
plan_content: str # Generated plan.md content
eligibility_score: float # 0-1, determines if suitable for automation
# Tracks each step of the pipeline
demand: FK(AutoDevDemand)
step: 'specify' | 'plan' | 'implement' | 'review' | 'pr_create'
status: 'pending' | 'running' | 'completed' | 'failed'
input_tokens: int
output_tokens: int
duration_seconds: float
error_message: str # If failed
@app.task
def poll_issue_trackers():
"""Poll all active issue tracker configs for new issues."""
configs = IssueTrackerConfig.objects.filter(is_active=True)
for config in configs:
engine = IssueTrackerSyncEngine(config)
new_issues = engine.fetch_new_issues()
for issue in new_issues:
create_demand_and_analyze.delay(str(config.id), issue.to_dict())
@app.task(bind=True, max_retries=3)
def process_demand(self, demand_id: str):
"""Analyze demand and generate spec via AI."""
demand = AutoDevDemand.objects.get(id=demand_id)
analyzer = DemandAnalyzer(demand)
spec = analyzer.generate_spec() # LiteLLM call
demand.spec_content = spec
demand.status = 'awaiting_approval' if config.approval_mode == 'manual' else 'implementing'
demand.save()
if demand.status == 'implementing':
execute_pipeline.delay(demand_id)
@app.task(bind=True, max_retries=1, time_limit=3600) # 1 hour max
def execute_pipeline(self, demand_id: str):
"""Execute full SpecKit flow: plan → implement → PR."""
demand = AutoDevDemand.objects.get(id=demand_id)
orchestrator = PipelineOrchestrator(demand)
# Step 1: Generate plan
plan = orchestrator.generate_plan()
# Step 2: Execute in sandbox
executor = CodeExecutor(demand, plan)
result = executor.run() # Claude Agent SDK
# Step 3: Create PR
if result.success:
pr = PRCreator(demand, result).create_pr()
demand.pr_url = pr.url
demand.status = 'pr_created'
demand.save()
New trackers must implement IssueTrackerProvider:
# backend/autodev/services/issue_tracker.py
class IssueTrackerProvider(Protocol):
def fetch_new_issues(self, since_cursor: str) -> list[Issue]: ...
def get_issue(self, issue_id: str) -> Issue: ...
def post_comment(self, issue_id: str, comment: str) -> None: ...
class GitHubIssuesProvider:
"""Implements IssueTrackerProvider for GitHub Issues."""
def fetch_new_issues(self, since_cursor: str) -> list[Issue]:
# Use PyGithub or direct REST API
...
// src/pages/admin/AutoDevPage.tsx
// Shows pipeline status for all demands
// src/components/admin/AutoDevDashboard.tsx
// Real-time updates via polling (useQuery with refetchInterval)
const { data: demands } = useQuery({
queryKey: ['autodev', 'demands'],
queryFn: () => api.get<AutoDevDemand[]>('/api/v1/autodev/demands/'),
refetchInterval: 10_000, // Poll every 10 seconds
});
// src/components/admin/AutoDevDemandDetail.tsx
// Shows: issue → spec → plan → tasks → PR with full traceability
Before processing a demand, score it 0-1 for automation suitability:
# demand_analyzer.py
def score_eligibility(self, issue: Issue) -> float:
score = 0.0
# Positive signals
if len(issue.description) > 100: score += 0.2 # Well-described
if issue.has_label('bug'): score += 0.2 # Clear type
if issue.has_label('good-first-issue'): score += 0.1
if self._estimated_complexity(issue) == 'small': score += 0.3
# Negative signals
if 'design' in issue.title.lower(): score -= 0.3 # Design decisions need humans
if issue.has_label('needs-discussion'): score -= 0.4
return max(0.0, min(1.0, score))
# Only proceed if score >= 0.6
AutoDevConfig.approval_mode = 'manual' stops before implementing