substrate-ai 0.5.10 → 0.5.11

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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { AdapterTelemetryPersistence, AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, FileStateStore, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SUBSTRATE_OWNED_SETTINGS_KEYS, SymbolParser, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDatabaseAdapter, createDispatcher, createDoltClient, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, createTelemetryAdvisor, detectCycles, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initSchema, initializeDolt, isSyncAdapter, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-BWmiveTZ.js";
2
+ import { AdapterTelemetryPersistence, AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, FileStateStore, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SUBSTRATE_OWNED_SETTINGS_KEYS, SymbolParser, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDatabaseAdapter, createDispatcher, createDoltClient, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, createTelemetryAdvisor, detectCycles, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initSchema, initializeDolt, isSyncAdapter, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-DCW67EQW.js";
3
3
  import { createLogger } from "../logger-D2fS2ccL.js";
4
4
  import { AdapterRegistry } from "../adapter-registry-D2zdMwVu.js";
5
5
  import { CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, PartialSubstrateConfigSchema } from "../config-migrator-DtZW1maj.js";
@@ -2969,7 +2969,7 @@ async function runSupervisorAction(options, deps = {}) {
2969
2969
  await initSchema(expAdapter);
2970
2970
  const { runRunAction: runPipeline } = await import(
2971
2971
  /* @vite-ignore */
2972
- "../run-DZGdLF4h.js"
2972
+ "../run-D2sZQ66W.js"
2973
2973
  );
2974
2974
  const runStoryFn = async (opts) => {
2975
2975
  const exitCode = await runPipeline({
@@ -1,4 +1,4 @@
1
- import { registerRunCommand, runRunAction } from "./run-BWmiveTZ.js";
1
+ import { registerRunCommand, runRunAction } from "./run-DCW67EQW.js";
2
2
  import "./logger-D2fS2ccL.js";
3
3
  import "./config-migrator-DtZW1maj.js";
4
4
  import "./helpers-BihqWgVe.js";
@@ -13963,13 +13963,20 @@ var Recommender = class Recommender {
13963
13963
  });
13964
13964
  }
13965
13965
  /**
13966
+ * Categories whose growth is inherent to normal agentic work and not actionable.
13967
+ * tool_outputs grows as the agent reads files, runs commands, etc. — expected behavior.
13968
+ * conversation_history grows naturally as conversations progress.
13969
+ */
13970
+ static EXPECTED_GROWTH_CATEGORIES = new Set(["tool_outputs", "conversation_history"]);
13971
+ /**
13966
13972
  * Flag semantic categories with trend === 'growing'.
13967
13973
  * Severity is 'info' by default; 'warning' if percentage > 25%.
13974
+ * Skips categories whose growth is inherent to normal agentic work.
13968
13975
  */
13969
13976
  _runGrowingCategories(ctx) {
13970
13977
  const { categories, storyKey, sprintId, generatedAt } = ctx;
13971
13978
  if (categories.length === 0) return [];
13972
- const growing = categories.filter((c) => c.trend === "growing");
13979
+ const growing = categories.filter((c) => c.trend === "growing" && !Recommender.EXPECTED_GROWTH_CATEGORIES.has(c.category));
13973
13980
  return growing.map((cat, index) => {
13974
13981
  const severity = cat.percentage > 25 ? "warning" : "info";
13975
13982
  const actionTarget = cat.category;
@@ -14029,8 +14036,15 @@ var Recommender = class Recommender {
14029
14036
  }];
14030
14037
  }
14031
14038
  /**
14039
+ * Models known to be intentionally routed for lightweight tasks.
14040
+ * These should not be flagged as "underperforming" — the orchestrator chose them
14041
+ * deliberately for cost/speed reasons, not as a performance optimization target.
14042
+ */
14043
+ static INTENTIONAL_LIGHTWEIGHT_MODELS = new Set(["claude-haiku-4-5-20251001", "claude-haiku-4-5"]);
14044
+ /**
14032
14045
  * If more than one model is present, flag the underperforming model.
14033
14046
  * Severity is 'info' by default; 'warning' if cache efficiency gap > 20pp.
14047
+ * Skips flagging models that are intentionally routed for lightweight tasks.
14034
14048
  */
14035
14049
  _runModelComparison(ctx) {
14036
14050
  const { efficiencyScore, storyKey, sprintId, generatedAt } = ctx;
@@ -14039,6 +14053,7 @@ var Recommender = class Recommender {
14039
14053
  const sorted = [...models].sort((a, b) => b.cacheHitRate - a.cacheHitRate);
14040
14054
  const best = sorted[0];
14041
14055
  const worst = sorted[sorted.length - 1];
14056
+ if (Recommender.INTENTIONAL_LIGHTWEIGHT_MODELS.has(worst.model)) return [];
14042
14057
  if (best.model === worst.model) return [];
14043
14058
  const gapPP = (best.cacheHitRate - worst.cacheHitRate) * 100;
14044
14059
  const severity = gapPP > 20 ? "warning" : "info";
@@ -16626,7 +16641,7 @@ function createImplementationOrchestrator(deps) {
16626
16641
  const fixTemplate = await pack.getPrompt("fix-story");
16627
16642
  const storyContent = await readFile$1(storyFilePath ?? "", "utf-8");
16628
16643
  const complexity = computeStoryComplexity(storyContent);
16629
- autoApproveMaxTurns = resolveFixStoryMaxTurns(complexity.complexityScore);
16644
+ autoApproveMaxTurns = Math.max(15, Math.floor(resolveFixStoryMaxTurns(complexity.complexityScore) / 2));
16630
16645
  logComplexityResult(storyKey, complexity, autoApproveMaxTurns);
16631
16646
  let reviewFeedback;
16632
16647
  if (issueList.length === 0) reviewFeedback = `Verdict: ${verdict}\nIssues: Minor issues flagged but no specifics provided. Review the story ACs and fix any remaining gaps.`;
@@ -16730,7 +16745,8 @@ function createImplementationOrchestrator(deps) {
16730
16745
  const storyContent = await readFile$1(storyFilePath ?? "", "utf-8");
16731
16746
  {
16732
16747
  const complexity = computeStoryComplexity(storyContent);
16733
- fixMaxTurns = resolveFixStoryMaxTurns(complexity.complexityScore);
16748
+ const fullBudget = resolveFixStoryMaxTurns(complexity.complexityScore);
16749
+ fixMaxTurns = taskType === "minor-fixes" ? Math.max(15, Math.floor(fullBudget / 2)) : fullBudget;
16734
16750
  logComplexityResult(storyKey, complexity, fixMaxTurns);
16735
16751
  }
16736
16752
  let reviewFeedback;
@@ -22675,4 +22691,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
22675
22691
 
22676
22692
  //#endregion
22677
22693
  export { AdapterTelemetryPersistence, AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, FileStateStore, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SUBSTRATE_OWNED_SETTINGS_KEYS, SymbolParser, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDatabaseAdapter, createDispatcher, createDoltClient, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, createTelemetryAdvisor, detectCycles, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initSchema, initializeDolt, isSyncAdapter, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
22678
- //# sourceMappingURL=run-BWmiveTZ.js.map
22694
+ //# sourceMappingURL=run-DCW67EQW.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",