The design language that makes your AI harness better at design.
JavaScript
Fix Codex hook manifest schema
Paul Bakaus1a3f5d78bd09
diff --git a/.agents/skills/impeccable/scripts/hook-admin.mjs b/.agents/skills/impeccable/scripts/hook-admin.mjsindex 4a80e3345..ce4ec7b2b 100644--- a/.agents/skills/impeccable/scripts/hook-admin.mjs+++ b/.agents/skills/impeccable/scripts/hook-admin.mjs@@ -75,7 +75,6 @@ const HOOK_MANIFEST_TARGETS = [skillRel: '.agents/skills/impeccable',destRel: '.codex/hooks.json',manifest: () => ({- description: 'Impeccable design detector: runs after Edit/Write/apply_patch on UI files and surfaces findings as system reminders.',hooks: {PostToolUse: [{@@ -83,7 +82,7 @@ const HOOK_MANIFEST_TARGETS = [hooks: [{type: 'command',- command: 'node "$(git rev-parse --show-toplevel)/.agents/skills/impeccable/scripts/hook.mjs"',+ command: 'node ".agents/skills/impeccable/scripts/hook.mjs"',timeout: TIMEOUT_SECONDS,statusMessage: STATUS_MESSAGE,},diff --git a/.codex/hooks.json b/.codex/hooks.jsonindex fc2d539be..8f058ddaf 100644--- a/.codex/hooks.json+++ b/.codex/hooks.json@@ -1,5 +1,4 @@{- "description": "Impeccable design detector: runs after Edit/Write/apply_patch on UI files and surfaces findings as system reminders.","hooks": {"PostToolUse": [{@@ -7,7 +6,7 @@"hooks": [{"type": "command",- "command": "node \"$(git rev-parse --show-toplevel)/.agents/skills/impeccable/scripts/hook.mjs\"",+ "command": "node \".agents/skills/impeccable/scripts/hook.mjs\"","timeout": 5,"statusMessage": "Checking UI changes"}diff --git a/plugin/skills/impeccable/scripts/hook-admin.mjs b/plugin/skills/impeccable/scripts/hook-admin.mjsindex 4a80e3345..ce4ec7b2b 100644--- a/plugin/skills/impeccable/scripts/hook-admin.mjs+++ b/plugin/skills/impeccable/scripts/hook-admin.mjs@@ -75,7 +75,6 @@ const HOOK_MANIFEST_TARGETS = [skillRel: '.agents/skills/impeccable',destRel: '.codex/hooks.json',manifest: () => ({- description: 'Impeccable design detector: runs after Edit/Write/apply_patch on UI files and surfaces findings as system reminders.',hooks: {PostToolUse: [{@@ -83,7 +82,7 @@ const HOOK_MANIFEST_TARGETS = [hooks: [{type: 'command',- command: 'node "$(git rev-parse --show-toplevel)/.agents/skills/impeccable/scripts/hook.mjs"',+ command: 'node ".agents/skills/impeccable/scripts/hook.mjs"',timeout: TIMEOUT_SECONDS,statusMessage: STATUS_MESSAGE,},diff --git a/scripts/lib/transformers/hooks.js b/scripts/lib/transformers/hooks.jsindex 315230603..b25c4d7dc 100644--- a/scripts/lib/transformers/hooks.js+++ b/scripts/lib/transformers/hooks.js@@ -22,7 +22,7 @@ const TIMEOUT_SECONDS = 5;const STATUS_MESSAGE = 'Checking UI changes';const CLAUDE_PROJECT_HOOK = '${CLAUDE_PROJECT_DIR}/.claude/skills/impeccable/scripts/hook.mjs';const CLAUDE_PLUGIN_HOOK = '${CLAUDE_PLUGIN_ROOT}/skills/impeccable/scripts/hook.mjs';-const CODEX_PROJECT_HOOK = '$(git rev-parse --show-toplevel)/.agents/skills/impeccable/scripts/hook.mjs';+const CODEX_PROJECT_HOOK = '.agents/skills/impeccable/scripts/hook.mjs';const CURSOR_BEFORE_EDIT_SCRIPT = '.cursor/skills/impeccable/scripts/hook-before-edit.mjs';const GITHUB_PROJECT_HOOK = '$(git rev-parse --show-toplevel)/.github/skills/impeccable/scripts/hook.mjs';@@ -74,7 +74,6 @@ export function buildClaudePluginHooksManifest() {export function buildCodexHooksManifest() {return {- description: 'Impeccable design detector: runs after Edit/Write/apply_patch on UI files and surfaces findings as system reminders.',hooks: {PostToolUse: [{diff --git a/skill/scripts/hook-admin.mjs b/skill/scripts/hook-admin.mjsindex 4a80e3345..ce4ec7b2b 100644--- a/skill/scripts/hook-admin.mjs+++ b/skill/scripts/hook-admin.mjs@@ -75,7 +75,6 @@ const HOOK_MANIFEST_TARGETS = [skillRel: '.agents/skills/impeccable',destRel: '.codex/hooks.json',manifest: () => ({- description: 'Impeccable design detector: runs after Edit/Write/apply_patch on UI files and surfaces findings as system reminders.',hooks: {PostToolUse: [{@@ -83,7 +82,7 @@ const HOOK_MANIFEST_TARGETS = [hooks: [{type: 'command',- command: 'node "$(git rev-parse --show-toplevel)/.agents/skills/impeccable/scripts/hook.mjs"',+ command: 'node ".agents/skills/impeccable/scripts/hook.mjs"',timeout: TIMEOUT_SECONDS,statusMessage: STATUS_MESSAGE,},diff --git a/tests/hook-build.test.mjs b/tests/hook-build.test.mjsindex a9a4e8ca4..cad22a5d0 100644--- a/tests/hook-build.test.mjs+++ b/tests/hook-build.test.mjs@@ -49,6 +49,7 @@ describe('hook manifest builders', () => {it('builds Codex project-local hooks for the real detector hook', () => {const manifest = buildCodexHooksManifest();+ assert.equal(manifest.description, undefined);const group = manifest.hooks.PostToolUse[0];const handler = group.hooks[0];@@ -57,7 +58,7 @@ describe('hook manifest builders', () => {assert.equal(handler.timeout, 5);assert.equal(handler.statusMessage, 'Checking UI changes');expectCommand(handler.command, '.agents/skills/impeccable/scripts/hook.mjs');- assert.ok(handler.command.includes('git rev-parse --show-toplevel'));+ assert.ok(!handler.command.includes('git rev-parse --show-toplevel'));assert.ok(!handler.command.includes('${PLUGIN_ROOT}'));assert.equal(manifest.hooks.SessionStart, undefined);});diff --git a/tests/skills-cli.test.js b/tests/skills-cli.test.jsindex a829a055d..491e1ca0e 100644--- a/tests/skills-cli.test.js+++ b/tests/skills-cli.test.js@@ -99,8 +99,7 @@ function createFakeUniversalBundle(root, providers = ['.claude', '.agents', '.cuif (providers.includes('.agents')) {mkdirSync(join(bundleRoot, '.codex'), { recursive: true });writeFileSync(join(bundleRoot, '.codex', 'hooks.json'), JSON.stringify({- description: 'fresh codex hook',- hooks: { PostToolUse: [{ matcher: 'apply_patch', hooks: [{ type: 'command', command: 'node "$(git rev-parse --show-toplevel)/.agents/skills/impeccable/scripts/hook.mjs"' }] }] },+ hooks: { PostToolUse: [{ matcher: 'apply_patch', hooks: [{ type: 'command', command: 'node ".agents/skills/impeccable/scripts/hook.mjs"' }] }] },}, null, 2));}return bundleRoot;