kibi-codex
v2.14.0
Published
Kibi Codex plugin - thin adapter for Codex MCP integration
Readme
kibi-codex
Optional Codex plugin for Kibi. It bundles Kibi's skills, MCP configuration and warning-only lifecycle hooks. At session start the hook adds the shared Kibi session brief (search for recorded intent before changing behaviour, record decisions with their reason, run kibi check --staged before finishing, ask before making a recorded rule false), the kibi-usage skill, and a note when the git hooks are missing. Before apply_patch changes code linked to a requirement, the hook adds that requirement, what it must keep true, its decision and its tests to the agent's context. Before it changes a source file no symbol links to a requirement, the hook adds a one-time note with the kb_search call that finds requirements which may already describe that behavior (docs, tests and .kb/ get no note). After an edit of a source file, the PostToolUse hook names the kb_check impact call next to the tool result (once per file per session). When the turn ends after source edits that no impact check covered, the Stop hook continues the turn once with the edited files and the exact kb_check call (decision: "block"; Codex shows systemMessage only to you, so that would not reach the agent). While a Stop hook already continued the turn (stop_hook_active), the reminder goes to you as a systemMessage instead. Session state lives in PLUGIN_DATA; without it (hooks configured outside a plugin), a per-user temp directory. The hooks also keep decisions in view while the agent works: before an edit changes code that implements a firm requirement, the agent is told to ask the person first (once per requirement per session; KIBI_CONFIRM_FIRM_EDITS=0 turns this off, since Codex hooks cannot ask the person themselves); a prompt that states a rule gets a note to record it with kb_upsert; its words help pick candidate requirements for unlinked files; and when the turn ends after source edits with nothing recorded in the knowledge base, the Stop hook continues the turn once to ask for that record. When the session wrote a requirement and kibi signoff has not run since, the Stop hook continues the turn once to show you the signoff view: plain Markdown with each requirement's statement, firmness, origin and proof state, plus a full page in .kb/briefs/signoff/latest.html.
The plugin is optional and builds on kibi-core, kibi-cli and kibi-mcp, which you install in the project first. It does not replace them.
Install
Add the Kibi repository marketplace, open Codex, run /plugins, choose Kibi Plugins and install kibi-codex:
codex plugin marketplace add Looted/kibi
codexThe plugin only activates in workspaces that ran kibi init (a project root with .kb/manifest.json); elsewhere its hooks exit silently. Without the plugin, register the server directly:
codex mcp add kibi -- npx --no-install kibi-mcpSee the Codex plugin guide for details and host limitations.
Links
License
AGPL-3.0-or-later
