murmur8 4.1.1 → 4.3.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/.blueprint/agents/AGENT_SPECIFICATION_ALEX.md +33 -3
- package/.blueprint/features/feature_config-factory/FEATURE_SPEC.md +138 -0
- package/.blueprint/features/feature_config-factory/IMPLEMENTATION_PLAN.md +187 -0
- package/.blueprint/features/feature_config-factory/handoff-nigel.md +57 -0
- package/.blueprint/features/feature_export-history/FEATURE_SPEC.md +215 -0
- package/.blueprint/features/feature_export-history/IMPLEMENTATION_PLAN.md +48 -0
- package/.blueprint/features/feature_export-history/story-basic-export.md +48 -0
- package/.blueprint/features/feature_export-history/story-date-filter.md +42 -0
- package/.blueprint/features/feature_export-history/story-feature-filter.md +42 -0
- package/.blueprint/features/feature_export-history/story-file-output.md +48 -0
- package/.blueprint/features/feature_export-history/story-status-filter.md +42 -0
- package/.blueprint/features/feature_extract-prompt-util/FEATURE_SPEC.md +42 -0
- package/.blueprint/features/feature_fix-status-icons/FEATURE_SPEC.md +37 -0
- package/.blueprint/features/feature_murm-subagent/FEATURE_SPEC.md +137 -0
- package/.blueprint/features/feature_murm-subagent/SKILL_CHANGES.md +345 -0
- package/.blueprint/features/feature_split-cli-commands/FEATURE_SPEC.md +125 -0
- package/.blueprint/features/feature_split-cli-commands/IMPLEMENTATION_PLAN.md +119 -0
- package/.blueprint/features/feature_split-cli-commands/handoff-nigel.md +45 -0
- package/.blueprint/features/feature_theme-adoption/FEATURE_SPEC.md +143 -0
- package/.blueprint/features/feature_theme-adoption/IMPLEMENTATION_PLAN.md +68 -0
- package/.blueprint/features/feature_theme-adoption/handoff-nigel.md +35 -0
- package/.blueprint/templates/BACKLOG_TEMPLATE.md +46 -0
- package/README.md +26 -10
- package/SKILL.md +377 -3
- package/bin/cli.js +20 -384
- package/package.json +1 -1
- package/src/commands/feedback-config.js +32 -0
- package/src/commands/help.js +81 -0
- package/src/commands/history.js +42 -0
- package/src/commands/init.js +12 -0
- package/src/commands/insights.js +23 -0
- package/src/commands/murm-config.js +52 -0
- package/src/commands/murm.js +109 -0
- package/src/commands/queue.js +19 -0
- package/src/commands/retry-config.js +28 -0
- package/src/commands/stack-config.js +32 -0
- package/src/commands/update.js +12 -0
- package/src/commands/utils.js +24 -0
- package/src/commands/validate.js +15 -0
- package/src/config-factory.js +190 -0
- package/src/feedback.js +5 -2
- package/src/history.js +92 -1
- package/src/init.js +1 -15
- package/src/insights.js +19 -16
- package/src/retry.js +5 -2
- package/src/stack.js +4 -1
- package/src/theme.js +4 -4
- package/src/update.js +2 -15
- package/src/utils.js +26 -0
- package/src/validate.js +5 -12
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Implementation Plan — Export Pipeline History
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Add `exportHistory()` function to `src/history.js` that reads pipeline history, applies optional filters (date range, status, feature slug), and outputs CSV or JSON. Wire `history export` subcommand in CLI to invoke this function with parsed flags.
|
|
6
|
+
|
|
7
|
+
## Files to Create/Modify
|
|
8
|
+
|
|
9
|
+
| Path | Action | Purpose |
|
|
10
|
+
|------|--------|---------|
|
|
11
|
+
| `src/history.js` | Modify | Add `exportHistory()` function with filtering, CSV/JSON formatting, file output |
|
|
12
|
+
| `bin/cli.js` | Modify | Add `export` subcommand to `history` handler, parse new flags |
|
|
13
|
+
|
|
14
|
+
## Implementation Steps
|
|
15
|
+
|
|
16
|
+
1. **Add date validation helper** in `src/history.js` — validate YYYY-MM-DD format, return Date or null
|
|
17
|
+
|
|
18
|
+
2. **Add CSV formatter** in `src/history.js` — convert entry array to CSV string with header row (slug, status, startedAt, completedAt, totalDurationMs, failedStage, pausedAfter), escape commas/quotes in values
|
|
19
|
+
|
|
20
|
+
3. **Add JSON formatter** in `src/history.js` — pretty-print array with 2-space indent
|
|
21
|
+
|
|
22
|
+
4. **Implement `exportHistory(options)` function** in `src/history.js`:
|
|
23
|
+
- Read history via `readHistoryFile()`
|
|
24
|
+
- Return `{ exitCode: 1, error: '...' }` if corrupted
|
|
25
|
+
- Apply filters: `since`, `until`, `status`, `feature` (all optional)
|
|
26
|
+
- Validate date formats and status values, return error if invalid
|
|
27
|
+
- Format output as CSV (default) or JSON based on `options.format`
|
|
28
|
+
- If `options.output`: write to file (create parent dirs), return `{ message: '...' }`
|
|
29
|
+
- Otherwise return `{ output: '...' }` for stdout
|
|
30
|
+
|
|
31
|
+
5. **Export `exportHistory`** from `src/history.js` module.exports
|
|
32
|
+
|
|
33
|
+
6. **Add export subcommand handling** in `bin/cli.js`:
|
|
34
|
+
- In `history` command handler, check if `subArg === 'export'`
|
|
35
|
+
- Parse flags: `--format=csv|json`, `--since=YYYY-MM-DD`, `--until=YYYY-MM-DD`, `--status=success|failed|paused`, `--feature=<slug>`, `--output=<path>`
|
|
36
|
+
- Call `exportHistory()` with options object
|
|
37
|
+
- Print `result.output` to stdout or `result.message` for file confirmation
|
|
38
|
+
- Exit with `result.exitCode` if error
|
|
39
|
+
|
|
40
|
+
7. **Update help text** in `showHelp()` to document `history export` and its flags
|
|
41
|
+
|
|
42
|
+
8. **Run tests** — `node --test test/feature_export-history.test.js`
|
|
43
|
+
|
|
44
|
+
## Risks/Questions
|
|
45
|
+
|
|
46
|
+
- CSV escaping edge case: slugs containing commas or quotes need proper RFC 4180 escaping (wrap in quotes, double internal quotes)
|
|
47
|
+
- Date filtering uses `completedAt` per spec; entries without `completedAt` should be excluded from date filters
|
|
48
|
+
- Empty/missing history file treated as empty array (not an error per spec)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Story — Basic Export
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to export pipeline history to CSV or JSON format so that I can analyze execution data in spreadsheets or integrate with external tools.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Acceptance criteria
|
|
10
|
+
|
|
11
|
+
**AC-1 — Default CSV export to stdout**
|
|
12
|
+
- Given the history file contains one or more entries,
|
|
13
|
+
- When I run `murmur8 history export`,
|
|
14
|
+
- Then the output is written to stdout in CSV format with a header row.
|
|
15
|
+
|
|
16
|
+
**AC-2 — Explicit CSV format selection**
|
|
17
|
+
- Given the history file contains entries,
|
|
18
|
+
- When I run `murmur8 history export --format=csv`,
|
|
19
|
+
- Then the output is CSV format with columns: slug, status, startedAt, completedAt, totalDurationMs, failedStage, pausedAfter.
|
|
20
|
+
|
|
21
|
+
**AC-3 — JSON format selection**
|
|
22
|
+
- Given the history file contains entries,
|
|
23
|
+
- When I run `murmur8 history export --format=json`,
|
|
24
|
+
- Then the output is a pretty-printed JSON array containing all history entries with their full structure.
|
|
25
|
+
|
|
26
|
+
**AC-4 — Empty history produces valid structure**
|
|
27
|
+
- Given the history file is empty or does not exist,
|
|
28
|
+
- When I run `murmur8 history export --format=csv`,
|
|
29
|
+
- Then the output is a CSV header row with no data rows.
|
|
30
|
+
|
|
31
|
+
**AC-5 — Empty history produces valid JSON**
|
|
32
|
+
- Given the history file is empty or does not exist,
|
|
33
|
+
- When I run `murmur8 history export --format=json`,
|
|
34
|
+
- Then the output is an empty JSON array `[]`.
|
|
35
|
+
|
|
36
|
+
**AC-6 — Corrupted history file handling**
|
|
37
|
+
- Given the history file contains invalid JSON,
|
|
38
|
+
- When I run `murmur8 history export`,
|
|
39
|
+
- Then the command exits with code 1 and displays an error message suggesting `history clear`.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Out of scope
|
|
44
|
+
|
|
45
|
+
- Exporting nested stage data in CSV (available in JSON only)
|
|
46
|
+
- Streaming output for large files
|
|
47
|
+
- Custom column selection
|
|
48
|
+
- Export of queue state or insights aggregations
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Story — Date Filtering
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to filter exported history by date range so that I can extract data for specific time periods for reporting or analysis.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Acceptance criteria
|
|
10
|
+
|
|
11
|
+
**AC-1 — Filter by since date**
|
|
12
|
+
- Given the history file contains entries from multiple dates,
|
|
13
|
+
- When I run `murmur8 history export --since=2024-01-15`,
|
|
14
|
+
- Then only entries where `completedAt >= 2024-01-15T00:00:00` (local time) are included in the output.
|
|
15
|
+
|
|
16
|
+
**AC-2 — Filter by until date**
|
|
17
|
+
- Given the history file contains entries from multiple dates,
|
|
18
|
+
- When I run `murmur8 history export --until=2024-01-20`,
|
|
19
|
+
- Then only entries where `completedAt <= 2024-01-20T23:59:59` (local time) are included in the output.
|
|
20
|
+
|
|
21
|
+
**AC-3 — Combined date range filter**
|
|
22
|
+
- Given the history file contains entries from multiple dates,
|
|
23
|
+
- When I run `murmur8 history export --since=2024-01-15 --until=2024-01-20`,
|
|
24
|
+
- Then only entries within the inclusive date range are included in the output.
|
|
25
|
+
|
|
26
|
+
**AC-4 — No matches returns empty result**
|
|
27
|
+
- Given the history file contains entries but none within the specified range,
|
|
28
|
+
- When I run `murmur8 history export --since=2099-01-01`,
|
|
29
|
+
- Then the output is a valid empty structure (CSV header only or empty JSON array).
|
|
30
|
+
|
|
31
|
+
**AC-5 — Invalid date format error**
|
|
32
|
+
- Given an invalid date format is provided,
|
|
33
|
+
- When I run `murmur8 history export --since=invalid-date`,
|
|
34
|
+
- Then the command exits with code 1 and displays a usage hint showing the expected YYYY-MM-DD format.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Out of scope
|
|
39
|
+
|
|
40
|
+
- Time-of-day filtering (only date precision)
|
|
41
|
+
- Timezone configuration (uses local timezone)
|
|
42
|
+
- Relative date expressions (e.g., "last week")
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Story — Feature Filtering
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to filter exported history by feature slug so that I can extract execution data for a specific feature across all its runs.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Acceptance criteria
|
|
10
|
+
|
|
11
|
+
**AC-1 — Filter by exact feature slug**
|
|
12
|
+
- Given the history file contains entries for multiple features,
|
|
13
|
+
- When I run `murmur8 history export --feature=user-auth`,
|
|
14
|
+
- Then only entries where `slug === 'user-auth'` are included in the output.
|
|
15
|
+
|
|
16
|
+
**AC-2 — Exact match only**
|
|
17
|
+
- Given the history file contains entries for "user-auth" and "user-auth-v2",
|
|
18
|
+
- When I run `murmur8 history export --feature=user-auth`,
|
|
19
|
+
- Then only entries with exact slug "user-auth" are included (not "user-auth-v2").
|
|
20
|
+
|
|
21
|
+
**AC-3 — No matches returns empty result**
|
|
22
|
+
- Given the history file contains entries but none matching the specified slug,
|
|
23
|
+
- When I run `murmur8 history export --feature=nonexistent`,
|
|
24
|
+
- Then the output is a valid empty structure (CSV header only or empty JSON array).
|
|
25
|
+
|
|
26
|
+
**AC-4 — Combine with other filters**
|
|
27
|
+
- Given the history file contains multiple entries for a feature with different statuses,
|
|
28
|
+
- When I run `murmur8 history export --feature=user-auth --status=failed`,
|
|
29
|
+
- Then only entries matching both the feature slug AND the status are included.
|
|
30
|
+
|
|
31
|
+
**AC-5 — Case-sensitive matching**
|
|
32
|
+
- Given the history file contains an entry with slug "User-Auth",
|
|
33
|
+
- When I run `murmur8 history export --feature=user-auth`,
|
|
34
|
+
- Then no entries are returned (matching is case-sensitive).
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Out of scope
|
|
39
|
+
|
|
40
|
+
- Substring or pattern matching
|
|
41
|
+
- Multiple feature slugs in a single filter
|
|
42
|
+
- Case-insensitive matching option
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Story — File Output
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to write exported history directly to a file so that I can save reports without shell redirection and receive confirmation of the write.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Acceptance criteria
|
|
10
|
+
|
|
11
|
+
**AC-1 — Write to specified file**
|
|
12
|
+
- Given the history file contains entries,
|
|
13
|
+
- When I run `murmur8 history export --output=report.csv`,
|
|
14
|
+
- Then the export is written to `report.csv` in the current directory.
|
|
15
|
+
|
|
16
|
+
**AC-2 — Success confirmation message**
|
|
17
|
+
- Given the export writes successfully,
|
|
18
|
+
- When I run `murmur8 history export --output=report.csv`,
|
|
19
|
+
- Then a confirmation message is displayed showing the file path and entry count.
|
|
20
|
+
|
|
21
|
+
**AC-3 — Create parent directories**
|
|
22
|
+
- Given the output path includes directories that do not exist,
|
|
23
|
+
- When I run `murmur8 history export --output=reports/2024/january.csv`,
|
|
24
|
+
- Then the parent directories are created and the file is written.
|
|
25
|
+
|
|
26
|
+
**AC-4 — Combine with format option**
|
|
27
|
+
- Given the history file contains entries,
|
|
28
|
+
- When I run `murmur8 history export --format=json --output=report.json`,
|
|
29
|
+
- Then the file contains JSON-formatted export data.
|
|
30
|
+
|
|
31
|
+
**AC-5 — File write error handling**
|
|
32
|
+
- Given the output path is not writable (e.g., permission denied),
|
|
33
|
+
- When I run `murmur8 history export --output=/readonly/report.csv`,
|
|
34
|
+
- Then the command exits with code 1 and displays a descriptive error message.
|
|
35
|
+
|
|
36
|
+
**AC-6 — Overwrite existing file**
|
|
37
|
+
- Given a file already exists at the output path,
|
|
38
|
+
- When I run `murmur8 history export --output=existing.csv`,
|
|
39
|
+
- Then the existing file is overwritten without prompting.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Out of scope
|
|
44
|
+
|
|
45
|
+
- Interactive overwrite confirmation
|
|
46
|
+
- Append mode for existing files
|
|
47
|
+
- Automatic file extension based on format
|
|
48
|
+
- Output to multiple files
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Story — Status Filtering
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to filter exported history by pipeline status so that I can analyze specific outcomes like failures or successful runs.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Acceptance criteria
|
|
10
|
+
|
|
11
|
+
**AC-1 — Filter by success status**
|
|
12
|
+
- Given the history file contains entries with mixed statuses,
|
|
13
|
+
- When I run `murmur8 history export --status=success`,
|
|
14
|
+
- Then only entries with `status === 'success'` are included in the output.
|
|
15
|
+
|
|
16
|
+
**AC-2 — Filter by failed status**
|
|
17
|
+
- Given the history file contains entries with mixed statuses,
|
|
18
|
+
- When I run `murmur8 history export --status=failed`,
|
|
19
|
+
- Then only entries with `status === 'failed'` are included in the output.
|
|
20
|
+
|
|
21
|
+
**AC-3 — Filter by paused status**
|
|
22
|
+
- Given the history file contains entries with mixed statuses,
|
|
23
|
+
- When I run `murmur8 history export --status=paused`,
|
|
24
|
+
- Then only entries with `status === 'paused'` are included in the output.
|
|
25
|
+
|
|
26
|
+
**AC-4 — No matches returns empty result**
|
|
27
|
+
- Given the history file contains entries but none with the specified status,
|
|
28
|
+
- When I run `murmur8 history export --status=failed`,
|
|
29
|
+
- Then the output is a valid empty structure (CSV header only or empty JSON array).
|
|
30
|
+
|
|
31
|
+
**AC-5 — Invalid status value error**
|
|
32
|
+
- Given an invalid status value is provided,
|
|
33
|
+
- When I run `murmur8 history export --status=unknown`,
|
|
34
|
+
- Then the command exits with code 1 and displays an error listing valid status values: success, failed, paused.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Out of scope
|
|
39
|
+
|
|
40
|
+
- Multiple status values in a single filter (e.g., `--status=success,failed`)
|
|
41
|
+
- Negation filters (e.g., exclude failed)
|
|
42
|
+
- Custom status values
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Feature Specification — Extract Prompt Utility
|
|
2
|
+
|
|
3
|
+
## 1. Feature Intent
|
|
4
|
+
|
|
5
|
+
The `prompt()` function is duplicated identically in `src/init.js` and `src/update.js`. Extract to a shared utility module to eliminate duplication and make the pattern reusable.
|
|
6
|
+
|
|
7
|
+
## 2. Scope
|
|
8
|
+
|
|
9
|
+
### In Scope
|
|
10
|
+
- Create `src/utils.js` with `prompt()` function
|
|
11
|
+
- Update `src/init.js` to import from utils.js
|
|
12
|
+
- Update `src/update.js` to import from utils.js
|
|
13
|
+
- Remove duplicate function definitions
|
|
14
|
+
|
|
15
|
+
### Out of Scope
|
|
16
|
+
- Adding new utility functions
|
|
17
|
+
- Changing prompt behavior
|
|
18
|
+
- Adding tests for prompt (interactive, hard to test)
|
|
19
|
+
|
|
20
|
+
## 3. Files to Modify
|
|
21
|
+
|
|
22
|
+
| File | Change |
|
|
23
|
+
|------|--------|
|
|
24
|
+
| `src/utils.js` | Create new file with prompt() |
|
|
25
|
+
| `src/init.js` | Remove prompt(), add import |
|
|
26
|
+
| `src/update.js` | Remove prompt(), add import |
|
|
27
|
+
|
|
28
|
+
## 4. Function Signature
|
|
29
|
+
|
|
30
|
+
```javascript
|
|
31
|
+
async function prompt(question) {
|
|
32
|
+
// Creates readline interface
|
|
33
|
+
// Asks question
|
|
34
|
+
// Returns answer.toLowerCase().trim()
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 5. Change Log
|
|
39
|
+
|
|
40
|
+
| Date | Change | Reason | Raised By |
|
|
41
|
+
|------|--------|--------|-----------|
|
|
42
|
+
| 2026-03-03 | Initial spec | DRY refactoring | Alex |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Feature Specification — Fix Status Icons
|
|
2
|
+
|
|
3
|
+
## 1. Feature Intent
|
|
4
|
+
|
|
5
|
+
The `STATUS_ICONS` object in `src/theme.js` uses legacy `parallel_*` keys, but the actual status strings in `src/murm.js` use `murm_*`. This creates a mismatch where icon lookups fail silently.
|
|
6
|
+
|
|
7
|
+
## 2. Scope
|
|
8
|
+
|
|
9
|
+
### In Scope
|
|
10
|
+
- Rename `parallel_queued` → `murm_queued`
|
|
11
|
+
- Rename `parallel_running` → `murm_running`
|
|
12
|
+
- Rename `parallel_complete` → `murm_complete`
|
|
13
|
+
- Rename `parallel_failed` → `murm_failed`
|
|
14
|
+
- Update tests that reference these keys
|
|
15
|
+
|
|
16
|
+
### Out of Scope
|
|
17
|
+
- Adding new icons
|
|
18
|
+
- Changing icon characters
|
|
19
|
+
- Refactoring theme.js structure
|
|
20
|
+
|
|
21
|
+
## 3. Actors
|
|
22
|
+
- **Developer**: Uses STATUS_ICONS for CLI output formatting
|
|
23
|
+
|
|
24
|
+
## 4. Behaviour Overview
|
|
25
|
+
After this change, `STATUS_ICONS[status]` will return the correct icon when `status` is one of the `murm_*` values from the state machine.
|
|
26
|
+
|
|
27
|
+
## 5. Files to Modify
|
|
28
|
+
| File | Change |
|
|
29
|
+
|------|--------|
|
|
30
|
+
| `src/theme.js` | Rename 4 keys in STATUS_ICONS |
|
|
31
|
+
| `test/feature_murmuration-theme.test.js` | Update key references |
|
|
32
|
+
| `test/feature_theme-adoption.test.js` | Update key references |
|
|
33
|
+
|
|
34
|
+
## 6. Change Log
|
|
35
|
+
| Date | Change | Reason | Raised By |
|
|
36
|
+
|------|--------|--------|-----------|
|
|
37
|
+
| 2026-03-03 | Initial spec | Complete v4.0 murm theming | Alex |
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Feature Specification — Murmuration Sub-Agent Architecture
|
|
2
|
+
|
|
3
|
+
## 1. Feature Intent
|
|
4
|
+
**Why this feature exists.**
|
|
5
|
+
|
|
6
|
+
- Current murmuration spawns separate CLI processes (`npx claude`) which fails inside existing Claude sessions
|
|
7
|
+
- The `/implement-feature` skill already uses Task sub-agents for Alex/Cass/Nigel/Codey
|
|
8
|
+
- Extending this pattern to run multiple feature pipelines in parallel is natural and efficient
|
|
9
|
+
- Enables true parallel execution without leaving the current Claude Code session
|
|
10
|
+
|
|
11
|
+
> This feature changes how murmuration works: from process spawning to Task sub-agent orchestration.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Scope
|
|
16
|
+
### In Scope
|
|
17
|
+
- Modify SKILL.md to accept multiple slugs
|
|
18
|
+
- Add worktree creation/cleanup logic to the skill
|
|
19
|
+
- Spawn parallel Task sub-agents (one full pipeline per feature)
|
|
20
|
+
- Merge results back to main branch
|
|
21
|
+
- Handle conflicts and failures gracefully
|
|
22
|
+
|
|
23
|
+
### Out of Scope
|
|
24
|
+
- Changing the single-feature pipeline flow
|
|
25
|
+
- Removing CLI process spawning (keep for CI/automation use cases)
|
|
26
|
+
- Adding new agent types
|
|
27
|
+
- Changing worktree locations or branch naming
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 3. Actors Involved
|
|
32
|
+
|
|
33
|
+
- **User**: Invokes `/implement-feature slug-a slug-b slug-c`
|
|
34
|
+
- **Orchestrator (Claude)**: Reads skill, creates worktrees, spawns parallel Tasks
|
|
35
|
+
- **Task Sub-agents**: Each runs a complete pipeline in isolation
|
|
36
|
+
- **Git**: Provides worktree isolation and branch merging
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 4. Behaviour Overview
|
|
41
|
+
|
|
42
|
+
**Single slug (existing):**
|
|
43
|
+
```
|
|
44
|
+
/implement-feature "slug"
|
|
45
|
+
→ Sequential: Alex → Cass → Nigel → Codey
|
|
46
|
+
→ Commit to current branch
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Multiple slugs (new):**
|
|
50
|
+
```
|
|
51
|
+
/implement-feature slug-a slug-b slug-c
|
|
52
|
+
→ Create worktrees for isolation
|
|
53
|
+
→ Parallel Tasks: each runs full pipeline
|
|
54
|
+
→ Merge successful branches to main
|
|
55
|
+
→ Cleanup worktrees
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 5. State & Lifecycle Interactions
|
|
61
|
+
|
|
62
|
+
- **Worktree creation**: New state - `.claude/worktrees/feat-{slug}/`
|
|
63
|
+
- **Branch creation**: New branches `feature/{slug}` per feature
|
|
64
|
+
- **Merge state**: Successful features merged to main
|
|
65
|
+
- **Conflict state**: Failed merges preserved for manual resolution
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 6. Rules & Decision Logic
|
|
70
|
+
|
|
71
|
+
| Rule | Description |
|
|
72
|
+
|------|-------------|
|
|
73
|
+
| Multi-feature detection | `slugs.length > 1` triggers murmuration mode |
|
|
74
|
+
| Worktree isolation | Each feature gets dedicated worktree |
|
|
75
|
+
| Parallel execution | All Task sub-agents spawned in single message |
|
|
76
|
+
| No cross-contamination | Sub-agents work only in their worktree |
|
|
77
|
+
| Merge order | First-completed = first-merged |
|
|
78
|
+
| Conflict handling | Preserve branch, don't force |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 7. Dependencies
|
|
83
|
+
|
|
84
|
+
- Git 2.5+ (worktree support)
|
|
85
|
+
- Clean working tree before starting
|
|
86
|
+
- Task tool supports concurrent invocations
|
|
87
|
+
- Sufficient context window for multiple sub-agent prompts
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 8. Non-Functional Considerations
|
|
92
|
+
|
|
93
|
+
- **Context usage**: Each parallel Task adds ~2-3k tokens to the prompt
|
|
94
|
+
- **Parallelism limit**: Recommend max 3-5 concurrent features
|
|
95
|
+
- **Failure isolation**: One feature's failure doesn't affect others
|
|
96
|
+
- **Recovery**: Failed worktrees preserved for debugging/retry
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 9. Assumptions & Open Questions
|
|
101
|
+
|
|
102
|
+
**Assumptions:**
|
|
103
|
+
- Task tool executes concurrent calls truly in parallel
|
|
104
|
+
- Sub-agents can write to worktree paths
|
|
105
|
+
- Git merge from worktree branches works as expected
|
|
106
|
+
|
|
107
|
+
**Open Questions:**
|
|
108
|
+
- What's the practical limit on concurrent Task sub-agents?
|
|
109
|
+
- Should there be a `--max-concurrency` flag?
|
|
110
|
+
- How to handle partial success (some merge, some conflict)?
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 10. Impact on System Specification
|
|
115
|
+
|
|
116
|
+
- Extends the skill's capabilities without changing core agent behavior
|
|
117
|
+
- Murmuration becomes an in-session feature rather than external process
|
|
118
|
+
- CLI `murm` command could detect in-session mode and delegate to skill
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 11. Handover to BA (Cass)
|
|
123
|
+
|
|
124
|
+
**Skip Cass stage** — this is a technical/infrastructure feature.
|
|
125
|
+
|
|
126
|
+
Direct handover to Nigel:
|
|
127
|
+
- Test multi-slug parsing
|
|
128
|
+
- Test worktree creation/cleanup
|
|
129
|
+
- Test parallel execution (mock Task tool)
|
|
130
|
+
- Test merge success/conflict handling
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 12. Change Log
|
|
135
|
+
| Date | Change | Reason | Raised By |
|
|
136
|
+
|------|--------|--------|-----------|
|
|
137
|
+
| 2026-03-03 | Initial spec | Enable parallel features via sub-agents | Alex |
|