feat(review): codex on-disk skill discovery in $name form · Entire
feat(review): codex on-disk skill discovery in $name form
ed5f528→main
Codex's DiscoverReviewSkills was a Phase-1 stub returning nil, while spawn-time validation (VerifyConfiguredSkillsInstalled) rejects any configured skill that is neither a curated builtin nor discovered — so every on-disk codex skill configured in $name form hard-failed with 'configured review skill(s) not installed'. This repo's own saved $code-reviewer config hit it on every run.
Ports the discovery slice from closed #1370 (applies verbatim — the touched files did not diverge and no open PR overlaps them):
- skilldiscovery gains the generic SKILL.md scanners (skills dir, versioned plugin cache with semver pick, frontmatter parse, dedupe) parameterized by invocation form (SlashForm/DollarForm).
- claude-code's discovery delegates to the shared scanners; its own discovery tests pass unchanged, pinning identical behavior.
- codex discovers ~/.codex/{skills,plugins/cache,superpowers} in $name / $plugin:name form — the literal token codex's skill system resolves.
- codex's curated '/review' builtin is removed: the interactive TUI slash command never fires through codex exec, so validating it was a lie. Configs still naming '/review' for codex now fail validation with the reconfigure hint (honest — that path never invoked a real skill); on-disk skills like $code-reviewer validate and run.
Verified against the real ~/.codex on this machine: $code-reviewer, $review-swarm, $superpowers: * et al discovered correctly.
Sessions
01KWYW70EFC8JERS2Q1FRNFXKYView transcript
Changes
8
- cmd/entire/cli
- agent
- claudecode
- Mdiscovery.go+24/-260
- codex
- MAGENT.md+9/-1
- Mdiscovery.go+43/-6
- Mdiscovery_test.go+97/-7
- skilldiscovery
- Mregistry.go+14/-5
- Mregistry_test.go+4/-2
- Ascan.go+257
- claudecode
- agent
Gaps & Limitations
- Hooks require feature flag: The
hooksfeature isdefault_enabled: false(stage: UnderDevelopment). It must be enabled via--enable hooksCLI flag, orfeatures.hooks = trueinconfig.toml, or-c features.hooks=true. Without this, hooks.json is ignored entirely. - Hooks require feature flag: The
codex_hooksfeature isdefault_enabled: false(stage: UnderDevelopment). It must be enabled via--enable codex_hooksCLI flag, orfeatures.codex_hooks = trueinconfig.toml, or-c features.codex_hooks=true. Without this, hooks.json is ignored entirely. - No SessionEnd hook: Codex does not fire a hook when a session is completely terminated. The
Stophook fires at end-of-turn, not end-of-session. This is similar to some other agents — the framework handles this gracefully. - PreToolUse is shell-only: Currently only fires for
Bashtool (direct shell execution). MCP tools, stdin streaming, and other tool types are not yet hooked. PostToolUse is in review. - Transcript may be null: In
--ephemeralmode,transcript_pathis null. The integration should handle this gracefully.