Merge branch 'next' into fix/1394-gemini-skill-tool-exclusion

This commit is contained in:
Tom Boucher
2026-06-20 17:49:11 -04:00
committed by GitHub
46 changed files with 315 additions and 88 deletions

View File

@@ -2210,8 +2210,18 @@ function cmdVerifyCodebaseDrift(cwd: string, raw: boolean): void {
else if (status === 'D') deleted.push(file);
}
const config = loadConfig(cwd);
const wf = config?.workflow as Record<string, unknown> | undefined;
// loadConfig() returns a flattened object — there is no nested `workflow`
// key. Read the raw config.json directly to access workflow-scoped keys,
// matching the pattern used in check-command-router.cts:readWorkflowConfig.
let wf: Record<string, unknown> | undefined;
try {
const rawCfg = JSON.parse(
fs.readFileSync(path.join(planningDir(cwd), 'config.json'), 'utf-8'),
) as Record<string, unknown>;
wf = rawCfg['workflow'] as Record<string, unknown> | undefined;
} catch {
wf = undefined;
}
const threshold =
Number.isInteger(wf?.drift_threshold) && (wf?.drift_threshold as number) >= 1
? (wf?.drift_threshold as number)