Add human component review and prepare Impeccable 4.4.0

Carry native comp capture and completion integrity fixes into the reviewed component workflow. Bump the skill to 4.4.0 and engine/platform pins to 0.1.6; keep publication separate from this release candidate.

AI assistance: implemented and validated with OpenAI Codex.
This commit is contained in:
Paul Bakaus
2026-09-13 20:41:09 -07:00
parent 2b9353be6d
commit 6a93a35293
233 changed files with 10689 additions and 266 deletions
+7
View File
@@ -0,0 +1,7 @@
// Source bundle embedded in the native engine; no Node/Bun is needed at runtime.
import { fileURLToPath } from 'node:url';
import { resolve } from 'node:path';
const root = fileURLToPath(new URL('../', import.meta.url));
const result = await Bun.build({ entrypoints: [resolve(root, 'ui/component-review/entry.ts')], target: 'browser', format: 'iife', minify: true });
if (!result.success) throw new AggregateError(result.logs, 'Component review bundle failed');
await Bun.write(resolve(root, 'crates/context/assets/component-review.js'), await result.outputs[0].text());
+21 -3
View File
@@ -94,10 +94,12 @@ const GROK_PROJECT_SCRIPTS = '.grok/skills/impeccable/scripts';
// `windows: true` adds the `commandWindows` sibling; only Codex-shaped
// consumers honor it, and an unknown key would fail Codex's strict parser if
// it were the other way round, so it stays opt-in per manifest.
function buildClaudeCompatibleHooks(matcher, scriptsDir, { windows = false } = {}) {
function buildClaudeCompatibleHooks(matcher, scriptsDir, { windows = false, sessionIdentity = false } = {}) {
const command = guardedLauncher(launcherIn(scriptsDir));
const commandWindows = windows ? windowsLauncherCommand(launcherCmdIn(scriptsDir)) : undefined;
return {
...(sessionIdentity ? { SessionStart: [{ hooks: [{ type: 'command', command,
timeout: TIMEOUT_SECONDS, statusMessage: 'Preparing build session' }] }] } : {}),
PostToolUse: [
{
matcher,
@@ -119,7 +121,7 @@ function buildClaudeCompatibleHooks(matcher, scriptsDir, { windows = false } = {
export function buildClaudeSettingsManifest() {
return {
description: 'Impeccable design detector: immediate-tier checks after Edit/Write on UI files, full-rule deep pass on Stop.',
hooks: buildClaudeCompatibleHooks('Edit|Write', CLAUDE_PROJECT_SCRIPTS),
hooks: buildClaudeCompatibleHooks('Edit|Write', CLAUDE_PROJECT_SCRIPTS, { sessionIdentity: true }),
};
}
@@ -131,7 +133,7 @@ export function buildClaudeSettingsManifest() {
// than `hooks`, failing the whole manifest (issue #330).
export function buildClaudePluginHooksManifest() {
return {
hooks: buildClaudeCompatibleHooks('Edit|Write', CLAUDE_PLUGIN_SCRIPTS),
hooks: buildClaudeCompatibleHooks('Edit|Write', CLAUDE_PLUGIN_SCRIPTS, { sessionIdentity: true }),
};
}
@@ -205,6 +207,20 @@ export function buildGrokHooksManifest() {
};
}
// Gemini's hook timeouts are milliseconds. BeforeTool transports only the
// session environment; AfterAgent uses the engine's shared completion check.
export function buildGeminiHooksManifest() {
const command = guardedLauncher('$GEMINI_PROJECT_DIR/.gemini/skills/impeccable/scripts/impeccable');
return { hooks: {
BeforeTool: [{ matcher: '^run_shell_command$', hooks: [{
name: 'impeccable-session', type: 'command', command, timeout: 5000,
}] }],
AfterAgent: [{ hooks: [{
name: 'impeccable-completion', type: 'command', command, timeout: 30000,
}] }],
} };
}
export function hooksJsonFor(provider, options = {}) {
switch (provider) {
case 'claude':
@@ -217,6 +233,8 @@ export function hooksJsonFor(provider, options = {}) {
return buildGitHubHooksManifest();
case 'grok':
return buildGrokHooksManifest();
case 'gemini':
return buildGeminiHooksManifest();
default:
return null;
}
+2
View File
@@ -43,6 +43,8 @@ export const PROVIDERS = {
configDir: '.gemini',
displayName: 'Gemini',
frontmatterFields: [],
emitHooks: 'gemini',
hooksManifestRel: 'settings.json',
},
dsh: {
provider: 'dsh',
+5
View File
@@ -29,6 +29,8 @@ export const SUITES = {
core: {
description: 'Build, provider transforms, hook manifests, plugin validators, and prose gates.',
triggers: [
/^ui\/component-review\//,
/^crates\/context\/assets\/component-review\.js$/,
...COMMON_INFRA_PATTERNS,
/^scripts\/(?!build-extension)/,
/^skill\/(SKILL\.src\.md|agents\/|reference\/|scripts\/)/,
@@ -43,6 +45,9 @@ export const SUITES = {
runner: 'bun',
files: [
'tests/build.test.js',
'tests/component-review-bundle.test.js',
'ui/component-review/model.test.ts',
'ui/component-review/viewport.test.ts',
'tests/lib/provider-blocks.test.js',
'tests/lib/transformers/provider-blocks.test.js',
'tests/lib/utils.test.js',