murmur8 3.5.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_BA_CASS.md +239 -0
- package/.blueprint/agents/AGENT_DEVELOPER_CODEY.md +308 -0
- package/.blueprint/agents/AGENT_SPECIFICATION_ALEX.md +183 -0
- package/.blueprint/agents/AGENT_TESTER_NIGEL.md +159 -0
- package/.blueprint/agents/GUARDRAILS.md +83 -0
- package/.blueprint/agents/TEAM_MANIFESTO.md +91 -0
- package/.blueprint/features/.gitkeep +0 -0
- package/.blueprint/features/feature_adaptive-retry/FEATURE_SPEC.md +239 -0
- package/.blueprint/features/feature_adaptive-retry/IMPLEMENTATION_PLAN.md +48 -0
- package/.blueprint/features/feature_adaptive-retry/story-prompt-modification.md +85 -0
- package/.blueprint/features/feature_adaptive-retry/story-retry-config.md +89 -0
- package/.blueprint/features/feature_adaptive-retry/story-should-retry.md +98 -0
- package/.blueprint/features/feature_adaptive-retry/story-strategy-recommendation.md +85 -0
- package/.blueprint/features/feature_agent-guardrails/FEATURE_SPEC.md +328 -0
- package/.blueprint/features/feature_agent-guardrails/IMPLEMENTATION_PLAN.md +90 -0
- package/.blueprint/features/feature_agent-guardrails/story-citation-requirements.md +50 -0
- package/.blueprint/features/feature_agent-guardrails/story-confidentiality.md +50 -0
- package/.blueprint/features/feature_agent-guardrails/story-escalation-protocol.md +55 -0
- package/.blueprint/features/feature_agent-guardrails/story-source-restrictions.md +50 -0
- package/.blueprint/features/feature_compressed-feedback/FEATURE_SPEC.md +136 -0
- package/.blueprint/features/feature_compressed-feedback/IMPLEMENTATION_PLAN.md +40 -0
- package/.blueprint/features/feature_feedback-loop/FEATURE_SPEC.md +347 -0
- package/.blueprint/features/feature_feedback-loop/IMPLEMENTATION_PLAN.md +71 -0
- package/.blueprint/features/feature_feedback-loop/story-feedback-collection.md +63 -0
- package/.blueprint/features/feature_feedback-loop/story-feedback-config.md +61 -0
- package/.blueprint/features/feature_feedback-loop/story-feedback-insights.md +63 -0
- package/.blueprint/features/feature_feedback-loop/story-quality-gates.md +57 -0
- package/.blueprint/features/feature_interactive-alex/FEATURE_SPEC.md +263 -0
- package/.blueprint/features/feature_interactive-alex/IMPLEMENTATION_PLAN.md +69 -0
- package/.blueprint/features/feature_interactive-alex/handoff-alex.md +19 -0
- package/.blueprint/features/feature_interactive-alex/handoff-cass.md +21 -0
- package/.blueprint/features/feature_interactive-alex/handoff-nigel.md +19 -0
- package/.blueprint/features/feature_interactive-alex/story-flag-routing.md +54 -0
- package/.blueprint/features/feature_interactive-alex/story-iterative-drafting.md +65 -0
- package/.blueprint/features/feature_interactive-alex/story-pipeline-integration.md +66 -0
- package/.blueprint/features/feature_interactive-alex/story-session-lifecycle.md +75 -0
- package/.blueprint/features/feature_interactive-alex/story-system-spec-creation.md +57 -0
- package/.blueprint/features/feature_lazy-business-context/FEATURE_SPEC.md +140 -0
- package/.blueprint/features/feature_lazy-business-context/IMPLEMENTATION_PLAN.md +54 -0
- package/.blueprint/features/feature_model-native-features/FEATURE_SPEC.md +174 -0
- package/.blueprint/features/feature_model-native-features/IMPLEMENTATION_PLAN.md +45 -0
- package/.blueprint/features/feature_parallel-abort/FEATURE_SPEC.md +117 -0
- package/.blueprint/features/feature_parallel-confirm/FEATURE_SPEC.md +90 -0
- package/.blueprint/features/feature_parallel-features/FEATURE_SPEC.md +291 -0
- package/.blueprint/features/feature_parallel-features/IMPLEMENTATION_PLAN.md +73 -0
- package/.blueprint/features/feature_parallel-lock/FEATURE_SPEC.md +119 -0
- package/.blueprint/features/feature_parallel-logging/FEATURE_SPEC.md +105 -0
- package/.blueprint/features/feature_parallel-preflight/FEATURE_SPEC.md +141 -0
- package/.blueprint/features/feature_pipeline-history/FEATURE_SPEC.md +239 -0
- package/.blueprint/features/feature_pipeline-history/IMPLEMENTATION_PLAN.md +71 -0
- package/.blueprint/features/feature_pipeline-history/story-clear-history.md +73 -0
- package/.blueprint/features/feature_pipeline-history/story-display-history.md +75 -0
- package/.blueprint/features/feature_pipeline-history/story-record-execution.md +76 -0
- package/.blueprint/features/feature_pipeline-history/story-show-statistics.md +85 -0
- package/.blueprint/features/feature_pipeline-insights/FEATURE_SPEC.md +288 -0
- package/.blueprint/features/feature_pipeline-insights/IMPLEMENTATION_PLAN.md +65 -0
- package/.blueprint/features/feature_pipeline-insights/story-anomaly-detection.md +71 -0
- package/.blueprint/features/feature_pipeline-insights/story-bottleneck-analysis.md +75 -0
- package/.blueprint/features/feature_pipeline-insights/story-failure-patterns.md +75 -0
- package/.blueprint/features/feature_pipeline-insights/story-json-output.md +75 -0
- package/.blueprint/features/feature_pipeline-insights/story-trend-analysis.md +78 -0
- package/.blueprint/features/feature_shared-guardrails/FEATURE_SPEC.md +119 -0
- package/.blueprint/features/feature_shared-guardrails/IMPLEMENTATION_PLAN.md +34 -0
- package/.blueprint/features/feature_shared-guardrails/story-extract-guardrails.md +60 -0
- package/.blueprint/features/feature_shared-guardrails/story-update-init-commands.md +63 -0
- package/.blueprint/features/feature_slim-agent-prompts/FEATURE_SPEC.md +145 -0
- package/.blueprint/features/feature_slim-agent-prompts/IMPLEMENTATION_PLAN.md +87 -0
- package/.blueprint/features/feature_slim-agent-prompts/story-create-runtime-prompt-template.md +59 -0
- package/.blueprint/features/feature_slim-agent-prompts/story-create-slim-agent-prompts.md +65 -0
- package/.blueprint/features/feature_slim-agent-prompts/story-skill-integration.md +53 -0
- package/.blueprint/features/feature_smart-story-routing/FEATURE_SPEC.md +147 -0
- package/.blueprint/features/feature_smart-story-routing/IMPLEMENTATION_PLAN.md +73 -0
- package/.blueprint/features/feature_template-extraction/FEATURE_SPEC.md +134 -0
- package/.blueprint/features/feature_template-extraction/IMPLEMENTATION_PLAN.md +46 -0
- package/.blueprint/features/feature_upstream-summaries/FEATURE_SPEC.md +150 -0
- package/.blueprint/features/feature_upstream-summaries/IMPLEMENTATION_PLAN.md +70 -0
- package/.blueprint/features/feature_validate-command/FEATURE_SPEC.md +209 -0
- package/.blueprint/features/feature_validate-command/IMPLEMENTATION_PLAN.md +59 -0
- package/.blueprint/features/feature_validate-command/story-failure-output.md +61 -0
- package/.blueprint/features/feature_validate-command/story-node-version-check.md +52 -0
- package/.blueprint/features/feature_validate-command/story-run-validation.md +59 -0
- package/.blueprint/features/feature_validate-command/story-success-output.md +50 -0
- package/.blueprint/prompts/TEMPLATE.md +65 -0
- package/.blueprint/prompts/alex-runtime.md +49 -0
- package/.blueprint/prompts/cass-runtime.md +46 -0
- package/.blueprint/prompts/codey-implement-runtime.md +52 -0
- package/.blueprint/prompts/codey-plan-runtime.md +47 -0
- package/.blueprint/prompts/nigel-runtime.md +47 -0
- package/.blueprint/system_specification/.gitkeep +0 -0
- package/.blueprint/system_specification/SYSTEM_SPEC.md +248 -0
- package/.blueprint/templates/FEATURE_SPEC.md +125 -0
- package/.blueprint/templates/STORY_TEMPLATE.md +96 -0
- package/.blueprint/templates/SYSTEM_SPEC.md +128 -0
- package/.blueprint/templates/TEST_TEMPLATE.md +76 -0
- package/.blueprint/ways_of_working/DEVELOPMENT_RITUAL.md +178 -0
- package/.business_context/README.md +27 -0
- package/LICENSE +21 -0
- package/README.md +564 -0
- package/SKILL.md +840 -0
- package/bin/cli.js +388 -0
- package/package.json +36 -0
- package/src/business-context.js +91 -0
- package/src/classifier.js +173 -0
- package/src/feedback.js +201 -0
- package/src/handoff.js +148 -0
- package/src/history.js +306 -0
- package/src/index.js +170 -0
- package/src/init.js +139 -0
- package/src/insights.js +504 -0
- package/src/interactive.js +338 -0
- package/src/orchestrator.js +217 -0
- package/src/parallel.js +1544 -0
- package/src/retry.js +274 -0
- package/src/stack.js +320 -0
- package/src/tools/index.js +27 -0
- package/src/tools/prompts.js +45 -0
- package/src/tools/schemas.js +38 -0
- package/src/tools/validation.js +83 -0
- package/src/update.js +112 -0
- package/src/validate.js +172 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Feature Specification — Parallel Logging
|
|
2
|
+
|
|
3
|
+
## 1. Feature Intent
|
|
4
|
+
|
|
5
|
+
Write each pipeline's output to a dedicated log file instead of interleaving on console. When multiple pipelines run simultaneously, their output becomes unreadable. Logging to files keeps the console clean while preserving full output for debugging.
|
|
6
|
+
|
|
7
|
+
**Problem:** With 3 pipelines running in parallel, console output is an unreadable mess of interleaved messages from different agents.
|
|
8
|
+
|
|
9
|
+
**Solution:** Write each pipeline's stdout/stderr to a log file; show only summary status on console.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 2. Scope
|
|
14
|
+
|
|
15
|
+
### In Scope
|
|
16
|
+
- Log file per pipeline: `.claude/worktrees/feat-{slug}/pipeline.log`
|
|
17
|
+
- Summary status on console (started, completed, failed)
|
|
18
|
+
- `--verbose` flag to also stream to console
|
|
19
|
+
- Timestamps on log entries
|
|
20
|
+
|
|
21
|
+
### Out of Scope
|
|
22
|
+
- Log rotation
|
|
23
|
+
- Log compression
|
|
24
|
+
- Remote log shipping
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 3. Behaviour Overview
|
|
29
|
+
|
|
30
|
+
### Default (Quiet Console)
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
$ murmur8 parallel feat-a feat-b feat-c
|
|
34
|
+
|
|
35
|
+
Starting parallel pipelines...
|
|
36
|
+
|
|
37
|
+
[10:30:01] feat-a: Started (log: .claude/worktrees/feat-feat-a/pipeline.log)
|
|
38
|
+
[10:30:02] feat-b: Started (log: .claude/worktrees/feat-feat-b/pipeline.log)
|
|
39
|
+
[10:30:03] feat-c: Started (log: .claude/worktrees/feat-feat-c/pipeline.log)
|
|
40
|
+
[10:35:15] feat-b: Completed ✓
|
|
41
|
+
[10:36:22] feat-a: Completed ✓
|
|
42
|
+
[10:38:45] feat-c: Failed ✗ (see log for details)
|
|
43
|
+
|
|
44
|
+
Summary: 2 completed, 1 failed
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Verbose Mode
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
$ murmur8 parallel feat-a --verbose
|
|
51
|
+
|
|
52
|
+
Starting parallel pipelines...
|
|
53
|
+
|
|
54
|
+
[10:30:01] feat-a: Started
|
|
55
|
+
--- feat-a output ---
|
|
56
|
+
You are Alex, the System Specification Agent...
|
|
57
|
+
[Alex output streams here]
|
|
58
|
+
...
|
|
59
|
+
--- end feat-a output ---
|
|
60
|
+
|
|
61
|
+
[10:35:15] feat-a: Completed ✓
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 4. Log File Format
|
|
67
|
+
|
|
68
|
+
Location: `.claude/worktrees/feat-{slug}/pipeline.log`
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
[2026-02-25T10:30:01.123Z] Pipeline started for feat-a
|
|
72
|
+
[2026-02-25T10:30:01.456Z] [stdout] You are Alex, the System Specification Agent...
|
|
73
|
+
[2026-02-25T10:30:02.789Z] [stdout] Reading feature spec...
|
|
74
|
+
[2026-02-25T10:35:15.000Z] [stderr] Warning: some warning
|
|
75
|
+
[2026-02-25T10:35:15.100Z] Pipeline completed with exit code 0
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 5. Implementation Notes
|
|
81
|
+
|
|
82
|
+
- Change `stdio: 'inherit'` to `stdio: 'pipe'`
|
|
83
|
+
- Create write stream to log file
|
|
84
|
+
- Prefix each line with timestamp and stream type
|
|
85
|
+
- On `--verbose`, also pipe to `process.stdout`
|
|
86
|
+
- Console shows only status updates (not full output)
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 6. Test Themes
|
|
91
|
+
|
|
92
|
+
- Log file created in worktree directory
|
|
93
|
+
- Log contains timestamped output
|
|
94
|
+
- Console shows only status by default
|
|
95
|
+
- `--verbose` streams output to console
|
|
96
|
+
- Log preserved on failure for debugging
|
|
97
|
+
- Multiple pipelines don't interleave in logs
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 7. Change Log
|
|
102
|
+
|
|
103
|
+
| Date | Change | Reason |
|
|
104
|
+
|------|--------|--------|
|
|
105
|
+
| 2026-02-25 | Initial spec | Parallel safeguards |
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Feature Specification — Parallel Pre-flight Validation
|
|
2
|
+
|
|
3
|
+
## 1. Feature Intent
|
|
4
|
+
|
|
5
|
+
Validate that a batch of features is safe to run in parallel before execution begins. This prevents wasted resources from features that would fail due to conflicts, missing specs, or dependencies.
|
|
6
|
+
|
|
7
|
+
**Problem:** Users can queue features for parallel execution without knowing if they'll conflict. Discovering issues mid-execution wastes time and creates cleanup work.
|
|
8
|
+
|
|
9
|
+
**Solution:** Pre-flight validation that checks feature readiness, detects conflicts, and estimates scope before any worktrees are created.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 2. Scope
|
|
14
|
+
|
|
15
|
+
### In Scope
|
|
16
|
+
- Check feature specs exist and are complete
|
|
17
|
+
- Detect dependencies between features in batch
|
|
18
|
+
- Detect file overlap from implementation plans
|
|
19
|
+
- Estimate scope and warn about timeout risk
|
|
20
|
+
- Integrate with existing dry-run flow
|
|
21
|
+
|
|
22
|
+
### Out of Scope
|
|
23
|
+
- Automatic dependency resolution
|
|
24
|
+
- Automatic batching suggestions
|
|
25
|
+
- Cross-repo validation
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 3. Behaviour Overview
|
|
30
|
+
|
|
31
|
+
### Pre-flight Check Output
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
$ murmur8 parallel feat-a feat-b feat-c --dry-run
|
|
35
|
+
|
|
36
|
+
Pre-flight Validation
|
|
37
|
+
=====================
|
|
38
|
+
|
|
39
|
+
✓ feat-a: Spec complete, plan exists
|
|
40
|
+
✓ feat-b: Spec complete, plan exists
|
|
41
|
+
✗ feat-c: Missing FEATURE_SPEC.md
|
|
42
|
+
|
|
43
|
+
Conflict Analysis
|
|
44
|
+
=================
|
|
45
|
+
|
|
46
|
+
⚠ File overlap detected:
|
|
47
|
+
• src/utils.js: feat-a, feat-b both modify
|
|
48
|
+
• bin/cli.js: feat-a, feat-c both modify
|
|
49
|
+
|
|
50
|
+
Recommendation: Run feat-a alone, then feat-b + feat-c
|
|
51
|
+
|
|
52
|
+
Scope Estimation
|
|
53
|
+
================
|
|
54
|
+
|
|
55
|
+
Feature | Stories | Tests | Est. Time
|
|
56
|
+
----------|---------|-------|----------
|
|
57
|
+
feat-a | 3 | 12 | ~15 min
|
|
58
|
+
feat-b | 2 | 8 | ~10 min
|
|
59
|
+
feat-c | 1 | 4 | ~5 min
|
|
60
|
+
|
|
61
|
+
Total estimated: ~30 min (parallel: ~15 min)
|
|
62
|
+
|
|
63
|
+
Proceed? [y/N]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Validation Failures Block Execution
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
$ murmur8 parallel feat-a feat-b
|
|
70
|
+
|
|
71
|
+
Pre-flight Validation
|
|
72
|
+
=====================
|
|
73
|
+
|
|
74
|
+
✗ feat-a: Missing FEATURE_SPEC.md
|
|
75
|
+
✗ feat-b: Missing user stories
|
|
76
|
+
|
|
77
|
+
Cannot proceed. Run these commands first:
|
|
78
|
+
/implement-feature feat-a --pause-after=alex
|
|
79
|
+
/implement-feature feat-b --pause-after=cass
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Override with --skip-preflight
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
$ murmur8 parallel feat-a feat-b --skip-preflight
|
|
86
|
+
|
|
87
|
+
⚠ Skipping pre-flight validation (not recommended)
|
|
88
|
+
|
|
89
|
+
Starting parallel pipelines...
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 4. Implementation Notes
|
|
95
|
+
|
|
96
|
+
### Validation Checks
|
|
97
|
+
|
|
98
|
+
1. **Spec Completeness**
|
|
99
|
+
- FEATURE_SPEC.md exists and has required sections
|
|
100
|
+
- At least one story-*.md file exists
|
|
101
|
+
- Test file exists (optional - may be created by pipeline)
|
|
102
|
+
|
|
103
|
+
2. **Dependency Detection**
|
|
104
|
+
- Parse feature specs for "depends_on" or similar markers
|
|
105
|
+
- Scan for references to other feature slugs
|
|
106
|
+
- Warn if features reference each other
|
|
107
|
+
|
|
108
|
+
3. **File Overlap Detection**
|
|
109
|
+
- Parse IMPLEMENTATION_PLAN.md for "Files to Create/Modify" section
|
|
110
|
+
- Extract file paths from each feature's plan
|
|
111
|
+
- Flag any files that appear in multiple features
|
|
112
|
+
|
|
113
|
+
4. **Scope Estimation**
|
|
114
|
+
- Count stories and acceptance criteria
|
|
115
|
+
- Count existing tests
|
|
116
|
+
- Use history averages to estimate duration
|
|
117
|
+
|
|
118
|
+
### Integration Points
|
|
119
|
+
|
|
120
|
+
- Called from `runParallel()` before worktree creation
|
|
121
|
+
- Results displayed in dry-run output
|
|
122
|
+
- Blocking by default, override with `--skip-preflight`
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 5. Test Themes
|
|
127
|
+
|
|
128
|
+
- Detects missing feature specs
|
|
129
|
+
- Detects missing stories
|
|
130
|
+
- Detects file overlap from plans
|
|
131
|
+
- Allows override with flag
|
|
132
|
+
- Integrates with dry-run
|
|
133
|
+
- Scope estimation uses history
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 6. Change Log
|
|
138
|
+
|
|
139
|
+
| Date | Change | Reason |
|
|
140
|
+
|------|--------|--------|
|
|
141
|
+
| 2026-02-25 | Initial spec | Upfront validation for parallel safety |
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Feature Specification — Pipeline History
|
|
2
|
+
|
|
3
|
+
## 1. Feature Intent
|
|
4
|
+
|
|
5
|
+
**Why this feature exists.**
|
|
6
|
+
|
|
7
|
+
- **Problem being addressed:** Currently, murmur8 provides no visibility into historical pipeline executions. Users cannot see which features have been processed, how long each stage took, or identify patterns in failures.
|
|
8
|
+
- **User need:** Developers want to understand pipeline performance over time, identify bottlenecks, and diagnose recurring failures. This supports continuous improvement of the feature development process.
|
|
9
|
+
- **System purpose alignment:** Per SYSTEM_SPEC.md:Section 8 (Cross-Cutting Concerns:Observability), the system aims for observability via queue status and agent summaries. This feature extends observability to historical data, enabling retrospective analysis.
|
|
10
|
+
|
|
11
|
+
> This feature reinforces the system's observability goals without altering core pipeline behaviour.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Scope
|
|
16
|
+
|
|
17
|
+
### In Scope
|
|
18
|
+
|
|
19
|
+
- Recording execution metrics for each pipeline run (start/end times, duration per stage, success/failure)
|
|
20
|
+
- Persisting history to a JSON file (`.claude/pipeline-history.json`)
|
|
21
|
+
- New CLI command `murmur8 history` with subcommands and flags
|
|
22
|
+
- Display of recent runs, aggregate statistics, and failure analysis
|
|
23
|
+
- Clearing history via CLI
|
|
24
|
+
|
|
25
|
+
### Out of Scope
|
|
26
|
+
|
|
27
|
+
- Real-time monitoring or streaming metrics
|
|
28
|
+
- Integration with external monitoring systems (Prometheus, Grafana, etc.)
|
|
29
|
+
- Exporting history to formats other than JSON
|
|
30
|
+
- History synchronisation across machines or repositories
|
|
31
|
+
- Detailed error logs or stack traces (only stage-level failure status)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Actors Involved
|
|
36
|
+
|
|
37
|
+
### Human User
|
|
38
|
+
|
|
39
|
+
- **Can do:** View pipeline history via CLI; view aggregate statistics; clear history
|
|
40
|
+
- **Cannot do:** Modify individual history entries; replay failed pipelines from history (out of scope)
|
|
41
|
+
|
|
42
|
+
### Pipeline Orchestrator (internal component)
|
|
43
|
+
|
|
44
|
+
- **Can do:** Record execution metrics at stage boundaries; write to history file
|
|
45
|
+
- **Cannot do:** Alter past entries; delete selective entries
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 4. Behaviour Overview
|
|
50
|
+
|
|
51
|
+
### Happy-path behaviour
|
|
52
|
+
|
|
53
|
+
1. User invokes `/implement-feature "slug"` and pipeline executes normally
|
|
54
|
+
2. At each stage transition (Alex, Cass, Nigel, Codey-plan, Codey-implement), timestamps are recorded
|
|
55
|
+
3. On pipeline completion (success or failure), a history entry is written to `.claude/pipeline-history.json`
|
|
56
|
+
4. User runs `murmur8 history` to view recent executions and statistics
|
|
57
|
+
|
|
58
|
+
### Key alternatives or branches
|
|
59
|
+
|
|
60
|
+
- **Pipeline paused:** If `--pause-after` is used, history entry is recorded up to the pause point with status `paused`
|
|
61
|
+
- **Pipeline failure:** If a stage fails, history entry records failure stage and status `failed`
|
|
62
|
+
- **No history file:** On first write, file is created with empty array structure
|
|
63
|
+
- **History clear:** User runs `murmur8 history clear` to remove all entries
|
|
64
|
+
|
|
65
|
+
### User-visible outcomes
|
|
66
|
+
|
|
67
|
+
- List of recent pipeline runs with timing and status
|
|
68
|
+
- Success rate percentage across all runs
|
|
69
|
+
- Average duration per stage
|
|
70
|
+
- Most common failure stage (if any failures exist)
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 5. State & Lifecycle Interactions
|
|
75
|
+
|
|
76
|
+
### States entered
|
|
77
|
+
|
|
78
|
+
- **history_recording:** When pipeline starts, a pending history entry is created in memory
|
|
79
|
+
- **history_persisted:** When pipeline completes/fails/pauses, entry is written to file
|
|
80
|
+
|
|
81
|
+
### States modified
|
|
82
|
+
|
|
83
|
+
- Queue state (`.claude/implement-queue.json`) is extended with `startedAt` timestamp for each stage (if not already present)
|
|
84
|
+
|
|
85
|
+
### This feature is:
|
|
86
|
+
|
|
87
|
+
- **State-creating:** Creates new history entries per pipeline run
|
|
88
|
+
- **Not state-transitioning:** Does not alter pipeline flow
|
|
89
|
+
- **Not state-constraining:** Does not block pipeline operations
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 6. Rules & Decision Logic
|
|
94
|
+
|
|
95
|
+
### Rule: History Entry Creation
|
|
96
|
+
|
|
97
|
+
- **Description:** A history entry is created when a pipeline run completes (success), fails, or pauses
|
|
98
|
+
- **Inputs:** Feature slug, stage timestamps, final status
|
|
99
|
+
- **Outputs:** JSON object appended to history array
|
|
100
|
+
- **Deterministic:** Yes
|
|
101
|
+
|
|
102
|
+
### Rule: Duration Calculation
|
|
103
|
+
|
|
104
|
+
- **Description:** Duration per stage calculated as difference between stage start and next stage start (or completion time for final stage)
|
|
105
|
+
- **Inputs:** Stage timestamps
|
|
106
|
+
- **Outputs:** Duration in milliseconds for each stage
|
|
107
|
+
- **Deterministic:** Yes
|
|
108
|
+
|
|
109
|
+
### Rule: Statistics Aggregation
|
|
110
|
+
|
|
111
|
+
- **Description:** Statistics computed on-read from full history file
|
|
112
|
+
- **Inputs:** All history entries
|
|
113
|
+
- **Outputs:** Success rate, average durations, failure frequency by stage
|
|
114
|
+
- **Deterministic:** Yes
|
|
115
|
+
|
|
116
|
+
### Rule: Display Limit Default
|
|
117
|
+
|
|
118
|
+
- **Description:** By default, show last 10 runs; `--all` shows unlimited
|
|
119
|
+
- **Inputs:** Flag presence, history array length
|
|
120
|
+
- **Outputs:** Truncated or full list
|
|
121
|
+
- **Deterministic:** Yes
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 7. Dependencies
|
|
126
|
+
|
|
127
|
+
### System components
|
|
128
|
+
|
|
129
|
+
- `src/orchestrator.js` — Must emit events or expose hooks for recording stage transitions
|
|
130
|
+
- `bin/cli.js` — Must register new `history` command
|
|
131
|
+
- `.claude/implement-queue.json` — May be read for timing data during pipeline execution
|
|
132
|
+
|
|
133
|
+
### External systems
|
|
134
|
+
|
|
135
|
+
- None
|
|
136
|
+
|
|
137
|
+
### Operational dependencies
|
|
138
|
+
|
|
139
|
+
- File system access to `.claude/` directory
|
|
140
|
+
- Permissions to write `.claude/pipeline-history.json`
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 8. Non-Functional Considerations
|
|
145
|
+
|
|
146
|
+
### Performance sensitivity
|
|
147
|
+
|
|
148
|
+
- History file read/write should be efficient; consider file size growth over time
|
|
149
|
+
- ASSUMPTION: Most users will have <100 runs; O(n) aggregation is acceptable
|
|
150
|
+
|
|
151
|
+
### Audit/logging needs
|
|
152
|
+
|
|
153
|
+
- History file serves as an audit log of pipeline executions
|
|
154
|
+
- Timestamps must be ISO 8601 format for consistency
|
|
155
|
+
|
|
156
|
+
### Error tolerance
|
|
157
|
+
|
|
158
|
+
- If history file is corrupted or unreadable, CLI should warn and allow continuation (no blocking)
|
|
159
|
+
- History recording failure should not abort pipeline execution
|
|
160
|
+
|
|
161
|
+
### Security implications
|
|
162
|
+
|
|
163
|
+
- Feature slugs may contain project information; history file should be gitignored
|
|
164
|
+
- No sensitive data (credentials, secrets) should appear in history entries
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 9. Assumptions & Open Questions
|
|
169
|
+
|
|
170
|
+
### Assumptions
|
|
171
|
+
|
|
172
|
+
- ASSUMPTION: History file will grow at a manageable rate (tens to hundreds of entries)
|
|
173
|
+
- ASSUMPTION: Stage names are stable (alex, cass, nigel, codey-plan, codey-implement)
|
|
174
|
+
- ASSUMPTION: ISO 8601 timestamps are sufficient for duration calculations
|
|
175
|
+
|
|
176
|
+
### Open Questions
|
|
177
|
+
|
|
178
|
+
- Should history entries include partial stage data for paused pipelines?
|
|
179
|
+
- Should `--stats` include median duration alongside average?
|
|
180
|
+
- Should there be a `history export` subcommand for CI integration (deferred)?
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 10. Impact on System Specification
|
|
185
|
+
|
|
186
|
+
### Alignment assessment
|
|
187
|
+
|
|
188
|
+
This feature **reinforces existing system assumptions**:
|
|
189
|
+
|
|
190
|
+
- Per SYSTEM_SPEC.md:Section 8 (Observability), the system already tracks queue status and completion summaries
|
|
191
|
+
- This feature extends observability to historical analysis without changing core behaviour
|
|
192
|
+
- The queue file structure (`.claude/implement-queue.json`) already captures timestamps; this feature adds persistence beyond current run
|
|
193
|
+
|
|
194
|
+
### No contradictions identified
|
|
195
|
+
|
|
196
|
+
The feature does not alter:
|
|
197
|
+
|
|
198
|
+
- Agent roles or boundaries
|
|
199
|
+
- Pipeline flow or stage order
|
|
200
|
+
- Artifact structures or handoff mechanisms
|
|
201
|
+
|
|
202
|
+
### Minor extension to system spec
|
|
203
|
+
|
|
204
|
+
The following addition to SYSTEM_SPEC.md:Section 5 (Core Domain Concepts) may be warranted:
|
|
205
|
+
|
|
206
|
+
> **History Entry** — A record of a completed pipeline run, including slug, timestamps per stage, duration, and final status. Persisted to `.claude/pipeline-history.json`.
|
|
207
|
+
|
|
208
|
+
This is flagged as a **non-breaking extension** for consideration.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 11. Handover to BA (Cass)
|
|
213
|
+
|
|
214
|
+
### Story themes
|
|
215
|
+
|
|
216
|
+
1. **History recording** — Capturing execution data during pipeline runs
|
|
217
|
+
2. **History display** — CLI command for viewing recent runs
|
|
218
|
+
3. **Statistics display** — Aggregate metrics via `--stats` flag
|
|
219
|
+
4. **History management** — Clearing history via `history clear`
|
|
220
|
+
|
|
221
|
+
### Expected story boundaries
|
|
222
|
+
|
|
223
|
+
- Recording logic should be a separate story from display logic
|
|
224
|
+
- Statistics computation may be combined with display or separated
|
|
225
|
+
- Clear functionality is a distinct, small story
|
|
226
|
+
|
|
227
|
+
### Areas needing careful story framing
|
|
228
|
+
|
|
229
|
+
- The interaction between `--pause-after` and history recording needs precise acceptance criteria
|
|
230
|
+
- Error handling when history file is corrupted should be explicit
|
|
231
|
+
- The "most common failure stage" calculation needs clear definition when there are ties
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 12. Change Log (Feature-Level)
|
|
236
|
+
|
|
237
|
+
| Date | Change | Reason | Raised By |
|
|
238
|
+
|------------|---------------------------------------|------------------------------|-----------|
|
|
239
|
+
| 2026-02-24 | Initial feature specification created | Feature request from user | Alex |
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Implementation Plan - Pipeline History
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Implement pipeline history tracking by creating a new `src/history.js` module that records execution metrics during pipeline runs and provides CLI commands for viewing/managing history. The module will integrate with the existing orchestrator to capture stage timestamps and persist entries to `.claude/pipeline-history.json`. CLI routing in `bin/cli.js` will be extended with a new `history` command supporting subcommands and flags.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Files to Create/Modify
|
|
10
|
+
|
|
11
|
+
| Path | Action | Purpose |
|
|
12
|
+
|------|--------|---------|
|
|
13
|
+
| `src/history.js` | Create | Core history module: `recordHistory()`, `displayHistory()`, `showStats()`, `clearHistory()` |
|
|
14
|
+
| `bin/cli.js` | Modify | Add `history` command routing with `--all`, `--stats`, `--force` flags and `clear` subcommand |
|
|
15
|
+
| `src/orchestrator.js` | Modify | Add stage timestamp tracking; call `recordHistory()` on pipeline completion/failure/pause |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Implementation Steps
|
|
20
|
+
|
|
21
|
+
1. **Create `src/history.js` with file I/O helpers** - `readHistoryFile()`, `writeHistoryFile()`, `ensureHistoryFile()` handling missing/corrupted files gracefully.
|
|
22
|
+
|
|
23
|
+
2. **Implement `recordHistory(entry)` function** - Accepts history entry object, appends to history array, writes to `.claude/pipeline-history.json`. Wrap in try/catch to log warning on failure without throwing.
|
|
24
|
+
|
|
25
|
+
3. **Implement `displayHistory(options)` function** - Read history, sort by `completedAt` descending, slice to 10 entries (unless `--all`), format tabular output with color-coded status.
|
|
26
|
+
|
|
27
|
+
4. **Implement `showStats()` function** - Compute success rate, average duration per stage, total average for successful runs, most common failure stage (handling ties).
|
|
28
|
+
|
|
29
|
+
5. **Implement `clearHistory(options)` function** - Show confirmation prompt (unless `--force`), reset file to empty array on confirm, display count of removed entries.
|
|
30
|
+
|
|
31
|
+
6. **Add CLI routing in `bin/cli.js`** - Register `history` command; parse `--all`, `--stats`, `--force` flags; handle `clear` subcommand.
|
|
32
|
+
|
|
33
|
+
7. **Modify `src/orchestrator.js` to track stage timestamps** - Update `setCurrent()` to record `startedAt`; add `completeStage()` helper to record `completedAt` and compute `durationMs`.
|
|
34
|
+
|
|
35
|
+
8. **Add `recordPipelineCompletion()` to orchestrator** - Called on success/failure/pause; builds history entry from accumulated stage data and calls `recordHistory()`.
|
|
36
|
+
|
|
37
|
+
9. **Add `.claude/pipeline-history.json` to `.gitignore`** - Update `src/init.js` to append this pattern during initialization.
|
|
38
|
+
|
|
39
|
+
10. **Run tests and verify all T-* test IDs pass** - Execute `node --test test/feature_pipeline-history.test.js`.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Data Model
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"slug": "feature-name",
|
|
48
|
+
"status": "success | failed | paused",
|
|
49
|
+
"startedAt": "2026-02-24T10:00:00.000Z",
|
|
50
|
+
"completedAt": "2026-02-24T10:15:00.000Z",
|
|
51
|
+
"totalDurationMs": 900000,
|
|
52
|
+
"stages": {
|
|
53
|
+
"alex": { "startedAt": "...", "completedAt": "...", "durationMs": 120000 },
|
|
54
|
+
"cass": { "startedAt": "...", "completedAt": "...", "durationMs": 90000 },
|
|
55
|
+
"nigel": { "startedAt": "...", "completedAt": "...", "durationMs": 180000 },
|
|
56
|
+
"codey-plan": { "startedAt": "...", "completedAt": "...", "durationMs": 75000 },
|
|
57
|
+
"codey-implement": { "startedAt": "...", "completedAt": "...", "durationMs": 255000 }
|
|
58
|
+
},
|
|
59
|
+
"failedStage": null,
|
|
60
|
+
"pausedAfter": null
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Risks/Questions
|
|
67
|
+
|
|
68
|
+
- **Confirmation prompt testing**: Tests will need to mock stdin for `clearHistory()` confirmation; consider using `readline` interface that can be injected for testing.
|
|
69
|
+
- **Color output detection**: Use `process.stdout.isTTY` to determine if colors should be applied; provide fallback for non-TTY environments.
|
|
70
|
+
- **Orchestrator integration point**: The `/implement-feature` skill (SKILL.md) runs via Task tool sub-agents; recording hooks must be called from the skill's completion handler, not just from `src/orchestrator.js`. Verify integration path.
|
|
71
|
+
- **File corruption recovery**: Per AC-4, corrupted history file should not block CLI; implement robust JSON parsing with fallback to empty array after warning.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Story — Clear Pipeline History
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer using murmur8, I want to clear the pipeline history so that I can reset metrics or remove stale data.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context / scope
|
|
10
|
+
|
|
11
|
+
- New CLI subcommand: `murmur8 history clear`
|
|
12
|
+
- Removes all entries from `.claude/pipeline-history.json`
|
|
13
|
+
- Per FEATURE_SPEC.md:Section 3 (Actors), users can clear history but cannot modify individual entries
|
|
14
|
+
- Destructive action requiring confirmation
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Acceptance criteria
|
|
19
|
+
|
|
20
|
+
**AC-1 — Clear with confirmation**
|
|
21
|
+
- Given `.claude/pipeline-history.json` contains history entries,
|
|
22
|
+
- When I run `murmur8 history clear`,
|
|
23
|
+
- Then I see a confirmation prompt: "This will delete all 25 history entries. Continue? (y/N)"
|
|
24
|
+
- And I must type 'y' or 'yes' to proceed.
|
|
25
|
+
|
|
26
|
+
**AC-2 — Clear executes on confirmation**
|
|
27
|
+
- Given I confirm the clear action,
|
|
28
|
+
- When the command completes,
|
|
29
|
+
- Then `.claude/pipeline-history.json` is reset to an empty array `[]`,
|
|
30
|
+
- And I see "Pipeline history cleared. 25 entries removed."
|
|
31
|
+
|
|
32
|
+
**AC-3 — Clear cancelled on decline**
|
|
33
|
+
- Given I decline the confirmation (type 'n', 'no', or press Enter),
|
|
34
|
+
- When the command completes,
|
|
35
|
+
- Then `.claude/pipeline-history.json` remains unchanged,
|
|
36
|
+
- And I see "Clear cancelled. History unchanged."
|
|
37
|
+
|
|
38
|
+
**AC-4 — Force clear without confirmation**
|
|
39
|
+
- Given `.claude/pipeline-history.json` contains history entries,
|
|
40
|
+
- When I run `murmur8 history clear --force`,
|
|
41
|
+
- Then the history is cleared without a confirmation prompt,
|
|
42
|
+
- And I see "Pipeline history cleared. 25 entries removed."
|
|
43
|
+
|
|
44
|
+
**AC-5 — Clear empty history**
|
|
45
|
+
- Given `.claude/pipeline-history.json` is empty or does not exist,
|
|
46
|
+
- When I run `murmur8 history clear`,
|
|
47
|
+
- Then I see "No history to clear."
|
|
48
|
+
- And the command exits with code 0.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## CLI interaction
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
$ murmur8 history clear
|
|
56
|
+
This will delete all 25 history entries. Continue? (y/N) y
|
|
57
|
+
Pipeline history cleared. 25 entries removed.
|
|
58
|
+
|
|
59
|
+
$ murmur8 history clear --force
|
|
60
|
+
Pipeline history cleared. 25 entries removed.
|
|
61
|
+
|
|
62
|
+
$ murmur8 history clear
|
|
63
|
+
No history to clear.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Out of scope
|
|
69
|
+
|
|
70
|
+
- Clearing individual entries or filtered subsets
|
|
71
|
+
- Archiving history before clearing
|
|
72
|
+
- Undo/restore functionality
|
|
73
|
+
- Automatic cleanup based on age or count
|