diff --git a/.agents/skills/impeccable/scripts/lib/staleness-deep.mjs b/.agents/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.agents/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.agents/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.claude/skills/impeccable/scripts/lib/staleness-deep.mjs b/.claude/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.claude/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.claude/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.cursor/skills/impeccable/scripts/lib/staleness-deep.mjs b/.cursor/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.cursor/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.cursor/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.gemini/skills/impeccable/scripts/lib/staleness-deep.mjs b/.gemini/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.gemini/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.gemini/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.github/skills/impeccable/scripts/lib/staleness-deep.mjs b/.github/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.github/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.github/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.grok/skills/impeccable/scripts/lib/staleness-deep.mjs b/.grok/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.grok/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.grok/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.kiro/skills/impeccable/scripts/lib/staleness-deep.mjs b/.kiro/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.kiro/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.kiro/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.opencode/skills/impeccable/scripts/lib/staleness-deep.mjs b/.opencode/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.opencode/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.opencode/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.pi/skills/impeccable/scripts/lib/staleness-deep.mjs b/.pi/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.pi/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.pi/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.qoder/skills/impeccable/scripts/lib/staleness-deep.mjs b/.qoder/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.qoder/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.qoder/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.rovodev/skills/impeccable/scripts/lib/staleness-deep.mjs b/.rovodev/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.rovodev/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.rovodev/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.trae-cn/skills/impeccable/scripts/lib/staleness-deep.mjs b/.trae-cn/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.trae-cn/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.trae-cn/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.trae/skills/impeccable/scripts/lib/staleness-deep.mjs b/.trae/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.trae/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.trae/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/.vibe/skills/impeccable/scripts/lib/staleness-deep.mjs b/.vibe/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/.vibe/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/.vibe/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage', diff --git a/plugin/skills/impeccable/scripts/lib/staleness-deep.mjs b/plugin/skills/impeccable/scripts/lib/staleness-deep.mjs index bae03bc98..8981b654a 100644 --- a/plugin/skills/impeccable/scripts/lib/staleness-deep.mjs +++ b/plugin/skills/impeccable/scripts/lib/staleness-deep.mjs @@ -117,6 +117,18 @@ export function checkDesignDrift({ designPath, projectRoot, threshold = 25 }) { * a section can be absent because it never applied, so this is reported as a * documentation gap for a human to judge, never as an error. */ +function hasCoverageValue(value) { + if (Array.isArray(value)) return value.some(hasCoverageValue); + if (value && typeof value === 'object') { + return Object.values(value).some(hasCoverageValue); + } + if (typeof value === 'string') { + const trimmed = value.trim(); + return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed); + } + return false; +} + export function checkDesignCoverage({ design, designPath, parseDesignMd }) { if (!design || typeof parseDesignMd !== 'function') return []; let model; @@ -126,7 +138,7 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) { return []; } const missing = ['colors', 'typography', 'components'] - .filter((section) => !model[section]); + .filter((section) => !model[section] && !hasCoverageValue(model.frontmatter?.[section])); if (!missing.length) return []; return [finding({ id: 'design-md-coverage',