automatasaurus 0.1.0
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/LICENSE +21 -0
- package/README.md +543 -0
- package/bin/cli.js +62 -0
- package/package.json +39 -0
- package/src/commands/init.js +149 -0
- package/src/commands/status.js +68 -0
- package/src/commands/update.js +140 -0
- package/src/lib/block-merge.js +86 -0
- package/src/lib/json-merge.js +121 -0
- package/src/lib/manifest.js +60 -0
- package/src/lib/paths.js +55 -0
- package/src/lib/symlinks.js +127 -0
- package/template/CLAUDE.block.md +357 -0
- package/template/README.md +36 -0
- package/template/agents/architect/AGENT.md +167 -0
- package/template/agents/designer/AGENT.md +289 -0
- package/template/agents/developer/AGENT.md +182 -0
- package/template/agents/tester/AGENT.md +308 -0
- package/template/artifacts/discovery.md.template +193 -0
- package/template/artifacts/implementation-plan.md.template +119 -0
- package/template/commands/discovery.md +325 -0
- package/template/commands/work-all.md +274 -0
- package/template/commands/work-plan.md +169 -0
- package/template/commands/work.md +73 -0
- package/template/commands.block.md +45 -0
- package/template/commands.template.md +156 -0
- package/template/hooks/notify.sh +83 -0
- package/template/hooks/on-stop.sh +54 -0
- package/template/hooks/request-attention.sh +16 -0
- package/template/settings.json +85 -0
- package/template/skills/agent-coordination/SKILL.md +166 -0
- package/template/skills/code-review/SKILL.md +386 -0
- package/template/skills/css-standards/SKILL.md +488 -0
- package/template/skills/github-issues/SKILL.md +144 -0
- package/template/skills/github-workflow/SKILL.md +161 -0
- package/template/skills/infrastructure-standards/SKILL.md +189 -0
- package/template/skills/javascript-standards/SKILL.md +355 -0
- package/template/skills/notifications/SKILL.md +95 -0
- package/template/skills/pr-writing/SKILL.md +259 -0
- package/template/skills/project-commands/SKILL.md +100 -0
- package/template/skills/python-standards/SKILL.md +284 -0
- package/template/skills/requirements-gathering/SKILL.md +212 -0
- package/template/skills/user-stories/SKILL.md +192 -0
- package/template/skills/work-issue/SKILL.md +245 -0
- package/template/skills/workflow-orchestration/SKILL.md +271 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Stuart Williamson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
# Automatasaurus
|
|
2
|
+
|
|
3
|
+
<img src="logo.jpeg" alt="Automatasaurus Logo" width="200">
|
|
4
|
+
|
|
5
|
+
An automated software development workflow powered by Claude Code. Uses specialized subagents, stop hooks, and skills to enable extended autonomous development sessions with multiple coordinated agents.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
Get automatasaurus running in your project in under a minute:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Prerequisites: Claude Code CLI and GitHub CLI must be installed
|
|
13
|
+
# Install: https://claude.ai/code and https://cli.github.com/
|
|
14
|
+
|
|
15
|
+
# Initialize in your project
|
|
16
|
+
cd your-project
|
|
17
|
+
npx automatasaurus init
|
|
18
|
+
|
|
19
|
+
# Start Claude Code
|
|
20
|
+
claude
|
|
21
|
+
|
|
22
|
+
# Begin discovery for a new feature
|
|
23
|
+
/discovery user authentication system
|
|
24
|
+
|
|
25
|
+
# Review and sequence the implementation plan
|
|
26
|
+
/work-plan
|
|
27
|
+
|
|
28
|
+
# Work through all issues autonomously
|
|
29
|
+
/work-all
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
That's it! The framework installs agents, skills, hooks, and slash commands into your project. See [Prerequisites](#prerequisites) for detailed setup instructions.
|
|
33
|
+
|
|
34
|
+
## Overview
|
|
35
|
+
|
|
36
|
+
Automatasaurus creates a team of AI agents that work together through GitHub issues and PRs to build software. Each agent has specific expertise and responsibilities, and they coordinate their work using established software development practices.
|
|
37
|
+
|
|
38
|
+
**This repository contains the workflow orchestration framework.** Install it into your project to enable AI-assisted software development with coordinated agents.
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
The workflow operates in two phases:
|
|
43
|
+
|
|
44
|
+
### Phase 1: Discovery (Interactive)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
User: /discovery "feature description"
|
|
48
|
+
↓
|
|
49
|
+
Discovery command facilitates conversation:
|
|
50
|
+
- Goals and success metrics
|
|
51
|
+
- Users and stakeholders
|
|
52
|
+
- Business logic and constraints
|
|
53
|
+
- Infrastructure requirements
|
|
54
|
+
↓
|
|
55
|
+
Brings in specialists for review:
|
|
56
|
+
- Architect: Technical feasibility
|
|
57
|
+
- Designer: UI/UX considerations
|
|
58
|
+
↓
|
|
59
|
+
Creates GitHub issues with:
|
|
60
|
+
- User stories and acceptance criteria
|
|
61
|
+
- Dependencies ("Depends on #X")
|
|
62
|
+
- Organized into milestones
|
|
63
|
+
↓
|
|
64
|
+
User approves milestone/issue breakdown
|
|
65
|
+
↓
|
|
66
|
+
User: /work-plan (analyze dependencies, create sequence)
|
|
67
|
+
↓
|
|
68
|
+
User: /work-all
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Phase 2: Autonomous Loop (Command Orchestrated)
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
75
|
+
│ /work-all ORCHESTRATION LOOP │
|
|
76
|
+
│ │
|
|
77
|
+
│ 1. Select next issue │
|
|
78
|
+
│ - Check dependencies (all deps closed?) │
|
|
79
|
+
│ - Consider priority labels │
|
|
80
|
+
│ - Check circuit breaker limits │
|
|
81
|
+
│ │
|
|
82
|
+
│ 2. Spawn /work {n} as subagent (context isolation) │
|
|
83
|
+
│ └→ Designer: Add specs if UI work needed │
|
|
84
|
+
│ │
|
|
85
|
+
│ 3. Developer: Implement │
|
|
86
|
+
│ - Create branch: {issue-num}-{slug} │
|
|
87
|
+
│ - Commit frequently at logical checkpoints │
|
|
88
|
+
│ - If stuck (5 attempts) → Escalate to Architect │
|
|
89
|
+
│ - If Architect stuck → Notify human, wait │
|
|
90
|
+
│ - Open PR with "Closes #X" │
|
|
91
|
+
│ │
|
|
92
|
+
│ 4. Review Cycle │
|
|
93
|
+
│ ├→ Architect: REQUIRED review │
|
|
94
|
+
│ ├→ Designer: Review if UI-relevant (can decline "N/A") │
|
|
95
|
+
│ └→ Developer: Address feedback, push fixes │
|
|
96
|
+
│ │
|
|
97
|
+
│ 5. Tester: Verification │
|
|
98
|
+
│ - Run automated tests │
|
|
99
|
+
│ - Manual verification if needed (Playwright) │
|
|
100
|
+
│ - If issues → Back to Developer │
|
|
101
|
+
│ │
|
|
102
|
+
│ 6. Merge and continue │
|
|
103
|
+
│ - Product Owner merges PR │
|
|
104
|
+
│ - Loop until complete or limits reached │
|
|
105
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Agents
|
|
109
|
+
|
|
110
|
+
| Agent | Model | Role | Responsibilities |
|
|
111
|
+
|-------|-------|------|------------------|
|
|
112
|
+
| **Architect** | Opus | Design | System design, ADRs, required PR reviews, stuck-issue analysis |
|
|
113
|
+
| **Developer** | Sonnet | Implementation | Feature development, bug fixes, PRs, addresses feedback |
|
|
114
|
+
| **Designer** | Sonnet | Experience | UI/UX specs, accessibility, design reviews (if UI changes) |
|
|
115
|
+
| **Tester** | Sonnet | Quality | Test execution, Playwright verification, required PR reviews |
|
|
116
|
+
|
|
117
|
+
**Note:** Commands (`/discovery`, `/work`, `/work-all`) handle orchestration. There is no separate PM agent.
|
|
118
|
+
|
|
119
|
+
## Agent Comment Format
|
|
120
|
+
|
|
121
|
+
All agents prefix their comments with their identity:
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
**[Product Owner]** Starting work on issue #5. Routing to Developer.
|
|
125
|
+
**[Developer]** Fixed in commit abc1234. Ready for re-review.
|
|
126
|
+
**[Architect]** ✅ APPROVED - Architect. Clean separation of concerns.
|
|
127
|
+
**[Designer]** N/A - No UI changes in this PR.
|
|
128
|
+
**[Tester]** ✅ APPROVED - Tester. All tests passing.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Features
|
|
132
|
+
|
|
133
|
+
- **Stop Hooks**: Intelligent evaluation ensures tasks are complete before stopping
|
|
134
|
+
- **Subagent Coordination**: Specialized agents with role-specific completion criteria
|
|
135
|
+
- **GitHub Integration**: All work coordinated through issues, PRs, and labels
|
|
136
|
+
- **Playwright MCP**: Browser automation for E2E testing and visual verification
|
|
137
|
+
- **Notifications**: Desktop alerts when agents need attention or finish work
|
|
138
|
+
- **Escalation Flow**: Developer → Architect → Human (when stuck)
|
|
139
|
+
- **Language Skills**: On-demand coding standards for Python, JavaScript, CSS
|
|
140
|
+
- **Project Commands**: Configurable commands for any project stack
|
|
141
|
+
- **Extended Sessions**: Designed for autonomous work over extended periods
|
|
142
|
+
|
|
143
|
+
## Prerequisites
|
|
144
|
+
|
|
145
|
+
- [Claude Code CLI](https://claude.ai/code) installed and authenticated
|
|
146
|
+
- [GitHub CLI](https://cli.github.com/) (`gh`) installed and authenticated
|
|
147
|
+
- Node.js (for Playwright MCP and npm-based projects)
|
|
148
|
+
|
|
149
|
+
**GitHub CLI Setup:**
|
|
150
|
+
```bash
|
|
151
|
+
# Install (macOS)
|
|
152
|
+
brew install gh
|
|
153
|
+
|
|
154
|
+
# Authenticate
|
|
155
|
+
gh auth login
|
|
156
|
+
|
|
157
|
+
# Verify
|
|
158
|
+
gh auth status
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Project Structure
|
|
162
|
+
|
|
163
|
+
After running `npx automatasaurus init`, your project will have:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
your-project/
|
|
167
|
+
├── CLAUDE.md # Project context (automatasaurus block merged in)
|
|
168
|
+
├── .automatasaurus/ # Framework files (managed by installer)
|
|
169
|
+
│ ├── README.md # Framework documentation
|
|
170
|
+
│ ├── agents/ # AI agents
|
|
171
|
+
│ │ ├── architect/ # Design & required PR reviews
|
|
172
|
+
│ │ ├── developer/ # Implementation & PRs
|
|
173
|
+
│ │ ├── designer/ # UI/UX design specs
|
|
174
|
+
│ │ └── tester/ # QA, Playwright, merge authority
|
|
175
|
+
│ ├── skills/ # Knowledge modules
|
|
176
|
+
│ │ ├── workflow-orchestration/
|
|
177
|
+
│ │ ├── github-workflow/
|
|
178
|
+
│ │ ├── github-issues/
|
|
179
|
+
│ │ ├── python-standards/
|
|
180
|
+
│ │ ├── javascript-standards/
|
|
181
|
+
│ │ ⋮ # (additional skills)
|
|
182
|
+
│ ├── hooks/ # Shell scripts for notifications
|
|
183
|
+
│ │ ├── notify.sh
|
|
184
|
+
│ │ ├── on-stop.sh
|
|
185
|
+
│ │ └── request-attention.sh
|
|
186
|
+
│ └── commands/ # Slash command definitions
|
|
187
|
+
│ ├── discovery.md
|
|
188
|
+
│ ├── work.md
|
|
189
|
+
│ ├── work-all.md
|
|
190
|
+
│ └── work-plan.md
|
|
191
|
+
└── .claude/
|
|
192
|
+
├── settings.json # Claude Code settings (automatasaurus hooks merged in)
|
|
193
|
+
├── commands.md # Project-specific commands (you edit this)
|
|
194
|
+
├── agents/ → .automatasaurus/agents/ # Symlinks
|
|
195
|
+
├── skills/ → .automatasaurus/skills/
|
|
196
|
+
├── hooks/ → .automatasaurus/hooks/
|
|
197
|
+
└── commands/ → .automatasaurus/commands/
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Note:** Files in `.automatasaurus/` are managed by the installer and updated via `npx automatasaurus update`. Add your own custom agents/skills directly to `.claude/` (not as symlinks).
|
|
201
|
+
|
|
202
|
+
## Installation
|
|
203
|
+
|
|
204
|
+
### From npm (recommended)
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Initialize automatasaurus in your project
|
|
208
|
+
cd your-project
|
|
209
|
+
npx automatasaurus init
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### From local build
|
|
213
|
+
|
|
214
|
+
To install from a local checkout (useful for testing changes before publishing):
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# 1. In the automatasaurus repo, create the package tarball
|
|
218
|
+
cd ~/src/automatasaurus
|
|
219
|
+
npm pack
|
|
220
|
+
# Creates automatasaurus-0.1.0.tgz (version number from package.json)
|
|
221
|
+
|
|
222
|
+
# 2. In your target project, install the tarball
|
|
223
|
+
cd ~/src/your-project
|
|
224
|
+
npm install ~/src/automatasaurus/automatasaurus-0.1.0.tgz
|
|
225
|
+
|
|
226
|
+
# 3. Run the init command
|
|
227
|
+
npx automatasaurus init
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Note:** Use `npm install` (not `npx install`) to add the package, then `npx automatasaurus` to run the CLI.
|
|
231
|
+
|
|
232
|
+
This approach tests exactly what would be published to npm, catching any packaging issues like missing files.
|
|
233
|
+
|
|
234
|
+
### Updating from local build
|
|
235
|
+
|
|
236
|
+
When testing changes to automatasaurus, you need to reinstall the tarball before running update:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# 1. In the automatasaurus repo, create a new tarball
|
|
240
|
+
cd ~/src/automatasaurus
|
|
241
|
+
npm pack
|
|
242
|
+
|
|
243
|
+
# 2. In your target project, reinstall and update
|
|
244
|
+
cd ~/src/your-project
|
|
245
|
+
npm install ~/src/automatasaurus/automatasaurus-0.1.0.tgz
|
|
246
|
+
npx automatasaurus update --force
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
The `--force` flag is needed because the version number may not have changed. Without it, update will say "Already at latest version."
|
|
250
|
+
|
|
251
|
+
**Alternative:** Run directly from source without packing:
|
|
252
|
+
```bash
|
|
253
|
+
npx ~/src/automatasaurus update --force
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### What init does
|
|
257
|
+
|
|
258
|
+
This will:
|
|
259
|
+
1. Copy framework files to `.automatasaurus/` directory
|
|
260
|
+
2. Create symlinks in `.claude/` pointing to framework files
|
|
261
|
+
3. Merge automatasaurus config into `CLAUDE.md` and `.claude/settings.json`
|
|
262
|
+
4. Set up slash commands, agents, skills, and hooks
|
|
263
|
+
|
|
264
|
+
After initialization:
|
|
265
|
+
1. Customize `.claude/commands.md` with your project's build/test commands
|
|
266
|
+
2. Ensure GitHub CLI is authenticated: `gh auth status`
|
|
267
|
+
3. Start Claude Code: `claude`
|
|
268
|
+
|
|
269
|
+
### CLI Commands
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
npx automatasaurus init # Install into current project
|
|
273
|
+
npx automatasaurus update # Update framework files to latest
|
|
274
|
+
npx automatasaurus status # Show installation info
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## Usage
|
|
278
|
+
|
|
279
|
+
### Slash Commands
|
|
280
|
+
|
|
281
|
+
The primary way to invoke workflows:
|
|
282
|
+
|
|
283
|
+
| Command | Description |
|
|
284
|
+
|---------|-------------|
|
|
285
|
+
| `/discovery [feature]` | Start discovery to understand requirements and create plan |
|
|
286
|
+
| `/work-plan` | Analyze open issues, create sequenced implementation plan |
|
|
287
|
+
| `/work-all` | Work through all open issues autonomously |
|
|
288
|
+
| `/work [issue#]` | Work on a specific issue |
|
|
289
|
+
|
|
290
|
+
### `/discovery` - Discovery Mode
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
/discovery user authentication system
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The discovery command will:
|
|
297
|
+
- Lead a conversation about goals, constraints, and requirements
|
|
298
|
+
- Bring in specialists (Architect, Designer) for review
|
|
299
|
+
- Create well-formed GitHub issues with acceptance criteria
|
|
300
|
+
- Organize issues into milestones
|
|
301
|
+
- Get your approval before any implementation
|
|
302
|
+
|
|
303
|
+
### `/work-plan` - Implementation Planning
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
/work-plan
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Before starting autonomous work, run this command to:
|
|
310
|
+
- Analyze all open issues and their dependencies
|
|
311
|
+
- Create a sequenced implementation plan
|
|
312
|
+
- Generate `implementation-plan.md` with work order and rationale
|
|
313
|
+
- Identify blockers and risks
|
|
314
|
+
|
|
315
|
+
This step helps you review and approve the execution order before `/work-all` begins.
|
|
316
|
+
|
|
317
|
+
### `/work-all` - Autonomous Loop
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
/work-all
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
The orchestrator will:
|
|
324
|
+
- List all remaining issues
|
|
325
|
+
- Select next issue based on dependencies and priority
|
|
326
|
+
- Spawn `/work {n}` as a subagent for context isolation
|
|
327
|
+
- Merge successful PRs
|
|
328
|
+
- Continue until all issues complete or circuit breaker limits reached
|
|
329
|
+
|
|
330
|
+
**Circuit Breaker Limits** (configurable in `.claude/settings.json`):
|
|
331
|
+
- `maxIssuesPerRun`: 20 - Stop after this many issues
|
|
332
|
+
- `maxEscalationsBeforeStop`: 3 - Stop if stuck too many times
|
|
333
|
+
- `maxConsecutiveFailures`: 3 - Stop if failing repeatedly
|
|
334
|
+
|
|
335
|
+
### `/work` - Single Issue
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
/work 42
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Work on a specific issue - useful for one-off tickets or addressing a particular issue outside the full autonomous loop:
|
|
342
|
+
- Checks dependencies are satisfied
|
|
343
|
+
- Gets design specs if UI work is involved
|
|
344
|
+
- Developer implements and opens PR
|
|
345
|
+
- Coordinates reviews (Architect required, Designer if UI)
|
|
346
|
+
- Tester verifies
|
|
347
|
+
- Stops after that issue is complete (does not auto-merge)
|
|
348
|
+
|
|
349
|
+
### Invoking Specific Agents
|
|
350
|
+
|
|
351
|
+
You can also invoke agents directly:
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
Use the architect agent to review the database schema
|
|
355
|
+
Use the tester agent to create a test plan for the API
|
|
356
|
+
Use the tester agent with playwright to verify the checkout flow
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Dependency Tracking
|
|
360
|
+
|
|
361
|
+
Issues track dependencies in their body:
|
|
362
|
+
|
|
363
|
+
```markdown
|
|
364
|
+
## Dependencies
|
|
365
|
+
Depends on #12 (User authentication)
|
|
366
|
+
Depends on #15 (Database schema)
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
The PM uses this to determine issue order - an issue is only "ready" when all dependencies are closed.
|
|
370
|
+
|
|
371
|
+
## State Labels
|
|
372
|
+
|
|
373
|
+
| Label | Description |
|
|
374
|
+
|-------|-------------|
|
|
375
|
+
| `ready` | No blocking dependencies, can be worked |
|
|
376
|
+
| `in-progress` | Currently being implemented |
|
|
377
|
+
| `blocked` | Waiting on dependencies or input |
|
|
378
|
+
| `needs-review` | PR open, awaiting reviews |
|
|
379
|
+
| `needs-testing` | Reviews complete, awaiting tester |
|
|
380
|
+
| `priority:high/medium/low` | Work order priority |
|
|
381
|
+
|
|
382
|
+
## Escalation Flow
|
|
383
|
+
|
|
384
|
+
When the Developer gets stuck after 5 attempts:
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
Developer stuck
|
|
388
|
+
↓
|
|
389
|
+
Escalate to Architect
|
|
390
|
+
↓
|
|
391
|
+
Architect analyzes and provides guidance
|
|
392
|
+
↓
|
|
393
|
+
If Architect also stuck → Notify human and wait
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
## Notifications
|
|
397
|
+
|
|
398
|
+
Agents send desktop notifications when they need your attention:
|
|
399
|
+
|
|
400
|
+
| Type | Trigger | Sound |
|
|
401
|
+
|------|---------|-------|
|
|
402
|
+
| **Question** | Agent has a blocking question | Submarine |
|
|
403
|
+
| **Approval** | PR or decision needs approval | Submarine |
|
|
404
|
+
| **Stuck** | Agent encountered an issue | Basso |
|
|
405
|
+
| **Complete** | All work finished | Hero |
|
|
406
|
+
|
|
407
|
+
## Configuration
|
|
408
|
+
|
|
409
|
+
### Project Commands
|
|
410
|
+
|
|
411
|
+
Edit `.claude/commands.md` for your project's commands:
|
|
412
|
+
|
|
413
|
+
```markdown
|
|
414
|
+
## Quick Reference
|
|
415
|
+
|
|
416
|
+
| Action | Command |
|
|
417
|
+
|--------|---------|
|
|
418
|
+
| Install dependencies | `npm install` |
|
|
419
|
+
| Start development server | `npm run dev` |
|
|
420
|
+
| Run all tests | `npm test` |
|
|
421
|
+
| Run E2E tests | `npx playwright test` |
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### MCP Servers
|
|
425
|
+
|
|
426
|
+
The `.mcp.json` file configures Playwright for browser testing:
|
|
427
|
+
|
|
428
|
+
```json
|
|
429
|
+
{
|
|
430
|
+
"mcpServers": {
|
|
431
|
+
"playwright": {
|
|
432
|
+
"command": "npx",
|
|
433
|
+
"args": ["@playwright/mcp@latest"]
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Circuit Breaker Limits
|
|
440
|
+
|
|
441
|
+
Configure limits in `.claude/settings.json` under `automatasaurus.limits`:
|
|
442
|
+
|
|
443
|
+
```json
|
|
444
|
+
{
|
|
445
|
+
"automatasaurus": {
|
|
446
|
+
"limits": {
|
|
447
|
+
"maxIssuesPerRun": 20,
|
|
448
|
+
"maxEscalationsBeforeStop": 3,
|
|
449
|
+
"maxRetriesPerIssue": 5,
|
|
450
|
+
"maxConsecutiveFailures": 3
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Custom limits survive framework updates (deep merge preserves your values).
|
|
457
|
+
|
|
458
|
+
### Notifications
|
|
459
|
+
|
|
460
|
+
Configure notification behavior via environment variables:
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
# Disable sound alerts
|
|
464
|
+
export AUTOMATASAURUS_SOUND=false
|
|
465
|
+
|
|
466
|
+
# Custom log location
|
|
467
|
+
export AUTOMATASAURUS_LOG=/path/to/log
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
## Language Skills
|
|
471
|
+
|
|
472
|
+
The developer agent loads language-specific skills on demand:
|
|
473
|
+
|
|
474
|
+
| Language | Skill | Covers |
|
|
475
|
+
|----------|-------|--------|
|
|
476
|
+
| Python | `python-standards` | PEP 8, type hints, pytest, async patterns |
|
|
477
|
+
| JavaScript/TypeScript | `javascript-standards` | ESM, React, testing, error handling |
|
|
478
|
+
| CSS/SCSS | `css-standards` | BEM, CSS variables, flexbox/grid, accessibility |
|
|
479
|
+
|
|
480
|
+
## Customization
|
|
481
|
+
|
|
482
|
+
### Adding a New Agent
|
|
483
|
+
|
|
484
|
+
1. Create `.claude/agents/<agent-name>/AGENT.md`
|
|
485
|
+
2. Define the frontmatter:
|
|
486
|
+
```yaml
|
|
487
|
+
---
|
|
488
|
+
name: agent-name
|
|
489
|
+
description: When to use this agent
|
|
490
|
+
tools: Read, Edit, Write, Bash, Grep, Glob
|
|
491
|
+
model: sonnet
|
|
492
|
+
---
|
|
493
|
+
```
|
|
494
|
+
3. Write a detailed system prompt including:
|
|
495
|
+
- Responsibilities
|
|
496
|
+
- When to use this agent
|
|
497
|
+
- Comment format: `**[Agent Name]** comment text`
|
|
498
|
+
4. Update `CLAUDE.md` with the new agent
|
|
499
|
+
|
|
500
|
+
### Creating Skills
|
|
501
|
+
|
|
502
|
+
1. Create `.claude/skills/<skill-name>/SKILL.md`
|
|
503
|
+
2. Add frontmatter:
|
|
504
|
+
```yaml
|
|
505
|
+
---
|
|
506
|
+
name: skill-name
|
|
507
|
+
description: What this skill does and when to use it
|
|
508
|
+
---
|
|
509
|
+
```
|
|
510
|
+
3. Document the workflow or knowledge
|
|
511
|
+
4. Skills are loaded on-demand when relevant
|
|
512
|
+
|
|
513
|
+
## Roadmap
|
|
514
|
+
|
|
515
|
+
- [x] CLI tool for easy installation (`automatasaurus init`)
|
|
516
|
+
- [ ] Project detection and automatic command configuration
|
|
517
|
+
- [ ] Additional MCP integrations (database, API testing)
|
|
518
|
+
- [ ] Custom agent templates
|
|
519
|
+
- [ ] Workflow visualization
|
|
520
|
+
- [ ] Integration with CI/CD
|
|
521
|
+
|
|
522
|
+
## Contributing
|
|
523
|
+
|
|
524
|
+
Contributions welcome:
|
|
525
|
+
- New agent definitions
|
|
526
|
+
- Improved stop hook prompts
|
|
527
|
+
- Additional skills and language standards
|
|
528
|
+
- Workflow patterns
|
|
529
|
+
- CLI tool development
|
|
530
|
+
|
|
531
|
+
## References
|
|
532
|
+
|
|
533
|
+
- [Claude Code Documentation](https://code.claude.com/docs)
|
|
534
|
+
- [Subagents Reference](https://code.claude.com/docs/en/sub-agents)
|
|
535
|
+
- [Hooks Reference](https://code.claude.com/docs/en/hooks)
|
|
536
|
+
- [Skills Reference](https://code.claude.com/docs/en/skills)
|
|
537
|
+
- [Playwright MCP](https://github.com/microsoft/playwright-mcp)
|
|
538
|
+
- [GitHub CLI](https://cli.github.com/)
|
|
539
|
+
- [Best Practices](https://www.anthropic.com/engineering/claude-code-best-practices)
|
|
540
|
+
|
|
541
|
+
## License
|
|
542
|
+
|
|
543
|
+
This project is licensed under the [MIT License](LICENSE).
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { parseArgs } from 'node:util';
|
|
4
|
+
import { init } from '../src/commands/init.js';
|
|
5
|
+
import { update } from '../src/commands/update.js';
|
|
6
|
+
import { status } from '../src/commands/status.js';
|
|
7
|
+
|
|
8
|
+
const helpText = `
|
|
9
|
+
automatasaurus - Claude Code automation framework
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
automatasaurus <command> [options]
|
|
13
|
+
|
|
14
|
+
Commands:
|
|
15
|
+
init Install automatasaurus into current project
|
|
16
|
+
update Update framework files to latest version
|
|
17
|
+
status Show installation status and version info
|
|
18
|
+
|
|
19
|
+
Options:
|
|
20
|
+
--help Show this help message
|
|
21
|
+
--force Force overwrite of modified files (update only)
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
npx automatasaurus init
|
|
25
|
+
npx automatasaurus update
|
|
26
|
+
npx automatasaurus update --force
|
|
27
|
+
npx automatasaurus status
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const { positionals, values } = parseArgs({
|
|
31
|
+
allowPositionals: true,
|
|
32
|
+
options: {
|
|
33
|
+
help: { type: 'boolean', short: 'h' },
|
|
34
|
+
force: { type: 'boolean', short: 'f' },
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const command = positionals[0];
|
|
39
|
+
|
|
40
|
+
if (values.help || !command) {
|
|
41
|
+
console.log(helpText);
|
|
42
|
+
process.exit(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const commands = {
|
|
46
|
+
init,
|
|
47
|
+
update,
|
|
48
|
+
status,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
if (!commands[command]) {
|
|
52
|
+
console.error(`Unknown command: ${command}`);
|
|
53
|
+
console.log(helpText);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
await commands[command]({ force: values.force });
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.error(`Error: ${error.message}`);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "automatasaurus",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Automated software development workflow powered by Claude Code",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"automatasaurus": "./bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"src/",
|
|
12
|
+
"template/",
|
|
13
|
+
"!**/*.test.js"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "node --test src/**/*.test.js"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"claude",
|
|
20
|
+
"claude-code",
|
|
21
|
+
"automation",
|
|
22
|
+
"ai",
|
|
23
|
+
"development"
|
|
24
|
+
],
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Stuart Williamson",
|
|
27
|
+
"email": "s.h.williamson@gmail.com",
|
|
28
|
+
"url": "https://github.com/shwilliamson"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/shwilliamson/automatasaurus"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/shwilliamson/automatasaurus#readme",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18.0.0"
|
|
38
|
+
}
|
|
39
|
+
}
|