← Back to Pull requests

feat: add codex_hooks to point the Codex manifest at Codex-only hook files #32

Closed
unknown closed this pull request without merging on Nov 22, 2026 20:25 UTC
View on GitHub
unknown unknown commented on Nov 22, 2026 20:19 UTC
Author

Adds an optional codex_hooks key to plugin.meta.toml. Use it when a plugin needs Codex-only hook files. Bumps the version to 0.5.0.

Why: Claude Code and Codex both load hooks/hooks.json by default. A hook command that names its harness, such as brot hook claude-code … or brot hook codex …, therefore cannot share that file. Codex can use other hook files instead, named by the manifest hooks entry: "If a manifest defines hooks, Codex uses those manifest entries instead of the default hooks/hooks.json" (learn.chatgpt.com/docs/hooks, plugin-bundled hooks). harness-kit 0.4.0 could not write that entry, and plugin.meta.toml rejected unknown keys.

What changes

  • codex_hooks takes a ./-prefixed path, or a non-empty list of them, and must stay inside the plugin root. Anything else raises ValueError.

  • When it is set, .codex-plugin/plugin.json gets "hooks": <value>. The Claude manifest and both marketplaces are unchanged.

  • When it is absent, the output is byte-identical to before.

  • README and PROJECTS (P02) are updated.
  • Verified

  • just all passes: fmt, lint, typecheck, and 86 tests, 8 of them new.

  • End to end, generated for a scratch copy of bitrot-sanitation-skill with codex_hooks = "./hooks/codex-hooks.json". codex plugin add into a throwaway CODEX_HOME installed a cached .codex-plugin/plugin.json carrying that hooks entry. A Codex session was not run, because the throwaway home has no login.
  • After merge: tag v0.5.0 on the merge commit, then pin it in bitrot-sanitation-skill (P02-T02).

    https://claude.ai/code/session_01HuEtW5qBg4F1Qg9dnQ8W5b

    <!-- codesmith:footer -->
    ---
    <a href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797970781&installation_model_id=425421&pr_number=32&ref=codesmith_pr_footer&repository=smorinlabs%2Fharness-kit&return_to=https%3A%2F%2Fgithub.com%2Fsmorinlabs%2Fharness-kit%2Fpull%2F32&variant=run_proof&signature=0b09f4948968078c15aed68be679141180eb7d33fd834df35a0af21d2455008c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-v2-light.svg"><img alt="Run Proof" src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-v2-dark-3x.png" width="102" height="28"></picture></a>
    <sup><a href="https://app.blacksmith.sh/smorinlabs/codesmith/harness-kit/pr/32?autoLogin=true&ref=codesmith_pr_footer">Open in [code]smith</a> · Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup>

    <!-- codesmith:autofix:disabled -->
    <!-- /codesmith:footer -->

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Added support for specifying one or more hook-file paths for Codex plugins. These appear in the Codex manifest; Claude manifests remain unchanged.
    Documentation
    Updated project documentation with the new Codex hook configuration and its path requirements.
    Chores
    Updated the project version to 0.5.0.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 409 lines (+306 / -103) across 5 files Reviewer: greptile-apps[bot] Review duration: 5m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 409 lines diff across 5 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 56% · Reviewer familiarity: 35%
    45%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.360
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #32"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 45.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.9% (MEDIUM) · Higher = larger blast radius
    49.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 45.1% · Lower = rushed or shallow review
    45.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 27.4% · Safe to merge
    27.4%