substrate-ai 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/cli/index.js +120 -130
- package/dist/index.d.ts +40 -1
- package/dist/{run-D3ZscMlL.js → run-0IlA2ubQ.js} +396 -54
- package/dist/{run-Bwyy5-RY.js → run-Chc5BzIz.js} +1 -1
- package/package.json +1 -1
- package/packs/bmad/manifest.yaml +29 -0
- package/packs/bmad/prompts/critique-research.md +92 -0
- package/packs/bmad/prompts/research-step-1-discovery.md +76 -0
- package/packs/bmad/prompts/research-step-2-synthesis.md +64 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./logger-C6n1g8uP.js";
|
|
2
2
|
import "./event-bus-J-bw-pkp.js";
|
|
3
|
-
import { registerRunCommand, runRunAction } from "./run-
|
|
3
|
+
import { registerRunCommand, runRunAction } from "./run-0IlA2ubQ.js";
|
|
4
4
|
import "./decisions-DNYByk0U.js";
|
|
5
5
|
import "./metrics-BSg8VIHd.js";
|
|
6
6
|
|
package/package.json
CHANGED
package/packs/bmad/manifest.yaml
CHANGED
|
@@ -2,12 +2,37 @@ name: bmad
|
|
|
2
2
|
version: 1.0.0
|
|
3
3
|
description: BMAD methodology for autonomous software development
|
|
4
4
|
|
|
5
|
+
# Optional research phase (Story 20.1).
|
|
6
|
+
# When true, a 'research' phase runs before analysis, conducting market/competitive research.
|
|
7
|
+
# Set to false (or omit) to skip research and proceed directly to analysis.
|
|
8
|
+
research: true
|
|
9
|
+
|
|
5
10
|
# Optional UX design phase (Story 16.5).
|
|
6
11
|
# When true, a 'ux-design' phase runs between planning and solutioning.
|
|
7
12
|
# Set to false (or omit) to skip UX design and proceed directly to solutioning.
|
|
8
13
|
uxDesign: true
|
|
9
14
|
|
|
10
15
|
phases:
|
|
16
|
+
- name: research
|
|
17
|
+
description: Market research, competitive landscape analysis, and technical feasibility (runs before analysis when research is enabled)
|
|
18
|
+
entryGates: []
|
|
19
|
+
exitGates: [research-complete]
|
|
20
|
+
artifacts: [research-findings]
|
|
21
|
+
steps:
|
|
22
|
+
- name: research-step-1-discovery
|
|
23
|
+
template: research-step-1-discovery
|
|
24
|
+
context:
|
|
25
|
+
- placeholder: concept
|
|
26
|
+
source: "param:concept"
|
|
27
|
+
elicitate: true
|
|
28
|
+
- name: research-step-2-synthesis
|
|
29
|
+
template: research-step-2-synthesis
|
|
30
|
+
context:
|
|
31
|
+
- placeholder: concept
|
|
32
|
+
source: "param:concept"
|
|
33
|
+
- placeholder: raw_findings
|
|
34
|
+
source: "step:research-step-1-discovery"
|
|
35
|
+
critique: true
|
|
11
36
|
- name: analysis
|
|
12
37
|
description: Product discovery and brief creation
|
|
13
38
|
entryGates: []
|
|
@@ -175,6 +200,10 @@ prompts:
|
|
|
175
200
|
architecture-step-3-patterns: prompts/architecture-step-3-patterns.md
|
|
176
201
|
stories-step-1-epics: prompts/stories-step-1-epics.md
|
|
177
202
|
stories-step-2-stories: prompts/stories-step-2-stories.md
|
|
203
|
+
# Research phase prompts (Story 20-2)
|
|
204
|
+
research-step-1-discovery: prompts/research-step-1-discovery.md
|
|
205
|
+
research-step-2-synthesis: prompts/research-step-2-synthesis.md
|
|
206
|
+
critique-research: prompts/critique-research.md
|
|
178
207
|
# UX design step prompts (Story 16-5)
|
|
179
208
|
ux-step-1-discovery: prompts/ux-step-1-discovery.md
|
|
180
209
|
ux-step-2-design-system: prompts/ux-step-2-design-system.md
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# BMAD Critique Agent — Research Phase
|
|
2
|
+
|
|
3
|
+
## Artifact Under Review
|
|
4
|
+
|
|
5
|
+
{{artifact_content}}
|
|
6
|
+
|
|
7
|
+
## Project Context
|
|
8
|
+
|
|
9
|
+
{{project_context}}
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Your Role
|
|
14
|
+
|
|
15
|
+
You are an adversarial quality reviewer. Your job is to find what's wrong with this research document before the team builds a product brief on a flawed foundation.
|
|
16
|
+
|
|
17
|
+
Adopt a critical mindset: assume the research is incomplete, biased, or stale until proven otherwise.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Quality Standards for Research Artifacts
|
|
22
|
+
|
|
23
|
+
A high-quality research artifact must satisfy ALL of these criteria:
|
|
24
|
+
|
|
25
|
+
### 1. Source Credibility
|
|
26
|
+
- Findings must reference identifiable, credible sources (industry reports, named companies, published standards, or well-known open source projects).
|
|
27
|
+
- Vague attributions like "industry experts say" or "research shows" without specifics are unacceptable.
|
|
28
|
+
- Market sizing claims must include a source or methodology (e.g., "Gartner 2024", "company 10-K", "author's estimate based on TAM").
|
|
29
|
+
- At minimum, 2-3 named companies or products must be referenced as evidence.
|
|
30
|
+
|
|
31
|
+
### 2. Finding Relevance
|
|
32
|
+
- Every finding must be directly relevant to the stated concept — tangential observations about adjacent markets are noise.
|
|
33
|
+
- Market findings must describe the actual target buyer, not a proxy audience.
|
|
34
|
+
- Technical findings must reflect the technology decisions the concept will actually face, not hypothetical stacks.
|
|
35
|
+
- Risk flags must be specific and actionable (not generic "the market is competitive").
|
|
36
|
+
|
|
37
|
+
### 3. Gap Identification
|
|
38
|
+
- The research must acknowledge what it does NOT know — gaps are acceptable, but must be named explicitly.
|
|
39
|
+
- If web search was unavailable, the agent must state that findings are based on training knowledge and may be stale.
|
|
40
|
+
- Missing dimensions: if any of market, competitive, technical, or risk analysis is absent, it is a blocker.
|
|
41
|
+
- Opportunity signals must be grounded in research — speculative "we could do X" signals are unacceptable.
|
|
42
|
+
|
|
43
|
+
### 4. Synthesis Coherence
|
|
44
|
+
- The competitive landscape must identify named competitors, not generic categories ("some incumbents").
|
|
45
|
+
- Risk flags must be distinct from each other — no duplicates or slight rewording of the same risk.
|
|
46
|
+
- Opportunity signals must logically follow from the findings — they must be traceable to specific evidence in the research.
|
|
47
|
+
- Market context and competitive landscape must be internally consistent — contradictions are blockers.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Instructions
|
|
52
|
+
|
|
53
|
+
1. Read the artifact carefully. Do not assume anything is correct.
|
|
54
|
+
2. For each quality dimension above, identify whether it is met, partially met, or missing.
|
|
55
|
+
3. For each issue found, classify its severity:
|
|
56
|
+
- **blocker**: The research cannot be used to proceed — a critical dimension is missing, contradictory, or completely uncredible.
|
|
57
|
+
- **major**: Significant quality gap that will bias the product brief if not addressed.
|
|
58
|
+
- **minor**: Improvement that would increase quality but does not block progress.
|
|
59
|
+
|
|
60
|
+
4. If the artifact meets all criteria, emit a `pass` verdict with zero issues.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Output Contract
|
|
65
|
+
|
|
66
|
+
Emit ONLY this YAML block — no preamble, no explanation, no other text.
|
|
67
|
+
|
|
68
|
+
If no issues found:
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
verdict: pass
|
|
72
|
+
issue_count: 0
|
|
73
|
+
issues: []
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If issues found:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
verdict: needs_work
|
|
80
|
+
issue_count: 2
|
|
81
|
+
issues:
|
|
82
|
+
- severity: major
|
|
83
|
+
category: source-credibility
|
|
84
|
+
description: "Market size claim of '$15B by 2027' has no cited source or methodology."
|
|
85
|
+
suggestion: "Add the source (e.g., 'per Gartner 2024 Cloud Infrastructure Report') or note it as an author estimate with the derivation method."
|
|
86
|
+
- severity: minor
|
|
87
|
+
category: finding-relevance
|
|
88
|
+
description: "Technical findings describe a microservices architecture that is not relevant to the stated single-tenant SaaS concept."
|
|
89
|
+
suggestion: "Replace with findings specific to single-tenant deployment patterns, data isolation models, and per-tenant customization approaches."
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**IMPORTANT**: `issue_count` must equal the exact number of items in `issues`.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# BMAD Research Step 1: Discovery
|
|
2
|
+
|
|
3
|
+
## Context (pre-assembled by pipeline)
|
|
4
|
+
|
|
5
|
+
### Concept
|
|
6
|
+
{{concept}}
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Mission
|
|
11
|
+
|
|
12
|
+
Conduct a thorough **research discovery** for this concept. Your goal is to gather and organize raw findings across three dimensions:
|
|
13
|
+
|
|
14
|
+
1. **Concept Classification** — what type of product or tool is this, who is it for, and what domain does it operate in?
|
|
15
|
+
2. **Market Findings** — market size, target customers, pricing models, and market trends
|
|
16
|
+
3. **Domain Findings** — best practices, industry standards, regulatory requirements, and use cases
|
|
17
|
+
4. **Technical Findings** — technical architecture patterns, technology stacks, open source alternatives, and implementation challenges
|
|
18
|
+
|
|
19
|
+
This raw discovery output will feed directly into a synthesis step that distills the findings into actionable insights.
|
|
20
|
+
|
|
21
|
+
## Instructions
|
|
22
|
+
|
|
23
|
+
### 1. Classify the Concept
|
|
24
|
+
|
|
25
|
+
Before searching, classify the concept:
|
|
26
|
+
- **Product type**: Is this a product sold to customers, or an internal tool / developer tooling?
|
|
27
|
+
- **Industry vertical**: What industry or sector does it primarily serve (e.g., fintech, healthcare, devtools, SaaS platform, e-commerce)?
|
|
28
|
+
- **Tech domain**: What is the primary technical domain (e.g., data pipelines, mobile apps, APIs, AI/ML, infrastructure)?
|
|
29
|
+
|
|
30
|
+
### 2. Conduct Web Research
|
|
31
|
+
|
|
32
|
+
Use web search to gather findings across the three dimensions below. Execute approximately 12 searches total — 3-4 per dimension.
|
|
33
|
+
|
|
34
|
+
**Market dimension queries:**
|
|
35
|
+
- `"{{concept}} market size"`
|
|
36
|
+
- `"{{concept}} target customers"`
|
|
37
|
+
- `"{{concept}} pricing models"`
|
|
38
|
+
- `"{{concept}} market trends 2025"`
|
|
39
|
+
|
|
40
|
+
**Domain dimension queries:**
|
|
41
|
+
- `"{{concept}} best practices"`
|
|
42
|
+
- `"{{concept}} industry standards"`
|
|
43
|
+
- `"{{concept}} regulatory requirements"`
|
|
44
|
+
- `"{{concept}} use cases"`
|
|
45
|
+
|
|
46
|
+
**Technical dimension queries:**
|
|
47
|
+
- `"{{concept}} technical architecture"`
|
|
48
|
+
- `"{{concept}} technology stack"`
|
|
49
|
+
- `"{{concept}} open source alternatives"`
|
|
50
|
+
- `"{{concept}} implementation challenges"`
|
|
51
|
+
|
|
52
|
+
> **Fallback**: If web search is unavailable in your environment, proceed with concept analysis using your training knowledge — acknowledge that findings may not reflect the latest market conditions.
|
|
53
|
+
|
|
54
|
+
### 3. Organize Findings
|
|
55
|
+
|
|
56
|
+
For each dimension, summarize the key findings in 2-4 sentences. Be specific: name actual companies, technologies, standards, or regulations where found. Avoid vague generalizations.
|
|
57
|
+
|
|
58
|
+
## Output Contract
|
|
59
|
+
|
|
60
|
+
Emit ONLY this YAML block as your final output — no other text, no preamble.
|
|
61
|
+
|
|
62
|
+
**CRITICAL**: All string values MUST be quoted with double quotes.
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
result: success
|
|
66
|
+
concept_classification: "B2B SaaS product targeting mid-market DevOps teams in the cloud infrastructure space"
|
|
67
|
+
market_findings: "The cloud infrastructure automation market is valued at $12B in 2024, growing at 18% CAGR. Primary customers are platform engineering teams at companies with 50-500 engineers. Pricing models cluster around per-seat ($30-80/month) and usage-based (per compute hour). Key trend: shift from IaaS to developer-experience platforms."
|
|
68
|
+
domain_findings: "Industry standards include Terraform HCL for IaC and GitOps workflows (CNCF). Regulatory requirements vary by industry: SOC 2 Type II is table stakes for enterprise; HIPAA for healthcare customers. Key use cases: multi-cloud deployment, drift detection, cost optimization, and compliance reporting."
|
|
69
|
+
technical_findings: "Dominant architectural pattern is event-driven with a control plane / data plane separation. Common stack: Go or Rust for the agent, React for dashboard, PostgreSQL + TimescaleDB for time-series data. Open source alternatives include Pulumi, OpenTofu, and Crossplane. Primary implementation challenges are state reconciliation under network partitions and secret management at scale."
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If you cannot produce valid output:
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
result: failed
|
|
76
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# BMAD Research Step 2: Synthesis
|
|
2
|
+
|
|
3
|
+
## Context (pre-assembled by pipeline)
|
|
4
|
+
|
|
5
|
+
### Concept
|
|
6
|
+
{{concept}}
|
|
7
|
+
|
|
8
|
+
### Raw Research Findings
|
|
9
|
+
{{raw_findings}}
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Mission
|
|
14
|
+
|
|
15
|
+
Synthesize the raw research findings into a structured, actionable research report. Your goal is to distill the discovery output into five key sections:
|
|
16
|
+
|
|
17
|
+
1. **Market Context** — the market landscape, sizing, and customer dynamics
|
|
18
|
+
2. **Competitive Landscape** — who the key competitors are, their positioning, and differentiation opportunities
|
|
19
|
+
3. **Technical Feasibility** — how technically viable this concept is, key technology choices, and build vs. buy considerations
|
|
20
|
+
4. **Risk Flags** — specific risks that could threaten success (market, technical, regulatory, execution)
|
|
21
|
+
5. **Opportunity Signals** — specific indicators of where this concept has an advantage or untapped potential
|
|
22
|
+
|
|
23
|
+
This synthesis output feeds directly into the analysis phase to ground the product brief in real-world context.
|
|
24
|
+
|
|
25
|
+
## Instructions
|
|
26
|
+
|
|
27
|
+
1. **Market Context**: Synthesize the market dimension findings. Quantify the opportunity where possible. Identify the primary buyer profile and decision-maker. Note any market timing signals (growing, contracting, consolidating).
|
|
28
|
+
|
|
29
|
+
2. **Competitive Landscape**: Identify named competitors (direct and adjacent). Describe how they are positioned. Identify gaps or differentiation opportunities that the concept could exploit.
|
|
30
|
+
|
|
31
|
+
3. **Technical Feasibility**: Assess how technically achievable the concept is given the technology landscape. Highlight proven patterns to adopt, and identify areas where the technical approach is risky or unproven.
|
|
32
|
+
|
|
33
|
+
4. **Risk Flags**: List 3-6 specific, concrete risks. Each risk should name the threat and its potential impact. Avoid generic risks like "execution risk" — be specific (e.g., "Compliance with HIPAA BAA requirements may add 3-6 months to enterprise sales cycles").
|
|
34
|
+
|
|
35
|
+
5. **Opportunity Signals**: List 3-6 specific indicators that suggest this concept has real potential. These should be grounded in the research findings, not wishful thinking.
|
|
36
|
+
|
|
37
|
+
## Output Contract
|
|
38
|
+
|
|
39
|
+
Emit ONLY this YAML block as your final output — no other text, no preamble.
|
|
40
|
+
|
|
41
|
+
**CRITICAL**: All string values MUST be quoted with double quotes. List items in `risk_flags` and `opportunity_signals` must also be double-quoted.
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
result: success
|
|
45
|
+
market_context: "The cloud infrastructure automation market is a $12B opportunity growing at 18% CAGR, driven by the shift from DevOps to platform engineering. Primary buyers are VPs of Engineering and Platform Engineering leads at Series B+ startups and mid-market companies. Market is in early growth phase with high willingness to pay for workflow automation."
|
|
46
|
+
competitive_landscape: "Direct competitors are Terraform Cloud (HashiCorp/IBM), Spacelift, and Scalr — all targeting the same DevOps persona. Pulumi competes on developer experience with a code-first approach. Differentiation opportunity: none of the incumbent tools offer AI-assisted drift detection or natural-language policy authoring. Open source (OpenTofu) commoditizes the IaC layer, making the control plane the primary value surface."
|
|
47
|
+
technical_feasibility: "High feasibility using proven patterns: Go agent with event-driven control plane (used by Argo CD, Flux), React dashboard, and PostgreSQL for state. Primary technical risk is distributed state reconciliation under network partitions. Build recommendation: agent core in Go, leverage existing Terraform/OpenTofu compatibility, avoid building a custom DSL."
|
|
48
|
+
risk_flags:
|
|
49
|
+
- "Regulatory: HIPAA and SOC 2 Type II compliance are table stakes for enterprise sales — adds 4-6 months to first enterprise close"
|
|
50
|
+
- "Competitive: HashiCorp's BSL license change accelerated OpenTofu adoption — if IBM reverses the decision, momentum could shift back"
|
|
51
|
+
- "Technical: Distributed state reconciliation under network partitions is an unsolved problem that all incumbents struggle with — high engineering cost"
|
|
52
|
+
- "Market: Per-seat pricing erodes at scale (>500 engineers) — customers will demand volume discounts or switch to usage-based pricing"
|
|
53
|
+
opportunity_signals:
|
|
54
|
+
- "AI-native workflows: no incumbent offers natural-language policy authoring or AI-assisted remediation — clear whitespace"
|
|
55
|
+
- "OpenTofu migration wave: 30%+ of Terraform users are evaluating alternatives following the BSL license change — timing is favorable"
|
|
56
|
+
- "Platform engineering trend: Gartner predicts 80% of large orgs will have platform engineering teams by 2026 — growing buyer segment"
|
|
57
|
+
- "Developer experience gap: incumbent UIs are functional but dated — a modern, keyboard-first interface is a differentiator"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If you cannot produce valid output:
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
result: failed
|
|
64
|
+
```
|