automatasaurus 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/package.json +1 -1
- package/src/commands/init.js +1 -1
- package/src/commands/status.js +2 -2
- package/src/commands/update.js +1 -1
- package/template/CLAUDE.block.md +39 -0
- package/template/README.md +1 -1
- package/template/agents/developer/AGENT.md +44 -2
- package/template/commands/work-milestone.md +327 -0
- package/template/settings.json +69 -7
- package/template/skills/work-issue/SKILL.md +34 -2
package/README.md
CHANGED
|
@@ -246,6 +246,7 @@ your-project/
|
|
|
246
246
|
│ ├── discovery.md
|
|
247
247
|
│ ├── work.md
|
|
248
248
|
│ ├── work-all.md
|
|
249
|
+
│ ├── work-milestone.md
|
|
249
250
|
│ └── work-plan.md
|
|
250
251
|
└── .claude/
|
|
251
252
|
├── settings.json # Claude Code settings (automatasaurus hooks merged in)
|
|
@@ -345,6 +346,7 @@ The primary way to invoke workflows:
|
|
|
345
346
|
| `/work-plan` | Analyze open issues, create sequenced implementation plan |
|
|
346
347
|
| `/contextualize` | Generate agent-specific PROJECT.md context files |
|
|
347
348
|
| `/work-all` | Work through all open issues autonomously |
|
|
349
|
+
| `/work-milestone [milestone#]` | Work through all issues in a specific milestone |
|
|
348
350
|
| `/work [issue#]` | Work on a specific issue |
|
|
349
351
|
|
|
350
352
|
### `/discovery` - Discovery Mode
|
|
@@ -408,6 +410,24 @@ The orchestrator (aka Product Owner) will:
|
|
|
408
410
|
- `maxEscalationsBeforeStop`: 3 - Stop if stuck too many times
|
|
409
411
|
- `maxConsecutiveFailures`: 3 - Stop if failing repeatedly
|
|
410
412
|
|
|
413
|
+
### `/work-milestone` - Milestone-Scoped Work
|
|
414
|
+
|
|
415
|
+
```
|
|
416
|
+
/work-milestone 3
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Work through all open issues in a specific GitHub milestone:
|
|
420
|
+
- Validates the milestone exists and reports its title/open issue count
|
|
421
|
+
- Lists only issues assigned to that milestone
|
|
422
|
+
- Follows `implementation-plan.md` if it exists (filtered to milestone issues)
|
|
423
|
+
- Otherwise uses dependency/priority ordering within the milestone
|
|
424
|
+
- Same circuit breaker limits as `/work-all`
|
|
425
|
+
- Auto-merges successful PRs
|
|
426
|
+
- Reports milestone-specific progress
|
|
427
|
+
- Stops when all issues in the milestone are complete (or limits reached)
|
|
428
|
+
|
|
429
|
+
Useful when you want to focus on completing a specific release or feature set rather than all open issues.
|
|
430
|
+
|
|
411
431
|
### `/work` - Single Issue
|
|
412
432
|
|
|
413
433
|
```
|
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -144,6 +144,6 @@ Next steps:
|
|
|
144
144
|
2. Update .claude/commands.md with your project-specific commands
|
|
145
145
|
3. Start using /discovery, /work, or /work-all commands
|
|
146
146
|
|
|
147
|
-
Run "automatasaurus status" to see installation details.
|
|
147
|
+
Run "npx automatasaurus status" to see installation details.
|
|
148
148
|
`);
|
|
149
149
|
}
|
package/src/commands/status.js
CHANGED
|
@@ -31,7 +31,7 @@ Merged blocks: ${manifest.merged_blocks.length}
|
|
|
31
31
|
|
|
32
32
|
// Check for version mismatch
|
|
33
33
|
if (manifest.version !== currentVersion) {
|
|
34
|
-
console.log(`Update available! Run "automatasaurus update" to upgrade.\n`);
|
|
34
|
+
console.log(`Update available! Run "npx automatasaurus update" to upgrade.\n`);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// Check symlink health
|
|
@@ -55,7 +55,7 @@ Merged blocks: ${manifest.merged_blocks.length}
|
|
|
55
55
|
|
|
56
56
|
if (brokenCount > 0) {
|
|
57
57
|
console.log(`\nWarning: ${brokenCount} broken symlinks detected.`);
|
|
58
|
-
console.log('Run "automatasaurus update --force" to repair.\n');
|
|
58
|
+
console.log('Run "npx automatasaurus update --force" to repair.\n');
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// Show merged blocks
|
package/src/commands/update.js
CHANGED
|
@@ -16,7 +16,7 @@ export async function update({ force = false } = {}) {
|
|
|
16
16
|
const manifest = await readManifest(projectRoot);
|
|
17
17
|
if (!manifest) {
|
|
18
18
|
console.log('Automatasaurus is not initialized in this project.');
|
|
19
|
-
console.log('Run "automatasaurus init" first.');
|
|
19
|
+
console.log('Run "npx automatasaurus init" first.');
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
package/template/CLAUDE.block.md
CHANGED
|
@@ -340,6 +340,45 @@ Notifications are also sent automatically on stop based on context.
|
|
|
340
340
|
| `AUTOMATASAURUS_SOUND` | Set to "false" to disable notification sounds |
|
|
341
341
|
| `AUTOMATASAURUS_LOG` | Custom log file location |
|
|
342
342
|
|
|
343
|
+
## Sandbox Configuration
|
|
344
|
+
|
|
345
|
+
Automatasaurus enables sandbox mode by default for autonomous operation with safety boundaries:
|
|
346
|
+
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"sandbox": {
|
|
350
|
+
"enabled": true,
|
|
351
|
+
"mode": "auto-allow",
|
|
352
|
+
"filesystem": {
|
|
353
|
+
"writeDeny": ["~/.ssh", "~/.bashrc", "/etc", "/bin", ...]
|
|
354
|
+
},
|
|
355
|
+
"network": {
|
|
356
|
+
"allowedDomains": ["github.com", "npmjs.org", "pypi.org", ...]
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**Key features:**
|
|
363
|
+
- `auto-allow` mode: Bash commands run without prompts inside sandbox boundaries
|
|
364
|
+
- Protected paths: SSH keys, shell configs, system directories are write-protected
|
|
365
|
+
- Network allowlist: Only approved domains (GitHub, npm, PyPI) accessible
|
|
366
|
+
|
|
367
|
+
**To add more allowed domains**, add to `settings.local.json`:
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"sandbox": {
|
|
371
|
+
"network": {
|
|
372
|
+
"allowedDomains": ["your-internal-registry.com"]
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**Requirements:**
|
|
379
|
+
- macOS: Built-in (Seatbelt)
|
|
380
|
+
- Linux/WSL2: `sudo apt install bubblewrap socat`
|
|
381
|
+
|
|
343
382
|
## Circuit Breaker Configuration
|
|
344
383
|
|
|
345
384
|
Limits are configured in `.claude/settings.json` under `automatasaurus.limits`:
|
package/template/README.md
CHANGED
|
@@ -11,7 +11,7 @@ This folder contains the Automatasaurus framework - an automated software develo
|
|
|
11
11
|
| `agents/` | Specialized AI personas (Developer, Architect, Tester, etc.) |
|
|
12
12
|
| `skills/` | Knowledge modules (coding standards, workflows, etc.) |
|
|
13
13
|
| `hooks/` | Shell scripts for notifications and workflow control |
|
|
14
|
-
| `commands/` | Slash commands (`/discovery`, `/work`, `/work-all`) |
|
|
14
|
+
| `commands/` | Slash commands (`/discovery`, `/work`, `/work-all`, `/work-milestone`) |
|
|
15
15
|
|
|
16
16
|
## How It Works
|
|
17
17
|
|
|
@@ -83,8 +83,9 @@ Agent: Developer
|
|
|
83
83
|
8. Run project linter/formatter before commits
|
|
84
84
|
9. Self-review for obvious issues
|
|
85
85
|
10. Check for secrets/credentials (never commit .env, API keys, passwords)
|
|
86
|
-
11.
|
|
87
|
-
12.
|
|
86
|
+
11. Update README if needed (see README Updates below)
|
|
87
|
+
12. Sync with main and resolve any conflicts
|
|
88
|
+
13. Open PR with comprehensive description
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
---
|
|
@@ -128,6 +129,47 @@ Verify your implementation:
|
|
|
128
129
|
|
|
129
130
|
---
|
|
130
131
|
|
|
132
|
+
## README Updates
|
|
133
|
+
|
|
134
|
+
Keep the README accurate as you implement changes. Documentation that drifts from reality is worse than no documentation.
|
|
135
|
+
|
|
136
|
+
### When to Update README
|
|
137
|
+
|
|
138
|
+
Update the README when your changes affect:
|
|
139
|
+
- **New features** - Add usage examples and configuration options
|
|
140
|
+
- **New commands** - Document command syntax and options
|
|
141
|
+
- **Changed behavior** - Update any descriptions that no longer match
|
|
142
|
+
- **New dependencies** - Add installation or setup steps
|
|
143
|
+
- **Configuration changes** - Document new settings or environment variables
|
|
144
|
+
- **API changes** - Update endpoint documentation, parameters, responses
|
|
145
|
+
|
|
146
|
+
### When NOT to Update README
|
|
147
|
+
|
|
148
|
+
Skip README updates for:
|
|
149
|
+
- Internal refactors that don't change external behavior
|
|
150
|
+
- Bug fixes that restore documented behavior
|
|
151
|
+
- Test-only changes
|
|
152
|
+
- Code style/formatting changes
|
|
153
|
+
|
|
154
|
+
### How to Update
|
|
155
|
+
|
|
156
|
+
1. **Read the existing README** - understand its structure and style
|
|
157
|
+
2. **Find the right section** - don't duplicate, extend existing sections
|
|
158
|
+
3. **Match the existing style** - use same heading levels, formatting, examples
|
|
159
|
+
4. **Keep it concise** - document what users need, not implementation details
|
|
160
|
+
5. **Include examples** - show, don't just tell
|
|
161
|
+
|
|
162
|
+
### README Update Checklist
|
|
163
|
+
|
|
164
|
+
Before committing README changes:
|
|
165
|
+
- [ ] New features have usage examples
|
|
166
|
+
- [ ] Configuration options list is current
|
|
167
|
+
- [ ] Any removed features are removed from docs
|
|
168
|
+
- [ ] Examples actually work (test them)
|
|
169
|
+
- [ ] No TODO comments left in documentation
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
131
173
|
## Branch Naming
|
|
132
174
|
|
|
133
175
|
**Format:** `{issue-number}-{descriptive-slug}`
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# Work Milestone - Process All Issues in a Milestone
|
|
2
|
+
|
|
3
|
+
Process all open issues in a specific GitHub milestone using context-isolated subagents.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/work-milestone {milestone_number}
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Workflow Mode
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
WORKFLOW_MODE: milestone
|
|
15
|
+
AUTO_MERGE: true (handled by this orchestrator after /work completes)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
You are the **Milestone Implementation Orchestrator**. You:
|
|
23
|
+
1. Validate the milestone exists and get its details
|
|
24
|
+
2. List all open issues in the milestone
|
|
25
|
+
3. Select issues based on dependencies and priority
|
|
26
|
+
4. Spawn `/work {n}` as a subagent for each issue (context isolation)
|
|
27
|
+
5. Parse subagent output to determine result
|
|
28
|
+
6. Merge successful PRs
|
|
29
|
+
7. Enforce circuit breaker limits
|
|
30
|
+
8. Report milestone-specific progress
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Load Context
|
|
35
|
+
|
|
36
|
+
1. Load the `workflow-orchestration` skill
|
|
37
|
+
2. Load the `github-workflow` skill
|
|
38
|
+
3. Check for `implementation-plan.md` (if exists, filter to milestone issues and follow order)
|
|
39
|
+
4. Read circuit breaker limits from `.claude/settings.json` under `automatasaurus.limits`
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Validate Milestone
|
|
44
|
+
|
|
45
|
+
Before starting, validate the milestone exists:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Get milestone info
|
|
49
|
+
gh api repos/:owner/:repo/milestones/$ARGUMENTS --jq '{title: .title, open_issues: .open_issues, description: .description}'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If milestone doesn't exist or has no open issues, report and exit:
|
|
53
|
+
- Invalid milestone number → Error: "Milestone #X not found"
|
|
54
|
+
- No open issues → Success: "Milestone #X ({title}) has no open issues"
|
|
55
|
+
|
|
56
|
+
Store milestone info:
|
|
57
|
+
```
|
|
58
|
+
MILESTONE_NUMBER = $ARGUMENTS
|
|
59
|
+
MILESTONE_TITLE = [from API response]
|
|
60
|
+
MILESTONE_TOTAL = [open_issues from API response]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Circuit Breaker Limits
|
|
66
|
+
|
|
67
|
+
Before each iteration, check limits from settings:
|
|
68
|
+
|
|
69
|
+
| Limit | Default | Action When Exceeded |
|
|
70
|
+
|-------|---------|---------------------|
|
|
71
|
+
| `maxIssuesPerRun` | 20 | Stop, report progress |
|
|
72
|
+
| `maxEscalationsBeforeStop` | 3 | Stop, notify human |
|
|
73
|
+
| `maxConsecutiveFailures` | 3 | Stop, notify human |
|
|
74
|
+
|
|
75
|
+
Initialize counters:
|
|
76
|
+
```
|
|
77
|
+
issuesProcessed = 0
|
|
78
|
+
escalationCount = 0
|
|
79
|
+
consecutiveFailures = 0
|
|
80
|
+
successCount = 0
|
|
81
|
+
blockedCount = 0
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Main Loop
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
LOOP:
|
|
90
|
+
1. CHECK LIMITS
|
|
91
|
+
- If issuesProcessed >= maxIssuesPerRun → Stop (limit reached)
|
|
92
|
+
- If escalationCount >= maxEscalationsBeforeStop → Stop (escalation limit)
|
|
93
|
+
- If consecutiveFailures >= maxConsecutiveFailures → Stop (failure limit)
|
|
94
|
+
|
|
95
|
+
2. LIST MILESTONE ISSUES
|
|
96
|
+
- Use: gh issue list --state open --milestone $ARGUMENTS --json number,title,labels
|
|
97
|
+
- If no open issues remain → Notify milestone complete, exit
|
|
98
|
+
|
|
99
|
+
3. SELECT NEXT ISSUE
|
|
100
|
+
- If implementation-plan.md exists: filter to milestone issues, follow plan order
|
|
101
|
+
- Otherwise use selection criteria (see below)
|
|
102
|
+
- Check dependencies (skip if blocked)
|
|
103
|
+
|
|
104
|
+
4. SPAWN /work SUBAGENT
|
|
105
|
+
- Use Task tool to spawn: "Run /work {issue_number}"
|
|
106
|
+
- Wait for completion
|
|
107
|
+
- Parse output for result
|
|
108
|
+
|
|
109
|
+
5. PARSE RESULT
|
|
110
|
+
- SUCCESS: Output contains "PR #X is ready" or "All required reviews complete"
|
|
111
|
+
- BLOCKED: Output contains "blocked" or "dependency"
|
|
112
|
+
- ESCALATED: Output contains "Escalating" or "stuck"
|
|
113
|
+
|
|
114
|
+
6. HANDLE RESULT
|
|
115
|
+
- SUCCESS: Merge PR, reset consecutiveFailures, increment issuesProcessed, successCount
|
|
116
|
+
- BLOCKED: Increment blockedCount, skip issue, continue to next
|
|
117
|
+
- ESCALATED: Increment escalationCount, consecutiveFailures
|
|
118
|
+
|
|
119
|
+
7. REPORT PROGRESS
|
|
120
|
+
- Show milestone-specific stats
|
|
121
|
+
- Loop back to step 1
|
|
122
|
+
|
|
123
|
+
END LOOP
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Issue Selection Criteria
|
|
129
|
+
|
|
130
|
+
### Primary: Follow Implementation Plan
|
|
131
|
+
|
|
132
|
+
If `implementation-plan.md` exists:
|
|
133
|
+
1. Read the plan
|
|
134
|
+
2. Filter entries to only issues in this milestone (cross-reference with milestone issue list)
|
|
135
|
+
3. Process in plan order
|
|
136
|
+
|
|
137
|
+
### Fallback: Priority-Based Selection
|
|
138
|
+
|
|
139
|
+
If no plan exists, select issues by:
|
|
140
|
+
|
|
141
|
+
#### 1. Dependencies
|
|
142
|
+
- Issues with no open dependencies first
|
|
143
|
+
- Issues that unblock others prioritized
|
|
144
|
+
|
|
145
|
+
#### 2. Priority Labels
|
|
146
|
+
- `priority:high` → `priority:medium` → `priority:low`
|
|
147
|
+
|
|
148
|
+
#### 3. Logical Order
|
|
149
|
+
- Foundation (schemas, models) before features
|
|
150
|
+
- Backend before frontend if applicable
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Listing Milestone Issues
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# List all open issues in the milestone
|
|
158
|
+
gh issue list --state open --milestone $ARGUMENTS --json number,title,labels,body
|
|
159
|
+
|
|
160
|
+
# Check for dependencies in issue body (looks for "depends on #X" or "blocked by #X")
|
|
161
|
+
# Parse each issue to build dependency graph
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Spawning Work Subagent
|
|
167
|
+
|
|
168
|
+
For each selected issue, spawn a subagent that loads and follows the `work-issue` skill.
|
|
169
|
+
|
|
170
|
+
### Task Tool Parameters
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
subagent_type: "general-purpose"
|
|
174
|
+
description: "Work on issue #{issue_number}"
|
|
175
|
+
prompt: |
|
|
176
|
+
Work on GitHub issue #{issue_number}.
|
|
177
|
+
|
|
178
|
+
1. Load the `work-issue` skill from .claude/skills/work-issue/SKILL.md
|
|
179
|
+
2. Follow the skill workflow with ISSUE_NUMBER = {issue_number}
|
|
180
|
+
3. Execute all steps: dependencies, implementation, reviews
|
|
181
|
+
4. Report result using the skill's exit state format:
|
|
182
|
+
- SUCCESS: "PR #X is ready for merge"
|
|
183
|
+
- BLOCKED: "Issue #{issue_number} is blocked on #Y"
|
|
184
|
+
- ESCALATED: "Issue #{issue_number} requires human intervention"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Example Invocation
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
Use the Task tool with subagent_type "general-purpose" to work on issue #42:
|
|
191
|
+
|
|
192
|
+
"Work on GitHub issue #42.
|
|
193
|
+
|
|
194
|
+
Load the work-issue skill from .claude/skills/work-issue/SKILL.md and follow
|
|
195
|
+
the workflow with ISSUE_NUMBER = 42.
|
|
196
|
+
|
|
197
|
+
Execute all steps: check dependencies, get design specs if UI, implement via
|
|
198
|
+
developer agent, coordinate reviews (Architect, Tester, Designer if UI), handle
|
|
199
|
+
any change requests.
|
|
200
|
+
|
|
201
|
+
Report result clearly:
|
|
202
|
+
- SUCCESS: 'PR #X is ready for merge'
|
|
203
|
+
- BLOCKED: 'Issue #42 is blocked on #Y'
|
|
204
|
+
- ESCALATED: 'Issue #42 requires human intervention'"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
The subagent loads the same skill that `/work` uses, ensuring identical behavior with isolated context.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Result Parsing
|
|
212
|
+
|
|
213
|
+
After subagent completes, check output for:
|
|
214
|
+
|
|
215
|
+
**SUCCESS indicators:**
|
|
216
|
+
- "PR #X is ready"
|
|
217
|
+
- "All required reviews complete"
|
|
218
|
+
- "ready for merge"
|
|
219
|
+
|
|
220
|
+
**BLOCKED indicators:**
|
|
221
|
+
- "blocked"
|
|
222
|
+
- "dependency"
|
|
223
|
+
- "cannot proceed"
|
|
224
|
+
|
|
225
|
+
**ESCALATED indicators:**
|
|
226
|
+
- "Escalating"
|
|
227
|
+
- "stuck"
|
|
228
|
+
- "requires human"
|
|
229
|
+
- "unable to resolve"
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Merge on Success
|
|
234
|
+
|
|
235
|
+
When result is SUCCESS:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Get PR number from subagent output
|
|
239
|
+
PR_NUMBER=[parsed from output]
|
|
240
|
+
|
|
241
|
+
# Post verification
|
|
242
|
+
gh pr comment {PR_NUMBER} --body "**[Product Owner]**
|
|
243
|
+
|
|
244
|
+
All required reviews complete. Proceeding with merge.
|
|
245
|
+
|
|
246
|
+
Milestone #{MILESTONE_NUMBER}: {MILESTONE_TITLE}
|
|
247
|
+
Issue {issuesProcessed + 1} of {MILESTONE_TOTAL} in milestone"
|
|
248
|
+
|
|
249
|
+
# Merge
|
|
250
|
+
gh pr merge {PR_NUMBER} --squash --delete-branch
|
|
251
|
+
|
|
252
|
+
# Verify issue closed
|
|
253
|
+
gh issue view {issue_number} --json state --jq '.state'
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Progress Reporting
|
|
259
|
+
|
|
260
|
+
After each issue:
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
## Milestone #{MILESTONE_NUMBER}: {MILESTONE_TITLE}
|
|
264
|
+
|
|
265
|
+
Issue #{number}: [SUCCESS/BLOCKED/ESCALATED]
|
|
266
|
+
Progress: {successCount}/{MILESTONE_TOTAL} issues in milestone complete
|
|
267
|
+
Issues processed this run: {issuesProcessed}/{maxIssuesPerRun}
|
|
268
|
+
Escalations: {escalationCount}/{maxEscalationsBeforeStop}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Stopping Conditions
|
|
274
|
+
|
|
275
|
+
Stop the loop when ANY of these occur:
|
|
276
|
+
|
|
277
|
+
1. **Milestone complete** → All issues in milestone processed successfully
|
|
278
|
+
2. **Limit reached** (`maxIssuesPerRun`) → Report progress, suggest continuing later
|
|
279
|
+
3. **Escalation limit** (`maxEscalationsBeforeStop`) → Notify human intervention needed
|
|
280
|
+
4. **Failure limit** (`maxConsecutiveFailures`) → Notify something is wrong
|
|
281
|
+
5. **All remaining issues blocked** → Notify circular dependency or external blocker
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Completion Notifications
|
|
286
|
+
|
|
287
|
+
**Milestone complete:**
|
|
288
|
+
```bash
|
|
289
|
+
.claude/hooks/request-attention.sh complete "Milestone #{MILESTONE_NUMBER} ({MILESTONE_TITLE}) complete! All {MILESTONE_TOTAL} issues merged."
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Limit reached:**
|
|
293
|
+
```bash
|
|
294
|
+
.claude/hooks/request-attention.sh info "Processed {n} issues in milestone #{MILESTONE_NUMBER}. Run /work-milestone {MILESTONE_NUMBER} again to continue."
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Escalation/Failure limit:**
|
|
298
|
+
```bash
|
|
299
|
+
.claude/hooks/request-attention.sh stuck "Stopped after {n} escalations in milestone #{MILESTONE_NUMBER}. Human intervention needed."
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Final Summary
|
|
305
|
+
|
|
306
|
+
When stopping for any reason:
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
## Work-Milestone Summary
|
|
310
|
+
|
|
311
|
+
**Milestone:** #{MILESTONE_NUMBER} - {MILESTONE_TITLE}
|
|
312
|
+
**Status:** [Complete / Limit Reached / Stopped - Human Needed]
|
|
313
|
+
|
|
314
|
+
**Milestone Progress:** {successCount}/{MILESTONE_TOTAL} issues complete
|
|
315
|
+
**Issues Processed This Run:** {issuesProcessed}
|
|
316
|
+
**Successful Merges:** {successCount}
|
|
317
|
+
**Blocked:** {blockedCount}
|
|
318
|
+
**Escalated:** {escalatedCount}
|
|
319
|
+
|
|
320
|
+
**Remaining in Milestone:** {remaining_count}
|
|
321
|
+
|
|
322
|
+
[If applicable: Suggest next steps]
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
Begin by validating the milestone number from `$ARGUMENTS`, loading skills, reading limits from settings, then listing all open issues in the milestone.
|
package/template/settings.json
CHANGED
|
@@ -10,20 +10,82 @@
|
|
|
10
10
|
},
|
|
11
11
|
"permissions": {
|
|
12
12
|
"allow": [
|
|
13
|
-
"Bash(
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"Bash(claude:*)",
|
|
18
|
-
"Bash(*/.claude/hooks/*)",
|
|
13
|
+
"Bash(*)",
|
|
14
|
+
"Read(*)",
|
|
15
|
+
"Edit(./**)",
|
|
16
|
+
"Write(./**)",
|
|
19
17
|
"WebSearch"
|
|
20
18
|
],
|
|
21
19
|
"deny": [
|
|
22
20
|
"Read(./.env)",
|
|
23
21
|
"Read(./.env.*)",
|
|
24
|
-
"Read(./secrets/**)"
|
|
22
|
+
"Read(./secrets/**)",
|
|
23
|
+
"Edit(../)",
|
|
24
|
+
"Edit(~/**)",
|
|
25
|
+
"Edit(//etc/**)",
|
|
26
|
+
"Edit(//var/**)",
|
|
27
|
+
"Edit(//bin/**)",
|
|
28
|
+
"Edit(//sbin/**)",
|
|
29
|
+
"Edit(//usr/**)",
|
|
30
|
+
"Edit(//System/**)",
|
|
31
|
+
"Write(../)",
|
|
32
|
+
"Write(~/**)",
|
|
33
|
+
"Write(//etc/**)",
|
|
34
|
+
"Write(//var/**)",
|
|
35
|
+
"Write(//bin/**)",
|
|
36
|
+
"Write(//sbin/**)",
|
|
37
|
+
"Write(//usr/**)",
|
|
38
|
+
"Write(//System/**)",
|
|
39
|
+
"Bash(rm -rf ~*)",
|
|
40
|
+
"Bash(rm -rf /*)",
|
|
41
|
+
"Bash(rm -rf ../*)",
|
|
42
|
+
"Bash(rm -r ~*)",
|
|
43
|
+
"Bash(rm -r /*)",
|
|
44
|
+
"Bash(rm -r ../*)",
|
|
45
|
+
"Bash(chmod -R 777 /*)",
|
|
46
|
+
"Bash(chown -R * /*)"
|
|
25
47
|
]
|
|
26
48
|
},
|
|
49
|
+
"sandbox": {
|
|
50
|
+
"enabled": true,
|
|
51
|
+
"mode": "auto-allow",
|
|
52
|
+
"filesystem": {
|
|
53
|
+
"writeDeny": [
|
|
54
|
+
"~/.ssh",
|
|
55
|
+
"~/.gnupg",
|
|
56
|
+
"~/.bashrc",
|
|
57
|
+
"~/.zshrc",
|
|
58
|
+
"~/.profile",
|
|
59
|
+
"~/.bash_profile",
|
|
60
|
+
"~/.config/claude",
|
|
61
|
+
"/etc",
|
|
62
|
+
"/bin",
|
|
63
|
+
"/sbin",
|
|
64
|
+
"/usr/bin",
|
|
65
|
+
"/usr/sbin",
|
|
66
|
+
"/System"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"network": {
|
|
70
|
+
"allowedDomains": [
|
|
71
|
+
"github.com",
|
|
72
|
+
"api.github.com",
|
|
73
|
+
"raw.githubusercontent.com",
|
|
74
|
+
"ghcr.io",
|
|
75
|
+
"npmjs.org",
|
|
76
|
+
"registry.npmjs.org",
|
|
77
|
+
"pypi.org",
|
|
78
|
+
"files.pythonhosted.org",
|
|
79
|
+
"docker.io",
|
|
80
|
+
"registry-1.docker.io",
|
|
81
|
+
"auth.docker.io",
|
|
82
|
+
"index.docker.io",
|
|
83
|
+
"production.cloudflare.docker.com",
|
|
84
|
+
"gcr.io",
|
|
85
|
+
"quay.io"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
27
89
|
"hooks": {
|
|
28
90
|
"Stop": [
|
|
29
91
|
{
|
|
@@ -23,7 +23,8 @@ This skill expects an `ISSUE_NUMBER` to be provided by the caller.
|
|
|
23
23
|
5. IMPLEMENT → Invoke developer agent with briefing
|
|
24
24
|
6. COORDINATE REVIEWS → Architect (required), Designer (if UI), Tester (required)
|
|
25
25
|
7. HANDLE CHANGE REQUESTS → Loop until all approved
|
|
26
|
-
8.
|
|
26
|
+
8. COMMIT ORCHESTRATION FILES → Preserve audit trail in branch
|
|
27
|
+
9. REPORT RESULT → Success, Blocked, or Escalated
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
---
|
|
@@ -411,7 +412,38 @@ Repeat until all required approvals are present.
|
|
|
411
412
|
|
|
412
413
|
---
|
|
413
414
|
|
|
414
|
-
## Step 8:
|
|
415
|
+
## Step 8: Commit Orchestration Files
|
|
416
|
+
|
|
417
|
+
Before reporting success, commit all briefings and reports to the branch so they're preserved in the PR.
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
# Switch to the issue branch
|
|
421
|
+
BRANCH=$(gh pr view {pr_number} --json headRefName --jq '.headRefName')
|
|
422
|
+
git checkout "$BRANCH"
|
|
423
|
+
|
|
424
|
+
# Add all orchestration files for this issue
|
|
425
|
+
git add orchestration/issues/{ISSUE_NUMBER}-{slug}/
|
|
426
|
+
|
|
427
|
+
# Commit with clear message
|
|
428
|
+
git commit -m "docs: add agent orchestration files for #{ISSUE_NUMBER}
|
|
429
|
+
|
|
430
|
+
Includes briefings and reports from:
|
|
431
|
+
- Designer (if UI)
|
|
432
|
+
- Developer
|
|
433
|
+
- Architect review
|
|
434
|
+
- Tester verification
|
|
435
|
+
|
|
436
|
+
These provide audit trail of agent coordination."
|
|
437
|
+
|
|
438
|
+
# Push to the branch
|
|
439
|
+
git push
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
This ensures the full agent communication history is preserved in the PR and merged with the code.
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## Step 9: Report Result
|
|
415
447
|
|
|
416
448
|
### Check for All Approvals
|
|
417
449
|
|