Skip to content

feat(codex): ship native basecamp plugin#534

Open
yigitkonur wants to merge 17 commits into
basecamp:mainfrom
yigitkonur:feat/native-codex-plugin
Open

feat(codex): ship native basecamp plugin#534
yigitkonur wants to merge 17 commits into
basecamp:mainfrom
yigitkonur:feat/native-codex-plugin

Conversation

@yigitkonur

@yigitkonur yigitkonur commented Jul 15, 2026

Copy link
Copy Markdown

what changed

  • add a native Codex plugin manifest, Basecamp and doctor skills, and reviewed lifecycle hooks
  • add basecamp setup codex, Codex doctor checks, version parity, release stamping, and repository validation
  • document one-command and manual Codex setup while leaving the Claude plugin path unchanged

why

this gets codex users the same one-command setup without messing with the claude path.

test plan

  • go test ./internal/harness ./internal/commands -run "Codex|CodexHook" -timeout 60s
  • go test ./internal/release -run "Codex|Plugin"
  • focused golangci-lint, repository Codex checker, and official plugin validator
  • isolated Codex marketplace install: installed/enabled 0.7.2, both skills discovered in a fresh thread, both hooks listed in /hooks, hook fixtures exercised, and Codex doctor checks passed
  • bin/ci completed plugin, Go, and Actions lint stages; its full macOS run retains the existing internal/cli TestHardenConfigDir failures reproduced unchanged on main

Summary by cubic

Ships a native Codex plugin for Basecamp with one-command setup, lifecycle hooks, and health checks. Improves post-commit follow-ups by parsing shell commands with a Bash AST and modeling success states to avoid false positives; hardens release validation, de-duplicates checker errors, and handles invalid UTF‑8 without tracebacks. Doctor now surfaces Codex plugin health and version from a single Codex query with clear breadcrumbs.

  • New Features

    • Native Codex plugin bundle: .codex-plugin/plugin.json, icons, and hooks/hooks.json (SessionStart, PostToolUse).
    • CLI: hidden basecamp codex-hook {session-start,post-commit-check}; follow-ups run only after a successful git commit, never perform side effects; stronger detection via Bash AST parsing (mvdan.cc/sh) that handles env vars, env wrapper, quoting, chaining, and redirection; accurate success modeling from Codex tool output/response (nested JSON, status/exit code).
    • Setup: basecamp setup codex registers basecamp/claude-plugins, installs basecamp@37signals, upgrades the 37signals marketplace when already added, and verifies install.
    • Doctor: adds “Codex Plugin” and “Codex Plugin Version” checks with breadcrumbs; uses a single Codex plugin list query; version check is doctor-only and doesn’t block setup; basecamp doctor --json includes Codex diagnostics.
    • Skill: skills/basecamp-doctor/SKILL.md for diagnostics and remediation guidance.
    • Release/CI: stamps stable versions for Claude and Codex manifests; scripts/check-codex-plugin.py enforces strict semver, disallows unsupported manifest fields, validates hooks and command wiring (tolerates whitespace differences), de-duplicates errors, ensures Claude/Codex version parity, and gracefully handles invalid UTF‑8/unreadable files without stack traces; bin/ci runs the checker; release tests are OS-aware and verify Python 3 availability.
  • Migration

    • Run: basecamp setup codex.
    • Start a new Codex thread, then review and trust hooks with /hooks.
    • Verify: basecamp doctor --json.

Written for commit 63c5feb. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings July 15, 2026 06:58
@github-actions

Copy link
Copy Markdown

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .goreleaser.yaml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@github-actions github-actions Bot added commands CLI command implementations tests Tests (unit and e2e) skills Agent skills docs enhancement New feature or request labels Jul 15, 2026

Copilot AI 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.

Pull request overview

This PR adds first-class support for a native Codex plugin alongside the existing Claude Code integration, including plugin payload validation, lifecycle hooks, setup automation, and doctor diagnostics so Codex users can get a one-command setup path.

Changes:

  • Introduces a native Codex plugin manifest, hook payload, and a repository validator (scripts/check-codex-plugin.py) enforced by bin/ci.
  • Adds basecamp setup codex plus Codex-related doctor checks (plugin installed/enabled + version parity) and release stamping for .codex-plugin/plugin.json.
  • Documents Codex setup (automatic + manual) while keeping the Claude Code path intact.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
