import { existsSync, readdirSync, readFileSync } from 'node:fs'; import { basename, dirname, join, relative, resolve } from 'node:path'; import { spawnSync } from 'node:child_process'; import type { WorkflowConfig } from '../types.js'; import { parseFrontmatter } from '../lib/frontmatter.js'; /** Empty-shell detection patterns — template placeholders that indicate a file was created by CLI but never filled by agent. */ export const EMPTY_SHELL_PATTERNS: RegExp[] = [ /^- \[ \] ⚠️ PLACEHOLDER_/m, /^- \[ \] 需求\d/m, /^