Skip to content

feat(pstack): add native Codex package - #285

Closed
0xjoma wants to merge 1 commit into
cursor:mainfrom
0xjoma:codex/pstack-native-compat
Closed

feat(pstack): add native Codex package#285
0xjoma wants to merge 1 commit into
cursor:mainfrom
0xjoma:codex/pstack-native-compat

Conversation

@0xjoma

@0xjoma 0xjoma commented Aug 28, 2026

Copy link
Copy Markdown

Summary

  • add a native Codex package at pstack/codex/ without changing the existing
    Cursor package
  • port all 48 pstack skill entry points, 23 Poteto Mode playbooks, supporting
    references, tools, tests, guide pages, and optional Benny workflows
  • route bounded work across Spark, Luna, Terra, and Sol while keeping every
    child at xhigh reasoning effort
  • replace Cursor-only task, transcript, lifecycle, and automation assumptions
    with supported Codex skills, agents, hooks, thread APIs, and scheduling
    boundaries
  • include an upstream lock, file-level port map, compatibility record,
    attribution, and update procedure

Codex package boundary

The existing pstack/ Cursor implementation remains authoritative and
unchanged; its README only gains a pointer to the new package.
pstack/codex/ is a standalone Codex plugin root with its own manifest,
skills, lifecycle hook, documentation, and validation tooling.

The core workflows are skills-only. The six custom-agent TOML profiles are
optional companion configuration because Codex plugins do not currently
distribute personal custom-agent profiles as a manifest component. Each skill
also carries direct spawn-time routing so the workflows do not depend on those
profiles being installed.

Compatibility decisions

  • Codex invocation uses $pstack:skill-name.
  • Explicit-only Cursor skills remain explicit-only through Codex skill policy.
  • Cursor task/background semantics map to native spawn, wait, message, and
    bounded follow-up operations.
  • Poteto Mode stickiness uses a trusted, session-scoped command hook with an
    explicit opt-out and bounded state lifetime.
  • Transcript-dependent workflows use accessible Codex thread APIs or degrade
    explicitly when transcript context is unavailable.
  • Benny remains optional. The port does not claim Slack-triggered inbound
    execution or a generic Codex automation webhook.
  • The parent retains integration, acceptance, security, release, and external
    action authority; workers never accept their own output.

The full migration matrix and product limits are documented in
pstack/codex/CODEX-COMPATIBILITY.md.

Validation

Automated validation completed against upstream commit
397c8660da6d3d873a91e18c2ca2f22cac1f0ac1:

  • validate_port.py: 48 skills, 42 explicit-only policies, six companion
    agents, hooks, manifest, and 157 mapped upstream files
  • official Codex plugin validator: pass
  • official Codex skill validator across all 48 skills: pass
  • Poteto Mode lifecycle hook tests: 5 pass
  • Poteto TypeScript tests: 52 pass, 0 fail
  • strict TypeScript typecheck: pass
  • git diff --check: pass

Manual local validation covered personal-marketplace installation, hook trust,
direct and explicit-only skill resolution, native delegation and model routing,
Poteto Mode activation and opt-out, referenced resources, clean-start behavior,
and documented failure/degradation paths.

Known limits

  • Large global plugin inventories can reduce implicit skill discovery; explicit
    $pstack:* invocation remains available.
  • Custom-agent profiles require optional local installation.
  • Slack inbound automation and generic webhook behavior require a separate
    authenticated integration and are not claimed by this port.

Note

Low Risk
Additive dual-target packaging and agent workflow assets; the existing Cursor plugin is unchanged aside from README cross-links.

Overview
Adds a standalone Codex plugin under pstack/codex/ while leaving the Cursor pstack/ tree intact; the root README only gains install/setup pointers to that package.

The new tree ships a .codex-plugin manifest, 48 ported skills (with agents/openai.yaml metadata and explicit-only policies where Cursor used disable-model-invocation), 23 Poteto Mode playbooks, guides, TypeScript tooling/tests, and optional Benny cron-oriented automation docs/templates. Cursor concepts are remapped to Codex: $pstack:skill-name invocation, native subagent spawn/wait at fixed Spark/Luna/Terra/Sol + xhigh, .agents/skills paths, and thread APIs instead of Cursor transcripts/tasks.

Optional companion custom-agent TOML profiles and an AGENTS.md routing fragment install via $pstack:setup-pstack (not bundled as manifest components). A session-scoped lifecycle hook (hooks/poteto_mode.py) persists explicit Poteto Mode activation across resume/compaction with opt-out and TTL.

Packaging/ops artifacts include UPSTREAM.lock.json, PORT-MAP.json, CODEX-COMPATIBILITY.md, and scripts to generate/sync metadata and validate the port (skill counts, forbidden Cursor tokens, link integrity, mapped upstream files).

Reviewed by Cursor Bugbot for commit 4c40810. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 4c40810. Configure here.


Findings must point to skills, tools, or MCPs invoked in this transcript. Speculative routings to skills the parent never opened do not count. To check whether a skill was used, scan the transcript for:

- File reads against a `SKILL.md` in the project's Codex skill root, `${CODEX_HOME:-~/.codex}/skills/`, or a plugin-provided skill path

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reflect misses personal skill path

Medium Severity · Bugbot Rules

Reflect reviewers detect used skills by scanning the project Codex skill root, ${CODEX_HOME:-~/.codex}/skills/, and a plugin path. That set omits personal ~/.agents/skills/, the Codex mapping for ~/.cursor/skills/. Sessions that only loaded a personal skill can be dropped as unused, so approved learnings never route.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by learned rule: Skill detection must cover all installation paths

Reviewed by Cursor Bugbot for commit 4c40810. Configure here.

"interface:",
f" display_name: {json.dumps(_display_name(name))}",
f" short_description: {json.dumps(_short_description(description))}",
f" default_prompt: {json.dumps(f'Use ${name} for this task.')}",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Metadata generator drops skill namespace

Medium Severity · Logic Bug

sync_skill_metadata.py writes default_prompt as Use $name instead of Use $pstack:name. Checked-in agents/openai.yaml files already use the namespaced form, so rerunning the generator during a re-port overwrites working prompts with invocations Codex will not resolve to this plugin.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4c40810. Configure here.


Opt in to a checkpoint when the invoker explicitly asks: "/architect with checkpoint," "stop and show me before implementing," or similar. Then surface the synthesized design and pause for sign-off.

The synthesis can ship as its own commit either way. That's the "scaffold first" mode of the **foundational-thinking** principle skill; subsequent commits read as filling in bodies against a stable contract. Planned and scoped breakage during fill-in is fine, per the **outcome-oriented-execution** principle skill. For adversarial pressure on the design before implementing, run the **interrogate** skill on the synthesized sketch.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Architect omits namespaced skill calls

Medium Severity · Logic Bug

Architect still tells the agent to run **how**, **why**, **arena**, and **interrogate**, and to opt into a checkpoint with /architect with checkpoint. Arena and interrogate are explicit-only, so those un-namespaced references can fail to load. Phase B then skips competing sketches and the checkpoint phrase does not match $pstack:architect.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4c40810. Configure here.

@0xjoma 0xjoma closed this Aug 28, 2026
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