Skip to content

feat: add Codex plugin compatibility - #2

Open
kkugot wants to merge 25 commits into
NovusEdge:mainfrom
kkugot:feature/codex-plugin-compatibility
Open

feat: add Codex plugin compatibility#2
kkugot wants to merge 25 commits into
NovusEdge:mainfrom
kkugot:feature/codex-plugin-compatibility

Conversation

@kkugot

@kkugot kkugot commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • package Palpatine once for Codex and Claude Code marketplaces
  • add Codex-native manifests, metadata, resource lookup, and subagent adapters
  • preserve Claude hooks and legacy root paths through compatibility symlinks
  • add validation, CI, and dual-host installation docs

Validation

  • Codex plugin-creator validator
  • all eight skill validators
  • repository compatibility validator
  • Node hook syntax and law-matcher smoke test
  • local palpatine@palpatine Codex installation

Summary by CodeRabbit

  • New Features
    • Expanded Codex support for Palpatine commands and skills, including new/updated interface metadata and invocation syntax.
    • Bundled reference datasets for 48 Laws of Power, 33 Strategies of War, and seduction guidance.
    • Enhanced multi-party simulation and “Unlimited Power” orchestration documentation.
    • Updated marketplace/plugin configuration for the Palpatine offering.
  • Documentation
    • Reworked installation, always-on toggles, and Windows checkout prerequisites; improved quick-lookup/search guidance and risk framing.
  • Bug Fixes
    • Improved hook activation messaging and reference lookup behavior for matching input and resolving law indexes.
  • Tests
    • Added “Validate plugins” workflow with Node compatibility and hook syntax checks.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kkugot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 31a65543-b1c8-464e-8536-3ab9754327b1

📥 Commits

Reviewing files that changed from the base of the PR and between e2f0d38 and 368b7ef.

📒 Files selected for processing (1)
  • scripts/validate-compatibility.mjs

Walkthrough

Palpatine is reorganized into a dual-host Claude Code and Codex plugin package with canonical manifests, symlinked wiring, host-specific skills, packaged reference data, updated hooks, bounded orchestration guidance, documentation, and automated compatibility checks.

Changes

Dual-host Palpatine packaging

