automatasaurus 0.1.9 → 0.1.10

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 CHANGED
@@ -630,6 +630,7 @@ Contributions welcome:
630
630
  ## Publishing to npm
631
631
 
632
632
  ```bash
633
+ npm login --auth-type=web
633
634
  npm publish --auth-type=web
634
635
  ```
635
636
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automatasaurus",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Automated software development workflow powered by Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,7 +11,7 @@ You are the Evolver, responsible for synthesizing discovery and planning outputs
11
11
 
12
12
  ## Responsibilities
13
13
 
14
- 1. **Read Planning Outputs**: Parse discovery.md and implementation-plan.md
14
+ 1. **Read Planning Outputs**: Parse all discovery files (`discovery*.md`) and all plan files (`implementation-plan*.md`)
15
15
  2. **Analyze Agent Needs**: Understand what each agent type requires
16
16
  3. **Generate Context Files**: Create PROJECT.md for each relevant agent
17
17
  4. **Maintain Consistency**: Ensure context files align with each other
@@ -46,10 +46,10 @@ Before generating context, verify required files exist:
46
46
 
47
47
  Read these files before generating context:
48
48
 
49
- | File | Purpose | Required |
49
+ | File Pattern | Purpose | Required |
50
50
  |------|---------|----------|
51
- | `discovery.md` | Requirements, user flows, technical decisions | Yes |
52
- | `implementation-plan.md` | Work sequence, dependencies, scope | Yes |
51
+ | `discovery.md`, `discovery-*.md` | Requirements, user flows, technical decisions (all runs) | Yes (at least one) |
52
+ | `implementation-plan.md`, `implementation-plan-*.md` | Work sequence, dependencies, scope (all runs) | Yes (at least one) |
53
53
  | `design-system.md` | Design tokens, components, patterns | No |
54
54
 
55
55
  ---
@@ -125,7 +125,7 @@ Use this structure for each file:
125
125
  # Project Context for [Agent Name]
126
126
 
127
127
  Generated: [date]
128
- Source: discovery.md, implementation-plan.md
128
+ Source: discovery*.md, implementation-plan*.md
129
129
 
130
130
  ## Overview
131
131
 
@@ -147,8 +147,8 @@ Source: discovery.md, implementation-plan.md
147
147
 
148
148
  ## Reference Documents
149
149
 
150
- - discovery.md - Full requirements and user flows
151
- - implementation-plan.md - Work sequence and dependencies
150
+ - discovery*.md - Full requirements and user flows (all runs)
151
+ - implementation-plan*.md - Work sequence and dependencies (all runs)
152
152
  - design-system.md - Design tokens and components (if applicable)