skills/basecamp-doctor/SKILL.md Adds a dedicated “doctor” skill describing how to run and interpret basecamp doctor --json safely.
scripts/stamp-codex-plugin-version.sh Adds a release helper to stamp the CLI version into the Codex plugin manifest.
scripts/release.sh Stamps + stages the Codex plugin manifest during stable releases and updates messaging.
scripts/check-codex-plugin.py Adds a repository contract/shape validator for the Codex plugin payload (manifest, hooks, wiring, version parity).
RELEASING.md Documents that stable releases update both Claude and Codex plugin metadata.
README.md Documents basecamp setup codex, manual install commands, and basecamp doctor --json coverage.
internal/release/codex_plugin_test.go Adds tests for stamping, repository validation, and release wiring/version parity.
internal/harness/codex.go Adds Codex detection and doctor checks (plugin presence + version parity) to the agent harness.
internal/harness/codex_test.go Adds unit tests covering Codex detection and the new doctor checks.
internal/commands/wizard_codex.go Implements basecamp setup codex to register marketplace, install plugin, and verify state.
internal/commands/wizard_codex_test.go Tests Codex setup command behavior (ordering, idempotency, failures, JSON output).
internal/commands/doctor.go Adds doctor breadcrumbs for Codex plugin failures/warnings to point users at basecamp setup codex.
internal/commands/doctor_test.go Tests Codex doctor integration wiring and breadcrumb behavior.
internal/commands/codex_hook.go Adds hidden basecamp codex-hook … commands used by Codex lifecycle hooks.
internal/commands/codex_hook_test.go Tests session-start context output and post-commit reference detection behavior.
internal/cli/root.go Registers the hidden Codex hook command group in the CLI root.
install.md Adds Codex setup docs (one-command + manual) and recommends basecamp doctor --json verification.
hooks/hooks.json Adds Codex-native lifecycle hook definitions for SessionStart and PostToolUse(Bash).
bin/ci Enforces Codex plugin payload validation via scripts/check-codex-plugin.py.
AGENTS.md Updates repository structure docs to include .codex-plugin/ and hooks/.
.goreleaser.yaml Stamps both Claude + Codex plugin versions for stable releases via GoReleaser hooks.
.codex-plugin/plugin.json Adds the native Codex plugin manifest (name/version/interface/skills/assets).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/check-codex-plugin.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 22 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread skills/basecamp-doctor/SKILL.md Outdated
Comment thread install.md Outdated
Comment thread internal/commands/codex_hook.go Outdated
Comment thread scripts/stamp-codex-plugin-version.sh Outdated
Comment thread scripts/check-codex-plugin.py Outdated
Comment thread internal/commands/wizard_codex.go
Comment thread internal/commands/codex_hook.go Outdated
Comment thread scripts/stamp-codex-plugin-version.sh Outdated
Comment thread scripts/check-codex-plugin.py Outdated
Comment thread internal/release/codex_plugin_test.go
Copilot AI review requested due to automatic review settings July 15, 2026 07:23
@yigitkonur

Copy link
Copy Markdown
Author

coordinated codex marketplace follow-up

The companion marketplace payload is ready at yigitkonur/claude-plugins@5607030 on branch feat/codex-marketplace.

GitHub currently denies contributor-created pull requests to basecamp/claude-plugins with CreatePullRequest permission errors, including from a separately authenticated fork owner. Basecamp crew will need to open the marketplace PR from that branch or cherry-pick 5607030 after this CLI payload merges. The CLI payload must merge first because the catalog entry tracks basecamp/basecamp-cli on main.

Copilot AI 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.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.

Comment thread internal/harness/codex_test.go
Comment thread scripts/check-codex-plugin.py
Copilot AI review requested due to automatic review settings July 15, 2026 07:38

Copilot AI 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.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated no new comments.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 11 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread internal/commands/codex_hook.go
Comment thread internal/commands/codex_hook.go Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 07:50

Copilot AI 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.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 7 comments.

Comment thread internal/commands/codex_hook.go Outdated
Comment thread internal/release/codex_plugin_test.go
Comment thread internal/release/codex_plugin_test.go
Comment thread internal/release/codex_plugin_test.go
Comment thread internal/release/codex_plugin_test.go
Comment thread internal/release/codex_plugin_test.go
Comment thread internal/release/codex_plugin_test.go

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread internal/commands/codex_hook.go
Comment thread internal/commands/codex_hook.go Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 08:04

Copilot AI 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.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Comment thread scripts/check-codex-plugin.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread internal/commands/codex_hook.go Outdated
Comment thread internal/commands/codex_hook.go Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 08:17
@github-actions github-actions Bot added the deps label Jul 15, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.

Comment thread scripts/check-codex-plugin.py Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 08:27

Copilot AI 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.

Pull request overview

Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.

Comment thread internal/harness/codex.go
Copilot AI review requested due to automatic review settings July 15, 2026 08:40

Copilot AI 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.

Pull request overview

Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.

Comment thread internal/harness/codex.go Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread internal/harness/codex_test.go
Comment thread internal/commands/doctor.go Outdated
Comment thread internal/commands/doctor.go Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 08:49

Copilot AI 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.

Pull request overview

Copilot reviewed 22 out of 24 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations deps docs enhancement New feature or request skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants