fix: clean workflow helper extraction lint
This commit is contained in:
parent
426fea7334
commit
e154dad930
3 changed files with 27 additions and 32 deletions
|
|
@ -9,23 +9,6 @@ import { existsSync } from "node:fs";
|
|||
import { basename, join } from "node:path";
|
||||
import { getLoadedSkills } from "@singularity-forge/pi-coding-agent";
|
||||
import { buildExtractionStepsBlock } from "./commands-extract-learnings.js";
|
||||
import {
|
||||
inlineFile,
|
||||
inlineFileOptional,
|
||||
inlineFileSmart,
|
||||
} from "./io-helpers.js";
|
||||
import {
|
||||
buildSliceSummaryExcerpt,
|
||||
getDependencyTaskSummaryPaths,
|
||||
getPriorTaskSummaryPaths,
|
||||
isSummaryCleanForSkip,
|
||||
} from "./summary-helpers.js";
|
||||
import {
|
||||
buildCarryForwardSection,
|
||||
buildResumeSection,
|
||||
checkNeedsReassessment,
|
||||
checkNeedsRunUat,
|
||||
} from "./workflow-helpers.js";
|
||||
import {
|
||||
computeBudgets,
|
||||
resolveExecutorContextWindow,
|
||||
|
|
@ -35,12 +18,16 @@ import {
|
|||
formatOverridesSection,
|
||||
loadActiveOverrides,
|
||||
loadFile,
|
||||
parseContinue,
|
||||
parseSummary,
|
||||
parseTaskPlanFile,
|
||||
} from "./files.js";
|
||||
import { assertGateCoverage, getGatesForTurn } from "./gate-registry.js";
|
||||
import { inlineGraphSubgraph } from "./graph-context.js";
|
||||
import {
|
||||
inlineFile,
|
||||
inlineFileOptional,
|
||||
inlineFileSmart,
|
||||
} from "./io-helpers.js";
|
||||
import { injectKnowledgeIntPrompt } from "./knowledge-injector.js";
|
||||
import {
|
||||
formatMemoriesForPrompt,
|
||||
|
|
@ -81,8 +68,17 @@ import {
|
|||
formatDecisionsCompact,
|
||||
formatRequirementsCompact,
|
||||
} from "./structured-data-formatter.js";
|
||||
import {
|
||||
buildSliceSummaryExcerpt,
|
||||
getDependencyTaskSummaryPaths,
|
||||
getPriorTaskSummaryPaths,
|
||||
} from "./summary-helpers.js";
|
||||
import { composeInlinedContext } from "./unit-context-composer.js";
|
||||
import { getUatType, hasVerdict } from "./verdict-parser.js";
|
||||
import { getUatType } from "./verdict-parser.js";
|
||||
import {
|
||||
buildCarryForwardSection,
|
||||
buildResumeSection,
|
||||
} from "./workflow-helpers.js";
|
||||
import { logWarning } from "./workflow-logger.js";
|
||||
|
||||
// ─── Preamble Cap ─────────────────────────────────────────────────────────────
|
||||
|
|
@ -925,9 +921,6 @@ export function extractMarkdownSection(content, heading) {
|
|||
export function escapeRegExp(value) {
|
||||
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
}
|
||||
function oneLine(text) {
|
||||
return text.replace(/\s+/g, " ").trim();
|
||||
}
|
||||
// Re-exported from workflow-helpers.js:
|
||||
// - buildResumeSection, buildCarryForwardSection
|
||||
// - checkNeedsReassessment, checkNeedsRunUat
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@
|
|||
*/
|
||||
|
||||
import { loadFile, parseSummary } from "./files.js";
|
||||
import {
|
||||
relSlicePath,
|
||||
resolveSliceFile,
|
||||
resolveTasksDir,
|
||||
resolveTaskFiles,
|
||||
} from "./paths.js";
|
||||
import { relSlicePath, resolveTaskFiles, resolveTasksDir } from "./paths.js";
|
||||
|
||||
/**
|
||||
* Extract and format a slice summary as a compact excerpt.
|
||||
|
|
@ -183,8 +178,15 @@ export function isSummaryCleanForSkip(content) {
|
|||
return false;
|
||||
}
|
||||
// Check for critical keywords in narrative
|
||||
const narrative = `${s.deviations} ${s.knownLimitations} ${s.followUps}`.toLowerCase();
|
||||
const criticalKeywords = ["critical", "blocker", "blocked", "fail", "error"];
|
||||
const narrative =
|
||||
`${s.deviations} ${s.knownLimitations} ${s.followUps}`.toLowerCase();
|
||||
const criticalKeywords = [
|
||||
"critical",
|
||||
"blocker",
|
||||
"blocked",
|
||||
"fail",
|
||||
"error",
|
||||
];
|
||||
if (criticalKeywords.some((kw) => narrative.includes(kw))) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
import { existsSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { loadFile, parseContinue, parseSummary } from "./files.js";
|
||||
import { resolveSliceFile } from "./paths.js";
|
||||
import { loadFile, parseSummary, parseContinue } from "./files.js";
|
||||
import { isDbAvailable } from "./sf-db.js";
|
||||
import { hasVerdict } from "./verdict-parser.js";
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ function extractMarkdownSection(content, heading) {
|
|||
* - The last completed slice already has an assessment file
|
||||
* - All slices are complete (milestone done — no point reassessing)
|
||||
*/
|
||||
export async function checkNeedsReassessment(base, mid, _state, prefs) {
|
||||
export async function checkNeedsReassessment(base, mid, _state, _prefs) {
|
||||
// DB primary path
|
||||
try {
|
||||
const { getMilestoneSlices } = await import("./sf-db.js");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue