substrate-ai 0.2.19 → 0.2.21
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/dist/cli/index.js +343 -123
- package/dist/{experimenter-CHRVkV3d.js → experimenter-bc40oi8p.js} +2 -2
- package/dist/index.d.ts +13 -0
- package/dist/{operational-CobuCGbM.js → operational-CnMlvWqc.js} +86 -2
- package/dist/{run-mFmS2pw6.js → run-BLIgARum.js} +1046 -170
- package/dist/run-gmS6DsGT.js +7 -0
- package/package.json +1 -1
- package/packs/bmad/prompts/analysis-step-1-vision.md +4 -1
- package/packs/bmad/prompts/code-review.md +5 -1
- package/packs/bmad/prompts/dev-story.md +3 -0
- package/packs/bmad/prompts/test-expansion.md +65 -0
- package/packs/bmad/prompts/test-plan.md +41 -0
- package/dist/run-CUGB4FQx.js +0 -7
package/package.json
CHANGED
|
@@ -8,13 +8,16 @@
|
|
|
8
8
|
### Research Context
|
|
9
9
|
{{research_findings}}
|
|
10
10
|
|
|
11
|
+
### Prior Run Findings
|
|
12
|
+
{{prior_findings}}
|
|
13
|
+
|
|
11
14
|
---
|
|
12
15
|
|
|
13
16
|
## Mission
|
|
14
17
|
|
|
15
18
|
Analyze the project concept above and produce a focused **vision analysis**: a clear problem statement and identification of target users. Do NOT define features or metrics yet — those come in a subsequent step.
|
|
16
19
|
|
|
17
|
-
When Research Context is provided above, ground your vision analysis in that evidence: reference specific market signals, competitive gaps, or feasibility findings to justify your problem statement and user segmentation. When Research Context is empty, proceed using the concept alone — output quality must be identical.
|
|
20
|
+
When Research Context is provided above, ground your vision analysis in that evidence: reference specific market signals, competitive gaps, or feasibility findings to justify your problem statement and user segmentation. When Research Context is empty, proceed using the concept alone — output quality must be identical. When Prior Run Findings are provided, use them as grounding context — recurring implementation patterns indicate where the concept underestimated complexity.
|
|
18
21
|
|
|
19
22
|
## Instructions
|
|
20
23
|
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
### Architecture Constraints
|
|
15
15
|
{{arch_constraints}}
|
|
16
16
|
|
|
17
|
+
### Prior Run Findings
|
|
18
|
+
{{prior_findings}}
|
|
19
|
+
|
|
17
20
|
---
|
|
18
21
|
|
|
19
22
|
## Mission
|
|
@@ -32,8 +35,9 @@ Adversarial code review. Find what's wrong. Validate story claims against actual
|
|
|
32
35
|
- Whether each AC is actually implemented
|
|
33
36
|
- Whether each `[x]` task is actually done
|
|
34
37
|
|
|
35
|
-
3. **Execute adversarial review** across
|
|
38
|
+
3. **Execute adversarial review** across 5 dimensions:
|
|
36
39
|
- **AC Validation** — Is each acceptance criterion implemented?
|
|
40
|
+
- **AC-to-Test Traceability** — For each AC, identify the specific test file and test function that validates it. If an AC has no corresponding test evidence, flag it as a major issue: "AC{N} has no test evidence". A test "covers" an AC if it directly exercises the behavior described in the criterion — tangential tests do not count.
|
|
37
41
|
- **Task Audit** — Tasks marked `[x]` that aren't done are BLOCKER issues
|
|
38
42
|
- **Code Quality** — Security, error handling, edge cases, maintainability
|
|
39
43
|
- **Test Quality** — Real assertions, not placeholders or skipped tests
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Test Expansion Analysis
|
|
2
|
+
|
|
3
|
+
## Mission
|
|
4
|
+
|
|
5
|
+
You are a test coverage analyst. Your mission is to identify gaps in E2E and integration test coverage after a story implementation.
|
|
6
|
+
|
|
7
|
+
Unit tests alone are insufficient for pipeline confidence. Bugs at module boundaries, DB interactions, and cross-service integrations are systematically missed by unit-only coverage.
|
|
8
|
+
|
|
9
|
+
For each acceptance criterion in the story:
|
|
10
|
+
1. Read the AC carefully to understand what behavior it specifies
|
|
11
|
+
2. Examine the git diff to see what tests were added or modified
|
|
12
|
+
3. Determine if the AC's happy path is exercised at the module-boundary or system level (integration or E2E test), or only via unit tests with mocked dependencies
|
|
13
|
+
4. Flag ACs whose happy path is covered only by unit tests (all real collaborators mocked) or not tested at all at the integration/E2E level
|
|
14
|
+
|
|
15
|
+
Focus on **actionable gaps** — where writing an integration or E2E test would catch real bugs that unit tests cannot.
|
|
16
|
+
|
|
17
|
+
## Story Content
|
|
18
|
+
|
|
19
|
+
{{story_content}}
|
|
20
|
+
|
|
21
|
+
## Git Changes
|
|
22
|
+
|
|
23
|
+
{{git_diff}}
|
|
24
|
+
|
|
25
|
+
## Architecture Context
|
|
26
|
+
|
|
27
|
+
{{arch_constraints}}
|
|
28
|
+
|
|
29
|
+
## Output Contract
|
|
30
|
+
|
|
31
|
+
Emit YAML exactly in this format — no other text before or after the YAML block:
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
expansion_priority: low # low | medium | high
|
|
35
|
+
coverage_gaps:
|
|
36
|
+
- ac_ref: AC1
|
|
37
|
+
description: "Brief description of what integration/E2E coverage is missing"
|
|
38
|
+
gap_type: missing-integration # missing-e2e | missing-integration | unit-only
|
|
39
|
+
- ac_ref: AC3
|
|
40
|
+
description: "AC3 happy path tested only with mocked DB — no real SQLite integration test"
|
|
41
|
+
gap_type: unit-only
|
|
42
|
+
suggested_tests:
|
|
43
|
+
- test_name: "runTestExpansion integration — persists result to real DB"
|
|
44
|
+
test_type: integration # e2e | integration | unit
|
|
45
|
+
description: "Use a real SQLite in-memory DB to verify createDecision is actually called with correct args"
|
|
46
|
+
target_ac: AC4 # optional
|
|
47
|
+
- test_name: "pipeline E2E — test-expansion triggers after SHIP_IT"
|
|
48
|
+
test_type: e2e
|
|
49
|
+
description: "Run a full orchestrator pipeline with a mocked dispatcher and verify test-expansion runs post-SHIP_IT"
|
|
50
|
+
target_ac: AC1
|
|
51
|
+
notes: "Optional free-text notes about overall coverage posture" # optional — omit if not needed
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Expansion priority guidance:**
|
|
55
|
+
- `high`: Multiple ACs have no integration coverage and the feature touches external systems (DB, filesystem, network)
|
|
56
|
+
- `medium`: Some ACs lack integration coverage for non-trivial logic
|
|
57
|
+
- `low`: Coverage gaps exist but are minor or the risk surface is small
|
|
58
|
+
|
|
59
|
+
**If no meaningful gaps exist**, emit:
|
|
60
|
+
```yaml
|
|
61
|
+
expansion_priority: low
|
|
62
|
+
coverage_gaps: []
|
|
63
|
+
suggested_tests: []
|
|
64
|
+
notes: "Coverage is adequate — all key paths have integration or E2E tests."
|
|
65
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Test Plan Agent
|
|
2
|
+
|
|
3
|
+
## Mission
|
|
4
|
+
|
|
5
|
+
Analyze the story's Acceptance Criteria and tasks. Produce a concrete test plan listing the test files to create, the test categories to cover (unit/integration/e2e), and a brief note on AC coverage.
|
|
6
|
+
|
|
7
|
+
## Story Content
|
|
8
|
+
|
|
9
|
+
{{story_content}}
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
1. Read the Acceptance Criteria (AC1, AC2, etc.) and Tasks in the story above.
|
|
14
|
+
2. Identify the source files that will need tests (from Dev Notes, Key File Paths, and Tasks).
|
|
15
|
+
3. For each AC, determine which test file and test function will validate it.
|
|
16
|
+
4. Produce a concise test plan — one or two test files is typical for small stories.
|
|
17
|
+
|
|
18
|
+
**Rules:**
|
|
19
|
+
- List only test files that will be NEW (not existing ones you'd extend unless necessary).
|
|
20
|
+
- Use the project's test path convention: `src/modules/<module>/__tests__/<file>.test.ts`
|
|
21
|
+
- Test categories: `unit` for isolated function tests, `integration` for multi-module tests, `e2e` for full pipeline tests.
|
|
22
|
+
- Keep `coverage_notes` brief — one sentence per AC is sufficient.
|
|
23
|
+
|
|
24
|
+
## Output Contract
|
|
25
|
+
|
|
26
|
+
Emit ONLY this YAML block — no markdown fences, no other text:
|
|
27
|
+
|
|
28
|
+
result: success
|
|
29
|
+
test_files:
|
|
30
|
+
- src/modules/<module>/__tests__/<file>.test.ts
|
|
31
|
+
test_categories:
|
|
32
|
+
- unit
|
|
33
|
+
- integration
|
|
34
|
+
coverage_notes: "AC1 covered by foo.test.ts describe('runFoo'). AC2 covered by..."
|
|
35
|
+
|
|
36
|
+
If you cannot produce a plan (e.g., story content is missing or unreadable), emit:
|
|
37
|
+
|
|
38
|
+
result: failed
|
|
39
|
+
test_files: []
|
|
40
|
+
test_categories: []
|
|
41
|
+
coverage_notes: ""
|
package/dist/run-CUGB4FQx.js
DELETED