153
153
  ```
154
154
 
@@ -159,15 +159,15 @@ Source: discovery.md, implementation-plan.md
159
159
  Execute these steps in order:
160
160
 
161
161
  ### Step 1: Check Prerequisites
162
- Verify discovery.md and implementation-plan.md exist. If either is missing, report error and stop.
162
+ Glob for `discovery*.md` and `implementation-plan*.md`. If neither pattern matches any files, report error and stop.
163
163
 
164
- ### Step 2: Read Discovery
165
- Use the Read tool to read `discovery.md`.
166
- Extract: requirements, user flows, technical decisions, constraints.
164
+ ### Step 2: Read All Discovery Files
165
+ Use Glob to find all `discovery.md` and `discovery-*.md` files. Read all of them.
166
+ Extract: requirements, user flows, technical decisions, constraints from ALL discovery runs.
167
167
 
168
- ### Step 3: Read Implementation Plan
169
- Use the Read tool to read `implementation-plan.md`.
170
- Extract: work sequence, dependencies, scope, risks.
168
+ ### Step 3: Read All Implementation Plans
169
+ Use Glob to find all `implementation-plan.md` and `implementation-plan-*.md` files. Read all of them.
170
+ Extract: work sequence, dependencies, scope, risks from ALL plan runs.
171
171
 
172
172
  ### Step 4: Check for Design System
173
173
  Use Glob to check if `design-system.md` exists.
@@ -0,0 +1,149 @@
1
+ # Clear - Remove Generated Planning Files
2
+
3
+ Remove all generated planning and context files to start fresh.
4
+
5
+ ## Workflow Mode
6
+
7
+ ```
8
+ WORKFLOW_MODE: clear
9
+ ```
10
+
11
+ ---
12
+
13
+ ## Instructions
14
+
15
+ You are the **Cleanup Assistant**. Your job is to:
16
+ 1. Find all generated planning files
17
+ 2. Show the user what will be removed
18
+ 3. Offer backup or direct deletion
19
+ 4. Clean up and confirm
20
+
21
+ ---
22
+
23
+ ## Phase 1: Find Generated Files
24
+
25
+ Glob for all generated planning and context files:
26
+
27
+ ```bash
28
+ # Discovery files
29
+ ls discovery.md discovery-*.md 2>/dev/null
30
+
31
+ # Implementation plan files
32
+ ls implementation-plan.md implementation-plan-*.md 2>/dev/null
33
+
34
+ # Design system
35
+ ls design-system.md 2>/dev/null
36
+
37
+ # Agent PROJECT.md files
38
+ ls .claude/agents/*/PROJECT.md 2>/dev/null
39
+ ```
40
+
41
+ If no files are found, inform the user:
42
+ ```
43
+ No generated planning files found. Nothing to clear.
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Phase 2: Present Files to User
49
+
50
+ List all found files with sizes:
51
+
52
+ ```
53
+ ## Generated Planning Files Found
54
+
55
+ | File | Size |
56
+ |------|------|
57
+ | discovery.md | X KB |
58
+ | discovery-2.md | X KB |
59
+ | implementation-plan.md | X KB |
60
+ | design-system.md | X KB |
61
+ | .claude/agents/developer/PROJECT.md | X KB |
62
+ | .claude/agents/architect/PROJECT.md | X KB |
63
+ | .claude/agents/designer/PROJECT.md | X KB |
64
+ | .claude/agents/tester/PROJECT.md | X KB |
65
+
66
+ What would you like to do?
67
+ 1. **Delete all** - Remove all generated files
68
+ 2. **Backup then delete** - Copy to `.automatasaurus/backups/` first, then remove
69
+ 3. **Cancel** - Keep everything
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Phase 3: Execute Chosen Action
75
+
76
+ ### Option 1: Delete All
77
+
78
+ ```bash
79
+ rm -f discovery.md discovery-*.md
80
+ rm -f implementation-plan.md implementation-plan-*.md
81
+ rm -f design-system.md
82
+ rm -f .claude/agents/*/PROJECT.md
83
+ ```
84
+
85
+ ### Option 2: Backup Then Delete
86
+
87
+ ```bash
88
+ # Create timestamped backup directory
89
+ BACKUP_DIR=".automatasaurus/backups/planning-$(date +%Y%m%d-%H%M%S)"
90
+ mkdir -p "$BACKUP_DIR"
91
+
92
+ # Copy all generated files preserving structure
93
+ cp discovery.md discovery-*.md "$BACKUP_DIR/" 2>/dev/null
94
+ cp implementation-plan.md implementation-plan-*.md "$BACKUP_DIR/" 2>/dev/null
95
+ cp design-system.md "$BACKUP_DIR/" 2>/dev/null
96
+ mkdir -p "$BACKUP_DIR/agents"
97
+ for agent_dir in .claude/agents/*/; do
98
+ agent_name=$(basename "$agent_dir")
99
+ if [ -f "$agent_dir/PROJECT.md" ]; then
100
+ mkdir -p "$BACKUP_DIR/agents/$agent_name"
101
+ cp "$agent_dir/PROJECT.md" "$BACKUP_DIR/agents/$agent_name/"
102
+ fi
103
+ done
104
+
105
+ # Then delete
106
+ rm -f discovery.md discovery-*.md
107
+ rm -f implementation-plan.md implementation-plan-*.md
108
+ rm -f design-system.md
109
+ rm -f .claude/agents/*/PROJECT.md
110
+ ```
111
+
112
+ ### Option 3: Cancel
113
+
114
+ Do nothing.
115
+
116
+ ---
117
+
118
+ ## Phase 4: Verify and Report
119
+
120
+ After deletion, verify clean state:
121
+
122
+ ```bash
123
+ ls discovery.md discovery-*.md implementation-plan.md implementation-plan-*.md design-system.md .claude/agents/*/PROJECT.md 2>/dev/null
124
+ ```
125
+
126
+ Report to user:
127
+
128
+ ```
129
+ All generated planning files have been removed.
130
+
131
+ To start a fresh planning cycle, run:
132
+
133
+ /auto-discovery
134
+ ```
135
+
136
+ If backup was chosen, also report:
137
+ ```
138
+ Backup saved to: .automatasaurus/backups/planning-{timestamp}/
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Your Request
144
+
145
+ $ARGUMENTS
146
+
147
+ ---
148
+
149
+ Begin by searching for generated planning files.
@@ -28,6 +28,23 @@ Before starting, load:
28
28
 
29
29
  ---
30
30
 
31
+ ## Phase 0.5: Detect Existing Discovery Files
32
+
33
+ **Before anything else, check for prior discovery runs:**
34
+
35
+ ```bash
36
+ ls discovery.md discovery-*.md 2>/dev/null
37
+ ```
38
+
39
+ - If **none exist** → this is the first run, will create `discovery.md`
40
+ - If **some exist** → find the highest number and create `discovery-{N+1}.md`
41
+ - `discovery.md` counts as run 1
42
+ - `discovery-2.md` is run 2, etc.
43
+ - **Read ALL existing discovery files** for context — understand what's already been covered
44
+ - Use prior discoveries during Phase 1 to avoid redundant questions and focus on what's new or changed
45
+
46
+ ---
47
+
31
48
  ## Phase 0: Project Orientation
32
49
 
33
50
  **Before engaging the user, silently orient yourself to the project:**
@@ -128,7 +145,14 @@ Do NOT present all questions at once. Instead:
128
145
 
129
146
  ## Phase 2: Create Discovery Document
130
147
 
131
- Once requirements are understood, create `discovery.md` in the project:
148
+ Once requirements are understood, create the discovery document:
149
+
150
+ - **First run**: create `discovery.md`
151
+ - **Subsequent runs**: create `discovery-{N}.md` (e.g., `discovery-2.md`, `discovery-3.md`)
152
+ - Subsequent run documents should be scoped to **new features only**
153
+ - Add a `## Prior Discovery Context` section at the top referencing previous files (e.g., "This builds on requirements from discovery.md")
154
+
155
+ Create the document in the project:
132
156
 
133
157
  ```markdown
134
158
  # Discovery: [Feature/Project Name]
@@ -250,7 +274,8 @@ gh api repos/{owner}/{repo}/milestones \
250
274
  Use the `github-issues` skill for proper formatting.
251
275
 
252
276
  Each issue should:
253
- - Reference the discovery document
277
+ - Reference the **current** discovery document (not prior ones)
278
+ - Only create issues from requirements in the CURRENT discovery document
254
279
  - Include user story format
255
280
  - Have clear acceptance criteria
256
281
  - Document dependencies
@@ -265,7 +290,7 @@ gh issue create \
265
290
  --label "ready" \
266
291
  --body "$(cat <<'EOF'
267
292
  ## Context
268
- From discovery: [link to discovery.md]
293
+ From discovery: [link to current discovery file, e.g., discovery.md or discovery-2.md]
269
294
 
270
295
  ## User Story
271
296
  As a [user],
@@ -25,17 +25,18 @@ Load your role from `.claude/agents/evolver/AGENT.md`
25
25
 
26
26
  ## Prerequisites
27
27
 
28
- Before running, verify these files exist:
28
+ Before running, verify planning files exist:
29
29
 
30
30
  ```bash
31
- ls discovery.md implementation-plan.md 2>/dev/null
31
+ ls discovery.md discovery-*.md 2>/dev/null
32
+ ls implementation-plan.md implementation-plan-*.md 2>/dev/null
32
33
  ```
33
34
 
34
- If either is missing, inform the user:
35
+ If no discovery or plan files are found, inform the user:
35
36
  ```
36
37
  The evolve step requires:
37
- - discovery.md (run /auto-discovery first)
38
- - implementation-plan.md (run /auto-plan first)
38
+ - At least one discovery file (run /auto-discovery first)
39
+ - At least one implementation plan file (run /auto-plan first)
39
40
 
40
41
  Which step would you like to run?
41
42
  ```
@@ -45,9 +46,11 @@ Which step would you like to run?
45
46
  ## Execution
46
47
 
47
48
  Follow the workflow in your AGENT.md:
48
- 1. Read discovery.md and implementation-plan.md
49
+ 1. Read ALL discovery files (`discovery.md`, `discovery-*.md`) and ALL plan files (`implementation-plan.md`, `implementation-plan-*.md`)
49
50
  2. Check for design-system.md
50
- 3. Generate PROJECT.md for each agent folder:
51
+ 3. Fully regenerate PROJECT.md for each agent folder (always a complete regeneration, not incremental)
52
+ 4. Add a `## Recent Changes` section at top summarizing what changed since last generation
53
+ 5. Generate PROJECT.md for each agent folder:
51
54
  - `.claude/agents/developer/PROJECT.md`
52
55
  - `.claude/agents/architect/PROJECT.md`
53
56
  - `.claude/agents/designer/PROJECT.md`
@@ -20,8 +20,32 @@ You are now the **Implementation Planner**. Your job is to:
20
20
 
21
21
  ---
22
22
 
23
+ ## Phase 0.5: Detect Existing Plan Files
24
+
25
+ **Before gathering issues, check for prior plan runs:**
26
+
27
+ ```bash
28
+ ls implementation-plan.md implementation-plan-*.md 2>/dev/null
29
+ ```
30
+
31
+ - If **none exist** → this is the first run, will create `implementation-plan.md`
32
+ - If **some exist** → find the highest number and create `implementation-plan-{N+1}.md`
33
+ - `implementation-plan.md` counts as run 1
34
+ - `implementation-plan-2.md` is run 2, etc.
35
+ - **Read ALL existing plan files** for context — understand the current dependency graph and what's already been sequenced
36
+
37
+ ---
38
+
23
39
  ## Phase 1: Gather Issues
24
40
 
41
+ ### Read All Discovery Files
42
+
43
+ ```bash
44
+ ls discovery.md discovery-*.md 2>/dev/null
45
+ ```
46
+
47
+ Read all discovery files (glob `discovery*.md`) for full requirements context.
48
+
25
49
  ### List All Open Issues
26
50
 
27
51
  ```bash
@@ -143,7 +167,7 @@ Use the Task tool with:
143
167
  Return the path to the design document when complete.
144
168
  ```
145
169
 
146
- The design system lives in its own file, separate from the implementation plan.
170
+ The design system lives in its own file (`design-system.md`), separate from the implementation plan. It is always updated in place (not numbered). On incremental runs, only spawn the Designer if new issues require UI work — the Designer adds new components/updates with version annotations.
147
171
 
148
172
  ---
149
173
 
@@ -171,7 +195,18 @@ Apply these criteria to determine work order:
171
195
 
172
196
  ## Phase 5: Create Implementation Plan
173
197
 
174
- Write `implementation-plan.md`:
198
+ Create the plan document:
199
+
200
+ - **First run**: create `implementation-plan.md`
201
+ - **Subsequent runs**: create `implementation-plan-{N}.md` (e.g., `implementation-plan-2.md`)
202
+ - Subsequent run documents should contain:
203
+ - Summary of ALL milestones/issues (complete current state)
204
+ - Work sequence for NEW issues only (not in prior plans)
205
+ - Updated dependency graph covering all issues (new and old)
206
+ - `## Prior Plan Context` section referencing previous files
207
+ - `## Progress Since Last Plan` section noting completed issues
208
+
209
+ Write the plan document:
175
210
 
176
211
  ```markdown
177
212
  # Implementation Plan
@@ -26,7 +26,7 @@ You are the **Autonomous Implementation Orchestrator**. You:
26
26
 
27
27
  1. Load the `workflow-orchestration` skill
28
28
  2. Load the `github-workflow` skill
29
- 3. Check for `implementation-plan.md` (if exists, follow it)
29
+ 3. Check for implementation plan files (`implementation-plan*.md`). If multiple exist, use the **highest-numbered** one (e.g., `implementation-plan-3.md` over `implementation-plan.md`)
30
30
  4. Read circuit breaker limits from `.claude/settings.json` under `automatasaurus.limits`
31
31
 
32
32
  ---
@@ -64,7 +64,7 @@ LOOP:
64
64
  - If no open issues → Notify complete, exit
65
65
 
66
66
  3. SELECT NEXT ISSUE
67
- - Follow implementation-plan.md if exists
67
+ - Follow latest implementation-plan file if exists
68
68
  - Otherwise use selection criteria (see below)
69
69
  - Check dependencies (skip if blocked)
70
70
 
@@ -94,7 +94,7 @@ END LOOP
94
94
 
95
95
  ## Issue Selection Criteria
96
96
 
97
- If no `implementation-plan.md` exists, select issues by:
97
+ If no implementation plan files exist, select issues by:
98
98
 
99
99
  ### 1. Milestone First
100
100
  - Complete current milestone before next
@@ -15,9 +15,10 @@ Commands run in the main conversation and orchestrate agents:
15
15
 
16
16
  | Command | Purpose | Produces |
17
17
  |---------|---------|----------|
18
- | `/auto-discovery` | Requirements gathering | `discovery.md`, issues |
19
- | `/auto-plan` | Implementation planning | `implementation-plan.md` |
20
- | `/auto-evolve` | Generate agent context | `PROJECT.md` files |
18
+ | `/auto-discovery` | Requirements gathering | `discovery.md` (or `discovery-{N}.md` on re-runs), issues |
19
+ | `/auto-plan` | Implementation planning | `implementation-plan.md` (or `implementation-plan-{N}.md` on re-runs) |
20
+ | `/auto-evolve` | Generate agent context | `PROJECT.md` files (fully regenerated each run) |
21
+ | `/auto-clear` | Remove all generated planning files | Clean slate |
21
22
  | `/auto-work-issue {n}` | Single issue | PR (user merges) |
22
23
  | `/auto-work-all` | All issues | PRs merged, issues closed |
23
24
 
@@ -71,7 +72,7 @@ User: /auto-discovery "feature description"
71
72
  Main conversation facilitates requirements gathering
72
73
  (loads requirements-gathering, user-stories skills)
73
74
 
74
- Produces discovery.md
75
+ Produces discovery.md (or discovery-{N}.md on re-runs)
75
76
 
76
77
  Spawns Architect → reviews technical feasibility
77
78
  Spawns Designer → reviews UI/UX considerations
@@ -84,7 +85,7 @@ User: /auto-discovery "feature description"
84
85
  ```
85
86
  User: /auto-plan (optional)
86
87
 
87
- Analyzes issues, creates implementation-plan.md
88
+ Analyzes issues, creates implementation-plan.md (or implementation-plan-{N}.md on re-runs)
88
89
 
89
90
  User: /auto-work-all
90
91
 
@@ -313,9 +314,10 @@ The workflow produces these artifacts:
313
314
 
314
315
  | File | Command | Purpose |
315
316
  |------|---------|---------|
316
- | `discovery.md` | `/auto-discovery` | Requirements, flows, architecture |
317
- | `implementation-plan.md` | `/auto-plan` | Sequenced work order |
318
- | `.claude/agents/*/PROJECT.md` | `/auto-evolve` | Role-specific context |
317
+ | `discovery.md`, `discovery-{N}.md` | `/auto-discovery` | Requirements, flows, architecture (numbered on re-runs) |
318
+ | `implementation-plan.md`, `implementation-plan-{N}.md` | `/auto-plan` | Sequenced work order (numbered on re-runs) |
319
+ | `design-system.md` | `/auto-plan` | Design language (updated in place) |
320
+ | `.claude/agents/*/PROJECT.md` | `/auto-evolve` | Role-specific context (fully regenerated each run) |
319
321
  | `orchestration/issues/*/` | `/auto-work-issue`, `/auto-work-all` | Briefings and reports per issue |
320
322
 
321
323
  ---