Skip to content

chore: integrate hk agent workflow - #11936

Merged
jdx merged 1 commit into
mainfrom
codex/hk-agent-integration
Aug 12, 2026
Merged

jdx merged 1 commit into
mainfrom
codex/hk-agent-integration

Conversation

@jdx

@jdx jdx commented Aug 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • bump hk from 1.54.0 to 1.55.0
  • migrate hk.pkl to the v1.55 schema and classify custom commands as read or write
  • configure hk's MCP server for project-local Codex sessions
  • document the safe, exact-file agent workflow

Why

hk 1.55.0 adds its agent-native workflow, including MCP support, structured output, exact file scoping, and effect-aware safe execution. The existing custom command strings were classified as unknown, so --safe could not run until the project configuration declared their effects.

Validation

  • hk validate
  • exact-file hk run check --safe --format json --files0-from -
  • mise run lint-fix
  • git diff --check

AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.


Note

Low Risk
Dev-tooling and hook config only; no runtime mise behavior changes, though misclassified write effects could affect what --safe allows agents to run.

Overview
Upgrades pinned hk to 1.55.0 in mise.lock and retargets hk.pkl to the v1.55 config package so lint hooks use the new schema.

Every custom linter command in hk.pkl is wrapped in CommandSpec with explicit read or write effects (including fix steps and checks like cargo-check), and shellcheck / shfmt set match_any = null so behavior matches the updated builtins. That unblocks hk run check --safe for agent-driven linting.

.codex/config.toml registers the project-local hk mcp server for Codex. AGENTS.md documents preferring that MCP path, safe JSON/JSONL output, and scoping with --files0-from / --cd.

Reviewed by Cursor Bugbot for commit 5446fa6. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Documentation

    • Added guidance for using the hk workflow, including direct invocations, changed-file scoping, and approval requirements for unknown or destructive commands.
  • Chores

    • Added configuration for the hk MCP server, enabling supported tooling to run with the project root as its working scope.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: bea5c3df-93d4-4682-bdee-29a144a2a889

📥 Commits

Reviewing files that changed from the base of the PR and between 085b130 and 5446fa6.

⛔ Files ignored due to path filters (2)
  • hk.pkl is excluded by !**/*.pkl
  • mise.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .codex/config.toml
  • AGENTS.md

📝 Walkthrough

Walkthrough

The repository now configures the hk MCP server and documents approved hk agent workflows, including machine-readable checks, changed-file scoping, and approval for unknown or destructive commands.

Changes

hk workflow

Layer / File(s) Summary
Configure hk and document usage
.codex/config.toml, AGENTS.md
The Codex configuration invokes hk mcp --root .. The agent guidance documents hk MCP usage, JSON and JSONL checks, changed-file scoping, and approval requirements.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

I’m a rabbit with config in tow,
hk helps the clean checks flow.
JSON paths stay neat and bright,
Scoped files keep the burrow right.
Ask before commands unknown—
Then hop safely homeward grown.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: integrating the hk agent workflow and related project configuration and documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR upgrades hk to 1.55.0 and integrates its agent-oriented workflow.

  • Migrates custom hk commands to effect-classified CommandSpec entries.
  • Adds an hk MCP server for project-local Codex sessions.
  • Documents safe, exact-file agent usage.
  • Updates the locked hk binaries and checksums for supported platforms.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The hk schema migration, MCP configuration, workflow documentation, and lockfile update are internally consistent, and the investigated edge cases did not expose a current reachable failure.

Important Files Changed

Filename Overview
hk.pkl Migrates to the hk 1.55 schema, classifies custom commands by effect, and clears inherited shell-linter selectors where custom globs are used; no actionable defect was established.
.codex/config.toml Registers the hk MCP server with the repository root argument; no concrete startup failure was established.
AGENTS.md Documents effect-aware, safe, machine-readable, exact-file hk workflows consistently with the stated migration.
mise.lock Updates hk 1.54.0 to 1.55.0 with corresponding platform URLs, asset identifiers, and checksums.

Reviews (1): Last reviewed commit: "chore: integrate hk agent workflow" | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▄▅▁█▄▆▇▇▆▇▇▇▆▅▃ 80,713,661 → 80,632,209 -0.10% 20.70 → 18.89ms -8.73%
hook-env ▁▂▁▄▁▃▅▄▃▂▅▃▄▂█ 82,138,504 → 82,286,245 +0.18% 19.02 → 19.36ms +1.80%
ls ▇▇▆█▇▇▇▃▃▃▃▂▁▁▁ 73,238,293 → 73,227,790 -0.01% 16.29 → 16.57ms +1.72%
registry ███████▁▁▁▁▁▁▁▁ 43,158,485 → 43,161,574 +0.01% 11.52 → 11.78ms +2.27%
startup ▁▁▁▄▁▄▅▆█▇█▆█▃▂ 15,545,812 → 15,542,887 -0.02% 9.35 → 9.64ms +3.15%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

5446fa6327cc vs 44dc62d2bf1f · measured on the runner, not pushed to the history.

@jdx
jdx merged commit 145d008 into main Aug 12, 2026
31 checks passed
@jdx
jdx deleted the codex/hk-agent-integration branch August 12, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant