Architecture · Diagram Design

Codex hooks, with ArcKit as the control plane

Codex hooks, with ArcKit as the control plane One ArcKit hook script wired to six Codex lifecycle events, grouped as guardrail, context injector, and session logger, closing a memory loop from Stop back to SessionStart. GUARDRAIL CONTEXT LOGGER REALISED BY SPAWNS·JSON IN STATIC GUARDRAIL CONTEXT LOGGING WRITES SESSION GOAL Control-plane goal guarantee lives in the harness HARNESS Codex harness fires lifecycle events · JSON in · exit 2 / JSON out [[hooks.*]] in config.toml POLICY .codex/rules/ static allow · forbid fires before the model decides SCRIPT arckit-codex-hook.mjs one script · dispatches on argv node "$HOOK" <Event> HOOK PreToolUse taxonomy · secrets · files HOOK PermissionRequest whitelist MCP servers HOOK UserPromptSubmit block secrets · inject graph HOOK SessionStart prime workspace · load memory HOOK PostToolUse stamp provenance · reindex HOOK Stop classify · write memory STORE memory/sessions.md last 30 session log entries LEGEND SOLID · CONTROL FLOW DASHED · POLICY / MEMORY LOOP CORAL · THE ONE SCRIPT + LOOP