substrate-ai 0.2.26 → 0.2.28

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.
@@ -1,4 +1,4 @@
1
- import { registerRunCommand, runRunAction } from "./run-CEtHPG4I.js";
1
+ import { registerRunCommand, runRunAction } from "./run-BCyrbL3w.js";
2
2
  import "./logger-D2fS2ccL.js";
3
3
  import "./helpers-DljGJnFF.js";
4
4
  import "./decisions-Dq4cAA2L.js";
@@ -1,4 +1,4 @@
1
- import { createVersionManager } from "./version-manager-impl-CZ6KF1Ds.js";
1
+ import { createVersionManager } from "./version-manager-impl-CtzNu7YZ.js";
2
2
  import { execSync, spawn } from "child_process";
3
3
  import * as readline from "readline";
4
4
 
@@ -123,4 +123,4 @@ function registerUpgradeCommand(program) {
123
123
 
124
124
  //#endregion
125
125
  export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
126
- //# sourceMappingURL=upgrade-CjjAx5kD.js.map
126
+ //# sourceMappingURL=upgrade-CJ0JFQ2c.js.map
@@ -1,4 +1,4 @@
1
- import "./version-manager-impl-CZ6KF1Ds.js";
2
- import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-CjjAx5kD.js";
1
+ import "./version-manager-impl-CtzNu7YZ.js";
2
+ import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-CJ0JFQ2c.js";
3
3
 
4
4
  export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
@@ -1,3 +1,3 @@
1
- import { VersionManagerImpl, createVersionManager } from "./version-manager-impl-CZ6KF1Ds.js";
1
+ import { VersionManagerImpl, createVersionManager } from "./version-manager-impl-CtzNu7YZ.js";
2
2
 
3
3
  export { createVersionManager };
@@ -74,6 +74,18 @@ const RoutingPolicySchema = z.object({
74
74
  default_provider: z.string(),
75
75
  rules: z.array(RoutingRuleSchema)
76
76
  }).strict();
77
+ /**
78
+ * Per-workflow token ceiling overrides.
79
+ * Keys match the workflow type names used in prompts and events.
80
+ * Values must be positive integers.
81
+ */
82
+ const TokenCeilingsSchema = z.object({
83
+ "create-story": z.number().int().positive("create-story token ceiling must be a positive integer").optional(),
84
+ "dev-story": z.number().int().positive("dev-story token ceiling must be a positive integer").optional(),
85
+ "code-review": z.number().int().positive("code-review token ceiling must be a positive integer").optional(),
86
+ "test-plan": z.number().int().positive("test-plan token ceiling must be a positive integer").optional(),
87
+ "test-expansion": z.number().int().positive("test-expansion token ceiling must be a positive integer").optional()
88
+ });
77
89
  /** Current supported config format version */
78
90
  const CURRENT_CONFIG_FORMAT_VERSION = "1";
79
91
  /** Current supported task graph version */
@@ -88,7 +100,8 @@ const SubstrateConfigSchema = z.object({
88
100
  global: GlobalSettingsSchema,
89
101
  providers: ProvidersSchema,
90
102
  cost_tracker: CostTrackerConfigSchema.optional(),
91
- budget: BudgetConfigSchema.optional()
103
+ budget: BudgetConfigSchema.optional(),
104
+ token_ceilings: TokenCeilingsSchema.optional()
92
105
  }).strict();
93
106
  const PartialProviderConfigSchema = ProviderConfigSchema.partial();
94
107
  const PartialGlobalSettingsSchema = GlobalSettingsSchema.partial();
@@ -102,7 +115,8 @@ const PartialSubstrateConfigSchema = z.object({
102
115
  gemini: PartialProviderConfigSchema.optional()
103
116
  }).partial().optional(),
104
117
  cost_tracker: CostTrackerConfigSchema.partial().optional(),
105
- budget: BudgetConfigSchema.partial().optional()
118
+ budget: BudgetConfigSchema.partial().optional(),
119
+ token_ceilings: TokenCeilingsSchema.optional()
106
120
  }).strict();
