substrate-ai 0.20.142 → 0.20.143
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 +6 -6
- package/dist/{health-Cf5RjwHi.js → health-CoxLvCcT.js} +2 -2
- package/dist/{health-DTJaiJOd.js → health-FUl73R5F.js} +2 -2
- package/dist/{interactive-prompt-OMlqP7Lm.js → interactive-prompt-CtO5Tm6u.js} +2 -2
- package/dist/{manifest-read-BgZ6mR5R.js → manifest-read-BkijWyWk.js} +38 -3
- package/dist/modules/interactive-prompt/index.js +2 -2
- package/dist/{run-DHHryElL.js → run-B2duge-W.js} +60 -7
- package/dist/{run-DStT56J1.js → run-DRwOPt3k.js} +4 -4
- package/package.json +1 -1
- package/packs/bmad/prompts/probe-author.md +4 -0
package/dist/cli/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-
|
|
2
|
+
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-FUl73R5F.js";
|
|
3
3
|
import { createLogger } from "../logger-KeHncl-f.js";
|
|
4
4
|
import { createEventBus } from "../helpers-CElYrONe.js";
|
|
5
5
|
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-DiNK6QOD.js";
|
|
6
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-
|
|
6
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-B2duge-W.js";
|
|
7
7
|
import "../adapter-registry-DIcrxjH8.js";
|
|
8
|
-
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-
|
|
8
|
+
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-BkijWyWk.js";
|
|
9
9
|
import "../errors-B21JUhcc.js";
|
|
10
10
|
import "../routing-DFxoKHDt.js";
|
|
11
11
|
import { WorkGraphRepository } from "../work-graph-repository-DZyJv5pV.js";
|
|
12
12
|
import "../decisions-CzSIEeGP.js";
|
|
13
13
|
import "../decision-router-BAPpON_C.js";
|
|
14
|
-
import "../interactive-prompt-
|
|
14
|
+
import "../interactive-prompt-CtO5Tm6u.js";
|
|
15
15
|
import "../recovery-engine-BKGBeBnW.js";
|
|
16
16
|
import "../version-manager-impl-qFBiO4Eh.js";
|
|
17
17
|
import { registerUpgradeCommand } from "../upgrade-DB7KzD9c.js";
|
|
@@ -7052,7 +7052,7 @@ async function runStatusAction(options) {
|
|
|
7052
7052
|
logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
7053
7053
|
}
|
|
7054
7054
|
if (run === void 0) {
|
|
7055
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
7055
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-CoxLvCcT.js");
|
|
7056
7056
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
7057
7057
|
const processInfo = inspectProcessTree$1({
|
|
7058
7058
|
projectRoot,
|
|
@@ -8581,7 +8581,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8581
8581
|
await initSchema(expAdapter);
|
|
8582
8582
|
const { runRunAction: runPipeline } = await import(
|
|
8583
8583
|
/* @vite-ignore */
|
|
8584
|
-
"../run-
|
|
8584
|
+
"../run-DRwOPt3k.js"
|
|
8585
8585
|
);
|
|
8586
8586
|
const runStoryFn = async (opts) => {
|
|
8587
8587
|
const exitCode = await runPipeline({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-
|
|
1
|
+
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-FUl73R5F.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./dist-DiNK6QOD.js";
|
|
4
|
-
import "./manifest-read-
|
|
4
|
+
import "./manifest-read-BkijWyWk.js";
|
|
5
5
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
6
6
|
import "./decisions-CzSIEeGP.js";
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
2
|
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-DiNK6QOD.js";
|
|
3
|
-
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-
|
|
3
|
+
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-BkijWyWk.js";
|
|
4
4
|
import { createRequire } from "module";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1000,4 +1000,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
1000
1000
|
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, runHealthAction, validateStoryKey };
|
|
1003
|
-
//# sourceMappingURL=health-
|
|
1003
|
+
//# sourceMappingURL=health-FUl73R5F.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-
|
|
2
|
+
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-BkijWyWk.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import * as readline from "node:readline";
|
|
@@ -180,4 +180,4 @@ async function runInteractivePrompt(decisionContext) {
|
|
|
180
180
|
|
|
181
181
|
//#endregion
|
|
182
182
|
export { runInteractivePrompt };
|
|
183
|
-
//# sourceMappingURL=interactive-prompt-
|
|
183
|
+
//# sourceMappingURL=interactive-prompt-CtO5Tm6u.js.map
|
|
@@ -8,7 +8,7 @@ import { YAMLException, load } from "js-yaml";
|
|
|
8
8
|
import { existsSync, promises, readFileSync, readdirSync, statSync } from "node:fs";
|
|
9
9
|
import { execSync, spawn } from "node:child_process";
|
|
10
10
|
import * as path$2 from "node:path";
|
|
11
|
-
import { basename as basename$1, dirname as dirname$1, join as join$1, resolve as resolve$1 } from "node:path";
|
|
11
|
+
import { basename as basename$1, delimiter, dirname as dirname$1, join as join$1, resolve as resolve$1 } from "node:path";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { mkdir as mkdir$1, open, readFile as readFile$1, unlink as unlink$1, writeFile as writeFile$1 } from "node:fs/promises";
|
|
14
14
|
import * as fs from "fs";
|
|
@@ -2554,6 +2554,35 @@ function parseRuntimeProbes(storyContent) {
|
|
|
2554
2554
|
|
|
2555
2555
|
//#endregion
|
|
2556
2556
|
//#region packages/sdlc/dist/verification/probes/executor.js
|
|
2557
|
+
/**
|
|
2558
|
+
* H1.3 (hardening program, field finding #6): shape the probe environment so
|
|
2559
|
+
* probe commands run in the PROJECT'S environment, not the orchestrator's.
|
|
2560
|
+
*
|
|
2561
|
+
* The field failure: probe `registry-rejects-undeclared-source` ran bare
|
|
2562
|
+
* `python` from the inherited PATH — outside the project venv — and died with
|
|
2563
|
+
* `ModuleNotFoundError: No module named 'structlog'` even though the behavior
|
|
2564
|
+
* it tested passed in-env. That single false negative flipped an
|
|
2565
|
+
* LGTM_WITH_NOTES story to VERIFICATION_FAILED and destabilized the rest of
|
|
2566
|
+
* the run.
|
|
2567
|
+
*
|
|
2568
|
+
* When the working dir carries a project-local env (`.venv/bin` — created by
|
|
2569
|
+
* uv, venv, virtualenv alike), prepend it to PATH and set VIRTUAL_ENV so bare
|
|
2570
|
+
* `python`/`pytest`/console-script invocations resolve inside the project.
|
|
2571
|
+
* PATH prepending (rather than command rewriting) is quoting-hazard-free and
|
|
2572
|
+
* tool-agnostic. POSIX layout only (`bin/`) — matches substrate's supported
|
|
2573
|
+
* platforms; extend for `Scripts/` if Windows dispatch ever lands.
|
|
2574
|
+
*
|
|
2575
|
+
* Pure given (cwd, baseEnv) + exported for testing.
|
|
2576
|
+
*/
|
|
2577
|
+
function buildProbeEnv(cwd, baseEnv = process.env) {
|
|
2578
|
+
const venvBin = join$1(cwd, ".venv", "bin");
|
|
2579
|
+
if (!existsSync(venvBin)) return baseEnv;
|
|
2580
|
+
return {
|
|
2581
|
+
...baseEnv,
|
|
2582
|
+
VIRTUAL_ENV: join$1(cwd, ".venv"),
|
|
2583
|
+
PATH: `${venvBin}${delimiter}${baseEnv.PATH ?? ""}`
|
|
2584
|
+
};
|
|
2585
|
+
}
|
|
2557
2586
|
/** Return the last N bytes of a UTF-8 string (sliced by length for simplicity). */
|
|
2558
2587
|
function tail(text, bytes = PROBE_TAIL_BYTES) {
|
|
2559
2588
|
return text.length <= bytes ? text : text.slice(text.length - bytes);
|
|
@@ -3042,7 +3071,13 @@ function probesInvokeProductionTrigger(probes) {
|
|
|
3042
3071
|
for (const probe of probes) for (const pattern of TRIGGER_COMMAND_PATTERNS) if (pattern.test(probe.command)) return true;
|
|
3043
3072
|
return false;
|
|
3044
3073
|
}
|
|
3045
|
-
const defaultExecutors = { host: (probe, cwd) =>
|
|
3074
|
+
const defaultExecutors = { host: (probe, cwd) => {
|
|
3075
|
+
const effectiveCwd = cwd ?? process.cwd();
|
|
3076
|
+
return executeProbeOnHost(probe, {
|
|
3077
|
+
cwd: effectiveCwd,
|
|
3078
|
+
env: buildProbeEnv(effectiveCwd)
|
|
3079
|
+
});
|
|
3080
|
+
} };
|
|
3046
3081
|
var RuntimeProbeCheck = class {
|
|
3047
3082
|
name = "runtime-probes";
|
|
3048
3083
|
tier = "A";
|
|
@@ -6040,4 +6075,4 @@ async function resolveRunManifest(dbRoot, runId) {
|
|
|
6040
6075
|
|
|
6041
6076
|
//#endregion
|
|
6042
6077
|
export { FindingsInjector, RunManifest, RuntimeProbeListSchema, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, readCurrentRunId, renderFindings, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runStaleVerificationRecovery };
|
|
6043
|
-
//# sourceMappingURL=manifest-read-
|
|
6078
|
+
//# sourceMappingURL=manifest-read-BkijWyWk.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../logger-KeHncl-f.js";
|
|
2
2
|
import "../../dist-DiNK6QOD.js";
|
|
3
|
-
import "../../manifest-read-
|
|
4
|
-
import { runInteractivePrompt } from "../../interactive-prompt-
|
|
3
|
+
import "../../manifest-read-BkijWyWk.js";
|
|
4
|
+
import { runInteractivePrompt } from "../../interactive-prompt-CtO5Tm6u.js";
|
|
5
5
|
|
|
6
6
|
export { runInteractivePrompt };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-FUl73R5F.js";
|
|
2
2
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
3
3
|
import { TypedEventBusImpl, createEventBus, createTuiApp, isTuiCapable, printNonTtyWarning, sleep } from "./helpers-CElYrONe.js";
|
|
4
4
|
import { ADVISORY_NOTES, CLAUDE_AUTH_FAILURE_HINT, CODEX_SANDBOX_BLOCK_HINT, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, createStderrLogger, detectClaudeAuthFailure, detectCodexSandboxBlock, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-DiNK6QOD.js";
|
|
5
|
-
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-
|
|
5
|
+
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-BkijWyWk.js";
|
|
6
6
|
import { WorkGraphRepository, detectCycles } from "./work-graph-repository-DZyJv5pV.js";
|
|
7
7
|
import { deriveExitCode, routeDecision } from "./decision-router-BAPpON_C.js";
|
|
8
|
-
import { runInteractivePrompt } from "./interactive-prompt-
|
|
8
|
+
import { runInteractivePrompt } from "./interactive-prompt-CtO5Tm6u.js";
|
|
9
9
|
import { runRecoveryEngine } from "./recovery-engine-BKGBeBnW.js";
|
|
10
10
|
import { basename, dirname, extname, join } from "path";
|
|
11
11
|
import { access, readFile, readdir, stat } from "fs/promises";
|
|
@@ -13490,6 +13490,34 @@ function summarizeEscalationIssues(issues, cap = 4e3) {
|
|
|
13490
13490
|
* the opaque verdict. Best-effort: a probe failure yields an empty list (never
|
|
13491
13491
|
* blocks escalation). Exported for unit testing.
|
|
13492
13492
|
*/
|
|
13493
|
+
/**
|
|
13494
|
+
* H1.4 (hardening program, field finding #13): classify a story's ground-truth
|
|
13495
|
+
* git diff into implementation vs. pipeline-artifact changes.
|
|
13496
|
+
*
|
|
13497
|
+
* The field failure: story 2-3 returned status=complete with "239 tests pass"
|
|
13498
|
+
* while its branch contained ONLY the create-story spec file — zero source,
|
|
13499
|
+
* zero tests (the 239 were the pre-existing suite; true but vacuous). The
|
|
13500
|
+
* zero-diff gate never fired because the spec .md IS a diff entry.
|
|
13501
|
+
*
|
|
13502
|
+
* A file counts as implementation when it lives outside substrate's own
|
|
13503
|
+
* artifact trees (`_bmad-output/`, `.substrate/`). Story specs, planning
|
|
13504
|
+
* artifacts, and manifest state are pipeline bookkeeping — a "successful"
|
|
13505
|
+
* dev pass whose diff is bookkeeping-only produced no implementation.
|
|
13506
|
+
*
|
|
13507
|
+
* Pure + exported for unit testing.
|
|
13508
|
+
*/
|
|
13509
|
+
function classifyImplementationDiff(files) {
|
|
13510
|
+
const isArtifact = (f$1) => {
|
|
13511
|
+
const norm = f$1.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
13512
|
+
return norm.startsWith("_bmad-output/") || norm.startsWith(".substrate/");
|
|
13513
|
+
};
|
|
13514
|
+
const artifactOnly = files.filter(isArtifact);
|
|
13515
|
+
const hasImplementation = files.some((f$1) => !isArtifact(f$1));
|
|
13516
|
+
return {
|
|
13517
|
+
hasImplementation,
|
|
13518
|
+
artifactOnly
|
|
13519
|
+
};
|
|
13520
|
+
}
|
|
13493
13521
|
function detectWorkOutsideWorktree(effectiveProjectRoot, projectRoot, checkDiff) {
|
|
13494
13522
|
const inWorktreeMode = effectiveProjectRoot !== void 0 && projectRoot !== void 0 && effectiveProjectRoot !== projectRoot;
|
|
13495
13523
|
if (!inWorktreeMode) return [];
|
|
@@ -15700,6 +15728,31 @@ function createImplementationOrchestrator(deps) {
|
|
|
15700
15728
|
}
|
|
15701
15729
|
}
|
|
15702
15730
|
}
|
|
15731
|
+
if (devStoryWasSuccess && gitDiffFiles !== void 0 && gitDiffFiles.length > 0) {
|
|
15732
|
+
const implClassification = classifyImplementationDiff(gitDiffFiles);
|
|
15733
|
+
if (!implClassification.hasImplementation) {
|
|
15734
|
+
logger$27.warn({
|
|
15735
|
+
storyKey,
|
|
15736
|
+
artifactFiles: implClassification.artifactOnly.slice(0, 10)
|
|
15737
|
+
}, "dev-story reported success but the diff contains only pipeline artifacts — no implementation was produced");
|
|
15738
|
+
endPhase(storyKey, "dev-story", devStoryModel);
|
|
15739
|
+
updateStory(storyKey, {
|
|
15740
|
+
phase: "ESCALATED",
|
|
15741
|
+
error: "no-implementation",
|
|
15742
|
+
completedAt: new Date().toISOString()
|
|
15743
|
+
});
|
|
15744
|
+
await writeStoryMetricsBestEffort(storyKey, "escalated", 0);
|
|
15745
|
+
await emitEscalation({
|
|
15746
|
+
storyKey,
|
|
15747
|
+
lastVerdict: "no-implementation",
|
|
15748
|
+
reviewCycles: 0,
|
|
15749
|
+
issues: [`dev-story reported COMPLETE but every changed file is a pipeline artifact (${implClassification.artifactOnly.slice(0, 10).join(", ")}) — no source or test files were produced. Self-reported test results on such a story are vacuous (they exercise the pre-existing suite).`],
|
|
15750
|
+
escalationReason: "no-implementation"
|
|
15751
|
+
});
|
|
15752
|
+
await persistState();
|
|
15753
|
+
return;
|
|
15754
|
+
}
|
|
15755
|
+
}
|
|
15703
15756
|
let _devOutputCommitHookFailure;
|
|
15704
15757
|
const _commitFirstEligible = !noWorktree && _worktreeManager !== void 0 && effectiveProjectRoot !== void 0 && effectiveProjectRoot !== projectRoot;
|
|
15705
15758
|
if (_commitFirstEligible && effectiveProjectRoot !== void 0) {
|
|
@@ -29968,7 +30021,7 @@ var require_uri_all = __commonJS({ "node_modules/uri-js/dist/es5/uri.all.js"(exp
|
|
|
29968
30021
|
var damp = 700;
|
|
29969
30022
|
var initialBias = 72;
|
|
29970
30023
|
var initialN = 128;
|
|
29971
|
-
var delimiter = "-";
|
|
30024
|
+
var delimiter$1 = "-";
|
|
29972
30025
|
/** Regular expressions */
|
|
29973
30026
|
var regexPunycode = /^xn--/;
|
|
29974
30027
|
var regexNonASCII = /[^\0-\x7E]/;
|
|
@@ -30123,7 +30176,7 @@ var require_uri_all = __commonJS({ "node_modules/uri-js/dist/es5/uri.all.js"(exp
|
|
|
30123
30176
|
var i = 0;
|
|
30124
30177
|
var n$1 = initialN;
|
|
30125
30178
|
var bias = initialBias;
|
|
30126
|
-
var basic = input.lastIndexOf(delimiter);
|
|
30179
|
+
var basic = input.lastIndexOf(delimiter$1);
|
|
30127
30180
|
if (basic < 0) basic = 0;
|
|
30128
30181
|
for (var j$1 = 0; j$1 < basic; ++j$1) {
|
|
30129
30182
|
if (input.charCodeAt(j$1) >= 128) error$1("not-basic");
|
|
@@ -30185,7 +30238,7 @@ var require_uri_all = __commonJS({ "node_modules/uri-js/dist/es5/uri.all.js"(exp
|
|
|
30185
30238
|
}
|
|
30186
30239
|
var basicLength = output.length;
|
|
30187
30240
|
var handledCPCount = basicLength;
|
|
30188
|
-
if (basicLength) output.push(delimiter);
|
|
30241
|
+
if (basicLength) output.push(delimiter$1);
|
|
30189
30242
|
while (handledCPCount < inputLength) {
|
|
30190
30243
|
var m = maxInt;
|
|
30191
30244
|
var _iteratorNormalCompletion2 = true;
|
|
@@ -48068,4 +48121,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
|
|
|
48068
48121
|
|
|
48069
48122
|
//#endregion
|
|
48070
48123
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR$1 as GLOBSTAR, GitClient, GrammarLoader, Minimatch$1 as Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape$1 as escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runRunAction, runSolutioningPhase, unescape$1 as unescape, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
48071
|
-
//# sourceMappingURL=run-
|
|
48124
|
+
//# sourceMappingURL=run-B2duge-W.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-FUl73R5F.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-DiNK6QOD.js";
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-
|
|
6
|
-
import "./manifest-read-
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-B2duge-W.js";
|
|
6
|
+
import "./manifest-read-BkijWyWk.js";
|
|
7
7
|
import "./routing-DFxoKHDt.js";
|
|
8
8
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
9
9
|
import "./decisions-CzSIEeGP.js";
|
|
10
10
|
import "./decision-router-BAPpON_C.js";
|
|
11
|
-
import "./interactive-prompt-
|
|
11
|
+
import "./interactive-prompt-CtO5Tm6u.js";
|
|
12
12
|
import "./recovery-engine-BKGBeBnW.js";
|
|
13
13
|
|
|
14
14
|
export { runRunAction };
|
package/package.json
CHANGED
|
@@ -8,6 +8,10 @@ You are a **probe-author agent**. Your sole responsibility is to author `## Runt
|
|
|
8
8
|
|
|
9
9
|
## Context
|
|
10
10
|
|
|
11
|
+
### Project Environment
|
|
12
|
+
|
|
13
|
+
{{project_env}}
|
|
14
|
+
|
|
11
15
|
### Rendered Acceptance Criteria (Story Artifact)
|
|
12
16
|
|
|
13
17
|
The following is the story's rendered AC section, as produced by the create-story agent:
|