Layer / File(s) Summary
Canonical manifests and repository wiring
.agents/plugins/marketplace.json, .claude-plugin/..., plugins/palpatine/..., hooks, skills
Adds Claude Code and Codex marketplace/manifests, host interface metadata, session hook configuration, and canonical symlink targets.
Host-compatible skills and reference data
plugins/palpatine/skills/*
Adds Codex interfaces, dual-host invocation and lookup instructions, plus law, war, and seduction reference indexes.
Hooks and bounded host orchestration
plugins/palpatine/hooks/*, plugins/palpatine/skills/adversary/*, plugins/palpatine/skills/unlimited-power/*
Updates prompt and law-path handling, adds host-specific activation output, and documents bounded waves, worker adapters, model inheritance, and termination guards.
Compatibility validation and contributor workflow
scripts/validate-compatibility.mjs, .github/workflows/validate.yml, README.md, CONTRIBUTING.md
Adds structural repository validation, CI execution, Windows symlink prerequisites, contributor checks, and Claude Code/Codex installation and usage documentation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • NovusEdge/palpatine#1: Both changes extend the unlimited-power bounded orchestration skill and its invocation entry.

Poem

A rabbit hops through plugins bright,
With Codex paths and hooks in flight.
Laws and strategies neatly align,
Bounded waves march in a careful line.
“Validate!” cries Bunny, ears held high—
Palpatine blooms beneath the sky.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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 main change: adding Codex plugin compatibility while keeping Claude Code support.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/palpatine/skills/palpatine/SKILL.md (1)

182-196: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Remove the blanket exemption from safety warnings.

The “No warning needed” rule suppresses risk framing for deception and career sabotage, contradicting the preceding exposure check and creating an anti-refusal path. Keep context-sensitive legal, consent, and harm warnings.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/palpatine/skills/palpatine/SKILL.md` around lines 182 - 196, Update
the “No warning needed” guidance in the Dark Arts section to remove the blanket
exemption for deception, reputation manipulation, and legitimate-means career
sabotage. Preserve context-sensitive legal, consent, and harm warnings, ensuring
these scenarios still receive appropriate risk framing instead of bypassing the
preceding exposure check.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/validate.yml:
- Around line 3-7: Add a workflow-level concurrency configuration alongside the
existing on triggers in the validation workflow. Use a stable group keyed to the
workflow and relevant ref, and enable cancellation of in-progress superseded
runs so only the latest validation run remains active.
- Around line 13-16: Harden the validation workflow by pinning both actions in
the checkout/setup-node steps to approved commit SHAs, adding least-privilege
workflow permissions including contents: read, and setting checkout’s
persist-credentials to false unless a later step explicitly requires
credentials.

In `@docs/superpowers/plans/2026-07-28-dual-codex-claude-plugin.md`:
- Around line 170-177: Replace the author-specific absolute paths in the
plugin-creator invocation, parser input, validator invocation, and codex plugin
marketplace add commands with repository-relative paths or portable environment
variables. Update all referenced occurrences, including the sections around the
cited lines, while preserving the commands’ intended behavior.

In `@docs/superpowers/specs/2026-07-28-dual-codex-claude-plugin-design.md`:
- Line 113: Update the skill presentation metadata requirement in the dual
Codex/Claude plugin design specification: change the statement around
agents/openai.yaml from optional to required in this repository, consistent with
the existing validator contract.
- Around line 75-76: Document that root compatibility requires true symlinks for
.claude-plugin/plugin.json, law_index.json, seduction_index.json, and
war_index.json, and explicitly test this prerequisite or provide a non-symlink
fallback. Apply the documentation or implementation guidance in
docs/superpowers/specs/2026-07-28-dual-codex-claude-plugin-design.md; the listed
root files require no direct changes unless implementing the fallback.
- Around line 81-87: Update the “The Codex manifest” section to remove the claim
that hooks, apps, and mcpServers are unsupported; describe their omission as an
intentional design choice, or explicitly scope the statement to the targeted
validator version.

In `@plugins/palpatine/skills/adversary/SKILL.md`:
- Around line 84-97: Add validation for the Codex adapter contract described in
the Host Adapters section, covering spawn_agent with fork_turns set to "none",
wait_agent mailbox completion, followup_task correction handling, exact
player-output keys, and inherited model behavior. Ensure the smoke test
exercises independent-player dispatch and correction flow rather than only the
unlimited-power loop, and update the instructions only after these behaviors are
verified against the target runtime.
- Line 202: Update the Claude Promise.all example and the Codex
parallel-dispatch guidance to schedule players in waves capped by
availableWorkerSlots, with no more than five total player models per invocation.
Await each wave’s completion before dispatching the next, ensuring no example
launches more workers than the current capacity.

In `@plugins/palpatine/skills/palpatine/SKILL.md`:
- Around line 98-103: Remove or revise the Codex activation claim in
plugins/palpatine/skills/palpatine/SKILL.md:98-103, documenting the toggle as
Claude-only or limiting Codex to always-on behavior. Update
plugins/palpatine/hooks/hooks.json:8-8 and
plugins/palpatine/hooks/activate.js:16-17 to remove or correct any Codex
disable/activation guidance; preserve the Claude command and toggle behavior.

In `@plugins/palpatine/skills/unlimited-power/SKILL.md`:
- Line 67: Update the effectiveWaveWidth calculation to use the configured
BUDGET.maxWidth value instead of the hard-coded 5. Preserve the existing limits
from availableWorkerSlots and remainingDispatchBudget when computing the final
width.
- Around line 109-114: The Codex dispatch instructions conflict on whether
user-requested model overrides are forwarded. Align the “Codex dispatchWorker”
step with the worker-forwarding guidance in the surrounding section: either
permit and describe forwarding overrides, or consistently require omitting them,
including the statement about inherited models.

In `@scripts/validate-compatibility.mjs`:
- Around line 225-236: Expand the skill iteration in the compatibility
validation around the existing skillName loop to cover all eight packaged
skills, including palpatine, laws, seduce, and war, while preserving both Claude
and Codex invocation checks. Prefer deriving the validated skill set from the
skills directory if that pattern is already available; otherwise add the missing
skill names to the existing set.
- Around line 118-147: Remove the AsyncFunction-based execution of loopSource
from the compatibility validation flow around runLoop. Replace it with
validation of the required loop contract against a separately maintained trusted
fixture or static assertions, ensuring Markdown-derived JavaScript is never
evaluated while preserving the existing compatibility checks.

---

Outside diff comments:
In `@plugins/palpatine/skills/palpatine/SKILL.md`:
- Around line 182-196: Update the “No warning needed” guidance in the Dark Arts
section to remove the blanket exemption for deception, reputation manipulation,
and legitimate-means career sabotage. Preserve context-sensitive legal, consent,
and harm warnings, ensuring these scenarios still receive appropriate risk
framing instead of bypassing the preceding exposure check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 58e0d504-35f5-4282-ae2f-ed610f34ab3d

📥 Commits

Reviewing files that changed from the base of the PR and between 3467a17 and 63c9ba3.

📒 Files selected for processing (46)
  • .agents/plugins/marketplace.json
  • .claude-plugin/marketplace.json
  • .claude-plugin/plugin.json
  • .claude-plugin/plugin.json
  • .codex-plugin
  • .github/plugin/marketplace.json
  • .github/plugin/marketplace.json
  • .github/workflows/validate.yml
  • CONTRIBUTING.md
  • README.md
  • docs/superpowers/plans/2026-07-28-dual-codex-claude-plugin.md
  • docs/superpowers/specs/2026-07-28-dual-codex-claude-plugin-design.md
  • hooks
  • law_index.json
  • law_index.json
  • plugins/palpatine/.claude-plugin/plugin.json
  • plugins/palpatine/.codex-plugin/plugin.json
  • plugins/palpatine/agents/openai.yaml
  • plugins/palpatine/hooks/activate.js
  • plugins/palpatine/hooks/hooks.json
  • plugins/palpatine/hooks/match-laws.js
  • plugins/palpatine/skills/adversary/SKILL.md
  • plugins/palpatine/skills/adversary/agents/openai.yaml
  • plugins/palpatine/skills/defense/SKILL.md
  • plugins/palpatine/skills/defense/agents/openai.yaml
  • plugins/palpatine/skills/laws/SKILL.md
  • plugins/palpatine/skills/laws/agents/openai.yaml
  • plugins/palpatine/skills/laws/references/law_index.json
  • plugins/palpatine/skills/palpatine/SKILL.md
  • plugins/palpatine/skills/palpatine/agents/openai.yaml
  • plugins/palpatine/skills/seduce/SKILL.md
  • plugins/palpatine/skills/seduce/agents/openai.yaml
  • plugins/palpatine/skills/seduce/references/seduction_index.json
  • plugins/palpatine/skills/unlimited-power/SKILL.md
  • plugins/palpatine/skills/unlimited-power/agents/openai.yaml
  • plugins/palpatine/skills/war/SKILL.md
  • plugins/palpatine/skills/war/agents/openai.yaml
  • plugins/palpatine/skills/war/references/war_index.json
  • plugins/palpatine/skills/wargame/SKILL.md
  • plugins/palpatine/skills/wargame/agents/openai.yaml
  • scripts/validate-compatibility.mjs
  • seduction_index.json
  • seduction_index.json
  • skills
  • war_index.json
  • war_index.json

Comment thread .github/workflows/validate.yml
Comment thread .github/workflows/validate.yml Outdated
Comment thread docs/superpowers/plans/2026-07-28-dual-codex-claude-plugin.md Outdated
Comment thread docs/superpowers/specs/2026-07-28-dual-codex-claude-plugin-design.md Outdated
Comment thread docs/superpowers/specs/2026-07-28-dual-codex-claude-plugin-design.md Outdated
Comment thread plugins/palpatine/skills/palpatine/SKILL.md
Comment thread plugins/palpatine/skills/unlimited-power/SKILL.md Outdated
Comment thread plugins/palpatine/skills/unlimited-power/SKILL.md
Comment thread scripts/validate-compatibility.mjs Outdated
Comment thread scripts/validate-compatibility.mjs Outdated
@kkugot

kkugot commented Jul 30, 2026

Copy link
Copy Markdown
Author

Addressed the outside-diff safety finding in c3cc31f: removed the blanket no-warning exemption and replaced it with context-sensitive legal, consent, retaliation, and material-harm risk framing. Follow-up commits also harden Codex worker collection, task naming, hook portability documentation, and compatibility validation. Fresh validation passes for both plugin manifests and all eight skills.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/palpatine/skills/adversary/SKILL.md`:
- Around line 181-198: Define userRequestedModel alongside the existing
dispatch-loop constants, using the established explicit user-requested-model
derivation for the current objective before it is passed to dispatchCodexPlayer;
keep the worker-wave scheduling logic unchanged.

In `@plugins/palpatine/skills/unlimited-power/SKILL.md`:
- Around line 141-156: Bound collectCodexWorkerFinals in
plugins/palpatine/skills/unlimited-power/SKILL.md (lines 141-156) with a
deadline or maximum wait count, and report any remaining worker tasks as gaps;
apply the same bounded behavior, including the post-followup_task wait, to
collectCodexPlayerFinals in plugins/palpatine/skills/adversary/SKILL.md (lines
157-177). Update scripts/validate-compatibility.mjs (lines 676-682 and the
matching adversary check at lines 607-613) to accept the bounded loop instead of
requiring the exact pendingWorkerTasks.size > 0 condition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ae0beebe-a067-4a20-a457-d3d82c83a750

📥 Commits

Reviewing files that changed from the base of the PR and between 63c9ba3 and b98f644.

📒 Files selected for processing (7)
  • .github/workflows/validate.yml
  • CONTRIBUTING.md
  • README.md
  • plugins/palpatine/skills/adversary/SKILL.md
  • plugins/palpatine/skills/palpatine/SKILL.md
  • plugins/palpatine/skills/unlimited-power/SKILL.md
  • scripts/validate-compatibility.mjs

Comment thread plugins/palpatine/skills/adversary/SKILL.md Outdated
Comment thread plugins/palpatine/skills/unlimited-power/SKILL.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/palpatine/skills/adversary/SKILL.md`:
- Around line 153-154: Remove the “No caveats” directive from the worker prompt
near the raw JSON response instructions, while preserving the exact-key
JSON-only requirement and the directive to state the most likely play.

In `@plugins/palpatine/skills/unlimited-power/SKILL.md`:
- Around line 271-272: Insert a blank line between the “Claude dispatchWorker:”
text and the opening JavaScript code fence in the unlimited-power skill
documentation, ensuring the fenced block is surrounded by blank lines to satisfy
markdownlint MD031.
- Around line 54-59: Fix the duplicated availableCodexWorkerSlots helper to
count agents whose agent_status object is not completed, rather than comparing
agent_status to status strings. Apply this change in
plugins/palpatine/skills/unlimited-power/SKILL.md lines 54-59 and
plugins/palpatine/skills/adversary/SKILL.md lines 188-193, preserving the
existing slot-limit calculation and enabling the no-capacity branch to trigger.

In `@scripts/validate-compatibility.mjs`:
- Around line 563-606: Update stripJavaScriptComments to recognize and preserve
JavaScript regex literals, including escaped characters and character classes,
before interpreting / as a comment delimiter. Track the lexical context needed
to distinguish regex starts from division operators, while retaining existing
string, line-comment, and block-comment behavior so patterns containing // or /*
are not truncated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5a1ca89b-871f-47db-ad19-3f7aa27d8595

📥 Commits

Reviewing files that changed from the base of the PR and between b98f644 and 51658c7.

📒 Files selected for processing (4)
  • README.md
  • plugins/palpatine/skills/adversary/SKILL.md
  • plugins/palpatine/skills/unlimited-power/SKILL.md
  • scripts/validate-compatibility.mjs

Comment thread plugins/palpatine/skills/adversary/SKILL.md Outdated
Comment thread plugins/palpatine/skills/unlimited-power/SKILL.md
Comment thread plugins/palpatine/skills/unlimited-power/SKILL.md
Comment thread scripts/validate-compatibility.mjs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/validate-compatibility.mjs`:
- Around line 719-1068: Update the template-literal handling in
stripJavaScriptComments so it parses ${...} interpolation expressions instead of
consuming them as literal text. Preserve structural characters and recursively
handle nested braces, strings, comments, regular expressions, and nested
template literals within interpolations; apply maskLiterals only to literal
portions while retaining interpolation structure for downstream checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 801145ae-82d8-49b4-8e58-3e0a8629e81f

📥 Commits

Reviewing files that changed from the base of the PR and between 51658c7 and e2f0d38.

📒 Files selected for processing (3)
  • plugins/palpatine/skills/adversary/SKILL.md
  • plugins/palpatine/skills/unlimited-power/SKILL.md
  • scripts/validate-compatibility.mjs

Comment thread scripts/validate-compatibility.mjs
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