Skip to content

The design language that makes your AI harness better at design.

JavaScript

Sync generated provider output

github-actions[bot]8e3926a3aaf1
diff --git a/.agents/skills/impeccable/scripts/doctor.mjs b/.agents/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.agents/skills/impeccable/scripts/doctor.mjs
+++ b/.agents/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.agents/skills/impeccable/scripts/lib/staleness.mjs b/.agents/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.agents/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.agents/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.claude/skills/impeccable/scripts/doctor.mjs b/.claude/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.claude/skills/impeccable/scripts/doctor.mjs
+++ b/.claude/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.claude/skills/impeccable/scripts/lib/staleness.mjs b/.claude/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.claude/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.claude/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.cursor/skills/impeccable/scripts/doctor.mjs b/.cursor/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.cursor/skills/impeccable/scripts/doctor.mjs
+++ b/.cursor/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.cursor/skills/impeccable/scripts/lib/staleness.mjs b/.cursor/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.cursor/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.cursor/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.gemini/skills/impeccable/scripts/doctor.mjs b/.gemini/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.gemini/skills/impeccable/scripts/doctor.mjs
+++ b/.gemini/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.gemini/skills/impeccable/scripts/lib/staleness.mjs b/.gemini/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.gemini/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.gemini/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.github/skills/impeccable/scripts/doctor.mjs b/.github/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.github/skills/impeccable/scripts/doctor.mjs
+++ b/.github/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.github/skills/impeccable/scripts/lib/staleness.mjs b/.github/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.github/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.github/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.grok/skills/impeccable/scripts/doctor.mjs b/.grok/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.grok/skills/impeccable/scripts/doctor.mjs
+++ b/.grok/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.grok/skills/impeccable/scripts/lib/staleness.mjs b/.grok/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.grok/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.grok/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.hermes/skills/impeccable/scripts/doctor.mjs b/.hermes/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.hermes/skills/impeccable/scripts/doctor.mjs
+++ b/.hermes/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.hermes/skills/impeccable/scripts/lib/staleness.mjs b/.hermes/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.hermes/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.hermes/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.kiro/skills/impeccable/scripts/doctor.mjs b/.kiro/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.kiro/skills/impeccable/scripts/doctor.mjs
+++ b/.kiro/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.kiro/skills/impeccable/scripts/lib/staleness.mjs b/.kiro/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.kiro/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.kiro/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.opencode/skills/impeccable/scripts/doctor.mjs b/.opencode/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.opencode/skills/impeccable/scripts/doctor.mjs
+++ b/.opencode/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.opencode/skills/impeccable/scripts/lib/staleness.mjs b/.opencode/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.opencode/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.opencode/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.pi/skills/impeccable/scripts/doctor.mjs b/.pi/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.pi/skills/impeccable/scripts/doctor.mjs
+++ b/.pi/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.pi/skills/impeccable/scripts/lib/staleness.mjs b/.pi/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.pi/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.pi/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.qoder/skills/impeccable/scripts/doctor.mjs b/.qoder/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.qoder/skills/impeccable/scripts/doctor.mjs
+++ b/.qoder/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.qoder/skills/impeccable/scripts/lib/staleness.mjs b/.qoder/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.qoder/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.qoder/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.rovodev/skills/impeccable/scripts/doctor.mjs b/.rovodev/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.rovodev/skills/impeccable/scripts/doctor.mjs
+++ b/.rovodev/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.rovodev/skills/impeccable/scripts/lib/staleness.mjs b/.rovodev/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.rovodev/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.rovodev/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.trae-cn/skills/impeccable/scripts/doctor.mjs b/.trae-cn/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.trae-cn/skills/impeccable/scripts/doctor.mjs
+++ b/.trae-cn/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.trae-cn/skills/impeccable/scripts/lib/staleness.mjs b/.trae-cn/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.trae-cn/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.trae-cn/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.trae/skills/impeccable/scripts/doctor.mjs b/.trae/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.trae/skills/impeccable/scripts/doctor.mjs
+++ b/.trae/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.trae/skills/impeccable/scripts/lib/staleness.mjs b/.trae/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.trae/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.trae/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/.vibe/skills/impeccable/scripts/doctor.mjs b/.vibe/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/.vibe/skills/impeccable/scripts/doctor.mjs
+++ b/.vibe/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/.vibe/skills/impeccable/scripts/lib/staleness.mjs b/.vibe/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/.vibe/skills/impeccable/scripts/lib/staleness.mjs
+++ b/.vibe/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}
diff --git a/plugin/skills/impeccable/scripts/doctor.mjs b/plugin/skills/impeccable/scripts/doctor.mjs
index ca3105809..b311f0366 100644
--- a/plugin/skills/impeccable/scripts/doctor.mjs
+++ b/plugin/skills/impeccable/scripts/doctor.mjs
@@ -33,13 +33,8 @@ import {
stampProductSchema,
} from './lib/artifact-schema.mjs';
import {
- checkBuildPathUnset,
- checkConfig,
- checkDesignSidecar,
+ collectBootFindingGroups,
checkNativePlatformEvidence,
- checkProduct,
- checkProjectRoots,
- checkSurfaceBriefs,
designSidecarCandidatesFor,
} from './lib/staleness.mjs';
import {
@@ -106,34 +101,30 @@ async function collect(cwd, targetOptions) {
extractPlatform,
readFile: safeRead,
});
+ const bootFindings = collectBootFindingGroups(ctx, {
+ absDesignPath,
+ sidecarCandidates,
+ projectRootPatterns: readProjectRootPatterns(ctx.repoRoot),
+ targetCandidates: workspaceCandidates,
+ });
const findings = [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
- ...(ctx.product
- ? checkNativePlatformEvidence({
- projectRoot,
- platform: ctx.platform,
- product: ctx.product,
- productPath: ctx.productPath,
- })
- : []),
- ...checkDesignSidecar({ designPath: absDesignPath, sidecarCandidates, projectRoot }),
+ ...bootFindings.product,
+ ...bootFindings.nativePlatform,
+ ...bootFindings.designSidecar,
...checkDesignDrift({ designPath: absDesignPath, projectRoot }),
...checkDesignCoverage({ design: ctx.design, designPath: ctx.designPath, parseDesignMd }),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ ...bootFindings.config,
+ ...bootFindings.buildPath,
...checkDetectorIgnores({ projectRoot, knownRuleIds }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ ...bootFindings.surfaceBriefs,
...checkHookInstallation({
projectRoot,
repoRoot: ctx.repoRoot,
providerId: IMPECCABLE_PROVIDER_ID,
}),
...checkLegacyLiveState({ projectRoot }),
- ...checkProjectRoots({
- patterns: readProjectRootPatterns(ctx.repoRoot),
- candidates: workspaceCandidates,
- }),
+ ...bootFindings.projectRoots,
...workspaceResult.findings,
];
diff --git a/plugin/skills/impeccable/scripts/lib/staleness.mjs b/plugin/skills/impeccable/scripts/lib/staleness.mjs
index 80599095b..dde3b2715 100644
--- a/plugin/skills/impeccable/scripts/lib/staleness.mjs
+++ b/plugin/skills/impeccable/scripts/lib/staleness.mjs
@@ -488,41 +488,46 @@ export function describeWorkspaceContext(candidates = []) {
// ─── Tier 1 orchestration ──────────────────────────────────────────────────
/**
- * Everything a boot can afford. `ctx` is the loadContext result; `extras`
- * carries values the caller already computed so nothing is recomputed here.
+ * Everything a boot can afford, grouped by artifact so deeper reports can
+ * interleave their own checks without rebuilding this policy. `ctx` is the
+ * loadContext result; `extras` carries values the caller already computed so
+ * nothing is recomputed here.
*/
-export function collectBootFindings(ctx, extras = {}) {
- if (!ctx) return [];
+export function collectBootFindingGroups(ctx, extras = {}) {
+ if (!ctx) return {};
const projectRoot = ctx.projectRoot || process.cwd();
- const absProductPath = extras.absProductPath || null;
const absDesignPath = extras.absDesignPath || null;
- return [
- ...checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
+ return {
+ product: checkProduct(ctx.product, ctx.productPath || 'PRODUCT.md'),
// Only checked once a PRODUCT.md exists. Without one the boot already
// emits NO_PRODUCT_MD and routes into init, which asks for the platform
// directly; a second signal saying the same thing is noise.
- ...(ctx.product
+ nativePlatform: ctx.product
? checkNativePlatformEvidence({
projectRoot,
platform: ctx.platform,
product: ctx.product,
productPath: ctx.productPath,
})
- : []),
- ...checkDesignSidecar({
+ : [],
+ designSidecar: checkDesignSidecar({
designPath: absDesignPath,
sidecarCandidates: extras.sidecarCandidates || [],
projectRoot,
}),
- ...checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
- ...checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
- ...checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
- ...(extras.projectRootPatterns
+ config: checkConfig({ projectRoot, repoRoot: ctx.repoRoot }),
+ buildPath: checkBuildPathUnset({ projectRoot, repoRoot: ctx.repoRoot, product: ctx.product }),
+ surfaceBriefs: checkSurfaceBriefs({ candidates: ctx.surfaceBriefCandidates, projectRoot }),
+ projectRoots: extras.projectRootPatterns
? checkProjectRoots({
patterns: extras.projectRootPatterns,
candidates: extras.targetCandidates || [],
})
- : []),
- ];
+ : [],
+ };
+}
+
+export function collectBootFindings(ctx, extras = {}) {
+ return Object.values(collectBootFindingGroups(ctx, extras)).flat();
}