107
121
 
108
122
  //#endregion
@@ -594,4 +608,4 @@ function createVersionManager(deps = {}) {
594
608
 
595
609
  //#endregion
596
610
  export { CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, PartialSubstrateConfigSchema, SUPPORTED_CONFIG_FORMAT_VERSIONS, SubstrateConfigSchema, VersionManagerImpl, createVersionManager, defaultConfigMigrator };
597
- //# sourceMappingURL=version-manager-impl-CZ6KF1Ds.js.map
611
+ //# sourceMappingURL=version-manager-impl-CtzNu7YZ.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.2.26",
3
+ "version": "0.2.28",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,14 +35,16 @@ Adversarial code review. Find what's wrong. Validate story claims against actual
35
35
  - Whether each AC is actually implemented
36
36
  - Whether each `[x]` task is actually done
37
37
 
38
- 3. **Execute adversarial review** across 5 dimensions:
38
+ 3. **Build AC Checklist** For each acceptance criterion (AC1, AC2, ...) in the story, determine: `met` (code implements it), `not_met` (code does not implement it), or `partial` (partially implemented). Cite the specific file and function as evidence.
39
+
40
+ 4. **Execute adversarial review** across 5 dimensions:
39
41
  - **AC Validation** — Is each acceptance criterion implemented?
40
42
  - **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.
41
43
  - **Task Audit** — Tasks marked `[x]` that aren't done are BLOCKER issues
42
44
  - **Code Quality** — Security, error handling, edge cases, maintainability
43
45
  - **Test Quality** — Real assertions, not placeholders or skipped tests
44
46
 
45
- 4. **Severity classification:**
47
+ 5. **Severity classification:**
46
48
  - **blocker** — Task `[x]` but not implemented; security vulnerability; data loss risk
47
49
  - **major** — AC not implemented; false claims; missing error handling on boundaries
48
50
  - **minor** — Style; documentation gap; naming; low-risk edge case
@@ -55,6 +57,13 @@ After completing the review, emit ONLY raw YAML — no markdown fences, no ``` w
55
57
  verdict: SHIP_IT
56
58
  issues: 0
57
59
  issue_list: []
60
+ ac_checklist:
61
+ - ac_id: AC1
62
+ status: met
63
+ evidence: "Implemented in src/modules/foo/foo.ts:createFoo()"
64
+ - ac_id: AC2
65
+ status: met
66
+ evidence: "Covered by src/modules/foo/__tests__/foo.test.ts:it('AC2 ...')"
58
67
  ```
59
68
 
60
69
  Or if issues were found:
@@ -74,10 +83,22 @@ issue_list:
74
83
  description: "Variable name `d` should be more descriptive"
75
84
  file: "src/modules/foo/foo.ts"
76
85
  line: 15
86
+ ac_checklist:
87
+ - ac_id: AC1
88
+ status: met
89
+ evidence: "Implemented in src/modules/foo/foo.ts:createFoo()"
90
+ - ac_id: AC2
91
+ status: not_met
92
+ evidence: "getConstraints() always returns [] — no implementation found"
93
+ - ac_id: AC3
94
+ status: partial
95
+ evidence: "Happy path implemented but error case missing in src/modules/foo/foo.ts:handleFoo()"
77
96
  ```
78
97
 
79
98
  **IMPORTANT**: `issues` must equal the number of items in `issue_list`.
80
99
 
100
+ **IMPORTANT**: `ac_checklist` must contain one entry for every AC found in the story. If the story has no parseable ACs (e.g. a refactoring story), `ac_checklist` may be an empty array.
101
+
81
102
  **Verdict rules:**
82
103
  - `SHIP_IT` — zero blocker/major issues (minor issues acceptable)
83
104
  - `NEEDS_MINOR_FIXES` — minor issues only, or 1-2 major with no blockers