mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
- Created execution agent prompt for issue execution with detailed deliverables and validation criteria. - Developed planning agent prompt to analyze issues and generate structured solution plans. - Introduced issue handling specifications outlining the workflow and issue structure. - Established quality standards for evaluating completeness, consistency, correctness, and clarity of solutions. - Defined solution schema specification detailing the required structure and validation rules for solutions. - Documented subagent roles and responsibilities, emphasizing the dual-agent strategy for improved workflow efficiency.
136 lines
3.1 KiB
Markdown
136 lines
3.1 KiB
Markdown
# Execution Agent Prompt
|
|
|
|
执行 agent 的提示词模板。
|
|
|
|
## MANDATORY FIRST STEPS (Agent Execute)
|
|
|
|
1. **Read role definition**: ~/.codex/agents/issue-execute-agent.md (MUST read first)
|
|
2. Read: .workflow/project-tech.json
|
|
3. Read: .workflow/project-guidelines.json
|
|
4. Read schema: ~/.claude/workflows/cli-templates/schemas/execution-result-schema.json
|
|
|
|
---
|
|
|
|
## Goal
|
|
|
|
Execute solution for issue "{ISSUE_ID}: {ISSUE_TITLE}"
|
|
|
|
## Scope
|
|
|
|
- **CAN DO**:
|
|
- Read and understand planned solution
|
|
- Implement code changes
|
|
- Execute tests and validation
|
|
- Create commits
|
|
- Handle errors and rollback
|
|
|
|
- **CANNOT DO**:
|
|
- Modify solution design
|
|
- Skip acceptance criteria
|
|
- Bypass test requirements
|
|
- Deploy to production
|
|
|
|
- **Directory**: {PROJECT_ROOT}
|
|
|
|
## Task Description
|
|
|
|
Planned Solution: {SOLUTION_JSON}
|
|
|
|
## Deliverables
|
|
|
|
### Primary Output: Execution Result JSON
|
|
|
|
```json
|
|
{
|
|
"id": "EXR-{ISSUE_ID}-1",
|
|
"issue_id": "{ISSUE_ID}",
|
|
"solution_id": "SOL-{ISSUE_ID}-1",
|
|
"status": "completed|failed",
|
|
"executed_tasks": [
|
|
{
|
|
"task_id": "T1",
|
|
"title": "Task title",
|
|
"status": "completed|failed",
|
|
"files_modified": ["src/auth.ts", "src/auth.test.ts"],
|
|
"commits": [
|
|
{
|
|
"hash": "abc123def",
|
|
"message": "Implement authentication"
|
|
}
|
|
],
|
|
"test_results": {
|
|
"passed": 15,
|
|
"failed": 0,
|
|
"command": "npm test -- auth.test.ts"
|
|
},
|
|
"acceptance_met": true,
|
|
"execution_time_minutes": 25,
|
|
"errors": []
|
|
}
|
|
],
|
|
"overall_stats": {
|
|
"total_tasks": 3,
|
|
"completed": 3,
|
|
"failed": 0,
|
|
"total_files_modified": 5,
|
|
"total_commits": 3,
|
|
"total_time_minutes": 75
|
|
},
|
|
"final_commit": {
|
|
"hash": "xyz789abc",
|
|
"message": "Resolve issue ISS-001: Feature implementation"
|
|
},
|
|
"verification": {
|
|
"all_tests_passed": true,
|
|
"all_acceptance_met": true,
|
|
"no_regressions": true
|
|
}
|
|
}
|
|
```
|
|
|
|
### Validation
|
|
|
|
Ensure:
|
|
- [ ] All planned tasks executed
|
|
- [ ] All acceptance criteria verified
|
|
- [ ] Tests pass without failures
|
|
- [ ] All commits created with descriptive messages
|
|
- [ ] Execution result follows schema exactly
|
|
- [ ] No breaking changes introduced
|
|
|
|
### Return JSON
|
|
|
|
```json
|
|
{
|
|
"status": "completed|failed",
|
|
"execution_result_id": "EXR-{ISSUE_ID}-1",
|
|
"issue_id": "{ISSUE_ID}",
|
|
"tasks_completed": 3,
|
|
"files_modified": 5,
|
|
"commits": 3,
|
|
"verification": {
|
|
"all_tests_passed": true,
|
|
"all_acceptance_met": true,
|
|
"no_regressions": true
|
|
},
|
|
"final_commit_hash": "xyz789abc",
|
|
"errors": []
|
|
}
|
|
```
|
|
|
|
## Quality Standards
|
|
|
|
- **Completeness**: All tasks executed, all acceptance criteria met
|
|
- **Correctness**: Tests pass, no regressions, code quality maintained
|
|
- **Traceability**: Each change tracked with commits and test results
|
|
- **Safety**: Changes verified before final commit
|
|
|
|
## Success Criteria
|
|
|
|
✓ All planned tasks completed
|
|
✓ All acceptance criteria verified and met
|
|
✓ Unit tests pass with 100% success rate
|
|
✓ No regressions in existing functionality
|
|
✓ Final commit created with descriptive message
|
|
✓ Execution result JSON is valid and complete
|