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,75 @@
|
|
|
1
|
+
# Story — Bottleneck Analysis
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to identify which pipeline stage consistently takes the longest so that I can focus optimization efforts where they will have the greatest impact.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context / scope
|
|
10
|
+
|
|
11
|
+
- User has executed multiple pipeline runs via `/implement-feature`
|
|
12
|
+
- History data exists in `.claude/pipeline-history.json`
|
|
13
|
+
- This is a read-only analysis; no pipeline state is modified
|
|
14
|
+
- Route: `murmur8 insights` or `murmur8 insights --bottlenecks`
|
|
15
|
+
|
|
16
|
+
Per FEATURE_SPEC.md:Section 6 (Rule: Bottleneck Detection):
|
|
17
|
+
- Bottleneck threshold: >35% of total pipeline time
|
|
18
|
+
- Recommendation threshold: >40% of total pipeline time
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Acceptance criteria
|
|
23
|
+
|
|
24
|
+
**AC-1 — Display bottleneck stage**
|
|
25
|
+
- Given the history file contains at least 3 successful pipeline runs,
|
|
26
|
+
- When the user runs `murmur8 insights`,
|
|
27
|
+
- Then the output includes a "Bottlenecks" section identifying the stage with the highest average duration.
|
|
28
|
+
|
|
29
|
+
**AC-2 — Show percentage of total time**
|
|
30
|
+
- Given a bottleneck stage is identified,
|
|
31
|
+
- When the analysis completes,
|
|
32
|
+
- Then the output displays the stage name, average duration in milliseconds, and percentage of total pipeline time.
|
|
33
|
+
|
|
34
|
+
**AC-3 — Bottleneck threshold reporting**
|
|
35
|
+
- Given a stage accounts for more than 35% of total pipeline time,
|
|
36
|
+
- When the analysis completes,
|
|
37
|
+
- Then that stage is flagged as a bottleneck in the output.
|
|
38
|
+
|
|
39
|
+
**AC-4 — Generate recommendation for severe bottleneck**
|
|
40
|
+
- Given a stage accounts for more than 40% of total pipeline time,
|
|
41
|
+
- When the analysis completes,
|
|
42
|
+
- Then the output includes the recommendation: "Consider simplifying {stage} requirements or splitting features".
|
|
43
|
+
|
|
44
|
+
**AC-5 — Filter to bottlenecks only**
|
|
45
|
+
- Given the user runs `murmur8 insights --bottlenecks`,
|
|
46
|
+
- When the analysis completes,
|
|
47
|
+
- Then only the bottleneck analysis section is displayed (other analysis types are omitted).
|
|
48
|
+
|
|
49
|
+
**AC-6 — Insufficient data handling**
|
|
50
|
+
- Given the history file contains fewer than 3 runs,
|
|
51
|
+
- When the user runs `murmur8 insights`,
|
|
52
|
+
- Then the output displays: "Insufficient data for insights. Complete at least 3 pipeline runs."
|
|
53
|
+
|
|
54
|
+
**AC-7 — Missing history file handling**
|
|
55
|
+
- Given no history file exists at `.claude/pipeline-history.json`,
|
|
56
|
+
- When the user runs `murmur8 insights`,
|
|
57
|
+
- Then the output displays: "No history found. Run some pipelines first."
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Out of scope
|
|
62
|
+
|
|
63
|
+
- Modifying the history file or pipeline configuration
|
|
64
|
+
- Customizing the 35%/40% threshold values
|
|
65
|
+
- Providing automated remediation
|
|
66
|
+
- Stage-specific threshold configuration
|
|
67
|
+
- Analysis of partial/in-progress runs
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## References
|
|
72
|
+
|
|
73
|
+
- Feature spec: `.blueprint/features/feature_pipeline-insights/FEATURE_SPEC.md`
|
|
74
|
+
- Upstream dependency: `.blueprint/features/feature_pipeline-history/FEATURE_SPEC.md`
|
|
75
|
+
- System spec: `.blueprint/system_specification/SYSTEM_SPEC.md`
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Story — Failure Pattern Analysis
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to analyze which pipeline stages fail most frequently so that I can identify systemic issues and improve pipeline reliability.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context / scope
|
|
10
|
+
|
|
11
|
+
- User has executed multiple pipeline runs, some of which have failed
|
|
12
|
+
- History data includes entries with `status: "failed"` and associated stage information
|
|
13
|
+
- This is a read-only analysis; no pipeline state is modified
|
|
14
|
+
- Route: `murmur8 insights` or `murmur8 insights --failures`
|
|
15
|
+
|
|
16
|
+
Per FEATURE_SPEC.md:Section 6 (Rule: Failure Pattern Analysis):
|
|
17
|
+
- Failure rate threshold: >15% is reported as concerning
|
|
18
|
+
- Recommendation threshold: >20% triggers specific recommendation
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Acceptance criteria
|
|
23
|
+
|
|
24
|
+
**AC-1 — Display failure rates per stage**
|
|
25
|
+
- Given the history file contains at least 3 pipeline runs with at least one failure,
|
|
26
|
+
- When the user runs `murmur8 insights`,
|
|
27
|
+
- Then the output includes a "Failure Patterns" section showing failure rate for each stage that has experienced failures.
|
|
28
|
+
|
|
29
|
+
**AC-2 — Identify most common failure stage**
|
|
30
|
+
- Given failures exist in the history,
|
|
31
|
+
- When the analysis completes,
|
|
32
|
+
- Then the output identifies the stage with the highest failure count as the "most common failure stage".
|
|
33
|
+
|
|
34
|
+
**AC-3 — Flag concerning failure rates**
|
|
35
|
+
- Given a stage has a failure rate greater than 15%,
|
|
36
|
+
- When the analysis completes,
|
|
37
|
+
- Then that stage is flagged as having a concerning failure rate.
|
|
38
|
+
|
|
39
|
+
**AC-4 — Generate recommendation for high failure rate**
|
|
40
|
+
- Given a stage has a failure rate greater than 20%,
|
|
41
|
+
- When the analysis completes,
|
|
42
|
+
- Then the output includes the recommendation: "Review {stage} agent configuration or specification clarity".
|
|
43
|
+
|
|
44
|
+
**AC-5 — Identify features with repeated failures**
|
|
45
|
+
- Given the same feature slug has failed multiple times,
|
|
46
|
+
- When the analysis completes,
|
|
47
|
+
- Then those features are listed as correlation hints (e.g., "Feature 'complex-auth' has failed 3 times").
|
|
48
|
+
|
|
49
|
+
**AC-6 — Filter to failures only**
|
|
50
|
+
- Given the user runs `murmur8 insights --failures`,
|
|
51
|
+
- When the analysis completes,
|
|
52
|
+
- Then only the failure pattern analysis section is displayed (other analysis types are omitted).
|
|
53
|
+
|
|
54
|
+
**AC-7 — No failures recorded**
|
|
55
|
+
- Given all pipeline runs in history have status "completed" (no failures),
|
|
56
|
+
- When the user runs `murmur8 insights`,
|
|
57
|
+
- Then the failure analysis section displays: "No failures recorded" and is omitted from recommendations.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Out of scope
|
|
62
|
+
|
|
63
|
+
- Automatic correlation with feature complexity metrics
|
|
64
|
+
- Root cause analysis beyond stage identification
|
|
65
|
+
- Failure notification or alerting
|
|
66
|
+
- Retry or remediation automation
|
|
67
|
+
- Classification of failure types (timeout vs error vs abort)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## References
|
|
72
|
+
|
|
73
|
+
- Feature spec: `.blueprint/features/feature_pipeline-insights/FEATURE_SPEC.md`
|
|
74
|
+
- Upstream dependency: `.blueprint/features/feature_pipeline-history/FEATURE_SPEC.md`
|
|
75
|
+
- System spec: `.blueprint/system_specification/SYSTEM_SPEC.md`
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Story — JSON Output
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to export pipeline insights as structured JSON so that I can integrate the analysis with other tools or process the data programmatically.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context / scope
|
|
10
|
+
|
|
11
|
+
- User wants machine-readable output instead of human-readable text
|
|
12
|
+
- JSON output contains all the same analysis data as text output
|
|
13
|
+
- Enables integration with CI/CD pipelines, dashboards, or custom tooling
|
|
14
|
+
- This is a read-only analysis; no pipeline state is modified
|
|
15
|
+
- Route: `murmur8 insights --json`
|
|
16
|
+
|
|
17
|
+
Per FEATURE_SPEC.md:Section 4 (Key alternatives or branches):
|
|
18
|
+
- `--json` flag produces structured JSON instead of formatted text
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Acceptance criteria
|
|
23
|
+
|
|
24
|
+
**AC-1 — Output JSON when flag provided**
|
|
25
|
+
- Given the history file contains valid pipeline data,
|
|
26
|
+
- When the user runs `murmur8 insights --json`,
|
|
27
|
+
- Then the output is valid JSON (parseable by `JSON.parse()`).
|
|
28
|
+
|
|
29
|
+
**AC-2 — Include bottleneck data in JSON**
|
|
30
|
+
- Given bottleneck analysis completes successfully,
|
|
31
|
+
- When `--json` flag is provided,
|
|
32
|
+
- Then the JSON output includes a `bottlenecks` object with: `stage`, `averageDurationMs`, `percentageOfTotal`, `isBottleneck`, `recommendation` (if applicable).
|
|
33
|
+
|
|
34
|
+
**AC-3 — Include failure data in JSON**
|
|
35
|
+
- Given failure analysis completes successfully,
|
|
36
|
+
- When `--json` flag is provided,
|
|
37
|
+
- Then the JSON output includes a `failures` object with: `failuresByStage` (array), `mostCommonFailureStage`, `featuresWithRepeatedFailures` (array), `recommendation` (if applicable).
|
|
38
|
+
|
|
39
|
+
**AC-4 — Include anomaly data in JSON**
|
|
40
|
+
- Given anomaly detection completes successfully,
|
|
41
|
+
- When `--json` flag is provided,
|
|
42
|
+
- Then the JSON output includes an `anomalies` object with: `detected` (array of anomalous runs), `recommendation` (if applicable).
|
|
43
|
+
|
|
44
|
+
**AC-5 — Include trend data in JSON**
|
|
45
|
+
- Given trend analysis completes successfully,
|
|
46
|
+
- When `--json` flag is provided,
|
|
47
|
+
- Then the JSON output includes a `trends` object with: `successRate` (trend + percentage), `duration` (trend + percentage), `recommendation` (if applicable).
|
|
48
|
+
|
|
49
|
+
**AC-6 — Combine JSON with filter flags**
|
|
50
|
+
- Given the user runs `murmur8 insights --json --bottlenecks`,
|
|
51
|
+
- When the analysis completes,
|
|
52
|
+
- Then the JSON output includes only the `bottlenecks` section (other analysis types are omitted).
|
|
53
|
+
|
|
54
|
+
**AC-7 — Handle insufficient data in JSON**
|
|
55
|
+
- Given there is insufficient data for analysis,
|
|
56
|
+
- When `--json` flag is provided,
|
|
57
|
+
- Then the JSON output includes an `error` field with the appropriate message (e.g., `{"error": "Insufficient data for insights. Complete at least 3 pipeline runs."}`).
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Out of scope
|
|
62
|
+
|
|
63
|
+
- Exporting JSON to a file (output to stdout only)
|
|
64
|
+
- JSON schema validation or versioning
|
|
65
|
+
- Compressed or minified JSON output options
|
|
66
|
+
- Integration with specific external platforms
|
|
67
|
+
- Historical JSON output comparison
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## References
|
|
72
|
+
|
|
73
|
+
- Feature spec: `.blueprint/features/feature_pipeline-insights/FEATURE_SPEC.md`
|
|
74
|
+
- Upstream dependency: `.blueprint/features/feature_pipeline-history/FEATURE_SPEC.md`
|
|
75
|
+
- System spec: `.blueprint/system_specification/SYSTEM_SPEC.md`
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Story — Trend Analysis
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
|
|
5
|
+
As a developer, I want to track whether pipeline performance is improving or degrading over time so that I can understand the impact of changes and maintain development efficiency.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context / scope
|
|
10
|
+
|
|
11
|
+
- User has accumulated sufficient history to compare earlier vs later runs
|
|
12
|
+
- Analysis compares first half vs second half of history data
|
|
13
|
+
- Requires minimum 6 runs to compute meaningful trends
|
|
14
|
+
- This is a read-only analysis; no pipeline state is modified
|
|
15
|
+
- Route: `murmur8 insights` (trends section included by default)
|
|
16
|
+
|
|
17
|
+
Per FEATURE_SPEC.md:Section 6 (Rule: Trend Analysis):
|
|
18
|
+
- Improving: >10% better in second half
|
|
19
|
+
- Degrading: >10% worse in second half
|
|
20
|
+
- Stable: within 10% variance
|
|
21
|
+
- Minimum data: 6 runs required
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Acceptance criteria
|
|
26
|
+
|
|
27
|
+
**AC-1 — Display success rate trend**
|
|
28
|
+
- Given the history file contains at least 6 pipeline runs,
|
|
29
|
+
- When the user runs `murmur8 insights`,
|
|
30
|
+
- Then the output includes a "Trends" section showing success rate trend as "improving", "stable", or "degrading".
|
|
31
|
+
|
|
32
|
+
**AC-2 — Display duration trend**
|
|
33
|
+
- Given the history file contains at least 6 pipeline runs,
|
|
34
|
+
- When the user runs `murmur8 insights`,
|
|
35
|
+
- Then the output includes average duration trend as "improving" (faster), "stable", or "degrading" (slower).
|
|
36
|
+
|
|
37
|
+
**AC-3 — Calculate trend by comparing halves**
|
|
38
|
+
- Given the history contains N runs (where N >= 6),
|
|
39
|
+
- When trend analysis is performed,
|
|
40
|
+
- Then the first N/2 runs are compared against the last N/2 runs to determine trend direction.
|
|
41
|
+
|
|
42
|
+
**AC-4 — Apply threshold for trend classification**
|
|
43
|
+
- Given the percentage change between halves is calculated,
|
|
44
|
+
- When classifying the trend,
|
|
45
|
+
- Then >10% improvement shows "improving", >10% degradation shows "degrading", and within 10% shows "stable".
|
|
46
|
+
|
|
47
|
+
**AC-5 — Generate recommendation for degrading trend**
|
|
48
|
+
- Given either success rate or duration trend is "degrading",
|
|
49
|
+
- When the analysis completes,
|
|
50
|
+
- Then the output includes the recommendation: "Review recent changes to agent specifications or system spec".
|
|
51
|
+
|
|
52
|
+
**AC-6 — Insufficient data for trends**
|
|
53
|
+
- Given the history file contains fewer than 6 runs,
|
|
54
|
+
- When trend analysis is attempted,
|
|
55
|
+
- Then it is skipped with explanation: "Insufficient data for trend analysis. Need at least 6 runs."
|
|
56
|
+
|
|
57
|
+
**AC-7 — Show percentage change**
|
|
58
|
+
- Given trend analysis completes successfully,
|
|
59
|
+
- When the output is displayed,
|
|
60
|
+
- Then the percentage change for both success rate and duration is shown alongside the trend indicator.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Out of scope
|
|
65
|
+
|
|
66
|
+
- Sliding window trend analysis (uses fixed first-half/second-half)
|
|
67
|
+
- Time-based trend analysis (e.g., last 30 days)
|
|
68
|
+
- Per-stage trend analysis
|
|
69
|
+
- Trend visualization or charting
|
|
70
|
+
- Predictive modelling of future performance
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## References
|
|
75
|
+
|
|
76
|
+
- Feature spec: `.blueprint/features/feature_pipeline-insights/FEATURE_SPEC.md`
|
|
77
|
+
- Upstream dependency: `.blueprint/features/feature_pipeline-history/FEATURE_SPEC.md`
|
|
78
|
+
- System spec: `.blueprint/system_specification/SYSTEM_SPEC.md`
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Feature Specification — Shared Guardrails
|
|
2
|
+
|
|
3
|
+
## 1. Feature Intent
|
|
4
|
+
**Why this feature exists.**
|
|
5
|
+
|
|
6
|
+
- The same guardrails section (~45 lines, ~400 tokens) is duplicated verbatim in all 4 agent specification files
|
|
7
|
+
- This wastes ~1,200 tokens per pipeline run (4 agents reading identical content)
|
|
8
|
+
- Extracting to a shared file reduces token usage and ensures consistency when guardrails are updated
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 2. Scope
|
|
13
|
+
### In Scope
|
|
14
|
+
- Extract guardrails section to `.blueprint/agents/GUARDRAILS.md`
|
|
15
|
+
- Update all agent specs to reference the shared file
|
|
16
|
+
- Ensure agents still read and apply guardrails
|
|
17
|
+
|
|
18
|
+
### Out of Scope
|
|
19
|
+
- Changing the content of guardrails
|
|
20
|
+
- Agent-specific guardrail variations (all agents use same guardrails currently)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 3. Actors Involved
|
|
25
|
+
|
|
26
|
+
| Actor | Can Do | Cannot Do |
|
|
27
|
+
|-------|--------|-----------|
|
|
28
|
+
| Alex | Read shared guardrails, apply to outputs | Modify guardrails |
|
|
29
|
+
| Cass | Read shared guardrails, apply to outputs | Modify guardrails |
|
|
30
|
+
| Nigel | Read shared guardrails, apply to outputs | Modify guardrails |
|
|
31
|
+
| Codey | Read shared guardrails, apply to outputs | Modify guardrails |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 4. Behaviour Overview
|
|
36
|
+
|
|
37
|
+
**Happy path:**
|
|
38
|
+
1. Pipeline invokes agent (e.g., Alex)
|
|
39
|
+
2. Agent reads slim spec file which references `GUARDRAILS.md`
|
|
40
|
+
3. Agent reads `GUARDRAILS.md` once
|
|
41
|
+
4. Agent applies guardrails to all outputs
|
|
42
|
+
|
|
43
|
+
**Key outcomes:**
|
|
44
|
+
- Identical guardrail enforcement as before
|
|
45
|
+
- ~1,200 fewer tokens per pipeline run
|
|
46
|
+
- Single source of truth for guardrail updates
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 5. State & Lifecycle Interactions
|
|
51
|
+
|
|
52
|
+
- No state changes — this is a structural refactor
|
|
53
|
+
- Agent behaviour is unchanged
|
|
54
|
+
- Pipeline flow is unchanged
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 6. Rules & Decision Logic
|
|
59
|
+
|
|
60
|
+
| Rule | Description |
|
|
61
|
+
|------|-------------|
|
|
62
|
+
| Single source | All agents reference the same `GUARDRAILS.md` file |
|
|
63
|
+
| Read once | Each agent reads guardrails once per invocation |
|
|
64
|
+
| No override | Agent specs cannot override shared guardrails |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 7. Dependencies
|
|
69
|
+
|
|
70
|
+
- All 4 agent specification files must be updated
|
|
71
|
+
- SKILL.md agent prompts may need adjustment if they reference guardrails directly
|
|
72
|
+
- `src/init.js` and `src/update.js` must handle the new file during init/update
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 8. Non-Functional Considerations
|
|
77
|
+
|
|
78
|
+
- **Performance:** Reduces token usage by ~1,200 per run
|
|
79
|
+
- **Maintainability:** Single file to update when guardrails change
|
|
80
|
+
- **Consistency:** Eliminates risk of guardrails drifting between agents
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 9. Assumptions & Open Questions
|
|
85
|
+
|
|
86
|
+
**Assumptions:**
|
|
87
|
+
- All agents will continue to use identical guardrails
|
|
88
|
+
- Agents can follow file references (read file X when spec says "see file X")
|
|
89
|
+
|
|
90
|
+
**Open Questions:**
|
|
91
|
+
- Should agent prompts explicitly include guardrails content, or trust agents to read the reference?
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 10. Impact on System Specification
|
|
96
|
+
|
|
97
|
+
- Reinforces existing system assumptions (guardrails apply to all agents)
|
|
98
|
+
- No contradiction with system spec
|
|
99
|
+
- No system spec change required
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 11. Handover to BA (Cass)
|
|
104
|
+
|
|
105
|
+
**Story themes:**
|
|
106
|
+
- Extract guardrails to shared file
|
|
107
|
+
- Update agent specs to reference shared file
|
|
108
|
+
- Update init/update commands to handle new file
|
|
109
|
+
|
|
110
|
+
**Expected story boundaries:**
|
|
111
|
+
- One story for file extraction and agent spec updates
|
|
112
|
+
- One story for init/update command changes
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 12. Change Log (Feature-Level)
|
|
117
|
+
| Date | Change | Reason | Raised By |
|
|
118
|
+
|-----|------|--------|-----------|
|
|
119
|
+
| 2026-02-25 | Initial spec | Token efficiency improvement | Claude |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Implementation Plan — Shared Guardrails
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Extract the duplicated ~45-line guardrails section from all 4 agent specifications into a new `.blueprint/agents/GUARDRAILS.md` file, then update each agent spec to reference the shared file instead of containing inline guardrails. No code changes required in init.js or update.js since they already copy the entire `agents/` directory.
|
|
6
|
+
|
|
7
|
+
## Files to Create/Modify
|
|
8
|
+
|
|
9
|
+
| Path | Action | Purpose |
|
|
10
|
+
|------|--------|---------|
|
|
11
|
+
| `.blueprint/agents/GUARDRAILS.md` | Create | New shared guardrails file containing extracted content |
|
|
12
|
+
| `.blueprint/agents/AGENT_SPECIFICATION_ALEX.md` | Modify | Remove inline guardrails, add reference to GUARDRAILS.md |
|
|
13
|
+
| `.blueprint/agents/AGENT_BA_CASS.md` | Modify | Remove inline guardrails, add reference to GUARDRAILS.md |
|
|
14
|
+
| `.blueprint/agents/AGENT_TESTER_NIGEL.md` | Modify | Remove inline guardrails, add reference to GUARDRAILS.md |
|
|
15
|
+
| `.blueprint/agents/AGENT_DEVELOPER_CODEY.md` | Modify | Remove inline guardrails, add reference to GUARDRAILS.md |
|
|
16
|
+
|
|
17
|
+
## Implementation Steps
|
|
18
|
+
|
|
19
|
+
1. **Create GUARDRAILS.md** - Extract the guardrails section (lines 169-210 from AGENT_SPECIFICATION_ALEX.md) into new file at `.blueprint/agents/GUARDRAILS.md`. Content includes: Allowed Sources, Prohibited Sources, Citation Requirements, Assumptions vs Facts, Confidentiality, Escalation Protocol.
|
|
20
|
+
|
|
21
|
+
2. **Update AGENT_SPECIFICATION_ALEX.md** - Remove the inline `## Guardrails` section (lines 169-210). Add reference: `## Guardrails\n\nRead and apply the shared guardrails from: `.blueprint/agents/GUARDRAILS.md``
|
|
22
|
+
|
|
23
|
+
3. **Update AGENT_BA_CASS.md** - Remove inline guardrails section (lines 383-425). Add same reference format.
|
|
24
|
+
|
|
25
|
+
4. **Update AGENT_TESTER_NIGEL.md** - Remove inline guardrails section (lines 174-216). Add same reference format.
|
|
26
|
+
|
|
27
|
+
5. **Update AGENT_DEVELOPER_CODEY.md** - Remove inline guardrails section (lines 426-468). Add same reference format.
|
|
28
|
+
|
|
29
|
+
6. **Run tests** - Execute `node --test test/feature_shared-guardrails.test.js` to verify all ACs pass.
|
|
30
|
+
|
|
31
|
+
## Risks/Questions
|
|
32
|
+
|
|
33
|
+
- ASSUMPTION: Claude agents can follow file references and will read GUARDRAILS.md when instructed. Per story-extract-guardrails.md:Notes, this is a documented assumption.
|
|
34
|
+
- No code changes needed in src/init.js or src/update.js since `agents/` is already in the UPDATABLE array (per story-update-init-commands.md:Notes).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Story — Extract Guardrails to Shared File
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
As a framework maintainer, I want to extract the duplicated guardrails section from all agent specification files into a single shared GUARDRAILS.md file so that guardrails are maintained in one place and token usage is reduced.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Context / scope
|
|
9
|
+
- Affects all 4 agent specifications (Alex, Cass, Nigel, Codey)
|
|
10
|
+
- Guardrails section is currently ~45 lines / ~400 tokens per agent
|
|
11
|
+
- New file location: `.blueprint/agents/GUARDRAILS.md`
|
|
12
|
+
- This is a structural refactor; agent behaviour remains unchanged
|
|
13
|
+
|
|
14
|
+
Per FEATURE_SPEC.md:Section 1: "The same guardrails section (~45 lines, ~400 tokens) is duplicated verbatim in all 4 agent specification files"
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Acceptance criteria
|
|
19
|
+
|
|
20
|
+
**AC-1 — Shared guardrails file exists**
|
|
21
|
+
- Given the `.blueprint/agents/` directory,
|
|
22
|
+
- When the shared guardrails feature is implemented,
|
|
23
|
+
- Then a new file `GUARDRAILS.md` exists at `.blueprint/agents/GUARDRAILS.md`
|
|
24
|
+
- And it contains the complete guardrails content (Allowed Sources, Prohibited Sources, Citation Requirements, Assumptions vs Facts, Confidentiality, Escalation Protocol sections).
|
|
25
|
+
|
|
26
|
+
**AC-2 — Agent specs reference shared file**
|
|
27
|
+
- Given each agent specification file (AGENT_SPECIFICATION_ALEX.md, AGENT_BA_CASS.md, AGENT_TESTER_NIGEL.md, AGENT_DEVELOPER_CODEY.md),
|
|
28
|
+
- When the shared guardrails feature is implemented,
|
|
29
|
+
- Then the inline guardrails section is removed from each file
|
|
30
|
+
- And each file contains a reference to read `.blueprint/agents/GUARDRAILS.md`.
|
|
31
|
+
|
|
32
|
+
**AC-3 — Guardrails content is identical**
|
|
33
|
+
- Given the new `GUARDRAILS.md` file,
|
|
34
|
+
- When comparing its content to the original inline guardrails,
|
|
35
|
+
- Then the content is identical (no additions, removals, or modifications to guardrail rules).
|
|
36
|
+
|
|
37
|
+
**AC-4 — Agent specs remain functional**
|
|
38
|
+
- Given an agent (e.g., Alex) reads its specification file,
|
|
39
|
+
- When the specification references `GUARDRAILS.md`,
|
|
40
|
+
- Then the agent can locate and read the shared guardrails file
|
|
41
|
+
- And the agent applies all guardrails to its outputs.
|
|
42
|
+
|
|
43
|
+
**AC-5 — No duplicate guardrails remain**
|
|
44
|
+
- Given all 4 agent specification files,
|
|
45
|
+
- When searching for guardrails sections,
|
|
46
|
+
- Then no file contains inline guardrails content (only the reference to the shared file).
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Out of scope
|
|
51
|
+
- Modifying the content of guardrails (per FEATURE_SPEC.md:Section 2)
|
|
52
|
+
- Agent-specific guardrail variations
|
|
53
|
+
- Changes to init/update commands (covered in separate story)
|
|
54
|
+
- Modifying agent prompts in SKILL.md
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Notes
|
|
59
|
+
- Per FEATURE_SPEC.md:Section 6, agents cannot override shared guardrails
|
|
60
|
+
- Per FEATURE_SPEC.md:Section 9, ASSUMPTION: Agents can follow file references (read file X when spec says "see file X")
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Story — Update Init/Update Commands for Shared Guardrails
|
|
2
|
+
|
|
3
|
+
## User story
|
|
4
|
+
As a user installing or updating murmur8, I want the init and update commands to correctly handle the new GUARDRAILS.md file so that the shared guardrails are properly distributed to target projects.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Context / scope
|
|
9
|
+
- Affects `src/init.js` (initialization command)
|
|
10
|
+
- Affects `src/update.js` (update command)
|
|
11
|
+
- New file `.blueprint/agents/GUARDRAILS.md` must be included in both operations
|
|
12
|
+
- Existing behaviour for other files remains unchanged
|
|
13
|
+
|
|
14
|
+
Per FEATURE_SPEC.md:Section 7: "src/init.js and src/update.js must handle the new file during init/update"
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Acceptance criteria
|
|
19
|
+
|
|
20
|
+
**AC-1 — Init copies GUARDRAILS.md**
|
|
21
|
+
- Given a user runs `murmur8 init` in a new project,
|
|
22
|
+
- When the `.blueprint/agents/` directory is copied,
|
|
23
|
+
- Then the `GUARDRAILS.md` file is included in the copied content
|
|
24
|
+
- And the file is placed at `.blueprint/agents/GUARDRAILS.md` in the target project.
|
|
25
|
+
|
|
26
|
+
**AC-2 — Update replaces GUARDRAILS.md**
|
|
27
|
+
- Given a user runs `murmur8 update` in an existing project,
|
|
28
|
+
- When the `.blueprint/agents/` directory is updated,
|
|
29
|
+
- Then the `GUARDRAILS.md` file is replaced with the latest version from the package
|
|
30
|
+
- And the file is placed at `.blueprint/agents/GUARDRAILS.md` in the target project.
|
|
31
|
+
|
|
32
|
+
**AC-3 — Update preserves user content directories**
|
|
33
|
+
- Given a user runs `murmur8 update`,
|
|
34
|
+
- When the update process completes,
|
|
35
|
+
- Then `features/` and `system_specification/` directories remain untouched
|
|
36
|
+
- And only `agents/`, `templates/`, and `ways_of_working/` are replaced.
|
|
37
|
+
|
|
38
|
+
**AC-4 — Agent specs with references are copied**
|
|
39
|
+
- Given the agent specification files now reference `GUARDRAILS.md`,
|
|
40
|
+
- When init or update copies the agent specs,
|
|
41
|
+
- Then all agent specs (AGENT_*.md) are copied with their guardrails references intact
|
|
42
|
+
- And no orphaned guardrails references exist (GUARDRAILS.md is always present when agent specs reference it).
|
|
43
|
+
|
|
44
|
+
**AC-5 — Backward compatibility**
|
|
45
|
+
- Given an existing project with old agent specs (containing inline guardrails),
|
|
46
|
+
- When a user runs `murmur8 update`,
|
|
47
|
+
- Then the old agent specs are replaced with new specs referencing GUARDRAILS.md
|
|
48
|
+
- And the new GUARDRAILS.md file is added to the project.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Out of scope
|
|
53
|
+
- Changes to the guardrails content itself
|
|
54
|
+
- Changes to SKILL.md agent prompts
|
|
55
|
+
- Changes to queue management or pipeline flow
|
|
56
|
+
- User content migration (users do not have custom guardrails)
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
- Per SYSTEM_SPEC.md:Section 8, the update command replaces framework directories while preserving user content
|
|
62
|
+
- The `agents/` directory is listed in UPDATABLE array in `src/update.js`, so GUARDRAILS.md will be handled automatically once it exists in the source
|
|
63
|
+
- No code changes are expected in init.js or update.js since they copy entire directories; the change is purely in the source assets
|