Skip to content

✨ feat(skill): run natively on Codex with subagent-safe gates - #1

Merged
ndisisnd merged 1 commit into
mainfrom
feat/kermit-v4-codex
Aug 7, 2026
Merged

ndisisnd merged 1 commit into
mainfrom
feat/kermit-v4-codex

Conversation

@ndisisnd

@ndisisnd ndisisnd commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

kermit v4: the skill now runs natively in OpenAI Codex as well as Claude Code, from a single skill body — no fork. Codex subagents (codex exec / spawn_agent workers) can run every mode end-to-end with zero human gates and zero stalls, and report back through a structured kermit-result block.

Why this change is being made

kermit's protocols were welded to Claude Code specifics: ~25 literal AskUserQuestion calls, .claude/kermit/ paths, and hook-fed inputs. A Codex worker errors out the moment anything asks for approval, so kermit could not participate in Codex workflows at all. This PR isolates every harness-specific behaviour behind one resolution step so the same protocols serve both harnesses, interactive or not.

Specific changes

skills/kermit/SKILL.md

  • New harness resolution (runs first, once): HARNESS (claude|codex), KERMIT_DIR (env → .claude/kermit/ → .codex/kermit/ → create per harness), INTERACTIVE (false under codex exec, spawned subagents, headless claude -p).
  • New GATE(question, options, default) contract: interactive Claude → real AskUserQuestion tool call; interactive Codex → plain-chat question; non-interactive → stated default, silently.
  • New kermit-result closing block (mode / head / changelog_entry / pushed / published / gates) emitted by every mode.

skills/kermit/refs/ (all protocols)

  • Every AskUserQuestion site rewritten as GATE(...) with explicit non-interactive defaults; non-interactive runs force effective-auto gates and record gates: auto (non-interactive).
  • .claude/kermit/ → $KERMIT_DIR throughout, including gitignore snippets.
  • Commit step probes and seeds the changelog itself; the PreToolUse hook cache is a non-authoritative pre-warm.
  • Push/PR/publish steps tolerate no-network sandboxes: pushed: failed / published: no are handled, successful terminations with remediation lines.
  • protocol-init.md: zero-question bootstrap for non-interactive runs on uninitialized repos; merge-to-main guard branches per harness (Claude keeps hook wiring; Codex prints an AGENTS.md convention snippet).
  • New protocol-subagent.md: the worker contract for orchestrators — preconditions per mode, result shape, handled outcomes.

skills/kermit/agents/ (new)

  • openai.yaml: optional Codex skill declaration (SKILL.md alone is sufficient; verified against OpenAI docs 2026-08-07).
  • kermit-agent.toml: ready-to-copy Codex subagent role (.codex/agents/kermit.toml).

Installers & CI

  • install.sh / bin/kermit.js: --codex and --all flags; Codex target is ~/.agents/skills/kermit; same byte-identical skill body.
  • .github/workflows/ci.yml: existence + install-sync checks for the Codex adapter files.

Docs

  • README Codex section, llms.txt entry points, SECURITY.md paragraph on the non-interactive auto-gate policy (containment comes from the harness sandbox, not kermit's gates).

Other additional information

  • Codex marks the subagent TOML format experimental; both adapter files carry the doc URL and verification date to make drift easy to spot.
  • Statically validated against the v4 plan's acceptance criteria. Live tests still to run before merge: interactive Claude regression, Codex interactive, subagent end-to-end in a scratch repo, and the shared-repo numbering check.
  • package.json description/keywords still position kermit as Claude-Code-only — left for a follow-up.

- skills/kermit/SKILL.md: harness resolution (HARNESS / KERMIT_DIR / INTERACTIVE), GATE contract, kermit-result closing block
- skills/kermit/refs/*: AskUserQuestion → GATE(...) sweep with per-site non-interactive defaults; $KERMIT_DIR paths; sandbox-tolerant push/publish; zero-question bootstrap in init
- skills/kermit/refs/protocol-subagent.md: new worker contract for Codex orchestrators
- skills/kermit/agents/: openai.yaml skill declaration + kermit-agent.toml subagent role
- install.sh, bin/kermit.js: --codex / --all install targets (~/.agents/skills/kermit)
- README.md, llms.txt, SECURITY.md: Codex docs; non-interactive auto-gate policy
- .github/workflows/ci.yml: existence/sync checks for agents/ files
@ndisisnd
ndisisnd merged commit ef4c864 into main Aug 7, 2026
1 check passed
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