substrate-ai 0.1.23 → 0.1.24

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 CHANGED
@@ -12438,7 +12438,8 @@ const ProductBriefSchema = z.object({
12438
12438
  target_users: z.array(z.string().min(1)).min(1),
12439
12439
  core_features: z.array(z.string().min(1)).min(1),
12440
12440
  success_metrics: z.array(z.string().min(1)).min(1),
12441
- constraints: z.array(z.string()).default([])
12441
+ constraints: z.array(z.string()).default([]),
12442
+ technology_constraints: z.array(z.string()).optional().default([])
12442
12443
  });
12443
12444
  /**
12444
12445
  * Zod schema for the full YAML output emitted by the analysis agent.
@@ -12465,7 +12466,8 @@ const AnalysisScopeOutputSchema = z.object({
12465
12466
  result: z.enum(["success", "failed"]),
12466
12467
  core_features: z.array(z.string().min(1)).min(1).optional(),
12467
12468
  success_metrics: z.array(z.string().min(1)).min(1).optional(),
12468
- constraints: z.array(z.string()).default([])
12469
+ constraints: z.array(z.string()).default([]),
12470
+ technology_constraints: z.array(z.string()).optional().default([])
12469
12471
  });
12470
12472
  /**
12471
12473
  * Zod schema for a single functional requirement.
@@ -13118,7 +13120,8 @@ const BRIEF_FIELDS$1 = [
13118
13120
  "target_users",
13119
13121
  "core_features",
13120
13122
  "success_metrics",
13121
- "constraints"
13123
+ "constraints",
13124
+ "technology_constraints"
13122
13125
  ];
13123
13126
  /**
13124
13127
  * Build step definitions for 2-step analysis decomposition.
@@ -13167,6 +13170,11 @@ function buildAnalysisSteps() {
13167
13170
  field: "constraints",
13168
13171
  category: "product-brief",
13169
13172
  key: "constraints"
13173
+ },
13174
+ {
13175
+ field: "technology_constraints",
13176
+ category: "technology-constraints",
13177
+ key: "technology_constraints"
13170
13178
  }
13171
13179
  ],
13172
13180
  registerArtifact: {
@@ -13188,10 +13196,8 @@ async function runAnalysisMultiStep(deps, params) {
13188
13196
  output: 0
13189
13197
  };
13190
13198
  try {
13191
- let effectiveConcept = params.concept;
13192
- if (params.concept.length > MAX_CONCEPT_CHARS) effectiveConcept = params.concept.slice(0, MAX_CONCEPT_CHARS) + "...";
13193
13199
  const steps = buildAnalysisSteps();
13194
- const result = await runSteps(steps, deps, params.runId, "analysis", { concept: effectiveConcept });
13200
+ const result = await runSteps(steps, deps, params.runId, "analysis", { concept: params.concept });
13195
13201
  if (!result.success) return {
13196
13202
  result: "failed",
13197
13203
  error: result.error ?? "multi_step_failed",
@@ -13211,7 +13217,8 @@ async function runAnalysisMultiStep(deps, params) {
13211
13217
  target_users: visionOutput.target_users,
13212
13218
  core_features: scopeOutput.core_features,
13213
13219
  success_metrics: scopeOutput.success_metrics,
13214
- constraints: scopeOutput.constraints ?? []
13220
+ constraints: scopeOutput.constraints ?? [],
13221
+ technology_constraints: scopeOutput.technology_constraints ?? []
13215
13222
  };
13216
13223
  const analysisResult = {
13217
13224
  result: "success",
@@ -13360,7 +13367,8 @@ const BRIEF_FIELDS = [
13360
13367
  "target_users",
13361
13368
  "core_features",
13362
13369
  "success_metrics",
13363
- "constraints"
13370
+ "constraints",
13371
+ "technology_constraints"
13364
13372
  ];
13365
13373
  /**
13366
13374
  * Format product brief decisions from the analysis phase into markdown-like text
@@ -13456,6 +13464,10 @@ function buildPlanningSteps() {
13456
13464
  {
13457
13465
  placeholder: "functional_requirements",
13458
13466
  source: "step:planning-step-2-frs"
13467
+ },
13468
+ {
13469
+ placeholder: "technology_constraints",
13470
+ source: "decision:analysis.technology-constraints"
13459
13471
  }
13460
13472
  ],
13461
13473
  persist: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -56,6 +56,8 @@ phases:
56
56
  source: "step:planning-step-1-classification"
57
57
  - placeholder: functional_requirements
58
58
  source: "step:planning-step-2-frs"
59
+ - placeholder: technology_constraints
60
+ source: "decision:analysis.technology-constraints"
59
61
  critique: true
60
62
  - name: ux-design
61
63
  description: UX discovery, design system, and user journey mapping (optional — runs when uxDesign is true)
@@ -20,7 +20,7 @@ Analyze the project concept above and produce a focused **vision analysis**: a c
20
20
 
21
21
  2. **Generate a research-grade problem statement:**
22
22
  - A clear, specific articulation of the problem (minimum 2-3 sentences)
23
- - Ground it in user pain, not technology
23
+ - Ground the problem statement in user pain, not technology choices
24
24
  - Include the impact of the problem remaining unsolved
25
25
 
26
26
  3. **Identify target users:**
@@ -26,12 +26,20 @@ Building on the vision analysis above, define the **scope**: core features, succ
26
26
  - Include both leading indicators (engagement, adoption) and lagging indicators (retention, revenue)
27
27
  - Be specific enough to measure
28
28
 
29
- 3. **Identify constraints:**
30
- - Technical limitations, regulatory requirements, budget boundaries
31
- - Timeline pressures, platform restrictions, or integration requirements
29
+ 3. **Identify constraints** (business, regulatory, and operational — NOT technology choices):
30
+ - Regulatory requirements, budget boundaries, compliance mandates
31
+ - Timeline pressures, integration requirements, market restrictions
32
+ - Do NOT include cloud platform, language, or framework choices here — those go in `technology_constraints`
32
33
  - Omit if genuinely none exist
33
34
 
34
- 4. **Quality bar**: A product manager should be able to write a PRD from the combined vision + scope output.
35
+ 4. **Identify technology constraints** (technology choices and restrictions ONLY):
36
+ - Extract explicit technology preferences or exclusions stated in the concept
37
+ - Cloud platform choices (e.g., "GCP", "AWS"), programming language mandates (e.g., "Kotlin/JVM", "Node.js excluded"), framework preferences, infrastructure choices
38
+ - If the concept has a "Technology Constraints" section, extract ALL items from it into this field
39
+ - Include ONLY preferences explicitly stated by the user — do not infer or add your own
40
+ - If none are stated in the concept, emit an empty array
41
+
42
+ 5. **Quality bar**: A product manager should be able to write a PRD from the combined vision + scope output.
35
43
 
36
44
  ## Output Contract
37
45
 
@@ -50,6 +58,8 @@ success_metrics:
50
58
  constraints:
51
59
  - "CLI-only interface limits audience to terminal-comfortable users"
52
60
  - "Must work offline with local storage, no cloud dependency"
61
+ technology_constraints:
62
+ - "Must use PostgreSQL for primary data store"
53
63
  ```
54
64
 
55
65
  If you cannot produce valid output:
@@ -11,6 +11,9 @@
11
11
  ### Functional Requirements (from Step 2)
12
12
  {{functional_requirements}}
13
13
 
14
+ ### Technology Constraints (from Analysis Phase)
15
+ {{technology_constraints}}
16
+
14
17
  ---
15
18
 
16
19
  ## Mission
@@ -29,7 +32,8 @@ Complete the PRD by defining **non-functional requirements**, **tech stack**, **
29
32
  - Key-value pairs mapping technology concerns to specific choices
30
33
  - Use real, current technologies — do not fabricate frameworks
31
34
  - Cover at minimum: language, framework, database, testing
32
- - Choices should align with the product brief constraints
35
+ - **MUST honor stated technology constraints** — if the analysis specifies a cloud platform, language, or framework preference, use it. Do not substitute alternatives unless the constraint is technically impossible for the requirements.
36
+ - If you must deviate from a stated constraint, explicitly note the deviation and rationale
33
37
 
34
38
  3. **Build the domain model:**
35
39
  - Key entities and their relationships
@@ -61,7 +61,14 @@ For EVERY story:
61
61
  3. Does the story have a clear definition of done?
62
62
  - Missing or ambiguous DoD = **minor** finding
63
63
 
64
- ### Step 4: UX Alignment (Conditional)
64
+ ### Step 4: Constraint Adherence
65
+
66
+ 1. Does the architecture honor all technology constraints from the product brief?
67
+ 2. If any technology constraint was overridden, is there an explicit rationale?
68
+ 3. Flag any silent deviations (constraint ignored without explanation) as **blocker** findings
69
+ 4. Flag deviations with rationale as **major** findings
70
+
71
+ ### Step 5: UX Alignment (Conditional)
65
72
 
66
73
  **Only if UX decisions are provided above:**
67
74
 
@@ -73,7 +80,7 @@ For EVERY story that involves user-facing functionality:
73
80
 
74
81
  **If no UX decisions were provided, skip this step entirely.**
75
82
 
76
- ### Step 5: Dependency Validity
83
+ ### Step 6: Dependency Validity
77
84
 
78
85
  For EVERY story with dependencies on other stories:
79
86
  1. Do the referenced stories actually exist (check story keys)?
@@ -81,7 +88,7 @@ For EVERY story with dependencies on other stories:
81
88
  3. Flag invalid references as **blocker** findings
82
89
  4. Flag potentially circular dependencies as **major** findings
83
90
 
84
- ### Step 6: Final Verdict
91
+ ### Step 7: Final Verdict
85
92
 
86
93
  Determine your verdict:
87
94
  - **NOT_READY**: Any of these conditions are true:
@@ -123,7 +130,7 @@ findings:
123
130
  ```
124
131
 
125
132
  Valid verdict values: READY, NEEDS_WORK, NOT_READY
126
- Valid category values: fr_coverage, architecture_compliance, story_quality, ux_alignment, dependency_validity
133
+ Valid category values: fr_coverage, architecture_compliance, story_quality, constraint_adherence, ux_alignment, dependency_validity
127
134
  Valid severity values: blocker, major, minor
128
135
 
129
136
  If you cannot perform the review: