-
Notifications
You must be signed in to change notification settings - Fork 209
feat(plugins): add codex plugin package #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "basic-memory-local", | ||
| "interface": { | ||
| "displayName": "Basic Memory Local" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "codex", | ||
| "source": { | ||
| "source": "local", | ||
| "path": "./plugins/codex" | ||
| }, | ||
| "policy": { | ||
| "installation": "AVAILABLE", | ||
| "authentication": "ON_INSTALL" | ||
| }, | ||
| "category": "Developer Tools" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { | ||
| "name": "codex", | ||
| "version": "0.1.0+codex.20260604201213", | ||
| "description": "A Codex-native bridge to Basic Memory for durable engineering context, decisions, and resumable checkpoints.", | ||
| "author": { | ||
| "name": "Basic Machines", | ||
| "email": "hello@basicmachines.co", | ||
| "url": "https://basicmemory.com" | ||
| }, | ||
| "homepage": "https://docs.basicmemory.com", | ||
| "repository": "https://github.com/basicmachines-co/basic-memory/tree/main/plugins/codex", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "basic-memory", | ||
| "codex", | ||
| "memory", | ||
| "knowledge-graph", | ||
| "mcp", | ||
| "checkpoints" | ||
| ], | ||
| "skills": "./skills/", | ||
| "mcpServers": "./.mcp.json", | ||
| "interface": { | ||
| "displayName": "Basic Memory for Codex", | ||
| "shortDescription": "Carry decisions, active work, and handoffs across Codex threads", | ||
| "longDescription": "Use Basic Memory for Codex to orient from your durable knowledge graph, capture engineering decisions, checkpoint long-running work, and resume with repo-backed context across Codex sessions.", | ||
| "developerName": "Basic Machines", | ||
| "category": "Developer Tools", | ||
| "capabilities": [ | ||
| "Interactive", | ||
| "Read", | ||
| "Write" | ||
| ], | ||
| "websiteURL": "https://basicmemory.com", | ||
| "privacyPolicyURL": "https://basicmemory.com/privacy", | ||
| "termsOfServiceURL": "https://basicmemory.com/terms", | ||
| "defaultPrompt": [ | ||
| "Use Basic Memory to orient before changing this repo.", | ||
| "Checkpoint this Codex thread into Basic Memory.", | ||
| "Capture the decision we just made." | ||
| ], | ||
| "brandColor": "#2563EB", | ||
| "composerIcon": "./assets/app-icon.png", | ||
| "logo": "./assets/logo.png" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "mcpServers": { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For bundled Codex plugin MCP configs, the current OpenAI plugin docs accept either a direct server map or a wrapped Useful? React with 👍 / 👎. |
||
| "basic-memory": { | ||
| "command": "uvx", | ||
| "args": [ | ||
| "basic-memory", | ||
| "mcp" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Basic Memory Codex Plugin Development | ||
|
|
||
| This plugin is developed in-place from the Basic Memory repository. Codex installs local plugins | ||
| through marketplaces, so local testing uses a repo-local marketplace wrapper rather than publishing | ||
| anything external. | ||
|
|
||
| ## Local Marketplace | ||
|
|
||
| The repo marketplace lives at: | ||
|
|
||
| ```text | ||
| .agents/plugins/marketplace.json | ||
| ``` | ||
|
|
||
| It exposes this plugin as: | ||
|
|
||
| ```text | ||
| codex@basic-memory-local | ||
| ``` | ||
|
|
||
| The marketplace entry points at `./plugins/codex`, resolved relative to the repository root. | ||
|
|
||
| ## First-Time Setup | ||
|
|
||
| From the repository root: | ||
|
|
||
| ```bash | ||
| codex plugin marketplace add "$(git rev-parse --show-toplevel)" | ||
| codex plugin add codex@basic-memory-local | ||
| ``` | ||
|
|
||
| Start a new Codex thread after installing. New threads are the reliable boundary for picking up | ||
| plugin skills, hooks, and MCP configuration. | ||
|
|
||
| Plugin installation is user-level in Codex, so one install makes the plugin available across | ||
| projects on the same machine. Repo-specific memory routing still comes from each checkout's | ||
| `.codex/basic-memory.json`. | ||
|
|
||
| ## Iteration Loop | ||
|
|
||
| After changing files in `plugins/codex`, run the local checks: | ||
|
|
||
| ```bash | ||
| just package-check-codex | ||
| ``` | ||
|
|
||
| Then update the manifest cachebuster and reinstall from the local marketplace: | ||
|
|
||
| ```bash | ||
| python3 "$CODEX_PLUGIN_CREATOR_SCRIPTS/update_plugin_cachebuster.py" \ | ||
| "$(git rev-parse --show-toplevel)/plugins/codex" | ||
| codex plugin add codex@basic-memory-local | ||
| ``` | ||
|
|
||
| Start a fresh Codex thread to test the updated plugin. | ||
|
|
||
| ## Useful Checks | ||
|
|
||
| List configured marketplaces: | ||
|
|
||
| ```bash | ||
| codex plugin marketplace list | ||
| ``` | ||
|
|
||
| List plugins Codex can see: | ||
|
|
||
| ```bash | ||
| codex plugin list | ||
| ``` | ||
|
|
||
| Run the full package validation gate when touching plugin packaging, shared skills, or integration | ||
| metadata: | ||
|
|
||
| ```bash | ||
| just package-check | ||
| ``` | ||
|
|
||
| To also run Codex's scaffold validator during `just package-check-codex`, set | ||
| `CODEX_PLUGIN_VALIDATOR` to the local `plugin-creator` validator script before | ||
| running the check. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Basic Memory for Codex | ||
|
|
||
| Basic Memory for Codex is the Codex-native bridge between a working coding thread | ||
| and Basic Memory's durable knowledge graph. | ||
|
|
||
| It is not a 1:1 copy of the Claude Code plugin. This version leans into Codex | ||
| workflows: repo orientation, long-running goals, changed-file evidence, explicit | ||
| verification, decision capture, and resumable checkpoints. | ||
|
|
||
| ## What It Does | ||
|
|
||
| - **Orient from memory.** The `bm-orient` skill reads active tasks, open | ||
| decisions, and recent Codex checkpoints before substantial work. | ||
| - **Checkpoint work.** The `bm-checkpoint` skill and `PreCompact` hook write | ||
| `type: codex_session` notes with the current work cursor. | ||
| - **Capture decisions.** The `bm-decide` skill records durable engineering | ||
| decisions with rationale, alternatives, and consequences. | ||
| - **Remember lightly.** The `bm-remember` skill saves small facts without turning | ||
| them into a full decision or session note. | ||
| - **Share deliberately.** The `bm-share` skill copies personal notes to configured | ||
| team projects only after confirmation. | ||
| - **Report status.** The `bm-status` skill shows configuration, reachability, and | ||
| recent memory state. | ||
|
|
||
| ## Package Contents | ||
|
|
||
| | Path | Role | | ||
| | --- | --- | | ||
| | `.codex-plugin/plugin.json` | Codex plugin manifest | | ||
| | `.mcp.json` | Basic Memory MCP server configuration | | ||
| | `hooks/hooks.json` | SessionStart and PreCompact hook registration | | ||
| | `hooks/session-start.sh` | Injects a compact memory brief at thread start | | ||
| | `hooks/pre-compact.sh` | Writes an automatic Codex checkpoint before compaction | | ||
| | `skills/` | Codex-native Basic Memory workflows | | ||
| | `schemas/` | Seed schemas for Codex sessions, decisions, and tasks | | ||
|
|
||
| ## Configuration | ||
|
|
||
| Plugin installation is user-level in Codex. Install `codex@basic-memory-local` | ||
| once and Codex can load the plugin across projects on the same machine. | ||
| The `.codex/basic-memory.json` file is still per repository: it maps that | ||
| checkout to the Basic Memory project and folders the hooks should use. | ||
|
|
||
| Run the setup skill, or create `.codex/basic-memory.json` in a repo: | ||
|
|
||
| ```json | ||
| { | ||
| "basicMemory": { | ||
| "primaryProject": "my-project", | ||
| "secondaryProjects": [], | ||
| "teamProjects": {}, | ||
| "focus": "code/dev", | ||
| "captureFolder": "codex-sessions", | ||
| "rememberFolder": "codex-remember", | ||
| "recallTimeframe": "7d", | ||
| "placementConventions": "Put decisions in decisions/ and work checkpoints in codex-sessions/." | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Codex plugin hooks must be reviewed and trusted before they run. Open `/hooks` in | ||
| Codex after enabling the plugin and trust the Basic Memory hook definitions. | ||
|
|
||
| ## Development | ||
|
|
||
| From this directory: | ||
|
|
||
| ```bash | ||
| just check | ||
| ``` | ||
|
|
||
| From the repo root: | ||
|
|
||
| ```bash | ||
| just package-check-codex | ||
| ``` | ||
|
|
||
| The package intentionally keeps Codex-specific configuration separate from | ||
| Claude's `.claude/settings.json`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "description": "Basic Memory for Codex hooks - orient from the graph on session start and checkpoint before compaction.", | ||
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "matcher": "startup|resume|compact", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a user starts a fresh context with Useful? React with 👍 / 👎. |
||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "${PLUGIN_ROOT}/hooks/session-start.sh", | ||
| "statusMessage": "Loading Basic Memory context", | ||
| "timeout": 30 | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "PreCompact": [ | ||
| { | ||
| "matcher": "manual|auto", | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "${PLUGIN_ROOT}/hooks/pre-compact.sh", | ||
| "statusMessage": "Checkpointing Codex work to Basic Memory", | ||
| "timeout": 60 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this plugin is installed or
just package-check-codexis run, the manifest points Codex and the validator at./.mcp.json, but no such file is included in the newplugins/codextree (I checked withrg --files plugins/codex .agents scripts | rg '(^|/)\.mcp\.json$|mcp'). The new validator then exits withMissing JSON file: /workspace/basic-memory/plugins/codex/.mcp.json, so the newly added package check fails and the plugin has no Basic Memory MCP server configuration to load.Useful? React with 👍 / 👎.